mambo: Add persistent memory disk support
mambo: Add persistent memory disk support

This adds support to for mapping disks images using persistent
memory. Disks can be added by setting this ENV variable:

  PMEM_DISK="/mydisks/disk1.img,/mydisks/disk2.img"

These will show up in Linux as /dev/pmem0 and /dev/pmem1.

This uses a new feature in mambo "mysim memory mmap .." which is only
available since mambo commit 0131f0fc08 (from 24/4/2018).

This also needs the of_pmem.c driver in Linux which is only available
since v4.17. It works with powernv_defconfig + CONFIG_OF_PMEM. ie

  --- a/arch/powerpc/configs/powernv_defconfig
  +++ b/arch/powerpc/configs/powernv_defconfig
  @@ -238,6 +238,8 @@ CONFIG_RTC_CLASS=y
   CONFIG_RTC_DRV_GENERIC=y
   CONFIG_VIRTIO_PCI=m
   CONFIG_VIRTIO_BALLOON=m
  +CONFIG_LIBNVDIMM=y
  +# CONFIG_ND_BLK is not set
   CONFIG_EXT2_FS=y
   CONFIG_EXT2_FS_XATTR=y
   CONFIG_EXT2_FS_POSIX_ACL=y

Signed-off-by: Michael Neuling <7b0ab45a730e48a69239010b5b8fe5fa4e8eaac6@neuling.org>
Signed-off-by: Stewart Smith <ec31ab75ddf977353c8f660f92ea8b23f64aef25@linux.ibm.com>

open-power/skiboot,open-power/skiboot,qemu/skiboot,legoater/skiboot,legoater/skiboot,qemu/skiboot,qemu/skiboot,legoater/skiboot,shenki/skiboot,stewart-ibm/skiboot,shenki/skiboot,shenki/skiboot,stewart-ibm/skiboot,qemu/skiboot,shenki/skiboot,shenki/skiboot,legoater/skiboot,legoater/skiboot,open-power/skiboot,open-power/skiboot,stewart-ibm/skiboot,open-power/skiboot,qemu/skiboot