Patrick Rudolph has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/35680 )
Change subject: cpu/qemu-x86: Add x86_64 bootblock support ......................................................................
Patch Set 2:
(3 comments)
https://review.coreboot.org/c/coreboot/+/35680/2//COMMIT_MSG Commit Message:
https://review.coreboot.org/c/coreboot/+/35680/2//COMMIT_MSG@15 PS2, Line 15: Introduce a new tool called pgtblgen that creates x86 long mode compatible : page tables and writes those to a file.
There already is util/x86/x86_page_tables for 32-bit PAE page tables. […]
That's written in go and requires CSV as input. I'd like to have a tool that works with the C toolchain.
https://review.coreboot.org/c/coreboot/+/35680/2/src/cpu/qemu-x86/cache_as_r... File src/cpu/qemu-x86/cache_as_ram_bootblock.S:
https://review.coreboot.org/c/coreboot/+/35680/2/src/cpu/qemu-x86/cache_as_r... PS2, Line 42: #include <cpu/x86/64bit/entry64.inc>
Should this happen in this mainboard specific file?
Could be place in a common file, but everything after this include runs in long mode already. It might need changes to cache as ram assembly code.
https://review.coreboot.org/c/coreboot/+/35680/2/src/cpu/x86/64bit/entry64.i... File src/cpu/x86/64bit/entry64.inc:
https://review.coreboot.org/c/coreboot/+/35680/2/src/cpu/x86/64bit/entry64.i... PS2, Line 25: $(CONFIG_ARCH_X86_64_PGTBL_LOC)
Would it not be better to use some linker script magic and link the page tables in the bootblock and […]
no that doesn't work. The page tables needs to be 4K aligned, but cbfstool doesn't care and places the XIP/relocatable bootblock anywhere, breaking this assumption.