commit 242118d56b2284c586eefb99d42f8734eaf3edf7 Author: Ashok Kumar Date: Tue Dec 2 15:22:25 2014 +0530 acpi: acpi tables for qemu diff --git a/ArmPlatformPkg/ArmVirtualizationPkg/AcpiTables/Pci/AcpiTables.inf b/ArmPlatformPkg/ArmVirtualizationPkg/AcpiTables/Pci/AcpiTables.inf new file mode 100644 index 0000000..34b65be --- /dev/null +++ b/ArmPlatformPkg/ArmVirtualizationPkg/AcpiTables/Pci/AcpiTables.inf @@ -0,0 +1,34 @@ +## +# Component description file for PlatformAcpiTables module. +# +# ACPI table data and ASL sources required to boot the platform. +# +# Copyright (c) 2013, AppliedMicro Corp. All rights reserved. +# +# This program and the accompanying materials +# are licensed and made available under the terms and conditions of the BSD License +# which accompanies this distribution. The full text of the license may be found at +# http://opensource.org/licenses/bsd-license.php +# +# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. +# +## + +[Defines] + INF_VERSION = 0x00010005 + BASE_NAME = PlatformAcpiTables + FILE_GUID = 7E374E25-8E01-4FEE-87F2-390C23C606CD + MODULE_TYPE = USER_DEFINED + VERSION_STRING = 1.0 + +[Sources] + Apic.asl + Facp.asl + Dsdt.asl + Gtdt.asl + Srat.asl + Mcfg.asl + +[Packages] + MdePkg/MdePkg.dec diff --git a/ArmPlatformPkg/ArmVirtualizationPkg/AcpiTables/Pci/Apic.asl b/ArmPlatformPkg/ArmVirtualizationPkg/AcpiTables/Pci/Apic.asl new file mode 100644 index 0000000..5ff9417 --- /dev/null +++ b/ArmPlatformPkg/ArmVirtualizationPkg/AcpiTables/Pci/Apic.asl @@ -0,0 +1,77 @@ +/** + * Copyright (c) 2013, AppliedMicro Corp. All rights reserved. + * + * This program and the accompanying materials are licensed and made + * available under the terms and conditions of the BSD License which + * accompanies this distribution. The full text of the license may be + * found at * http://opensource.org/licenses/bsd-license.php + * + * THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, + * WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. + * + * APIC Table for X-Gene Processor + * + * Format: [ByteLength] FieldName : HexFieldValue + * + **/ + +[0004] Signature : "APIC" [Multiple APIC Description Table (MADT)] +[0004] Table Length : 00000000 +[0001] Revision : 03 +[0001] Checksum : 00 +[0006] Oem ID : "QEMU " +[0008] Oem Table ID : "VIRT " +[0004] Oem Revision : 00000003 +[0004] Asl Compiler ID : "INTL" +[0004] Asl Compiler Revision : 20140724 + +[0004] Local Apic Address : 08010000 +[0004] Flags (decoded below) : 00000000 + PC-AT Compatibility : 0 + +[0001] Subtable Type : 0B [Generic Interrupt Controller] +[0001] Length : 28 +[0002] Reserved : 0000 +[0004] CPU Interface Number : 00000000 +[0004] Processor UID : 00000000 +[0004] Flags (decoded below) : 00000001 + Processor Enabled : 1 + Performance Interrupt Trigger Mode : 0 + Virtual GIC Interrupt Trigger Mode : 0 +[0004] Parking Protocol Version : 00000000 +[0004] Performance Interrupt : 00000000 +[0008] Parked Address : 0x00000000000000 +[0008] Base Address : 0000000008010000 +[0008] Virtual GIC Base Address : 0000000000000000 +[0008] Hypervisor GIC Base Address : 0000000000000000 +[0004] Virtual GIC Interrupt : 00000000 +[0008] Redistributor Base Address : 0000000000000000 +[0008] ARM MPIDR : 0000000000000000 + +[0001] Subtable Type : 0B [Generic Interrupt Controller] +[0001] Length : 28 +[0002] Reserved : 0000 +[0004] CPU Interface Number : 00000000 +[0004] Processor UID : 00000001 +[0004] Flags (decoded below) : 00000001 + Processor Enabled : 1 + Performance Interrupt Trigger Mode : 0 + Virtual GIC Interrupt Trigger Mode : 0 +[0004] Parking Protocol Version : 00000000 +[0004] Performance Interrupt : 00000000 +[0008] Parked Address : 0x00000000000000 +[0008] Base Address : 0000000008010000 +[0008] Virtual GIC Base Address : 0000000000000000 +[0008] Hypervisor GIC Base Address : 0000000000000000 +[0004] Virtual GIC Interrupt : 00000000 +[0008] Redistributor Base Address : 0000000000000000 +[0008] ARM MPIDR : 0000000000000101 + + +[0001] Subtable Type : 0C [Generic Interrupt Distributor] +[0001] Length : 18 +[0002] Reserved : 0000 +[0004] Local GIC Hardware ID : 00000000 +[0008] Base Address : 0000000008000000 +[0004] Interrupt Base : 00000000 +[0004] Reserved : 00000000 diff --git a/ArmPlatformPkg/ArmVirtualizationPkg/AcpiTables/Pci/Dsdt.asl b/ArmPlatformPkg/ArmVirtualizationPkg/AcpiTables/Pci/Dsdt.asl new file mode 100644 index 0000000..a5aa8fa --- /dev/null +++ b/ArmPlatformPkg/ArmVirtualizationPkg/AcpiTables/Pci/Dsdt.asl @@ -0,0 +1,161 @@ +DefinitionBlock("Dsdt.aml", "DSDT", 0x05, "QEMU ", "VIRT", 1) { + Scope (_SB_) + { + Device(CPU0) { // Cluster 0, Cpu 0 + Name(_HID, "ACPI0007") + Name(_UID, 0) + } + Device(CPU1) { // Cluster 0, Cpu 0 + Name(_HID, "ACPI0007") + Name(_UID, 1) + } + // VIRTIO + Device (VR28) { + Name (_HID, "LNRO0005") + Name (_UID, 28) + Name (_CRS, ResourceTemplate() { + Memory32Fixed (ReadWrite, 0x0a003800, 0x0200) + Interrupt (ResourceConsumer, Level, ActiveHigh, Exclusive) {0x4c} + }) + } + Device (VR29) { + Name (_HID, "LNRO0005") + Name (_UID, 29) + Name (_CRS, ResourceTemplate() { + Memory32Fixed (ReadWrite, 0x0a003a00, 0x0200) + Interrupt (ResourceConsumer, Level, ActiveHigh, Exclusive) {0x4d} + }) + } + Device (VR30) { + Name (_HID, "LNRO0005") + Name (_UID, 30) + Name (_CRS, ResourceTemplate() { + Memory32Fixed (ReadWrite, 0x0a003c00, 0x0200) + Interrupt (ResourceConsumer, Level, ActiveHigh, Exclusive) {0x4e} + }) + } + Device (VR31) { + Name (_HID, "LNRO0005") + Name (_UID, 31) + Name (_CRS, ResourceTemplate() { + Memory32Fixed (ReadWrite, 0x0a003e00, 0x0200) + Interrupt (ResourceConsumer, Level, ActiveHigh, Exclusive) {0x4f} + }) + } + + Device(COM0) { + Name(_HID, "ARMH0011") + Name(_CID, "PL011") + Name(_UID, Zero) + Name(_ADR, 0x09000000) + Name(_CRS, ResourceTemplate() { + Memory32Fixed(ReadWrite, 0x09000000, 0x1000) + Interrupt(ResourceConsumer, Level, ActiveHigh, Exclusive) { 0x21 } + }) + } + Device(PCI0) { + Name (_HID, EisaId ("PNP0A03")) // _HID: Hardware ID + Name (_CID, EisaId ("PNP0A08")) // _CID: Compatible ID + Name (_PXM, 0x1) + Name (RSRC, ResourceTemplate () + { + WordBusNumber (ResourceProducer, MinFixed, MaxFixed, PosDecode, + 0x0000, // Granularity + 0x0000, // Range Minimum + 0x000F, // Range Maximum + 0x0000, // Translation Offset + 0x0010, // Length + 0x00,, ) + DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed, Cacheable, ReadWrite, + 0x00000000, // Granularity + 0x12000000, // Range Minimum + 0x3FFFFFFF, // Range Maximum + 0x00000000, // Translation Offset + 0x2e000000, // Length + 0x00,, , AddressRangeMemory, TypeStatic) + DWordIO (ResourceProducer, MinFixed, MaxFixed, PosDecode, EntireRange, + 0x00000000, // Granularity + 0x11000000, // Range Minimum + 0x1100ffff, // Range Maximum + 0x00000000, // Translation Offset + 0x00010000, // Length + 0x00,, , TypeStatic) + }) + Method (_CRS, 0, Serialized) // _CRS: Current Resource Settings + { + Return (RSRC) + } + Device (LA) + { + Name (_HID, EisaId ("PNP0C0F")) + Name (_UID, 0x1) + Name (_PRS, ResourceTemplate () + { + Interrupt (ResourceProducer, Level, ActiveHigh, Shared, ) { 0x50 } + }) + Name (RSRC, ResourceTemplate() + { + Interrupt (ResourceProducer, Level, ActiveHigh, Shared, ) { 0x50 } + }) + + Method (_CRS, 0, Serialized) + { + Return (RSRC) + } + Method (_SRS, 1, Serialized) + { + + } + } + Device (LA_1) + { + Name (_HID, EisaId ("PNP0C0F")) + Name (_UID, 0x2) + Name (_PRS, ResourceTemplate () + { + Interrupt (ResourceProducer, Level, ActiveHigh, Shared, ) { 0x51 } + }) + Name (RSRC, ResourceTemplate() + { + Interrupt (ResourceProducer, Level, ActiveHigh, Shared, ) { 0x51 } + }) + + Method (_CRS, 0, Serialized) + { + Return (RSRC) + } + Method (_SRS, 1, Serialized) + { + + } + } + + + + Name (_PRT, Package (0x14){ + Package (0x4) { 0x0000FFFF, 0x00, 0x00, 0x50 }, + Package (0x4) { 0x0000FFFF, 0x01, 0x00, 0x51 }, + Package (0x4) { 0x0000FFFF, 0x02, 0x00, 0x52 }, + Package (0x4) { 0x0000FFFF, 0x03, 0x00, 0x53 }, + Package (0x4) { 0x0001FFFF, 0x00, 0x00, 0x54 }, + Package (0x4) { 0x0001FFFF, 0x01, 0x00, 0x55 }, + Package (0x4) { 0x0001FFFF, 0x02, 0x00, 0x56 }, + Package (0x4) { 0x0001FFFF, 0x03, 0x00, 0x57 }, + Package (0x4) { 0x0002FFFF, 0x00, 0x00, 0x58 }, + Package (0x4) { 0x0002FFFF, 0x01, 0x00, 0x59 }, + Package (0x4) { 0x0002FFFF, 0x02, 0x00, 0x5a }, + Package (0x4) { 0x0002FFFF, 0x03, 0x00, 0x5b }, + Package (0x4) { 0x0003FFFF, 0x00, \_SB_.PCI0.LA_1, 0x0 }, + Package (0x4) { 0x0003FFFF, 0x01, 0x00, 0x5d }, + Package (0x4) { 0x0003FFFF, 0x02, 0x00, 0x5e }, + Package (0x4) { 0x0003FFFF, 0x03, 0x00, 0x5f }, + Package (0x4) { 0x0004FFFF, 0x00, \_SB_.PCI0.LA, 0x0 }, + Package (0x4) { 0x0004FFFF, 0x01, 0x00, 0x61 }, + Package (0x4) { 0x0004FFFF, 0x02, 0x00, 0x62 }, + Package (0x4) { 0x0004FFFF, 0x03, 0x00, 0x63 } + + }) + + } + } +} diff --git a/ArmPlatformPkg/ArmVirtualizationPkg/AcpiTables/Pci/Facp.asl b/ArmPlatformPkg/ArmVirtualizationPkg/AcpiTables/Pci/Facp.asl new file mode 100644 index 0000000..c695963 --- /dev/null +++ b/ArmPlatformPkg/ArmVirtualizationPkg/AcpiTables/Pci/Facp.asl @@ -0,0 +1,196 @@ +/* + * Copyright (c) 2013, Al Stone + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED + * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * + * NB: This License is also known as the "BSD 2-Clause License". + * + * + * [FACP] ACPI Table + * + */ + +[0004] Signature : "FACP" +[0004] Table Length : 0000010C +[0001] Revision : 05 +[0001] Checksum : 18 +[0006] Oem ID : "QEMU" +[0008] Oem Table ID : "VIRT" +[0004] Oem Revision : 00000000 +[0004] Asl Compiler ID : "INTL" +[0004] Asl Compiler Revision : 20111123 + +[0004] FACS Address : 00000000 +[0004] DSDT Address : 00000010 +[0001] Model : 00 +[0001] PM Profile : 04 /* Enterprise Server */ +[0002] SCI Interrupt : 0000 +[0004] SMI Command Port : 00000000 +[0001] ACPI Enable Value : 00 +[0001] ACPI Disable Value : 00 +[0001] S4BIOS Command : 00 +[0001] P-State Control : 00 +[0004] PM1A Event Block Address : 00000001 +[0004] PM1B Event Block Address : 00000000 +[0004] PM1A Control Block Address : 00000001 +[0004] PM1B Control Block Address : 00000000 +[0004] PM2 Control Block Address : 00000001 +[0004] PM Timer Block Address : 00000001 +[0004] GPE0 Block Address : 00000001 +[0004] GPE1 Block Address : 00000000 +[0001] PM1 Event Block Length : 04 +[0001] PM1 Control Block Length : 02 +[0001] PM2 Control Block Length : 01 +[0001] PM Timer Block Length : 04 +[0001] GPE0 Block Length : 08 +[0001] GPE1 Block Length : 00 +[0001] GPE1 Base Offset : 00 +[0001] _CST Support : 00 +[0002] C2 Latency : 0000 +[0002] C3 Latency : 0000 +[0002] CPU Cache Size : 0000 +[0002] Cache Flush Stride : 0000 +[0001] Duty Cycle Offset : 00 +[0001] Duty Cycle Width : 00 +[0001] RTC Day Alarm Index : 00 +[0001] RTC Month Alarm Index : 00 +[0001] RTC Century Index : 00 +[0002] Boot Flags (decoded below) : 0000 + Legacy Devices Supported (V2) : 0 + 8042 Present on ports 60/64 (V2) : 0 + VGA Not Present (V4) : 0 + MSI Not Supported (V4) : 0 + PCIe ASPM Not Supported (V4) : 0 + CMOS RTC Not Present (V5) : 0 +[0001] Reserved : 00 +[0004] Flags (decoded below) : 00000000 + WBINVD instruction is operational (V1) : 1 + WBINVD flushes all caches (V1) : 1 + All CPUs support C1 (V1) : 0 + C2 works on MP system (V1) : 0 + Control Method Power Button (V1) : 1 + Control Method Sleep Button (V1) : 1 + RTC wake not in fixed reg space (V1) : 0 + RTC can wake system from S4 (V1) : 0 + 32-bit PM Timer (V1) : 0 + Docking Supported (V1) : 0 + Reset Register Supported (V2) : 0 + Sealed Case (V3) : 0 + Headless - No Video (V3) : 1 + Use native instr after SLP_TYPx (V3) : 0 + PCIEXP_WAK Bits Supported (V4) : 0 + Use Platform Timer (V4) : 0 + RTC_STS valid on S4 wake (V4) : 0 + Remote Power-on capable (V4) : 1 + Use APIC Cluster Model (V4) : 0 + Use APIC Physical Destination Mode (V4) : 0 + Hardware Reduced (V5) : 1 + Low Power S0 Idle (V5) : 1 + +[0012] Reset Register : [Generic Address Structure] +[0001] Space ID : 01 [SystemIO] +[0001] Bit Width : 08 +[0001] Bit Offset : 00 +[0001] Encoded Access Width : 01 [Byte Access:8] +[0008] Address : 0000000000000001 + +[0001] Value to cause reset : 00 +[0002] ARM_BOOT_ARCH (decoded below) : 0001 + Use PSCI 0.2+ : 1 + PSCI Use HVC : 1 +[0001] FADT Minor Revision : 01 +[0008] FACS Address : 0000000000000000 +[0008] DSDT Address : 0000000000000010 +[0012] PM1A Event Block : [Generic Address Structure] +[0001] Space ID : 01 [SystemIO] +[0001] Bit Width : 20 +[0001] Bit Offset : 00 +[0001] Encoded Access Width : 02 [Word Access:16] +[0008] Address : 0000000000000001 + +[0012] PM1B Event Block : [Generic Address Structure] +[0001] Space ID : 01 [SystemIO] +[0001] Bit Width : 00 +[0001] Bit Offset : 00 +[0001] Encoded Access Width : 00 [Undefined/Legacy] +[0008] Address : 0000000000000000 + +[0012] PM1A Control Block : [Generic Address Structure] +[0001] Space ID : 01 [SystemIO] +[0001] Bit Width : 10 +[0001] Bit Offset : 00 +[0001] Encoded Access Width : 02 [Word Access:16] +[0008] Address : 0000000000000001 + +[0012] PM1B Control Block : [Generic Address Structure] +[0001] Space ID : 01 [SystemIO] +[0001] Bit Width : 00 +[0001] Bit Offset : 00 +[0001] Encoded Access Width : 00 [Undefined/Legacy] +[0008] Address : 0000000000000000 + +[0012] PM2 Control Block : [Generic Address Structure] +[0001] Space ID : 01 [SystemIO] +[0001] Bit Width : 08 +[0001] Bit Offset : 00 +[0001] Encoded Access Width : 00 [Undefined/Legacy] +[0008] Address : 0000000000000001 + +[0012] PM Timer Block : [Generic Address Structure] +[0001] Space ID : 01 [SystemIO] +[0001] Bit Width : 20 +[0001] Bit Offset : 00 +[0001] Encoded Access Width : 03 [DWord Access:32] +[0008] Address : 0000000000000001 + +[0012] GPE0 Block : [Generic Address Structure] +[0001] Space ID : 01 [SystemIO] +[0001] Bit Width : 80 +[0001] Bit Offset : 00 +[0001] Encoded Access Width : 01 [Byte Access:8] +[0008] Address : 0000000000000001 + +[0012] GPE1 Block : [Generic Address Structure] +[0001] Space ID : 01 [SystemIO] +[0001] Bit Width : 00 +[0001] Bit Offset : 00 +[0001] Encoded Access Width : 00 [Undefined/Legacy] +[0008] Address : 0000000000000000 + + +[0012] Sleep Control Register : [Generic Address Structure] +[0001] Space ID : 01 [SystemIO] +[0001] Bit Width : 08 +[0001] Bit Offset : 00 +[0001] Encoded Access Width : 01 [Byte Access:8] +[0008] Address : 0000000000000000 + +[0012] Sleep Status Register : [Generic Address Structure] +[0001] Space ID : 01 [SystemIO] +[0001] Bit Width : 08 +[0001] Bit Offset : 00 +[0001] Encoded Access Width : 01 [Byte Access:8] +[0008] Address : 0000000000000000 diff --git a/ArmPlatformPkg/ArmVirtualizationPkg/AcpiTables/Pci/Gtdt.asl b/ArmPlatformPkg/ArmVirtualizationPkg/AcpiTables/Pci/Gtdt.asl new file mode 100644 index 0000000..b131081 --- /dev/null +++ b/ArmPlatformPkg/ArmVirtualizationPkg/AcpiTables/Pci/Gtdt.asl @@ -0,0 +1,91 @@ +/* + * Copyright (c) 2013, Al Stone + * Hanjun Guo + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED + * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * + * NB: This License is also known as the "BSD 2-Clause License". + * + * + * [GTDT] Generic Timer Description Table + * Format: [ByteLength] FieldName : HexFieldValue + * + */ + +[0004] Signature : "GTDT" +[0004] Table Length : 00000050 +[0001] Revision : 02 +[0001] Checksum : F1 +[0006] Oem ID : "QEMU" +[0008] Oem Table ID : "VIRT" +[0004] Oem Revision : 00000001 +[0004] Asl Compiler ID : "INTL" +[0004] Asl Compiler Revision : 20110623 + +[0008] Counter Block Address : 0000000000000000 +[0004] Reserved : 00000000 + +/* In RTSM model's dts file, the last cell of interrupts + * is 0xff01, it means its cpu mask is FF, and trigger type + * and flag is 1 = low-to-high edge triggered. + * + * so in ACPI the Trigger Mode is 1 - Edge triggered, and + * Polarity is 0 - Active high as ACPI spec describled. + * + * using direct mapping for hwirqs, it means that we using + * ID [16, 31] for PPI, not [0, 15] used in FDT. + */ +[0004] Secure EL1 Interrupt : 0000001d +[0004] SEL1 Flags (decoded below) : 00000001 + Trigger Mode : 1 + Polarity : 0 + Always-on : 0 + +[0004] Non-Secure EL1 Interrupt : 0000001e +[0004] NSEL1 Flags (decoded below) : 00000001 + Trigger Mode : 1 + Polarity : 0 + Always-on : 0 + +[0004] Virtual Timer Interrupt : 0000001b +[0004] VT Flags (decoded below) : 00000001 + Trigger Mode : 1 + Polarity : 0 + Always-on : 0 + +[0004] Non-Secure EL2 Interrupt : 0000001a +[0004] NSEL2 Flags (decoded below) : 00000001 + Trigger Mode : 1 + Polarity : 0 + Always-on : 0 + +/* The 64-bit physical address at which the Counter Read block is located */ +[0008] CntReadBase Physical address : 0000000000000000 + +[0004] Platform Timer Count : 00000000 +[0004] Platform Timer Offset : 00000000 + + diff --git a/ArmPlatformPkg/ArmVirtualizationPkg/AcpiTables/Pci/Mcfg.asl b/ArmPlatformPkg/ArmVirtualizationPkg/AcpiTables/Pci/Mcfg.asl new file mode 100644 index 0000000..9b6f619 --- /dev/null +++ b/ArmPlatformPkg/ArmVirtualizationPkg/AcpiTables/Pci/Mcfg.asl @@ -0,0 +1,53 @@ +/* + * Copyright (c) 2013, Al Stone + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED + * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * + * NB: This License is also known as the "BSD 2-Clause License". + * + * + * [MCFG] PCIe Memory Mapped Configuration Table + * Format: [ByteLength] FieldName : HexFieldValue + * + */ + +[0004] Signature : "MCFG" +[0004] Table Length : 0000003C +[0001] Revision : 01 +[0001] Checksum : 19 +[0006] Oem ID : "QEMU" +[0008] Oem Table ID : "VIRT" +[0004] Oem Revision : 00000001 +[0004] Asl Compiler ID : "INTL" +[0004] Asl Compiler Revision : 20100528 + +[0008] Reserved : 0000000000000000 + +[0008] Base Address : 0000000010000000 +[0002] Segment Group Number : 0000 +[0001] Start Bus Number : 00 +[0001] End Bus Number : 0F +[0004] Reserved : 00000000 diff --git a/ArmPlatformPkg/ArmVirtualizationPkg/AcpiTables/Pci/Rsdp.asl b/ArmPlatformPkg/ArmVirtualizationPkg/AcpiTables/Pci/Rsdp.asl new file mode 100644 index 0000000..3dd2068 --- /dev/null +++ b/ArmPlatformPkg/ArmVirtualizationPkg/AcpiTables/Pci/Rsdp.asl @@ -0,0 +1,24 @@ +/** + * Copyright (c) 2013, AppliedMicro Corp. All rights reserved. + * + * This program and the accompanying materials + * are licensed and made available under the terms and conditions of the BSD License + * which accompanies this distribution. The full text of the license may be found at + * http://opensource.org/licenses/bsd-license.php + * + * THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, + * WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. + * + * [RSDP] ACPI Table + * + **/ + +[0008] Signature : "RSD PTR " +[0001] Checksum : 43 +[0006] Oem ID : "QEMU " +[0001] Revision : 02 +[0004] RSDT Address : 00000000 +[0004] Length : 00000024 +[0008] XSDT Address : 0000004003800024 +[0001] Extended Checksum : DC +[0003] Reserved : 000000 diff --git a/ArmPlatformPkg/ArmVirtualizationPkg/AcpiTables/Pci/Srat.asl b/ArmPlatformPkg/ArmVirtualizationPkg/AcpiTables/Pci/Srat.asl new file mode 100644 index 0000000..492bb60 --- /dev/null +++ b/ArmPlatformPkg/ArmVirtualizationPkg/AcpiTables/Pci/Srat.asl @@ -0,0 +1,97 @@ +/* + * Copyright (c) 2013, Al Stone + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED + * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * + * NB: This License is also known as the "BSD 2-Clause License". + * + * + * [SRAT] System Resource Affinity Table + * Format: [ByteLength] FieldName : HexFieldValue + * + */ + +[0004] Signature : "SRAT" +[0004] Table Length : 00000000 +[0001] Revision : 03 +[0001] Checksum : 00 +[0006] Oem ID : "QEMU" +[0008] Oem Table ID : "VIRT" +[0004] Oem Revision : 00000001 +[0004] Asl Compiler ID : "INTL" +[0004] Asl Compiler Revision : 20100528 + +[0004] Table Revision : 00000001 +[0008] Reserved : 0000000000000000 + +[0001] Subtable Type : 03 [Processor GICC Affinity] +[0001] Length : 12 + +[0004] Proximity Domain : 00 +[0004] Acpi Processor UID : 00 +[0004] Flags (decoded below) : 00000001 + Enabled : 1 +[0004] Clock Domain : 00 + +[0001] Subtable Type : 03 [Processor GICC Affinity] +[0001] Length : 12 + +[0004] Proximity Domain : 01 +[0004] Acpi Processor UID : 01 +[0004] Flags (decoded below) : 00000001 + Enabled : 1 +[0004] Clock Domain : 00 + + +[0001] Subtable Type : 01 [Memory Affinity] +[0001] Length : 28 + +[0004] Proximity Domain : 00 +[0002] Reserved1 : 0000 +[0008] Base Address : 0000000040000000 +[0008] Address Length : 0000000020000000 +[0004] Reserved2 : 00000000 +[0004] Flags (decoded below) : 00000001 + Enabled : 1 + Hot Pluggable : 0 + Non-Volatile : 0 +[0008] Reserved3 : 0000000000000000 + +[0001] Subtable Type : 01 [Memory Affinity] +[0001] Length : 28 + +[0004] Proximity Domain : 01 +[0002] Reserved1 : 0000 +[0008] Base Address : 0000000060000000 +[0008] Address Length : 0000000020000000 +[0004] Reserved2 : 00000000 +[0004] Flags (decoded below) : 00000001 + Enabled : 1 + Hot Pluggable : 0 + Non-Volatile : 0 +[0008] Reserved3 : 0000000000000000 + + diff --git a/ArmPlatformPkg/ArmVirtualizationPkg/AcpiTables/Pci/Xsdt.asl b/ArmPlatformPkg/ArmVirtualizationPkg/AcpiTables/Pci/Xsdt.asl new file mode 100644 index 0000000..4a90f40 --- /dev/null +++ b/ArmPlatformPkg/ArmVirtualizationPkg/AcpiTables/Pci/Xsdt.asl @@ -0,0 +1,29 @@ +/** + * Copyright (c) 2013, AppliedMicro Corp. All rights reserved. + * + * This program and the accompanying materials + * are licensed and made available under the terms and conditions of the BSD License + * which accompanies this distribution. The full text of the license may be found at + * http://opensource.org/licenses/bsd-license.php + * + * THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, + * WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. + * + * [XSDT] ACPI Table + * Format: [ByteLength] FieldName : HexFieldValue + * + **/ + +[0004] Signature : "XSDT" [Extended System Description Table] +[0004] Table Length : 00000064 +[0001] Revision : 01 +[0001] Checksum : 8B +[0006] Oem ID : "QEMU " +[0008] Oem Table ID : "VIRT " +[0004] Oem Revision : 00000002 +[0004] Asl Compiler ID : "INTL" +[0004] Asl Compiler Revision : 20100528 + +[0008] ACPI Table Address 0 : 00000004003800060 +[0008] ACPI Table Address 1 : 0000000400380016C +[0008] ACPI Table Address 2 : 000000040038001BC diff --git a/ArmPlatformPkg/ArmVirtualizationPkg/ArmVirtualizationQemu.dsc b/ArmPlatformPkg/ArmVirtualizationPkg/ArmVirtualizationQemu.dsc index 169c07c..55e9417 100644 --- a/ArmPlatformPkg/ArmVirtualizationPkg/ArmVirtualizationQemu.dsc +++ b/ArmPlatformPkg/ArmVirtualizationPkg/ArmVirtualizationQemu.dsc @@ -252,6 +252,14 @@ MdeModulePkg/Universal/Disk/PartitionDxe/PartitionDxe.inf MdeModulePkg/Universal/Disk/UnicodeCollation/EnglishDxe/EnglishDxe.inf + # + # ACPI Support + # + MdeModulePkg/Universal/Acpi/AcpiPlatformDxe/AcpiPlatformDxe.inf + #ArmPlatformPkg/ArmVirtualizationPkg/AcpiTables/Trial/AcpiTables.inf + ArmPlatformPkg/ArmVirtualizationPkg/AcpiTables/Pci/AcpiTables.inf + ArmPlatformPkg/ArmVirtualizationPkg/Modules/MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableDxe.inf + # # Bds # diff --git a/ArmPlatformPkg/ArmVirtualizationPkg/ArmVirtualizationQemu.fdf b/ArmPlatformPkg/ArmVirtualizationPkg/ArmVirtualizationQemu.fdf index 2b71d61..43f9826 100644 --- a/ArmPlatformPkg/ArmVirtualizationPkg/ArmVirtualizationQemu.fdf +++ b/ArmPlatformPkg/ArmVirtualizationPkg/ArmVirtualizationQemu.fdf @@ -138,6 +138,14 @@ READ_LOCK_STATUS = TRUE INF MdeModulePkg/Universal/WatchdogTimerDxe/WatchdogTimer.inf # + # ACPI Table + INF ArmPlatformPkg/ArmVirtualizationPkg/Modules/MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableDxe.inf + INF MdeModulePkg/Universal/Acpi/AcpiPlatformDxe/AcpiPlatformDxe.inf +# INF RuleOverride=ACPITABLE ArmPlatformPkg/ArmVirtualizationPkg/AcpiTables/Trial/AcpiTables.inf + INF RuleOverride=ACPITABLE ArmPlatformPkg/ArmVirtualizationPkg/AcpiTables/Pci/AcpiTables.inf + + + # # FAT filesystem + GPT/MBR partitioning # INF MdeModulePkg/Universal/Disk/DiskIoDxe/DiskIoDxe.inf @@ -333,7 +341,5 @@ READ_LOCK_STATUS = TRUE [Rule.Common.USER_DEFINED.ACPITABLE] FILE FREEFORM = $(NAMED_GUID) { - RAW ACPI |.acpi RAW ASL |.aml - UI STRING="$(MODULE_NAME)" Optional }