Commit Graph

2 Commits

Author SHA1 Message Date
Conrad Meyer
7bf55415d5 nvdimm_e820: Fix braino in size=all SPA hint
The sentinel value for "use the rest of the region," -1, isn't zero modulo
PAGE_SIZE.  Relax the check to permit the intended special value.

X-MFC-With:	r353110
Sponsored by:	Dell EMC Isilon
2019-10-18 03:01:21 +00:00
Conrad Meyer
cbd974b4b9 nvdimm(4): Add nvdimm_e820 pseudo-bus
nvdimm_e820 is a newbus pseudo driver that looks for "legacy" e820 PRAM
spans and creates ordinary-looking SPA devfs nodes for them
(/dev/nvdimm_spaN).

As these legacy regions lack real NFIT SPA regions and namespace
definitions, they must be administratively sliced up externally using
device.hints.  This is similar in purpose to the Linux memmap= mechanism.

It is assumed that systems with working NFIT tables will not have any use
for this driver, and that that will be the prevailing style going forward,
so if there are no explicit hints provided, this driver does not
automatically create any devices.

Reviewed by:	kib (previous version)
Sponsored by:	Dell EMC Isilon
Differential Revision:	https://reviews.freebsd.org/D21885
2019-10-04 18:38:47 +00:00