linux-nvdimm.lists.01.org archive mirror
 help / color / mirror / Atom feed
* [ndctl PATCH 00/16] Firmware Activation and Test Updates
@ 2020-07-07  2:40 Dan Williams
  2020-07-07  2:40 ` [ndctl PATCH 01/16] ndctl/build: Fix zero-length array warnings Dan Williams
                   ` (15 more replies)
  0 siblings, 16 replies; 17+ messages in thread
From: Dan Williams @ 2020-07-07  2:40 UTC (permalink / raw)
  To: linux-nvdimm; +Cc: Dave Jiang, vishal.l.verma

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 [1], has added support for activating firmware at
runtime.

As mentioned in the kernel patches adding support for firmware-activate
[2], 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/ When the system can support activation without quiesce, or when the
   hibernate-resume requirement is going to be suppressed, the new
   activate-firmware command wraps that functionality:

    ndctl activate-firmware nfit_test.0 --force

   Otherwise, if activate_method is "suspend" then the activation can be
   triggered by the mem-quiet hibernate debug state, or a full hibernate
   resume:

    echo mem-quiet > /sys/power/pm_debug
    echo disk > /sys/power/state

In addition to firmware activate support this patch-set also includes
some miscellaneous test updates and build fixes.

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

---

Dan Williams (16):
      ndctl/build: Fix zero-length array warnings
      ndctl/dimm: Fix chatty status messages
      ndctl/list: Indicate firmware update capability
      ndctl/dimm: Detect firmware-update vs ARS conflict
      ndctl/dimm: Improve firmware-update failure message
      ndctl/dimm: Prepare to emit dimm json object after firmware update
      ndctl/dimm: Emit dimm firmware details after update
      ndctl/list: Add firmware activation enumeration
      ndctl/dimm: Auto-arm firmware activation
      ndctl/bus: Add 'activate-firmware' command
      ndctl/docs: Update copyright date
      ndctl/test: Test firmware-activation interface
      test: Validate strict iomem protections of pmem
      ndctl: Refactor nfit.h to acpi.h
      daxctl: Add 'split-acpi' command to generate custom ACPI tables
      test/ndctl: mremap pmd confusion


 Documentation/copyright.txt                     |    2 
 Documentation/ndctl/Makefile.am                 |    3 
 Documentation/ndctl/ndctl-activate-firmware.txt |  130 +++
 Documentation/ndctl/ndctl-list.txt              |   39 +
 Documentation/ndctl/ndctl-update-firmware.txt   |   40 +
 acpi.h                                          |  236 ++++++
 daxctl/Makefile.am                              |    1 
 daxctl/acpi.c                                   |  870 +++++++++++++++++++++++
 daxctl/builtin.h                                |    1 
 daxctl/daxctl.c                                 |    1 
 ndctl/Makefile.am                               |    1 
 ndctl/action.h                                  |    1 
 ndctl/builtin.h                                 |    1 
 ndctl/bus.c                                     |  173 ++++-
 ndctl/create-nfit.c                             |   66 --
 ndctl/dimm.c                                    |  278 +++++--
 ndctl/firmware-update.h                         |    1 
 ndctl/lib/hpe1.h                                |    4 
 ndctl/lib/libndctl.c                            |  258 +++++++
 ndctl/lib/libndctl.sym                          |   14 
 ndctl/lib/msft.h                                |    2 
 ndctl/lib/private.h                             |    3 
 ndctl/libndctl.h                                |   35 +
 ndctl/list.c                                    |   13 
 ndctl/ndctl.c                                   |    1 
 ndctl/ndctl.h                                   |    2 
 ndctl/util/json-firmware.c                      |   80 --
 nfit.h                                          |   65 --
 test.h                                          |    2 
 test/Makefile.am                                |    9 
 test/dax-dev.c                                  |    4 
 test/dax-pmd.c                                  |   99 +++
 test/device-dax.c                               |    7 
 test/firmware-update.sh                         |   50 +
 test/revoke-devmem.c                            |  143 ++++
 util/json.c                                     |  181 +++++
 util/json.h                                     |   20 -
 37 files changed, 2509 insertions(+), 327 deletions(-)
 create mode 100644 Documentation/ndctl/ndctl-activate-firmware.txt
 create mode 100644 acpi.h
 create mode 100644 daxctl/acpi.c
 delete mode 100644 ndctl/util/json-firmware.c
 delete mode 100644 nfit.h
 create mode 100644 test/revoke-devmem.c

base-commit: c7767834871f7ce50a2abe1da946e9e16fb08eda
_______________________________________________
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] 17+ messages in thread

end of thread, other threads:[~2020-07-07  2:58 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-07  2:40 [ndctl PATCH 00/16] Firmware Activation and Test Updates Dan Williams
2020-07-07  2:40 ` [ndctl PATCH 01/16] ndctl/build: Fix zero-length array warnings Dan Williams
2020-07-07  2:40 ` [ndctl PATCH 02/16] ndctl/dimm: Fix chatty status messages Dan Williams
2020-07-07  2:40 ` [ndctl PATCH 03/16] ndctl/list: Indicate firmware update capability Dan Williams
2020-07-07  2:40 ` [ndctl PATCH 04/16] ndctl/dimm: Detect firmware-update vs ARS conflict Dan Williams
2020-07-07  2:40 ` [ndctl PATCH 05/16] ndctl/dimm: Improve firmware-update failure message Dan Williams
2020-07-07  2:40 ` [ndctl PATCH 06/16] ndctl/dimm: Prepare to emit dimm json object after firmware update Dan Williams
2020-07-07  2:40 ` [ndctl PATCH 07/16] ndctl/dimm: Emit dimm firmware details after update Dan Williams
2020-07-07  2:41 ` [ndctl PATCH 08/16] ndctl/list: Add firmware activation enumeration Dan Williams
2020-07-07  2:41 ` [ndctl PATCH 09/16] ndctl/dimm: Auto-arm firmware activation Dan Williams
2020-07-07  2:41 ` [ndctl PATCH 10/16] ndctl/bus: Add 'activate-firmware' command Dan Williams
2020-07-07  2:41 ` [ndctl PATCH 11/16] ndctl/docs: Update copyright date Dan Williams
2020-07-07  2:41 ` [ndctl PATCH 12/16] ndctl/test: Test firmware-activation interface Dan Williams
2020-07-07  2:41 ` [ndctl PATCH 13/16] test: Validate strict iomem protections of pmem Dan Williams
2020-07-07  2:41 ` [ndctl PATCH 14/16] ndctl: Refactor nfit.h to acpi.h Dan Williams
2020-07-07  2:41 ` [ndctl PATCH 15/16] daxctl: Add 'split-acpi' command to generate custom ACPI tables Dan Williams
2020-07-07  2:41 ` [ndctl PATCH 16/16] test/ndctl: mremap pmd confusion 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).