Implement support for booting from a PMEM region compatible with NVDIMM and NFIT specifications.
The current implementation is still slow. When running a Linux guest on top of QEMU in x86:
Using actual -kernel option: QEMU startup time: .080 BIOS startup time: .060 Kernel setup time: .590 Total time: .730
Using -kernel option and fw_cfg DMA patch: QEMU startup time: .080 BIOS startup time: .039 Kernel setup time: .002 Total time: .121
Using this patch series and adding the vmlinuz as a NVDIMM device: QEMU startup time: .080 BIOS startup time: .065 Kernel setup time: .015 Total time: .160
This patch series is not ready for merging. There are things missing and questions to be answered: - Is it necessary to retrieve any other data from the NVDIMM? - Is there any other nicer (and faster) option for the page table? - Make NVDIMM a compile-time option, as the other devices. - Add some kind of wrapper to the boot files instead of a direct vmlinux. - Add NVDIMM boot priority support. - Add support for intitrd and cmdline. Maybe in another NVDIMM, or in the same, or through fw_cfg. - Reorder code to change to long mode less times.
Any other proposals for improvements are appreciated
Marc Marí (3): Basic NVDIMM PMEM support Transitions to and from 64 bits Add NVDIMM booting support
Makefile | 3 +- src/boot.c | 18 ++++++++ src/config.h | 2 + src/fw/biostables.c | 80 ++++++++++++++++++++++++++++++++ src/hw/nvdimm.c | 128 ++++++++++++++++++++++++++++++++++++++++++++++++++++ src/hw/nvdimm.h | 12 +++++ src/misc.c | 4 ++ src/post.c | 2 + src/romlayout.S | 126 +++++++++++++++++++++++++++++++++++++++++++++++++++ src/stacks.c | 77 +++++++++++++++++++++++++++++++ src/stacks.h | 2 + src/std/acpi.h | 40 ++++++++++++++++ src/util.h | 3 ++ src/x86.h | 1 + 14 files changed, 497 insertions(+), 1 deletion(-) create mode 100644 src/hw/nvdimm.c create mode 100644 src/hw/nvdimm.h