Changes since v1 [1]:
- Update the firmware-activation patches per v3 of the kernel support
  series. Specifically handle the rename of
  {ndbusX,nmemX}/firmware_activate to {ndbusX,nmemX}/firmware/activate,
  add support for ndbusX/firmware/capability, and account for ability to
  specify "quiesce" or "live" to ndbusX/firmware/activate to select the
  activation method.

- This series replaces patch 8, 9, 10, and 12 from the v1 posting.

[1]: 
http://lore.kernel.org/r/159408961822.2386154.888266173771881937.st...@dwillia2-desk3.amr.corp.intel.com

---

Some persistent memory devices run a firmware locally on the device /
"DIMM" to perform tasks like media management, capacity provisioning,
and health monitoring. The process of updating that firmware typically
involves a reboot because it has implications for in-flight memory
transactions. However, reboots are disruptive and at least the Intel
persistent memory platform implementation, described by the Intel ACPI
DSM specification [2], has added support for activating firmware at
runtime.

As mentioned in the kernel patches adding support for firmware-activate
[3], ndctl is extended with the following functionality:

1/ The existing update-firmware command will 'arm' devices where the
   firmware image is staged by default.

    ndctl update-firmware all -f firmware_image.bin

2/ The existing ability to enumerate firmware-update capabilities now
   includes firmware activate capabilities at the 'bus' and 'dimm/device'
   level:

    ndctl list -BDF -b nfit_test.0
    [
      {
        "provider":"nfit_test.0",
        "dev":"ndbus2",
        "scrub_state":"idle",
        "firmware":{
          "activate_method":"suspend",
          "activate_state":"idle"
        },
        "dimms":[
          {
            "dev":"nmem1",
            "id":"cdab-0a-07e0-ffffffff",
            "handle":0,
            "phys_id":0,
            "security":"disabled",
            "firmware":{
              "current_version":0,
              "can_update":true
            }
          },
    ...


3/ The new activate-firmware command triggers firmware activation per
   the platform enumerated context, "suspend" vs "live", or can be forced
   to "live" if there is explicit knowledge that allowing applications
   and devices to race the quiesce timeout will have no adverse effects.

    ndctl activate-firmware nfit_test.0 [--force]

[2]: https://pmem.io/documents/IntelOptanePMem_DSM_Interface-V2.0.pdf
[3]: 
http://lore.kernel.org/r/159528284411.993790.11733759435137949717.st...@dwillia2-desk3.amr.corp.intel.com
 

---

Dan Williams (4):
      ndctl/list: Add firmware activation enumeration
      ndctl/dimm: Auto-arm firmware activation
      ndctl/bus: Add 'activate-firmware' command
      ndctl/test: Test firmware-activation interface


 Documentation/ndctl/Makefile.am                 |    3 
 Documentation/ndctl/ndctl-activate-firmware.txt |  146 +++++++++++++
 Documentation/ndctl/ndctl-list.txt              |   39 +++
 Documentation/ndctl/ndctl-update-firmware.txt   |   16 +
 ndctl/action.h                                  |    1 
 ndctl/builtin.h                                 |    1 
 ndctl/bus.c                                     |  158 +++++++++++++-
 ndctl/dimm.c                                    |  125 ++++++++++-
 ndctl/lib/libndctl.c                            |  257 +++++++++++++++++++++++
 ndctl/lib/libndctl.sym                          |   14 +
 ndctl/lib/private.h                             |    4 
 ndctl/libndctl.h                                |   35 +++
 ndctl/list.c                                    |    3 
 ndctl/ndctl.c                                   |    1 
 test/firmware-update.sh                         |   47 ++++
 util/json.c                                     |  117 +++++++++-
 util/json.h                                     |    3 
 17 files changed, 920 insertions(+), 50 deletions(-)
 create mode 100644 Documentation/ndctl/ndctl-activate-firmware.txt
_______________________________________________
Linux-nvdimm mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to