This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM625: ERROR: reserving fdt memory region failed

Part Number: AM625

Tool/software:

Hi:

when my board boots up, it will show these log

ERROR: reserving fdt memory region failed (addr=xxxxxxxx size=xxxxxxxx flags=4)
ERROR: reserving fdt memory region failed (addr=xxxxxxxx size=xxxxxxxx flags=4)
ERROR: reserving fdt memory region failed (addr=xxxxxxxx size=xxxxxxxx flags=4)
ERROR: reserving fdt memory region failed (addr=xxxxxxxx size=xxxxxxxx flags=4)
ERROR: reserving fdt memory region failed (addr=xxxxxxxx size=xxxxxxxx flags=4)

I checked the code in uboot:

uboot loades the dtb of kernel which we add reserved-memory regions.

In uboot, it runs

image_setup_linux----------->if(CONFIG_IS_ENABLE(OF_LIBFDT))------------>

boot_fdt_add_mem_rsv_regions------------------>

boot_fdt_reserve_region -------------------->

lmb_reserve_flasg----------------->

lmb_add_region_flags

In lmb_add_region_flags, the flags of my reserve memory regions are LMB_NOMAP, but the flag of rgn->region[0] is LMB_NONE

So it returns -1.

How can we solve these error?

  • Hi Tom.

    Please attach the full boot log.

  • ## Flattened Device Tree blob at  0xXXXXXXXX 

       Booting using the fdt blob at 0xXXXXXXXX 

    Working FDT set to 0xXXXXXXXX 

       Loading Ramdisk to xxxxxx, end xxxxxxx .....OK

    ERROR: reserving fdt memory region failed (addr=9cc00000 size=e00000 flags=4)

       Loading Device Tree to xxxxxxx, end xxxxxxx ......OK

    Working FDT set to 0xXXXXXXXX 

  • Hi need to see the *full* console log.

    By the way, how do you get "0xXXXXXXXX" in the log? I never saw this before.

  • ## Flattened Device Tree blob at 88000000
    Booting using the fdt blob at 0x88000000
    Working FDT set to 88000000
    Loading Ramdisk to 8f15e000, end 8ffffa3d ... OK
    ERROR: reserving fdt memory region failed (addr=9cb00000 size=100000 flags=4)
    ERROR: reserving fdt memory region failed (addr=9cc00000 size=e00000 flags=4)
    ERROR: reserving fdt memory region failed (addr=9da00000 size=100000 flags=4)
    ERROR: reserving fdt memory region failed (addr=9db00000 size=c00000 flags=4)
    ERROR: reserving fdt memory region failed (addr=9e800000 size=1800000 flags=4)
    Loading Device Tree to 000000008f14d000, end 000000008f15d4fd ... OK
    Working FDT set to 8f14d000

  • boot_up_crash.zip

    Hi Bin:

    Here is the boot up log.

  • Hi Tom,

    The log has message about SPINAND and GPMC. Which AM625 interface does the board boot from?

    The log also has the following message.

        DRAM:  448 MiB (effective 512 MiB)

    It seems your board has 512MB DDR, but U-Boot is only configured use to 448MB. How exactly did you configured U-Boot to remove this 64MB DDR in U-Boot? Did you use CONFIG_SYS_MEM_TOP_HIDE in defconfig or something else?

  • Yes,We use the CONFIG_SYS_MEM_TOP_HIDE to remove the 64M in u-boot

  • What made you decide the 64M number?

    After removed 64MB from the top of 512MB, the upper DDR address is 0x9C000000. Then those reserved addresses in fdt are out of the range, of cause they will fail in reservation.

  • Hi Bin:

    If we don't remove this, the board can't boot up.

    For this ,we have checked with Yong.

  • Dear Tom.

    1. please refer to this ticket, AM623: uboot can‘t boot normally in our customer board - Processors forum - Processors - TI E2E support forums

    test with CONFIG_SYS_MEM_TOP_HIDE=0x02500000

    2. please share your code change (config file"configs/am62x_lpsk_a53_defconfig", uboot dts and full log) if there still problem.

    thanks a lot!

    yong

  • Hi Yong:

    I think Bin is right.

    for 512M DDR.the range is 0x80000000 - 0xA0000000

    If we removed 64M, the range is 0x80000000 - 0x9C000000

    The reserved memory offset is after 0x9C000000

  • Dear Tom.

    yes, please check Bin's answer in that ticket,

    please help try test CONFIG_SYS_MEM_TOP_HIDE=0x02500000.

    and provide log and code if there still problem.

    thanks a lot!

    yong

  • Hi Yong:

    I changed CONFIG_SYS_MEM_TOP_HIDE=0x02500000. But still have the log

    ERROR: reserving fdt memory region failed

    This ticket is want to solve these error reserve memory log.We can boot up kernel and rootfs normally.But maybe some times crash like another ticket.

    When boots up, u-boot shows these error log, but in kernel and rootfs, these are thses reseve memory regions.

    But we want to verify whether these error logs are correct? If incorrect, how to solve?

    change_CONFIG_SYS_MEM_TOP_HIDE_log.zip

  • But maybe some times crash like another ticket.

    Please attach the full console boot log when kernel doesn't crash.

  • Hi Bin:

    The full log I can't attach.

    The reserved memory regions which we added in kernel dts are all reserved when kernel and rootfs boot up

    But just show these error log when uboot parse these reserved memory regions

  • Dear Tom.

    1. what kind of crash? which kind of reserve memory region change leads to this crash?

    like Bin mentioned, full kernel log is very helpful to check crash issue. Let us check crash firstly and check if need further investigation.

    But maybe some times crash like another ticket.

    Please attach the full console boot log when kernel doesn't crash.

    2. I prepare one debug patch to show the lod in LMB. Would you please apply it to uboot then provide log?

    one more thing, please run bdinfo like below. it will show some information about board configuration.

    Hit any key to stop autoboot: 0
    =>
    => bdinfo

    https://e2e.ti.com/cfs-file/__key/communityserver-discussions-components-files/791/0001_2D00_am62xx_2D00_sdk10.1_2D00_add_2D00_debug_2D00_code_2D00_for_2D00_lmb.patch

    thanks a lot!

    yong

  • Dear Tom.

    please check this and provide feedback. thank you.

    1. what kind of crash? which kind of reserve memory region change leads to this crash?

    like Bin mentioned, full kernel log is very helpful to check crash issue. Let us check crash firstly and check if need further investigation.

    But maybe some times crash like another ticket.

    Please attach the full console boot log when kernel doesn't crash.

    2. I prepare one debug patch to show the lod in LMB. Would you please apply it to uboot then provide log?

    one more thing, please run bdinfo like below. it will show some information about board configuration.

    Hit any key to stop autoboot: 0
    =>
    => bdinfo

    0001-am62xx-sdk10.1-add-debug-code-for-lmb.patch

    yong

  • Dear Tom.

    any update?

    please let us know if you still face the problem, or can we close this in this week?

    thanks a lot!

    yong

  • All,

    If you use CONFIG_SYS_MEM_TOP_HIDE to enable 512MB operation in the context of SDK v10.x those "ERROR: reserving fdt memory region failed" error messages are harmless and can be ignored. You can use the below patch to suppress them. Also note the explanation/justification I added to the patch commit message:

    $ git show
    commit 06cdd82cb1dfac20bea2370d4fa77d13e60f2dbe (HEAD -> ti-u-boot-2024.04-512mb-dev)
    Author: Andreas Dannenberg <dannenberg@ti.com>
    Date:   Tue Oct 7 02:29:05 2025 -0500
    
        fdt: Skip reserving fdt memory regions located in hidden top region
        
        During kernel/OS boot U-Boot tries to reserve the memory regions that are
        declared as such in the OS' device tree file to prevent them from getting
        overwritten during the boot process. This however causes harmless error
        messages getting output during boot in case we have already used the
        CONFIG_SYS_MEM_TOP_HIDE feature to reserve the overall region containing
        the to-be-reserved region and make sure its excluded from use. Hence, in
        such cases simply skip the extra U-Boot reservation step.
        
        Signed-off-by: Andreas Dannenberg <dannenberg@ti.com>
    
    diff --git a/boot/image-fdt.c b/boot/image-fdt.c
    index d97727dce24..eacdc174e31 100644
    --- a/boot/image-fdt.c
    +++ b/boot/image-fdt.c
    @@ -75,6 +75,14 @@ static void boot_fdt_reserve_region(struct lmb *lmb, uint64_t addr,
     {
            long ret;
     
    +       if (addr >= gd->ram_top &&
    +           addr + size <= gd->ram_top + CONFIG_SYS_MEM_TOP_HIDE) {
    +               debug("   skip reserving fdt memory region in hidden top region: addr=%llx size=%llx flags=%x\n",
    +                               (unsigned long long)addr,
    +                               (unsigned long long)size, flags);
    +               return;
    +       }
    +
            ret = lmb_reserve_flags(lmb, addr, size, flags);
            if (ret >= 0) {
                    debug("   reserving fdt memory region: addr=%llx size=%llx flags=%x\n",

    Another approach is to use U-Boot from SDK v11.1 It no longer uses CONFIG_SYS_MEM_TOP_HIDE to support boards with 512MB memory, but instead relocates OPTEE and other artifacts so that U-Boot can relocate itself to the top of the 512MB memory range without any issues, and thus avoiding having to "hide" that memory, and the related complications.

    You can review the patches below to see how 512MB is enabled in SDK v11.1.

    * PENDING: board: am62x: add env file for am6254xxl
    * PENDING: configs: add defconfigs for am6254xxl
    * PENDING: arm: dts: add support for am6254xxl at R5 SPL

    Regards, Andreas