Skip to contentSkip to conversation

configs: Fix crash on coreboot x86

PATCH In review Patrick Rudolph 2 participants 3 messages Sep 3, 2025 – Sep 9, 2025

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 configs: Fix crash on coreboot x86

Booting u-boot as payload with coreboot's main branch is currently broken since commit [1] on x86 as U-boot assumes the active GDT matches what U-Boot would have installed in start16.S.

Make no assumptions and always load the GDT when building as coreboot payload to make sure the segment registers are actually matching the GDT.

Fixes #GP seen when booting U-Boot as coreboot payload.

1: https://review.coreboot.org/c/coreboot/+/87255

---
 configs/coreboot_defconfig | 1 +
 1 file changed, 1 insertion(+)
configs/coreboot_defconfig +1 -0
index dfb97a3d302..033746e4f91 100644
@@ -66,3 +66,4 @@ CONFIG_CONSOLE_SCROLL_LINES=5
 CONFIG_CMD_DHRYSTONE=y
 # CONFIG_GZIP is not set
 CONFIG_SMBIOS_PARSER=y
+CONFIG_X86_LOAD_FROM_32_BIT=y
Signature · 1 line
2.51.0
Reviewed-by on v1 1/1
#1 lore raw
Quoted 11 lines · Patrick Rudolph

Booting u-boot as payload with coreboot's main branch is currently broken since commit [1] on x86 as U-boot assumes the active GDT matches what U-Boot would have installed in start16.S.

Make no assumptions and always load the GDT when building as coreboot payload to make sure the segment registers are actually matching the GDT.

Fixes #GP seen when booting U-Boot as coreboot payload.

1: https://review.coreboot.org/c/coreboot/+/87255

Glad to see this. We should likely update coreboot in CI more often.

Signature · 1 line
Tom
#2 lore raw
In reply to Patrick Rudolph
Quoted 8 lines · Patrick Rudolph

Booting u-boot as payload with coreboot's main branch is currently broken since commit [1] on x86 as U-boot assumes the active GDT matches what U-Boot would have installed in start16.S.

Make no assumptions and always load the GDT when building as coreboot payload to make sure the segment registers are actually matching the GDT.

[...]

Applied to u-boot/master, thanks!

[1/1] configs: Fix crash on coreboot x86

      commit: 77ef938212b1b273389ea1560b999e79a6c285b3
Signature · 1 line
Tom