简体   繁体   中英

U-Boot fails with "Reading file would overwrite reserve memory" on Raspberry CM4

I am currently running MicroOS on some regular Raspberry Pi 4. Wanting to move storage to some PCIe NVMe device, I realised that the provided U-Boot build does not support PCIe NVMe devices out of the box and I recompiled U-Boot.

Now it detects the NVMe device but it fails to load the bootaa64.efi, basically it is saying:

** Reading file would overwrite reserved memory **

The kernel_address_r being used is 0x00080000.

Looking at bdinfo , I get the following reserved segments:

reserved[0] = [0x0-0x7ffff], 0x00080000 bytes flag: 4
reserved[1] = [0x3cb4f000-0x3dffffff], 0x014b1000 bytes flags: 0

So obviously, the target loading address for the boota64.efi is not reserved. I also tried other addresses for loading, but I always get the same error.

Okay, apparently the error message was a red herring. Turns out that the u-boot default configuration for the RPi 4 allows for a maximum of 8 reserved memory regions. And those were already used up in my case.

Increasing CONFIG_LMB_MAX_REGIONS solved the problem and let me boot the system properly.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM