Skip to content

Commit 47920aa

Browse files
hesham-huaweirafaeljw
authored andcommitted
ACPICA: Add support for Arm's MPAM ACPI table version 2
ACPICA commit 005e24bcaa6e4c7db327b4f81fb63b2715aac7e6 Complies with ACPI for Memory System Resource Partitioning and Monitoring 2.0 [1]. Document number: DEN0065, as of December 2022. Support for all types of MPAM resources. No support yet for: 1) MPAM PCC Interface Type 2) The optional Resource-specific data per MSC node, introduced in v2 of the MPAM ACPI spec. [1] https://developer.arm.com/documentation/den0065/latest Link: acpica/acpica@005e24bc Signed-off-by: Hesham Almatary <[email protected]> Signed-off-by: Bob Moore <[email protected]> Signed-off-by: Rafael J. Wysocki <[email protected]>
1 parent f5325cb commit 47920aa

File tree

1 file changed

+116
-0
lines changed

1 file changed

+116
-0
lines changed

include/acpi/actbl2.h

Lines changed: 116 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
#define ACPI_SIG_MADT "APIC" /* Multiple APIC Description Table */
3636
#define ACPI_SIG_MCFG "MCFG" /* PCI Memory Mapped Configuration table */
3737
#define ACPI_SIG_MCHI "MCHI" /* Management Controller Host Interface table */
38+
#define ACPI_SIG_MPAM "MPAM" /* Memory System Resource Partitioning and Monitoring Table */
3839
#define ACPI_SIG_MPST "MPST" /* Memory Power State Table */
3940
#define ACPI_SIG_MSDM "MSDM" /* Microsoft Data Management Table */
4041
#define ACPI_SIG_NFIT "NFIT" /* NVDIMM Firmware Interface Table */
@@ -1332,6 +1333,121 @@ struct acpi_table_mchi {
13321333
u8 pci_function;
13331334
};
13341335

1336+
/*******************************************************************************
1337+
*
1338+
* MPAM - Memory System Resource Partitioning and Monitoring
1339+
*
1340+
* Conforms to "ACPI for Memory System Resource Partitioning and Monitoring 2.0"
1341+
* Document number: ARM DEN 0065, December, 2022.
1342+
*
1343+
******************************************************************************/
1344+
1345+
/* MPAM RIS locator types. Table 11, Location types */
1346+
enum acpi_mpam_locator_type {
1347+
ACPI_MPAM_LOCATION_TYPE_PROCESSOR_CACHE = 0,
1348+
ACPI_MPAM_LOCATION_TYPE_MEMORY = 1,
1349+
ACPI_MPAM_LOCATION_TYPE_SMMU = 2,
1350+
ACPI_MPAM_LOCATION_TYPE_MEMORY_CACHE = 3,
1351+
ACPI_MPAM_LOCATION_TYPE_ACPI_DEVICE = 4,
1352+
ACPI_MPAM_LOCATION_TYPE_INTERCONNECT = 5,
1353+
ACPI_MPAM_LOCATION_TYPE_UNKNOWN = 0xFF
1354+
};
1355+
1356+
/* MPAM Functional dependency descriptor. Table 10 */
1357+
struct acpi_mpam_func_deps {
1358+
u32 producer;
1359+
u32 reserved;
1360+
};
1361+
1362+
/* MPAM Processor cache locator descriptor. Table 13 */
1363+
struct acpi_mpam_resource_cache_locator {
1364+
u64 cache_reference;
1365+
u32 reserved;
1366+
};
1367+
1368+
/* MPAM Memory locator descriptor. Table 14 */
1369+
struct acpi_mpam_resource_memory_locator {
1370+
u64 proximity_domain;
1371+
u32 reserved;
1372+
};
1373+
1374+
/* MPAM SMMU locator descriptor. Table 15 */
1375+
struct acpi_mpam_resource_smmu_locator {
1376+
u64 smmu_interface;
1377+
u32 reserved;
1378+
};
1379+
1380+
/* MPAM Memory-side cache locator descriptor. Table 16 */
1381+
struct acpi_mpam_resource_memcache_locator {
1382+
u8 reserved[7];
1383+
u8 level;
1384+
u32 reference;
1385+
};
1386+
1387+
/* MPAM ACPI device locator descriptor. Table 17 */
1388+
struct acpi_mpam_resource_acpi_locator {
1389+
u64 acpi_hw_id;
1390+
u32 acpi_unique_id;
1391+
};
1392+
1393+
/* MPAM Interconnect locator descriptor. Table 18 */
1394+
struct acpi_mpam_resource_interconnect_locator {
1395+
u64 inter_connect_desc_tbl_off;
1396+
u32 reserved;
1397+
};
1398+
1399+
/* MPAM Locator structure. Table 12 */
1400+
struct acpi_mpam_resource_generic_locator {
1401+
u64 descriptor1;
1402+
u32 descriptor2;
1403+
};
1404+
1405+
union acpi_mpam_resource_locator {
1406+
struct acpi_mpam_resource_cache_locator cache_locator;
1407+
struct acpi_mpam_resource_memory_locator memory_locator;
1408+
struct acpi_mpam_resource_smmu_locator smmu_locator;
1409+
struct acpi_mpam_resource_memcache_locator mem_cache_locator;
1410+
struct acpi_mpam_resource_acpi_locator acpi_locator;
1411+
struct acpi_mpam_resource_interconnect_locator interconnect_ifc_locator;
1412+
struct acpi_mpam_resource_generic_locator generic_locator;
1413+
};
1414+
1415+
/* Memory System Component Resource Node Structure Table 9 */
1416+
struct acpi_mpam_resource_node {
1417+
u32 identifier;
1418+
u8 ris_index;
1419+
u16 reserved1;
1420+
u8 locator_type;
1421+
union acpi_mpam_resource_locator locator;
1422+
u32 num_functional_deps;
1423+
};
1424+
1425+
/* Memory System Component (MSC) Node Structure. Table 4 */
1426+
struct acpi_mpam_msc_node {
1427+
u16 length;
1428+
u8 interface_type;
1429+
u8 reserved;
1430+
u32 identifier;
1431+
u64 base_address;
1432+
u32 mmio_size;
1433+
u32 overflow_interrupt;
1434+
u32 overflow_interrupt_flags;
1435+
u32 reserved1;
1436+
u32 overflow_interrupt_affinity;
1437+
u32 error_interrupt;
1438+
u32 error_interrupt_flags;
1439+
u32 reserved2;
1440+
u32 error_interrupt_affinity;
1441+
u32 max_nrdy_usec;
1442+
u64 hardware_id_linked_device;
1443+
u32 instance_id_linked_device;
1444+
u32 num_resouce_nodes;
1445+
};
1446+
1447+
struct acpi_table_mpam {
1448+
struct acpi_table_header header; /* Common ACPI table header */
1449+
};
1450+
13351451
/*******************************************************************************
13361452
*
13371453
* MPST - Memory Power State Table (ACPI 5.0)

0 commit comments

Comments
 (0)