]>
Commit | Line | Data |
---|---|---|
00e5a55c BS |
1 | From: Bob Moore <robert.moore@intel.com> |
2 | Subject: ACPICA: x2APIC support: changes for MADT and SRAT ACPI tables | |
3 | References: fate 303948 and fate 303984 | |
4 | Patch-Mainline: in 2.6.28 | |
5 | Commit-ID: 1d7cc03049f7c9c5cced9208a39316c5245ef314 | |
6 | ||
7 | Signed-off-by: Thomas Renninger <trenn@suse.de> | |
8 | ||
9 | Support for the x2APIC. There are 2 new subtables for the MADT and | |
10 | one new subtable for the SRAT. Includes disassembler and acpisrc | |
11 | support. Data from the Intel 64 Architecture x2APIC Specification, | |
12 | June 2008. | |
13 | ||
14 | Signed-off-by: Bob Moore <robert.moore@intel.com> | |
15 | Signed-off-by: Lin Ming <ming.m.lin@intel.com> | |
16 | Signed-off-by: Andi Kleen <ak@linux.intel.com> | |
17 | Signed-off-by: Len Brown <len.brown@intel.com> | |
18 | ||
19 | diff --git a/include/acpi/acdisasm.h b/include/acpi/acdisasm.h | |
20 | index f53faca..0c1ed38 100644 | |
21 | --- a/include/acpi/acdisasm.h | |
22 | +++ b/include/acpi/acdisasm.h | |
23 | @@ -186,6 +186,8 @@ extern struct acpi_dmtable_info acpi_dm_table_info_madt5[]; | |
24 | extern struct acpi_dmtable_info acpi_dm_table_info_madt6[]; | |
25 | extern struct acpi_dmtable_info acpi_dm_table_info_madt7[]; | |
26 | extern struct acpi_dmtable_info acpi_dm_table_info_madt8[]; | |
27 | +extern struct acpi_dmtable_info acpi_dm_table_info_madt9[]; | |
28 | +extern struct acpi_dmtable_info acpi_dm_table_info_madt10[]; | |
29 | extern struct acpi_dmtable_info acpi_dm_table_info_madt_hdr[]; | |
30 | extern struct acpi_dmtable_info acpi_dm_table_info_mcfg[]; | |
31 | extern struct acpi_dmtable_info acpi_dm_table_info_mcfg0[]; | |
32 | @@ -197,8 +199,10 @@ extern struct acpi_dmtable_info acpi_dm_table_info_slit[]; | |
33 | extern struct acpi_dmtable_info acpi_dm_table_info_spcr[]; | |
34 | extern struct acpi_dmtable_info acpi_dm_table_info_spmi[]; | |
35 | extern struct acpi_dmtable_info acpi_dm_table_info_srat[]; | |
36 | +extern struct acpi_dmtable_info acpi_dm_table_info_srat_hdr[]; | |
37 | extern struct acpi_dmtable_info acpi_dm_table_info_srat0[]; | |
38 | extern struct acpi_dmtable_info acpi_dm_table_info_srat1[]; | |
39 | +extern struct acpi_dmtable_info acpi_dm_table_info_srat2[]; | |
40 | extern struct acpi_dmtable_info acpi_dm_table_info_tcpa[]; | |
41 | extern struct acpi_dmtable_info acpi_dm_table_info_wdrt[]; | |
42 | ||
43 | diff --git a/include/acpi/actbl1.h b/include/acpi/actbl1.h | |
44 | index d38f9be..63f5b4c 100644 | |
45 | --- a/include/acpi/actbl1.h | |
46 | +++ b/include/acpi/actbl1.h | |
47 | @@ -908,7 +908,9 @@ enum acpi_madt_type { | |
48 | ACPI_MADT_TYPE_IO_SAPIC = 6, | |
49 | ACPI_MADT_TYPE_LOCAL_SAPIC = 7, | |
50 | ACPI_MADT_TYPE_INTERRUPT_SOURCE = 8, | |
51 | - ACPI_MADT_TYPE_RESERVED = 9 /* 9 and greater are reserved */ | |
52 | + ACPI_MADT_TYPE_LOCAL_X2APIC = 9, | |
53 | + ACPI_MADT_TYPE_LOCAL_X2APIC_NMI = 10, | |
54 | + ACPI_MADT_TYPE_RESERVED = 11 /* 11 and greater are reserved */ | |
55 | }; | |
56 | ||
57 | /* | |
58 | @@ -1009,6 +1011,26 @@ struct acpi_madt_interrupt_source { | |
59 | ||
60 | #define ACPI_MADT_CPEI_OVERRIDE (1) | |
61 | ||
62 | +/* 9: Processor Local X2_APIC (07/2008) */ | |
63 | + | |
64 | +struct acpi_madt_local_x2apic { | |
65 | + struct acpi_subtable_header header; | |
66 | + u16 reserved; /* Reserved - must be zero */ | |
67 | + u32 local_apic_id; /* Processor X2_APIC ID */ | |
68 | + u32 lapic_flags; | |
69 | + u32 uid; /* Extended X2_APIC processor ID */ | |
70 | +}; | |
71 | + | |
72 | +/* 10: Local X2APIC NMI (07/2008) */ | |
73 | + | |
74 | +struct acpi_madt_local_x2apic_nmi { | |
75 | + struct acpi_subtable_header header; | |
76 | + u16 inti_flags; | |
77 | + u32 uid; /* Processor X2_APIC ID */ | |
78 | + u8 lint; /* LINTn to which NMI is connected */ | |
79 | + u8 reserved[3]; | |
80 | +}; | |
81 | + | |
82 | /* | |
83 | * Common flags fields for MADT subtables | |
84 | */ | |
85 | @@ -1150,10 +1172,15 @@ struct acpi_table_srat { | |
86 | enum acpi_srat_type { | |
87 | ACPI_SRAT_TYPE_CPU_AFFINITY = 0, | |
88 | ACPI_SRAT_TYPE_MEMORY_AFFINITY = 1, | |
89 | - ACPI_SRAT_TYPE_RESERVED = 2 | |
90 | + ACPI_SRAT_TYPE_X2APIC_CPU_AFFINITY = 2, | |
91 | + ACPI_SRAT_TYPE_RESERVED = 3 /* 3 and greater are reserved */ | |
92 | }; | |
93 | ||
94 | -/* SRAT sub-tables */ | |
95 | +/* | |
96 | + * SRAT Sub-tables, correspond to Type in struct acpi_subtable_header | |
97 | + */ | |
98 | + | |
99 | +/* 0: Processor Local APIC/SAPIC Affinity */ | |
100 | ||
101 | struct acpi_srat_cpu_affinity { | |
102 | struct acpi_subtable_header header; | |
103 | @@ -1165,9 +1192,7 @@ struct acpi_srat_cpu_affinity { | |
104 | u32 reserved; /* Reserved, must be zero */ | |
105 | }; | |
106 | ||
107 | -/* Flags */ | |
108 | - | |
109 | -#define ACPI_SRAT_CPU_ENABLED (1) /* 00: Use affinity structure */ | |
110 | +/* 1: Memory Affinity */ | |
111 | ||
112 | struct acpi_srat_mem_affinity { | |
113 | struct acpi_subtable_header header; | |
114 | @@ -1186,6 +1211,20 @@ struct acpi_srat_mem_affinity { | |
115 | #define ACPI_SRAT_MEM_HOT_PLUGGABLE (1<<1) /* 01: Memory region is hot pluggable */ | |
116 | #define ACPI_SRAT_MEM_NON_VOLATILE (1<<2) /* 02: Memory region is non-volatile */ | |
117 | ||
118 | +/* 2: Processor Local X2_APIC Affinity (07/2008) */ | |
119 | + | |
120 | +struct acpi_srat_x2apic_cpu_affinity { | |
121 | + struct acpi_subtable_header header; | |
122 | + u16 reserved; /* Reserved, must be zero */ | |
123 | + u32 proximity_domain; | |
124 | + u32 apic_id; | |
125 | + u32 flags; | |
126 | +}; | |
127 | + | |
128 | +/* Flags for struct acpi_srat_cpu_affinity and struct acpi_srat_x2apic_cpu_affinity */ | |
129 | + | |
130 | +#define ACPI_SRAT_CPU_ENABLED (1) /* 00: Use affinity structure */ | |
131 | + | |
132 | /******************************************************************************* | |
133 | * | |
134 | * TCPA - Trusted Computing Platform Alliance table |