Page MenuHomeFreeBSD

md: use prestaged mfs_root
ClosedPublic

Authored by breno.leitao_gmail.com on May 30 2018, 7:53 PM.
Tags
None
Referenced Files
F103263775: D15625.diff
Fri, Nov 22, 7:32 PM
Unknown Object (File)
Wed, Nov 20, 11:53 PM
Unknown Object (File)
Wed, Nov 20, 1:03 PM
Unknown Object (File)
Tue, Nov 19, 3:16 PM
Unknown Object (File)
Sun, Nov 17, 3:04 PM
Unknown Object (File)
Sat, Nov 16, 9:38 AM
Unknown Object (File)
Sat, Nov 16, 7:19 AM
Unknown Object (File)
Sat, Nov 16, 5:48 AM
Subscribers

Details

Summary

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.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

This revision is now accepted and ready to land.May 30 2018, 10:31 PM

Who sets up the vars ?

sys/dev/md/md.c
185 ↗(On Diff #43165)

Why do you declare the vars volatile only to use __DEVOLATILE ugliness in the only place where they are used ?

sys/dev/md/md.c
185 ↗(On Diff #43165)

Doing so was my advice, because I don't understand why volatile is used in the case where the data is in a module or compiled-in, so it seemed safest to me to just keep it for the new case as well.

Removing the volatile qualifier for mfs_root and mfs_root_size.

This revision now requires review to proceed.Jun 6 2018, 7:52 PM
kib added inline comments.
sys/dev/md/md.c
185 ↗(On Diff #43165)

I think volatile can be removed from the other case as well, in the follow-up commit.

This revision is now accepted and ready to land.Jun 6 2018, 8:46 PM
This revision was automatically updated to reflect the committed changes.