- make sure the kernel version is 4.x;
- edit
/etc/default/grub
:
GRUB_CMDLINE_LINUX="memmap=nn[KMG]!ss[KMG]"
this command reserve physical memory region [ss, ss + nn], the unit could be [KB, MB, GB]; if more than one persistent memory is needed, add more command:
GRUB_CMDLINE_LINUX="memmap=nn1[KMG]!ss1[KMG] memmap=nn2[KMG]!ss2[KMG]"
- execute
grub-mkconfig -o /boot/grub/grub.cfg
to update grub; - reboot, and new persistent memory will be shown as
/dev/pmem[01234...]