aboutsummaryrefslogtreecommitdiffstats
path: root/xen/include/acpi
diff options
context:
space:
mode:
authorKeir Fraser <keir.fraser@citrix.com>2010-07-16 13:52:18 +0100
committerKeir Fraser <keir.fraser@citrix.com>2010-07-16 13:52:18 +0100
commitb3625d1e2c5815e6d65a47197bebeae2061153ce (patch)
tree0b81045610df333d54d1e17b5d081ca08560b362 /xen/include/acpi
parent1652d36bbe2108109159bf62ec11be2736351c02 (diff)
downloadxen-b3625d1e2c5815e6d65a47197bebeae2061153ce.tar.gz
xen-b3625d1e2c5815e6d65a47197bebeae2061153ce.tar.bz2
xen-b3625d1e2c5815e6d65a47197bebeae2061153ce.zip
ACPI: add support for x2APIC ACPI extensions
All logical processors with APIC ID values of 255 and greater will have their APIC reported through Processor X2APIC structure (type-9 entry type) and all logical processors with APIC ID less than 255 will have their APIC reported through legacy Processor Local APIC (type-0 entry type) only. This is the same case even for NMI structure reporting. The Processor X2APIC Affinity structure provides the association between the X2APIC ID of a logical processor and the proximity domain to which the logical processor belongs. This patch adds 2 new subtables to MADT and one new subtable to SRAT. This patch also changes x86_acpiid_to_apicid from u8 to u32 for x2APIC ID, and changes mp_register_lapic to accept 32-bit id. But there are still some 8-bit apic id hardcode and assumptions in Xen code, it needs to be fixed in future. Signed-off-by: Weidong Han <weidong.han@intel.com>
Diffstat (limited to 'xen/include/acpi')
-rw-r--r--xen/include/acpi/actbl1.h49
1 files changed, 44 insertions, 5 deletions
diff --git a/xen/include/acpi/actbl1.h b/xen/include/acpi/actbl1.h
index a1b1b2ee3e..8b50a05642 100644
--- a/xen/include/acpi/actbl1.h
+++ b/xen/include/acpi/actbl1.h
@@ -404,7 +404,9 @@ enum acpi_madt_type {
ACPI_MADT_TYPE_IO_SAPIC = 6,
ACPI_MADT_TYPE_LOCAL_SAPIC = 7,
ACPI_MADT_TYPE_INTERRUPT_SOURCE = 8,
- ACPI_MADT_TYPE_RESERVED = 9 /* 9 and greater are reserved */
+ ACPI_MADT_TYPE_LOCAL_X2APIC = 9,
+ ACPI_MADT_TYPE_LOCAL_X2APIC_NMI = 10,
+ ACPI_MADT_TYPE_RESERVED = 11 /* 11 and greater are reserved */
};
/*
@@ -505,6 +507,26 @@ struct acpi_madt_interrupt_source {
#define ACPI_MADT_CPEI_OVERRIDE (1)
+/* 9: Processor Local X2APIC (ACPI 4.0) */
+
+struct acpi_madt_local_x2apic {
+ struct acpi_subtable_header header;
+ u16 reserved; /* Reserved - must be zero */
+ u32 local_apic_id; /* Processor X2_APIC ID */
+ u32 lapic_flags;
+ u32 uid; /* Extended X2_APIC processor ID */
+};
+
+/* 10: Local X2APIC NMI (ACPI 4.0) */
+
+struct acpi_madt_local_x2apic_nmi {
+ struct acpi_subtable_header header;
+ u16 inti_flags;
+ u32 uid; /* Processor X2_APIC ID */
+ u8 lint; /* LINTn to which NMI is connected */
+ u8 reserved[3];
+};
+
/*
* Common flags fields for MADT subtables
*/
@@ -646,11 +668,14 @@ struct acpi_table_srat {
enum acpi_srat_type {
ACPI_SRAT_TYPE_CPU_AFFINITY = 0,
ACPI_SRAT_TYPE_MEMORY_AFFINITY = 1,
- ACPI_SRAT_TYPE_RESERVED = 2
+ ACPI_SRAT_TYPE_X2APIC_CPU_AFFINITY = 2,
+ ACPI_SRAT_TYPE_RESERVED = 3 /* 3 and greater are reserved */
};
/* SRAT sub-tables */
+/* 0: Processor Local APIC/SAPIC Affinity */
+
struct acpi_srat_cpu_affinity {
struct acpi_subtable_header header;
u8 proximity_domain_lo;
@@ -661,9 +686,7 @@ struct acpi_srat_cpu_affinity {
u32 reserved; /* Reserved, must be zero */
};
-/* Flags */
-
-#define ACPI_SRAT_CPU_ENABLED (1) /* 00: Use affinity structure */
+/* 1: Memory Affinity */
struct acpi_srat_mem_affinity {
struct acpi_subtable_header header;
@@ -682,6 +705,22 @@ struct acpi_srat_mem_affinity {
#define ACPI_SRAT_MEM_HOT_PLUGGABLE (1<<1) /* 01: Memory region is hot pluggable */
#define ACPI_SRAT_MEM_NON_VOLATILE (1<<2) /* 02: Memory region is non-volatile */
+/* 2: Processor Local X2_APIC Affinity (ACPI 4.0) */
+
+struct acpi_srat_x2apic_cpu_affinity {
+ struct acpi_subtable_header header;
+ u16 reserved; /* Reserved, must be zero */
+ u32 proximity_domain;
+ u32 apic_id;
+ u32 flags;
+ u32 clock_domain;
+ u32 reserved2;
+};
+
+/* Flags for struct acpi_srat_cpu_affinity and struct acpi_srat_x2apic_cpu_affinity */
+
+#define ACPI_SRAT_CPU_ENABLED (1) /* 00: Use affinity structure */
+
/*******************************************************************************
*
* TCPA - Trusted Computing Platform Alliance table