Page MenuHomeFreeBSD

nvdimm(4): Extract ACPI root bus driver

Authored by cem on Sep 26 2019, 11:49 PM.



No functional change intended.

The intent is to add a "legacy" e820 pmem newbus bus for nvdimm device in a
subsequent revision, and it's a little more clear if the parent buses get
independent source files.

Quite a lot of ACPI-specific logic is left in nvdimm.c; disentangling that
is a much larger change (and probably not especially useful).

Test Plan

I don't have any real NFIT nvdimm devices to confirm nothing is broken, but the
change is straightforward; it compiles.

Diff Detail

Lint OK
No Unit Test Coverage
Build Status
Buildable 26727
Build 25083: arc lint + arc unit

Event Timeline

cem created this revision.Sep 26 2019, 11:49 PM
cem added inline comments.Sep 27 2019, 12:06 AM

The two lines above are the only change; the rest is straight code lift from one file to another. Reviewboard doesn't make this clear, but I think git diff/blame and SVN will (with svn cp-modify to create this file).

kib added a comment.Sep 27 2019, 7:18 AM

Is there any public specs about NVDIMM enumeration using e820 ?


handle != NULL


I think you will get less mail if you remove this line (just in case, approved by ff)

kib accepted this revision.Sep 27 2019, 7:18 AM
This revision is now accepted and ready to land.Sep 27 2019, 7:18 AM
cem added a comment.Sep 27 2019, 3:09 PM


In D21813#476173, @kib wrote:

Is there any public specs about NVDIMM enumeration using e820 ?

Just Linux mailing lists and documentation, as far as I know. The device I have access to does not have much in the way of metadata. It has a single span of contiguous phyiscal addresses in SMAP with type OEM/PRAM (0xc). I noticed the same PA range is also described in SRAT; there it is divided into two equal-sized halves. The SRAT halves are marked with separate NUMA domains from each other, and are non-local to any CPU domain. But that's all so far. I don't have any NDA spec.

I plan to only enumerate these kind of spans under explicit administrative hint via a device.hints scheme, in case some BIOS describes the same region(s) with both e820 and NFIT. (And for caution, in case I am misunderstanding the limited metadata here.) I think we always prefer NFIT enumeration.


Thanks, will fix.


Ok, will do

This revision was automatically updated to reflect the committed changes.
cem marked 2 inline comments as done.