Page MenuHomeFreeBSD

nvdimm(4): Extract ACPI root bus driver
ClosedPublic

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

Details

Summary

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

Repository
rS FreeBSD src repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

cem created this revision.Sep 26 2019, 11:49 PM
cem added inline comments.Sep 27 2019, 12:06 AM
sys/dev/nvdimm/nvdimm_acpi.c
103–104 ↗(On Diff #62625)

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 ?

sys/dev/nvdimm/nvdimm.c
329 ↗(On Diff #62625)

handle != NULL

sys/dev/nvdimm/nvdimm_acpi.c
3 ↗(On Diff #62625)

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

Thanks!

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.

sys/dev/nvdimm/nvdimm.c
329 ↗(On Diff #62625)

Thanks, will fix.

sys/dev/nvdimm/nvdimm_acpi.c
3 ↗(On Diff #62625)

Ok, will do

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