Hi,
+/****************************************************************
- Page table
- ****************************************************************/
+void *gen_identity_page_table(u64 max_addr) +{
- /* Map directly all the addresses */
- u32 pt_entries = (max_addr + 0xFFF) >> 12;
- u32 pdt_entries = (pt_entries + 0x1FF) >> 9;
- u32 pdpt_entries = (pdt_entries + 0x1FF) >> 9;
- u32 pml4_entries = (pdpt_entries + 0x1FF) >> 9;
You can use hugepages. Then you'll need _alot_ less memory for the pagetables, and the copying probably goes faster too.
You might consider mapping the nvdimm below 4G instead of entering long mode.
cheers, Gerd