Implement the MADT for armv8 foundation model, There are 8 GIC struct entries in MADT, which stands for 8 cpus in the system. since 4 cpus was supported on armv8 foundation model, so I disabled 4 cpus to test the cpu topology and cpu hot-plug.
Signed-off-by: Hanjun Guo hanjun.guo@linaro.org --- arch/arm64/boot/asl/foundation-v8.acpi/apic.asl | 169 +++++++++++------------ 1 file changed, 81 insertions(+), 88 deletions(-)
diff --git a/arch/arm64/boot/asl/foundation-v8.acpi/apic.asl b/arch/arm64/boot/asl/foundation-v8.acpi/apic.asl index b301712..60d1f56 100644 --- a/arch/arm64/boot/asl/foundation-v8.acpi/apic.asl +++ b/arch/arm64/boot/asl/foundation-v8.acpi/apic.asl @@ -8,126 +8,119 @@ */
[0004] Signature : "APIC" -[0004] Table Length : 000000F6 -[0001] Revision : 01 -[0001] Checksum : B0 +[0004] Table Length : 000000F6 // should be updated when table finished? +[0001] Revision : 03 +[0001] Checksum : B0 // update it too? [0006] Oem ID : "LINARO" [0008] Oem Table ID : "FOUNDATI" [0004] Oem Revision : 00000001 [0004] Asl Compiler ID : "INTL" [0004] Asl Compiler Revision : 20110623
-[0004] Local Apic Address : 00000000 +[0004] Local Apic Address : 2C002000 [0004] Flags (decoded below) : 00000001 - PC-AT Compatibility : 1 + PC-AT Compatibility : 0
-[0001] Subtable Type : 00 [Processor Local APIC] -[0001] Length : 08 -[0001] Processor ID : 00 -[0001] Local Apic ID : 00 +[0001] Subtable Type : 0B [Generic Interrupt Controller] +[0001] Length : 28 +[0002] Reserved : 0000 +[0004] Local GIC Hardware ID : 00000000 // should this value be equal to FDT provided? +[0004] Processor UID : 00000000 [0004] Flags (decoded below) : 00000001 Processor Enabled : 1 +[0004] Parking Protocol Version : 00000000 +[0004] Performance Interrupt : 00000000 +[0008] Parked Address : 0000000000000000 +[0008] Base Address : 000000002C002000 // this is the foundation model's GIC address
-[0001] Subtable Type : 01 [I/O APIC] -[0001] Length : 0C -[0001] I/O Apic ID : 01 -[0001] Reserved : 00 -[0004] Address : 00000000 -[0004] Interrupt : 00000000 - -[0001] Subtable Type : 02 [Interrupt Source Override] -[0001] Length : 0A -[0001] Bus : 00 -[0001] Source : 00 -[0004] Interrupt : 00000000 -[0002] Flags (decoded below) : 0000 - Polarity : 0 - Trigger Mode : 0 - -[0001] Subtable Type : 03 [NMI Source] -[0001] Length : 08 -[0002] Flags (decoded below) : 000D - Polarity : 1 - Trigger Mode : 3 -[0004] Interrupt : 00000001 - -[0001] Subtable Type : 04 [Local APIC NMI] -[0001] Length : 06 -[0001] Processor ID : 00 -[0002] Flags (decoded below) : 0005 - Polarity : 1 - Trigger Mode : 1 -[0001] Interrupt Input LINT : 01 - -[0001] Subtable Type : 05 [Local APIC Address Override] -[0001] Length : 0C +[0001] Subtable Type : 0B [Generic Interrupt Controller] +[0001] Length : 28 [0002] Reserved : 0000 -[0008] APIC Address : 0000000000000000 - -[0001] Subtable Type : 06 [I/O SAPIC] -[0001] Length : 10 -[0001] I/O Sapic ID : 00 -[0001] Reserved : 00 -[0004] Interrupt Base : 00000000 -[0008] Address : 0000000000000000 - -[0001] Subtable Type : 07 [Local SAPIC] -[0001] Length : 16 -[0001] Processor ID : 00 -[0001] Local Sapic ID : 00 -[0001] Local Sapic EID : 00 -[0003] Reserved : 000000 +[0004] Local GIC Hardware ID : 00000001 +[0004] Processor UID : 00000001 [0004] Flags (decoded below) : 00000001 Processor Enabled : 1 -[0004] Processor UID : 00000000 -[0006] Processor UID String : "\CPU0" +[0004] Parking Protocol Version : 00000000 +[0004] Performance Interrupt : 00000000 +[0008] Parked Address : 0000000000000000 +[0008] Base Address : 000000002C002000
-[0001] Subtable Type : 08 [Platform Interrupt Sources] -[0001] Length : 10 -[0002] Flags (decoded below) : 0005 - Polarity : 1 - Trigger Mode : 1 -[0001] InterruptType : 00 -[0001] Processor ID : 00 -[0001] Processor EID : 00 -[0001] I/O Sapic Vector : 00 -[0004] Interrupt : 00000001 +[0001] Subtable Type : 0B [Generic Interrupt Controller] +[0001] Length : 28 +[0002] Reserved : 0000 +[0004] Local GIC Hardware ID : 00000002 +[0004] Processor UID : 00000002 [0004] Flags (decoded below) : 00000001 - CPEI Override : 1 + Processor Enabled : 1 +[0004] Parking Protocol Version : 00000000 +[0004] Performance Interrupt : 00000000 +[0008] Parked Address : 0000000000000000 +[0008] Base Address : 000000002C002000
-[0001] Subtable Type : 09 [Processor Local x2APIC] -[0001] Length : 10 +[0001] Subtable Type : 0B [Generic Interrupt Controller] +[0001] Length : 28 [0002] Reserved : 0000 -[0004] Processor x2Apic ID : 00000000 +[0004] Local GIC Hardware ID : 00000003 +[0004] Processor UID : 00000003 [0004] Flags (decoded below) : 00000001 Processor Enabled : 1 -[0004] Processor UID : 00000000 +[0004] Parking Protocol Version : 00000000 +[0004] Performance Interrupt : 00000000 +[0008] Parked Address : 0000000000000000 +[0008] Base Address : 000000002C002000
-[0001] Subtable Type : 0A [Local x2APIC NMI] -[0001] Length : 0C -[0002] Flags (decoded below) : 0005 - Polarity : 1 - Trigger Mode : 1 -[0004] Processor UID : 00000000 -[0001] Interrupt Input LINT : 00 -[0003] Reserved : 000000 +[0001] Subtable Type : 0B [Generic Interrupt Controller] +[0001] Length : 28 +[0002] Reserved : 0000 +[0004] Local GIC Hardware ID : 00000004 +[0004] Processor UID : 00000004 +[0004] Flags (decoded below) : 00000000 + Processor Enabled : 0 +[0004] Parking Protocol Version : 00000000 +[0004] Performance Interrupt : 00000000 +[0008] Parked Address : 0000000000000000 +[0008] Base Address : 000000002C002000
[0001] Subtable Type : 0B [Generic Interrupt Controller] [0001] Length : 28 [0002] Reserved : 0000 -[0004] Local GIC Hardware ID : 00000000 -[0004] Processor UID : 00000000 -[0004] Flags (decoded below) : 00000001 - Processor Enabled : 1 +[0004] Local GIC Hardware ID : 00000005 +[0004] Processor UID : 00000005 +[0004] Flags (decoded below) : 00000000 + Processor Enabled : 0 +[0004] Parking Protocol Version : 00000000 +[0004] Performance Interrupt : 00000000 +[0008] Parked Address : 0000000000000000 +[0008] Base Address : 000000002C002000 + +[0001] Subtable Type : 0B [Generic Interrupt Controller] +[0001] Length : 28 +[0002] Reserved : 0000 +[0004] Local GIC Hardware ID : 00000006 +[0004] Processor UID : 00000006 +[0004] Flags (decoded below) : 00000000 + Processor Enabled : 0 +[0004] Parking Protocol Version : 00000000 +[0004] Performance Interrupt : 00000000 +[0008] Parked Address : 0000000000000000 +[0008] Base Address : 000000002C002000 + +[0001] Subtable Type : 0B [Generic Interrupt Controller] +[0001] Length : 28 +[0002] Reserved : 0000 +[0004] Local GIC Hardware ID : 00000007 +[0004] Processor UID : 00000007 +[0004] Flags (decoded below) : 00000000 + Processor Enabled : 0 [0004] Parking Protocol Version : 00000000 [0004] Performance Interrupt : 00000000 [0008] Parked Address : 0000000000000000 -[0008] Base Address : 0000000000000000 +[0008] Base Address : 000000002C002000
[0001] Subtable Type : 0C [Generic Interrupt Distributor] [0001] Length : 18 [0002] Reserved : 0000 [0004] Local GIC Hardware ID : 00000000 -[0008] Base Address : 0000000000000000 +[0008] Base Address : 000000002C001000 [0004] Interrupt Base : 00000000 [0004] Reserved : 00000000