Skip to content

Instantly share code, notes, and snippets.

@leitao
Created June 7, 2018 13:54
Show Gist options
  • Save leitao/26436ace1ccdfb7aece36ac74ffe1ba4 to your computer and use it in GitHub Desktop.
Save leitao/26436ace1ccdfb7aece36ac74ffe1ba4 to your computer and use it in GitHub Desktop.
md: use prestaged mfs_root
On PowerNV systems, the rootfs is passed through kexec, which loads the rootfs
into memory and set two fdt entries to describe where the file is located in
the memory;
I need to pass this memory region to the md device as a mfs_root, but, current
md driver does not support two things:
* Just getting a pointer from an external (bootloader) memory. If I need to
workaround it, I would need to declare a static array and memcopy from this
external memory to this static variable.
* The size of the image. The usage of mfs_root_end, which is not a pointer,
seems to be not possible for this prestaged scenario.
This patch simply adds a new way to load mfs_root from memory.
Differential Revision: https://reviews.freebsd.org/D15625
Approved by: kib, jhibbits (mentor)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment