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
Unknown Object (File)
Tue, Apr 16, 2:28 PM
Unknown Object (File)
Mar 12 2024, 6:02 AM
Unknown Object (File)
Mar 12 2024, 5:05 AM
Unknown Object (File)
Mar 5 2024, 11:16 PM
Unknown Object (File)
Dec 22 2023, 10:00 PM
Unknown Object (File)
Dec 12 2023, 5:52 AM
Unknown Object (File)
Nov 12 2023, 12:23 PM
Unknown Object (File)
Nov 6 2023, 11:58 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

Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 17048
Build 16911: arc lint + arc unit

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

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

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

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.