Attention is currently required from: Christian Walter, Johnny Lin, Jonathan Zhang, Patrick Rudolph, Shuo Liu, Tim Chu.
Jérémy Compostella has posted comments on this change by Patrick Rudolph. ( https://review.coreboot.org/c/coreboot/+/85806?usp=email )
Change subject: cpu/x86/64bit: Install extended page tables in BSS ......................................................................
Patch Set 3:
(4 comments)
File src/cpu/x86/64bit/mmu.c:
https://review.coreboot.org/c/coreboot/+/85806/comment/6773cc75_93c50cab?usp... : PS3, Line 12: #define _PRES (1ULL << 0) Can't you use the BIT macro?
https://review.coreboot.org/c/coreboot/+/85806/comment/a5df0763_15d5152b?usp... : PS3, Line 64: int size_t
https://review.coreboot.org/c/coreboot/+/85806/comment/1bafc4aa_8da36ea0?usp... : PS3, Line 59: if (cpu_supports_1gb_hugepage()) { : const uintptr_t max_addr = 1ULL * GiB * 512ULL * 512ULL; : const uint64_t incr = 1ULL * GiB; : : /* Build P4MLE */ : for (int i = 0; i < 512; i++) : p4mle[i] = _GEN_DIR(&pdpt[i * 512]); : : /* Build PDPT */ : uint64_t *page_table_ptr = pdpt; : for (uintptr_t addr = 0; addr < max_addr; addr += incr, page_table_ptr++) : *page_table_ptr = _GEN_PAGE(addr); : } else { : const uintptr_t max_addr = 2ULL * MiB * 512ULL * 512ULL; : const uint64_t incr = 2ULL * MiB; : : /* Build P4MLE */ : p4mle[0] = _GEN_DIR(&pdpt[0]); : : /* Build PDPT */ : for (int i = 0; i < 512; i++) : pdpt[i] = _GEN_DIR(&pdt[i * 512]); : : /* Build PDT */ : uint64_t *page_table_ptr = pdt; : for (uintptr_t addr = 0; addr < max_addr; addr += incr, page_table_ptr++) : *page_table_ptr = _GEN_PAGE(addr); : } : There are a lot in common between these two branches, isn't it a way to share more code ?
https://review.coreboot.org/c/coreboot/+/85806/comment/60ed878c_1b7db564?usp... : PS3, Line 150: else unnecessary `else` keyword.