Issue #499 has been updated by Oberon 4071.
Nico Huber wrote in #note-14:
Oberon 4071 wrote in #note-13:
Nico Huber wrote in #note-11:
Alas, nothing obvious in the log. If there is any resource unknown to coreboot, even with a log of the failing boot, we might end up simply constraining the space for allocations. So we can try that right away: [Here's a patch that might work](https://review.coreboot.org/c/coreboot/+/76198). If that doesn't help, I guess we have to disable top-down allocation for Haswell.
Unfortunately, the above patch (to change DOMAIN_RESOURCE_32BIT_LIMIT) did not work for me when using EDK2.
Sorry, I forgot: You have to run `make olddefconfig` or any other config target after applying that patch. You can check if it had an effect in your `.config` file.
For this test, I've been starting with a clean build and set of configuration defaults for every rebuild. (Even the crossgcc-i386 and iasl targets get rebuilt each time, to prevent the toolchain from becoming out of sync.) I have confirmed that the configuration changes are applied to the .config file.
[I've spotted something now](https://review.coreboot.org/c/coreboot/+/76199), that actually makes sense to patch, but I don't know if it has an effect on edk2.
I applied patches 76198 and 76199 from Gerrit, but the coreboot build still did not successfully start EDK2.
I'm actually quite surprised that it works with SeaBIOS. A cbmem log with that patch and the changed limit would also be much appreciated. `dmesg` output can also be helpful in case Linux detects any error that is caused by the top-down allocation (I couldn't spot anything abnormal in the cbmem log).
I will try booting a SeaBIOS build with the two patches applied, and I'll post the cbmem and dmesg output in case it might provide any useful information.
---------------------------------------- Bug #499: coreboot will not boot edk2 on Lenovo T440p with CONFIG_RESOURCE_ALLOCATION_TOP_DOWN enabled, cannot disable this setting during build https://ticket.coreboot.org/issues/499#change-1578
* Author: Oberon 4071 * Status: New * Priority: Normal * Assignee: Nico Huber * Start date: 2023-06-29 * Affected versions: 4.21 * Needs backport to: none * Related links: https://review.coreboot.org/c/coreboot/+/76198 https://review.coreboot.org/c/coreboot/+/76199 * Affected hardware: lenovo/t440p ---------------------------------------- coreboot revision in git: feb27dcbf3fc685b070c950a16e8adec958bc1ce coreboot revision (git describe --tags): 4.20-520-gfeb27dcbf3 Tested payloads: edk2 from MrChromebox revision uefipayload_202304 and uefipayload_202306
coreboot will not boot my Lenovo ThinkPad T440p with CONFIG_RESOURCE_ALLOCATION_TOP_DOWN enabled, when using the edk2 payload (MrChromebox version, either uefipayload_202304 or uefipayload_202306). The display sometimes turns on, indicating that some of the hardware initialization was successful, but the payload will not start.
I tried to disable CONFIG_RESOURCE_ALLOCATION_TOP_DOWN in .config, but the build process insists on leaving this config enabled. This seems to be caused by the RESOURCE_ALLOCATION_TOP_DOWN setting changed to "def_bool y" in src/device/Kconfig in commit 5226301765ded70e0ef640e5252bbaca8cd14451 (allocator_v4: Treat above 4G resources more natively). The make target for building coreboot seems to automatically rerun olddefconfig, causing this setting to always remain enabled no matter what was previously saved in the .config file.
Modifying src/device/Kconfig to change RESOURCE_ALLOCATION_TOP_DOWN to "def_bool n" appears to fix the problem on my machine.
I have attached my .config file (with CONFIG_RESOURCE_ALLOCATION_TOP_DOWN enabled to reproduce the problem).
---Files-------------------------------- .config (20.7 KB) console.log (128 KB) cbmem.txt (151 KB) cbmem_seabios_with_resource_allocation_top_down.txt (41.1 KB)