1

I'll like to reserved the first 2 GB to the RAM because my hardware write in this position to the memory RAM and I need to the kernel don't touch this part to the memory.

I read to use this option need launch the order memmap in the bootloader and the bootloader to I use is U-Boot because I'm dessing to Driver-Kernel in Yocto OS.

I read this to example to use the memmap:

memmap=nn[KMG]$ss[KMG]
    [KNL,ACPI] Mark specific memory as reserved.
    Region of memory to be reserved is from ss to ss+nn.
    Example: Exclude memory from 0x18690000-0x1869ffff
             memmap=64K$0x18690000
             or
             memmap=0x10000$0x18690000
    Some bootloaders may need an escape character before '$',
    like Grub2, otherwise '$' and the following number
    will be eaten.

And I don't know to use in this case, thankyou

EDIT: New question

I write this option in the U-Boot, using memmap=2G$0x00000000 and memmap=7fffffff$0x00000000, don't return exception, I guess I write this correctly but in cat / proc / iomem I do not see anything that tells me this memory is reserved for memory.

Would you need to modify .dtb?

  • Finally I need to modify the .dtb for declare the "partition" RAM memory also I write in the U-Boot memmap=0x7fffffff\$0x00000000 now I'm trying write this option in the U-Boot because I need to update Kernel and I like to don't wirte .dtb again. If I can, I'll write the finall solution to this problem for the future people to need reserve physical RAM memory. – Daniel Oct 23 '18 at 13:09
0

I think you'd better use "mem" attribute in Uboot at the boot time, see here:

In order to reserve memory to not be used by Linux running on the SoC Cortex-A9, the Linux kernel must be told what is the top of memory (highest addressable RAM address). All RAM addresses beyond this address can be used for other purposes outside the Linux OS.

The highest addressable RAM address can be set in U-boot by added the "mem=..." Linux boot argument to the bootargs U-boot environment variable.

Below is an example U-boot command line command to set the top of memory to 0x3E800000 :

setenv bootargs console=ttyS0,115200 mem=1000M

Please note that the "mmcboot", "ramboot" and "qspiboot" U-boot environment variables also override the bootargs environment variable. If using these variables, the bootargs may also need to be modified within these variables.

The default U-boot environment variables are defined for the SoC with the "uboot-socfpga\include\configs\socfpga_common.h" C header file.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.