From: Erik Schmauss <erik.schmauss@intel.com>
To: linux-acpi@vger.kernel.org
Cc: Bob Moore <robert.moore@intel.com>,
Erik Schmauss <erik.schmauss@intel.com>
Subject: [PATCH 09/15] ACPICA: ACPI 6.0A: Changes to the NFIT ACPI table
Date: Fri, 17 Nov 2017 15:42:24 -0800 [thread overview]
Message-ID: <20171117234230.913-10-erik.schmauss@intel.com> (raw)
In-Reply-To: <20171117234230.913-1-erik.schmauss@intel.com>
From: Bob Moore <robert.moore@intel.com>
ACPICA commit a42a086b8d682ab8dfbc4666cf6b9c8a5ee23a77
Adds a new subtable.
Link: https://github.com/acpica/acpica/commit/a42a086b
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Erik Schmauss <erik.schmauss@intel.com>
---
include/acpi/actbl1.h | 66 ++++++++++++++++++++++++++++++++++++++++++++++++++-
1 file changed, 65 insertions(+), 1 deletion(-)
diff --git a/include/acpi/actbl1.h b/include/acpi/actbl1.h
index 5ef905626c6d..867f4136dbac 100644
--- a/include/acpi/actbl1.h
+++ b/include/acpi/actbl1.h
@@ -1150,7 +1150,8 @@ enum acpi_nfit_type {
ACPI_NFIT_TYPE_CONTROL_REGION = 4,
ACPI_NFIT_TYPE_DATA_REGION = 5,
ACPI_NFIT_TYPE_FLUSH_ADDRESS = 6,
- ACPI_NFIT_TYPE_RESERVED = 7 /* 7 and greater are reserved */
+ ACPI_NFIT_TYPE_CAPABILITIES = 7,
+ ACPI_NFIT_TYPE_RESERVED = 8 /* 8 and greater are reserved */
};
/*
@@ -1282,6 +1283,69 @@ struct acpi_nfit_flush_address {
u64 hint_address[1]; /* Variable length */
};
+/* 7: Platform Capabilities Structure */
+
+struct acpi_nfit_capabilities {
+ struct acpi_nfit_header header;
+ u8 highest_capability;
+ u8 reserved[3]; /* Reserved, must be zero */
+ u32 capabilities;
+ u32 reserved2;
+};
+
+/* Capabilities Flags */
+
+#define ACPI_NFIT_CAPABILITY_CACHE_FLUSH (1) /* 00: Cache Flush to NVDIMM capable */
+#define ACPI_NFIT_CAPABILITY_MEM_FLUSH (1<<1) /* 01: Memory Flush to NVDIMM capable */
+#define ACPI_NFIT_CAPABILITY_MEM_MIRRORING (1<<2) /* 02: Memory Mirroring capable */
+
+/*
+ * NFIT/DVDIMM device handle support - used as the _ADR for each NVDIMM
+ */
+struct nfit_device_handle {
+ u32 handle;
+};
+
+/* Device handle construction and extraction macros */
+
+#define ACPI_NFIT_DIMM_NUMBER_MASK 0x0000000F
+#define ACPI_NFIT_CHANNEL_NUMBER_MASK 0x000000F0
+#define ACPI_NFIT_MEMORY_ID_MASK 0x00000F00
+#define ACPI_NFIT_SOCKET_ID_MASK 0x0000F000
+#define ACPI_NFIT_NODE_ID_MASK 0x0FFF0000
+
+#define ACPI_NFIT_DIMM_NUMBER_OFFSET 0
+#define ACPI_NFIT_CHANNEL_NUMBER_OFFSET 4
+#define ACPI_NFIT_MEMORY_ID_OFFSET 8
+#define ACPI_NFIT_SOCKET_ID_OFFSET 12
+#define ACPI_NFIT_NODE_ID_OFFSET 16
+
+/* Macro to construct a NFIT/NVDIMM device handle */
+
+#define ACPI_NFIT_BUILD_DEVICE_HANDLE(dimm, channel, memory, socket, node) \
+ ((dimm) | \
+ ((channel) << ACPI_NFIT_CHANNEL_NUMBER_OFFSET) | \
+ ((memory) << ACPI_NFIT_MEMORY_ID_OFFSET) | \
+ ((socket) << ACPI_NFIT_SOCKET_ID_OFFSET) | \
+ ((node) << ACPI_NFIT_NODE_ID_OFFSET))
+
+/* Macros to extract individual fields from a NFIT/NVDIMM device handle */
+
+#define ACPI_NFIT_GET_DIMM_NUMBER(handle) \
+ ((handle) & ACPI_NFIT_DIMM_NUMBER_MASK)
+
+#define ACPI_NFIT_GET_CHANNEL_NUMBER(handle) \
+ (((handle) & ACPI_NFIT_CHANNEL_NUMBER_MASK) >> ACPI_NFIT_CHANNEL_NUMBER_OFFSET)
+
+#define ACPI_NFIT_GET_MEMORY_ID(handle) \
+ (((handle) & ACPI_NFIT_MEMORY_ID_MASK) >> ACPI_NFIT_MEMORY_ID_OFFSET)
+
+#define ACPI_NFIT_GET_SOCKET_ID(handle) \
+ (((handle) & ACPI_NFIT_SOCKET_ID_MASK) >> ACPI_NFIT_SOCKET_ID_OFFSET)
+
+#define ACPI_NFIT_GET_NODE_ID(handle) \
+ (((handle) & ACPI_NFIT_NODE_ID_MASK) >> ACPI_NFIT_NODE_ID_OFFSET)
+
/*******************************************************************************
*
* PDTT - Platform Debug Trigger Table (ACPI 6.2)
--
2.13.6
next prev parent reply other threads:[~2017-11-17 23:46 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-17 23:42 [PATCH 00/15] ACPICA release 20171110 Erik Schmauss
2017-11-17 23:42 ` [PATCH 01/15] ACPICA: Use local 64-bit divide support for string conversions Erik Schmauss
2017-11-17 23:42 ` [PATCH 02/15] ACPICA: Update output from ACPI_EXCEPTION macro Erik Schmauss
2017-11-17 23:42 ` [PATCH 03/15] ACPICA: Add an additional error message for EC timeouts Erik Schmauss
2017-11-17 23:42 ` [PATCH 04/15] ACPICA: iasl: Add SMMUv3 device ID mapping index support Erik Schmauss
2017-11-27 14:31 ` Lorenzo Pieralisi
2017-11-27 16:20 ` Rafael J. Wysocki
2017-11-17 23:42 ` [PATCH 05/15] ACPICA: ACPICA: style edits to utility function output, no functional change Erik Schmauss
2017-11-17 23:42 ` [PATCH 06/15] ACPICA: Trivial fix to spelling mistake in comment Erik Schmauss
2017-11-17 23:42 ` [PATCH 07/15] ACPICA: Enhance error messages from namespace create/lookup operations Erik Schmauss
2017-11-17 23:42 ` [PATCH 08/15] ACPICA: Namespace: fix memory leak from building prefixed pathname Erik Schmauss
2017-11-17 23:42 ` Erik Schmauss [this message]
2017-11-17 23:42 ` [PATCH 10/15] ACPICA: Small typo fix, no functional change Erik Schmauss
2017-11-17 23:42 ` [PATCH 11/15] ACPICA: Debugger: add "background" command for method execution Erik Schmauss
2017-11-17 23:42 ` [PATCH 12/15] ACPICA: Update mutex error messages, no functional change Erik Schmauss
2017-11-17 23:42 ` [PATCH 13/15] ACPICA: Update linkage for get mutex name interface Erik Schmauss
2017-11-17 23:42 ` [PATCH 14/15] ACPICA: ACPI 6.2: Additional PPTT flags Erik Schmauss
2017-11-17 23:42 ` [PATCH 15/15] ACPICA: Update version to 20171110 Erik Schmauss
2017-12-04 14:43 ` [PATCH 00/15] ACPICA release 20171110 Rafael J. Wysocki
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=20171117234230.913-10-erik.schmauss@intel.com \
--to=erik.schmauss@intel.com \
--cc=linux-acpi@vger.kernel.org \
--cc=robert.moore@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox