linux-nvdimm.lists.01.org archive mirror
 help / color / mirror / Atom feed
* [ndctl PATCH v2 0/4] Firmware Activation and Test Updates
@ 2020-07-20 23:37 Dan Williams
  2020-07-20 23:37 ` [ndctl PATCH v2 1/4] ndctl/list: Add firmware activation enumeration Dan Williams
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Dan Williams @ 2020-07-20 23:37 UTC (permalink / raw)
  To: linux-nvdimm; +Cc: vishal.l.verma

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.stgit@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.stgit@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 -- linux-nvdimm@lists.01.org
To unsubscribe send an email to linux-nvdimm-leave@lists.01.org

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2020-07-20 23:54 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-20 23:37 [ndctl PATCH v2 0/4] Firmware Activation and Test Updates Dan Williams
2020-07-20 23:37 ` [ndctl PATCH v2 1/4] ndctl/list: Add firmware activation enumeration Dan Williams
2020-07-20 23:38 ` [ndctl PATCH v2 2/4] ndctl/dimm: Auto-arm firmware activation Dan Williams
2020-07-20 23:38 ` [ndctl PATCH v2 3/4] ndctl/bus: Add 'activate-firmware' command Dan Williams
2020-07-20 23:38 ` [ndctl PATCH v2 4/4] ndctl/test: Test firmware-activation interface Dan Williams

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).