Attention is currently required from: Patrick Rudolph.
Benjamin Doron has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/30119?usp=email )
Change subject: arch/x86/mmu: Port armv8 MMU to x86_64 ......................................................................
Patch Set 18:
(2 comments)
Patchset:
PS18: I've updated this + made the tree use dynamic page tables, when there are and have support for SMM to add in a follow-up. I'll push those as follow-ups after I do some debugging: QEMU Q35 seems to overflow SMRAM, it seems to triple fault when jumping to the entrypoint which is outside SMRAM and therefore, unmapped
File src/arch/x86/mmu.c:
https://review.coreboot.org/c/coreboot/+/30119/comment/bf1c8020_1600e1f8 : PS16, Line 335: (uint64_t *)cbmem_add(CBMEM_ID_PAGE, pages * 4 * KiB);
It might be even better to have page tables in heap. […]
romstage generates only if necessary. ramstage's tables are the primary ones used.
Even assuming that SMM can read CBMEM (I looked briefly and I couldn't see it compiled in), we've discussed this off Gerrit and I agree it's not safe. Allowing ring-0 to control SMM's memory access doesn't sound good to me. Unless I misunderstood, I believe we've decided SMM needs different page tables?