Aaron Durbin has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/30855 )
Change subject: arch/x86: Align _start16bit with C_ENVIRONMENT_BOOBLOCK ......................................................................
Patch Set 2:
(1 comment)
https://review.coreboot.org/#/c/30855/2/src/cpu/x86/16bit/entry16.inc File src/cpu/x86/16bit/entry16.inc:
https://review.coreboot.org/#/c/30855/2/src/cpu/x86/16bit/entry16.inc@32 PS2, Line 32: #if IS_ENABLED(CONFIG_C_ENVIRONMENT_BOOTBLOCK) || \
Where does this 2^11 come from? 2^16 ? cpu/x86/16bit/reset. […]
Yes, sorry. I got confused with the alignment vs jmp instruction offset. 2^15 is more correct as the jump is relative signed offset. Anyway, we could improve the location by putting things into sections. However, I'm still not clear on the desire for the 4KiB alignment.
Even with 64KiB C_ENV_BOOTBLOCK_SIZE the reset vector won't work if _start16bit is more than 32KiB away because of the signedness of the jmp instruction. And since the reset vector is at the end of any C_ENV_BOOTBLOCK_SIZE we are limited on the placement of _start16bit symbol being 4GiB - 32KiB away.