Commit 1d7cc03049f7c9c5cced9208a39316c5245ef314

Authored by Bob Moore
Committed by Len Brown
1 parent c2de3a4945

ACPICA: x2APIC support: changes for MADT and SRAT ACPI tables

Support for the x2APIC. There are 2 new subtables for the MADT and
one new subtable for the SRAT. Includes disassembler and acpisrc
support. Data from the Intel 64 Architecture x2APIC Specification,
June 2008.

Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lin Ming <ming.m.lin@intel.com>
Signed-off-by: Andi Kleen <ak@linux.intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>

Showing 2 changed files with 49 additions and 6 deletions Side-by-side Diff

include/acpi/acdisasm.h
... ... @@ -186,6 +186,8 @@
186 186 extern struct acpi_dmtable_info acpi_dm_table_info_madt6[];
187 187 extern struct acpi_dmtable_info acpi_dm_table_info_madt7[];
188 188 extern struct acpi_dmtable_info acpi_dm_table_info_madt8[];
  189 +extern struct acpi_dmtable_info acpi_dm_table_info_madt9[];
  190 +extern struct acpi_dmtable_info acpi_dm_table_info_madt10[];
189 191 extern struct acpi_dmtable_info acpi_dm_table_info_madt_hdr[];
190 192 extern struct acpi_dmtable_info acpi_dm_table_info_mcfg[];
191 193 extern struct acpi_dmtable_info acpi_dm_table_info_mcfg0[];
192 194  
... ... @@ -197,8 +199,10 @@
197 199 extern struct acpi_dmtable_info acpi_dm_table_info_spcr[];
198 200 extern struct acpi_dmtable_info acpi_dm_table_info_spmi[];
199 201 extern struct acpi_dmtable_info acpi_dm_table_info_srat[];
  202 +extern struct acpi_dmtable_info acpi_dm_table_info_srat_hdr[];
200 203 extern struct acpi_dmtable_info acpi_dm_table_info_srat0[];
201 204 extern struct acpi_dmtable_info acpi_dm_table_info_srat1[];
  205 +extern struct acpi_dmtable_info acpi_dm_table_info_srat2[];
202 206 extern struct acpi_dmtable_info acpi_dm_table_info_tcpa[];
203 207 extern struct acpi_dmtable_info acpi_dm_table_info_wdrt[];
204 208  
include/acpi/actbl1.h
... ... @@ -908,7 +908,9 @@
908 908 ACPI_MADT_TYPE_IO_SAPIC = 6,
909 909 ACPI_MADT_TYPE_LOCAL_SAPIC = 7,
910 910 ACPI_MADT_TYPE_INTERRUPT_SOURCE = 8,
911   - ACPI_MADT_TYPE_RESERVED = 9 /* 9 and greater are reserved */
  911 + ACPI_MADT_TYPE_LOCAL_X2APIC = 9,
  912 + ACPI_MADT_TYPE_LOCAL_X2APIC_NMI = 10,
  913 + ACPI_MADT_TYPE_RESERVED = 11 /* 11 and greater are reserved */
912 914 };
913 915  
914 916 /*
... ... @@ -1009,6 +1011,26 @@
1009 1011  
1010 1012 #define ACPI_MADT_CPEI_OVERRIDE (1)
1011 1013  
  1014 +/* 9: Processor Local X2_APIC (07/2008) */
  1015 +
  1016 +struct acpi_madt_local_x2apic {
  1017 + struct acpi_subtable_header header;
  1018 + u16 reserved; /* Reserved - must be zero */
  1019 + u32 local_apic_id; /* Processor X2_APIC ID */
  1020 + u32 lapic_flags;
  1021 + u32 uid; /* Extended X2_APIC processor ID */
  1022 +};
  1023 +
  1024 +/* 10: Local X2APIC NMI (07/2008) */
  1025 +
  1026 +struct acpi_madt_local_x2apic_nmi {
  1027 + struct acpi_subtable_header header;
  1028 + u16 inti_flags;
  1029 + u32 uid; /* Processor X2_APIC ID */
  1030 + u8 lint; /* LINTn to which NMI is connected */
  1031 + u8 reserved[3];
  1032 +};
  1033 +
1012 1034 /*
1013 1035 * Common flags fields for MADT subtables
1014 1036 */
1015 1037  
1016 1038  
... ... @@ -1150,11 +1172,16 @@
1150 1172 enum acpi_srat_type {
1151 1173 ACPI_SRAT_TYPE_CPU_AFFINITY = 0,
1152 1174 ACPI_SRAT_TYPE_MEMORY_AFFINITY = 1,
1153   - ACPI_SRAT_TYPE_RESERVED = 2
  1175 + ACPI_SRAT_TYPE_X2APIC_CPU_AFFINITY = 2,
  1176 + ACPI_SRAT_TYPE_RESERVED = 3 /* 3 and greater are reserved */
1154 1177 };
1155 1178  
1156   -/* SRAT sub-tables */
  1179 +/*
  1180 + * SRAT Sub-tables, correspond to Type in struct acpi_subtable_header
  1181 + */
1157 1182  
  1183 +/* 0: Processor Local APIC/SAPIC Affinity */
  1184 +
1158 1185 struct acpi_srat_cpu_affinity {
1159 1186 struct acpi_subtable_header header;
1160 1187 u8 proximity_domain_lo;
1161 1188  
... ... @@ -1165,10 +1192,8 @@
1165 1192 u32 reserved; /* Reserved, must be zero */
1166 1193 };
1167 1194  
1168   -/* Flags */
  1195 +/* 1: Memory Affinity */
1169 1196  
1170   -#define ACPI_SRAT_CPU_ENABLED (1) /* 00: Use affinity structure */
1171   -
1172 1197 struct acpi_srat_mem_affinity {
1173 1198 struct acpi_subtable_header header;
1174 1199 u32 proximity_domain;
... ... @@ -1185,6 +1210,20 @@
1185 1210 #define ACPI_SRAT_MEM_ENABLED (1) /* 00: Use affinity structure */
1186 1211 #define ACPI_SRAT_MEM_HOT_PLUGGABLE (1<<1) /* 01: Memory region is hot pluggable */
1187 1212 #define ACPI_SRAT_MEM_NON_VOLATILE (1<<2) /* 02: Memory region is non-volatile */
  1213 +
  1214 +/* 2: Processor Local X2_APIC Affinity (07/2008) */
  1215 +
  1216 +struct acpi_srat_x2apic_cpu_affinity {
  1217 + struct acpi_subtable_header header;
  1218 + u16 reserved; /* Reserved, must be zero */
  1219 + u32 proximity_domain;
  1220 + u32 apic_id;
  1221 + u32 flags;
  1222 +};
  1223 +
  1224 +/* Flags for struct acpi_srat_cpu_affinity and struct acpi_srat_x2apic_cpu_affinity */
  1225 +
  1226 +#define ACPI_SRAT_CPU_ENABLED (1) /* 00: Use affinity structure */
1188 1227  
1189 1228 /*******************************************************************************
1190 1229 *