All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dan Williams <dan.j.williams@intel.com>
To: linux-nvdimm@lists.01.org
Cc: Dave Jiang <dave.jiang@intel.com>, vishal.l.verma@intel.com
Subject: [ndctl PATCH 00/16] Firmware Activation and Test Updates
Date: Mon, 06 Jul 2020 19:40:18 -0700	[thread overview]
Message-ID: <159408961822.2386154.888266173771881937.stgit@dwillia2-desk3.amr.corp.intel.com> (raw)

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

             reply	other threads:[~2020-07-07  2:56 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-07  2:40 Dan Williams [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=159408961822.2386154.888266173771881937.stgit@dwillia2-desk3.amr.corp.intel.com \
    --to=dan.j.williams@intel.com \
    --cc=dave.jiang@intel.com \
    --cc=linux-nvdimm@lists.01.org \
    --cc=vishal.l.verma@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.