All of lore.kernel.org
 help / color / mirror / Atom feed
From: Lv Zheng <lv.zheng@intel.com>
To: "Rafael J . Wysocki" <rafael.j.wysocki@intel.com>,
	"Rafael J . Wysocki" <rjw@rjwysocki.net>,
	Len Brown <len.brown@intel.com>
Cc: Lv Zheng <lv.zheng@intel.com>, Lv Zheng <zetalog@gmail.com>,
	linux-acpi@vger.kernel.org, Bob Moore <robert.moore@intel.com>
Subject: [PATCH 03/53] ACPICA: Tables: Add HMAT table definitions
Date: Mon,  5 Jun 2017 16:37:16 +0800	[thread overview]
Message-ID: <278c0445732719260d456f9ef8d3adac214bcf45.1496650343.git.lv.zheng@intel.com> (raw)
In-Reply-To: <cover.1496650343.git.lv.zheng@intel.com>

ACPICA commit 3dae756631c8c2baddfa19f43a379aee42b28312

This patch adds unified HMAT table structure definitions so that ACPICA
users can develop HMAT related OS features based on the ACPICA standard
structures. Lv Zheng.

Link: https://github.com/acpica/acpica/commit/3dae7566
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Bob Moore <robert.moore@intel.com>
---
 include/acpi/actbl1.h | 117 ++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 117 insertions(+)

diff --git a/include/acpi/actbl1.h b/include/acpi/actbl1.h
index b4ce55c..49d5487 100644
--- a/include/acpi/actbl1.h
+++ b/include/acpi/actbl1.h
@@ -65,6 +65,7 @@
 #define ACPI_SIG_ECDT           "ECDT"	/* Embedded Controller Boot Resources Table */
 #define ACPI_SIG_EINJ           "EINJ"	/* Error Injection table */
 #define ACPI_SIG_ERST           "ERST"	/* Error Record Serialization Table */
+#define ACPI_SIG_HMAT           "HMAT"	/* Heterogeneous Memory Attributes Table */
 #define ACPI_SIG_HEST           "HEST"	/* Hardware Error Source Table */
 #define ACPI_SIG_MADT           "APIC"	/* Multiple APIC Description Table */
 #define ACPI_SIG_MSCT           "MSCT"	/* Maximum System Characteristics Table */
@@ -688,6 +689,122 @@ struct acpi_hest_generic_data_v300 {
 
 /*******************************************************************************
  *
+ * HMAT - Heterogeneous Memory Attributes Table (ACPI 6.2)
+ *        Version 1
+ *
+ ******************************************************************************/
+
+struct acpi_table_hmat {
+	struct acpi_table_header header;	/* Common ACPI table header */
+	u32 reserved;
+};
+
+/* Values for HMAT structure types */
+
+enum acpi_hmat_type {
+	ACPI_HMAT_TYPE_ADDRESS_RANGE = 0,	/* Memory subystem address range */
+	ACPI_HMAT_TYPE_LOCALITY = 1,	/* System locality latency and bandwidth information */
+	ACPI_HMAT_TYPE_CACHE = 2,	/* Memory side cache information */
+	ACPI_HMAT_TYPE_RESERVED = 3	/* 3 and greater are reserved */
+};
+
+struct acpi_hmat_structure {
+	u16 type;
+	u16 reserved;
+	u32 length;
+};
+
+/*
+ * HMAT Structures, correspond to Type in struct acpi_hmat_structure
+ */
+
+/* 0: Memory subystem address range */
+
+struct acpi_hmat_address_range {
+	struct acpi_hmat_structure header;
+	u16 flags;
+	u16 reserved1;
+	u32 processor_PD;	/* Processor proximity domain */
+	u32 memory_PD;		/* Memory proximity domain */
+	u32 reserved2;
+	u64 physical_address_base;	/* Physical address range base */
+	u64 physical_address_length;	/* Physical address range length */
+};
+
+/* Masks for Flags field above */
+
+#define ACPI_HMAT_PROCESSOR_PD_VALID    (1)	/* 1: processor_PD field is valid */
+#define ACPI_HMAT_MEMORY_PD_VALID       (1<<1)	/* 1: memory_PD field is valid */
+#define ACPI_HMAT_RESERVATION_HINT      (1<<2)	/* 1: Reservation hint */
+
+/* 1: System locality latency and bandwidth information */
+
+struct acpi_hmat_locality {
+	struct acpi_hmat_structure header;
+	u8 flags;
+	u8 data_type;
+	u16 reserved1;
+	u32 number_of_initiator_Pds;
+	u32 number_of_target_Pds;
+	u32 reserved2;
+	u64 entry_base_unit;
+};
+
+/* Masks for Flags field above */
+
+#define ACPI_HMAT_MEMORY_HIERARCHY  (0x0F)
+
+/* Values for Memory Hierarchy flag */
+
+#define ACPI_HMAT_MEMORY            0
+#define ACPI_HMAT_LAST_LEVEL_CACHE  1
+#define ACPI_HMAT_1ST_LEVEL_CACHE   2
+#define ACPI_HMAT_2ND_LEVEL_CACHE   3
+#define ACPI_HMAT_3RD_LEVEL_CACHE   4
+
+/* Values for data_type field above */
+
+#define ACPI_HMAT_ACCESS_LATENCY    0
+#define ACPI_HMAT_READ_LATENCY      1
+#define ACPI_HMAT_WRITE_LATENCY     2
+#define ACPI_HMAT_ACCESS_BANDWIDTH  3
+#define ACPI_HMAT_READ_BANDWIDTH    4
+#define ACPI_HMAT_WRITE_BANDWIDTH   5
+
+/* 2: Memory side cache information */
+
+struct acpi_hmat_cache {
+	struct acpi_hmat_structure header;
+	u32 memory_PD;
+	u32 reserved1;
+	u64 cache_size;
+	u32 cache_attributes;
+	u16 reserved2;
+	u16 number_of_SMBIOShandles;
+};
+
+/* Masks for cache_attributes field above */
+
+#define ACPI_HMAT_TOTAL_CACHE_LEVEL     (0x0000000F)
+#define ACPI_HMAT_CACHE_LEVEL           (0x000000F0)
+#define ACPI_HMAT_CACHE_ASSOCIATIVITY   (0x00000F00)
+#define ACPI_HMAT_WRITE_POLICY          (0x0000F000)
+#define ACPI_HMAT_CACHE_LINE_SIZE       (0xFFFF0000)
+
+/* Values for cache associativity flag */
+
+#define ACPI_HMAT_CA_NONE                     (0)
+#define ACPI_HMAT_CA_DIRECT_MAPPED            (1)
+#define ACPI_HMAT_CA_COMPLEX_CACHE_INDEXING   (2)
+
+/* Values for write policy flag */
+
+#define ACPI_HMAT_CP_NONE   (0)
+#define ACPI_HMAT_CP_WB     (1)
+#define ACPI_HMAT_CP_WT     (2)
+
+/*******************************************************************************
+ *
  * MADT - Multiple APIC Description Table
  *        Version 3
  *
-- 
2.7.4


  parent reply	other threads:[~2017-06-05  8:37 UTC|newest]

Thread overview: 54+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-05  8:15 [PATCH 00/54] ACPICA 20170531 Release Lv Zheng
2017-06-05  8:15 ` [PATCH 01/53] ACPICA: Change path's type from u8* to char* Lv Zheng
2017-06-05  8:15 ` [PATCH 02/53] ACPICA: Tables: Add WSMT support Lv Zheng
2017-06-05  8:37 ` Lv Zheng [this message]
2017-06-05  8:37 ` [PATCH 04/53] ACPICA: Add new notify value for memory attributes update Lv Zheng
2017-06-05  8:37 ` [PATCH 05/53] ACPICA: Added two new UUID values Lv Zheng
2017-06-05  8:37 ` [PATCH 07/53] ACPICA: Update Status field for BGRT table Lv Zheng
2017-06-05  8:37 ` [PATCH 08/53] ACPICA: Tables: Fix defined values for MADT PCAT_COMPAT flag Lv Zheng
2017-06-05  8:37 ` [PATCH 09/53] ACPICA: Add support for _LSI as a predefined method Lv Zheng
2017-06-05  8:38 ` [PATCH 10/53] ACPICA: Add support for _LSR " Lv Zheng
2017-06-05  8:38 ` [PATCH 11/53] ACPICA: Add support for _LSW " Lv Zheng
2017-06-05  8:38 ` [PATCH 12/53] ACPICA: Add support for _HMA " Lv Zheng
2017-06-05  8:38 ` [PATCH 13/53] ACPICA: Add new notify value for HEST table Lv Zheng
2017-06-05  8:38 ` [PATCH 14/53] ACPICA: Tables: Add PPTT table definitions Lv Zheng
2017-06-05  8:38 ` [PATCH 15/53] ACPICA: Add new flags to HEST subtables Lv Zheng
2017-06-05  8:38 ` [PATCH 16/53] ACPICA: Add support for new HEST subtable Lv Zheng
2017-06-05  8:38 ` [PATCH 17/53] ACPICA: Add support for new SRAT subtable Lv Zheng
2017-06-05  8:38 ` [PATCH 18/53] ACPICA: disassembler: improve Switch support Lv Zheng
2017-06-05  8:39 ` [PATCH 19/53] ACPICA: Add header support for TPM2 table changes Lv Zheng
2017-06-05  8:39 ` [PATCH 20/53] ACPICA: Add support for new PCCT subtables Lv Zheng
2017-06-05  8:39 ` [PATCH 21/53] ACPICA: ACPI 6.2: Add support for PinFunction() resource Lv Zheng
2017-06-05  8:39 ` [PATCH 22/53] ACPICA: ACPI 6.2: Add support for PinConfig() resource Lv Zheng
2017-06-05  8:39 ` [PATCH 23/53] ACPICA: ACPI 6.2: Add support for PinGroup() resource Lv Zheng
2017-06-05  8:39 ` [PATCH 24/53] ACPICA: ACPI 6.2: Add support for PinGroupFunction() resource Lv Zheng
2017-06-05  8:39 ` [PATCH 25/53] ACPICA: ACPI 6.2: Add support for PinGroupConfig() resource Lv Zheng
2017-06-05  8:39 ` [PATCH 26/53] ACPICA: Fix a type value overlap in the AML support file Lv Zheng
2017-06-05  8:39 ` [PATCH 27/53] ACPICA: Core: Always set GPIO VendorOffset Lv Zheng
2017-06-05  8:39 ` [PATCH 28/53] ACPICA: OSL: Add support to exclude stdarg.h Lv Zheng
2017-06-05  8:40 ` [PATCH 29/53] ACPICA: Events: Add runtime stub support for event APIs Lv Zheng
2017-06-05  8:40 ` [PATCH 30/53] ACPICA: Update error message for field beyond buffer case Lv Zheng
2017-06-05  8:40 ` [PATCH 31/53] ACPICA: Explicitly cast 1 to u32 Lv Zheng
2017-06-05  8:40 ` [PATCH 32/53] ACPICA: Debugger/acpiexec: Cleanup error messages Lv Zheng
2017-06-05  8:40 ` [PATCH 33/53] ACPICA: Dispatcher: Remove unnecessary call to debugger Lv Zheng
2017-06-05  8:40 ` [PATCH 34/53] ACPICA: Disassembler: Abort on an invalid/unknown AML opcode Lv Zheng
2017-06-05  8:40 ` [PATCH 35/53] ACPICA: Export the public mutex interfaces Lv Zheng
2017-06-05  8:40 ` [PATCH 36/53] ACPICA: Remove extraneous status check Lv Zheng
2017-06-05  8:40 ` [PATCH 37/53] ACPICA: Update resource descriptor handling Lv Zheng
2017-06-05  8:40 ` [PATCH 38/53] ACPICA: Split resource descriptor decode strings to a new file Lv Zheng
2017-06-05  8:41 ` [PATCH 39/53] ACPICA: Update comments, no functional change Lv Zheng
2017-06-05  8:41 ` [PATCH 40/53] ACPICA: Comment update: spelling/format. No " Lv Zheng
2017-06-05  8:41 ` [PATCH 41/53] ACPICA: Fix for Device/Thermal objects with ObjectType and DerefOf Lv Zheng
2017-06-05  8:41 ` [PATCH 42/53] ACPICA: Update two error messages to emit control method name Lv Zheng
2017-06-05  8:41 ` [PATCH 43/53] ACPICA: Changing External to a named object Lv Zheng
2017-06-05  8:41 ` [PATCH 44/53] ACPICA: Changed Gbl_disasm_flag to acpi_gbl_disasm_flag Lv Zheng
2017-06-05  8:41 ` [PATCH 45/53] ACPICA: Disassembler: prevent external op's from opening a new scope Lv Zheng
2017-06-05  8:41 ` [PATCH 46/53] ACPICA: Disassembler: add external op to namespace on first pass Lv Zheng
2017-06-05  8:41 ` [PATCH 47/53] ACPICA: Disassembler: allow conflicting external declarations to be emitted Lv Zheng
2017-06-05  8:42 ` [PATCH 48/53] ACPICA: Improvements for debug output only Lv Zheng
2017-06-05  8:42 ` [PATCH 49/53] ACPICA: Unix application OSL: Correctly handle control-c (EINTR) Lv Zheng
2017-06-05  8:42 ` [PATCH 50/53] ACPICA: Simplify output for the ACPI Debug Object Lv Zheng
2017-06-05  8:42 ` [PATCH 51/53] ACPICA: acpiexec: enhance local signal handler Lv Zheng
2017-06-05  8:42 ` [PATCH 52/53] ACPICA: Update a couple of debug output messages Lv Zheng
2017-06-05  8:42 ` [PATCH 53/53] ACPICA: Update version to 20170531 Lv Zheng
2017-06-05  8:45 ` [PATCH 06/53] ACPICA: Utilities: Make a notify value reserved Lv Zheng

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=278c0445732719260d456f9ef8d3adac214bcf45.1496650343.git.lv.zheng@intel.com \
    --to=lv.zheng@intel.com \
    --cc=len.brown@intel.com \
    --cc=linux-acpi@vger.kernel.org \
    --cc=rafael.j.wysocki@intel.com \
    --cc=rjw@rjwysocki.net \
    --cc=robert.moore@intel.com \
    --cc=zetalog@gmail.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.