summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYi Li <yi.li@linaro.org>2013-09-26 11:00:33 -0500
committerLeif Lindholm <leif.lindholm@linaro.org>2014-01-24 15:45:19 +0000
commitab49dde065574297dd5a3ea0ce71fa16df53561f (patch)
treecf2eb3f9de6c8dec27438005757aee7e2552aa96
parent8ba9e9e7987c29aed43afc736f90602be047ab17 (diff)
downloaduefi-ab49dde065574297dd5a3ea0ce71fa16df53561f.tar.gz
ACPI:Convert the table and asl from acpi-asl
Convert the tables and asl code from acpi-asl[ https://git.linaro.org/gitweb?p=arm/acpi/acpi-asl.git;a=summary] Add Arndale/Foundation-V8/RTSM-V8/RTSM-V7 ACPI source. Signed-off-by: Yi Li <yi.li@linaro.org> Signed-off-by: Steven Kinney <steven.kinney@linaro.org>
-rw-r--r--ArmPkg/Drivers/AcpiTables/exynos5250-arndale/AcpiTables.inf87
-rw-r--r--ArmPkg/Drivers/AcpiTables/exynos5250-arndale/Apic.aslc246
-rw-r--r--ArmPkg/Drivers/AcpiTables/exynos5250-arndale/Bert.aslc84
-rw-r--r--ArmPkg/Drivers/AcpiTables/exynos5250-arndale/Csrt.aslc274
-rw-r--r--ArmPkg/Drivers/AcpiTables/exynos5250-arndale/Dsdt.asl172
-rw-r--r--ArmPkg/Drivers/AcpiTables/exynos5250-arndale/Ecdt.aslc70
-rw-r--r--ArmPkg/Drivers/AcpiTables/exynos5250-arndale/Einj.aslc202
-rw-r--r--ArmPkg/Drivers/AcpiTables/exynos5250-arndale/Erst.aslc319
-rw-r--r--ArmPkg/Drivers/AcpiTables/exynos5250-arndale/Facp.aslc177
-rw-r--r--ArmPkg/Drivers/AcpiTables/exynos5250-arndale/Facs.aslc88
-rw-r--r--ArmPkg/Drivers/AcpiTables/exynos5250-arndale/Gtdt.aslc53
-rw-r--r--ArmPkg/Drivers/AcpiTables/exynos5250-arndale/Hest.aslc86
-rw-r--r--ArmPkg/Drivers/AcpiTables/exynos5250-arndale/Mcfg.aslc66
-rw-r--r--ArmPkg/Drivers/AcpiTables/exynos5250-arndale/Mpst.aslc142
-rw-r--r--ArmPkg/Drivers/AcpiTables/exynos5250-arndale/Msct.aslc106
-rw-r--r--ArmPkg/Drivers/AcpiTables/exynos5250-arndale/Oem0.aslc49
-rw-r--r--ArmPkg/Drivers/AcpiTables/exynos5250-arndale/Platform.h78
-rw-r--r--ArmPkg/Drivers/AcpiTables/exynos5250-arndale/Pmtt.aslc216
-rw-r--r--ArmPkg/Drivers/AcpiTables/exynos5250-arndale/Slit.aslc87
-rw-r--r--ArmPkg/Drivers/AcpiTables/exynos5250-arndale/Spmi.aslc86
-rw-r--r--ArmPkg/Drivers/AcpiTables/exynos5250-arndale/Srat.aslc106
-rw-r--r--ArmPkg/Drivers/AcpiTables/exynos5250-arndale/Ssdt0.asl17
-rw-r--r--ArmPkg/Drivers/AcpiTables/exynos5250-arndale/Uefi.aslc57
-rw-r--r--ArmPkg/Drivers/AcpiTables/foundation-v8/AcpiTables.inf86
-rw-r--r--ArmPkg/Drivers/AcpiTables/foundation-v8/Apic.aslc216
-rw-r--r--ArmPkg/Drivers/AcpiTables/foundation-v8/Bert.aslc84
-rw-r--r--ArmPkg/Drivers/AcpiTables/foundation-v8/Csrt.aslc274
-rw-r--r--ArmPkg/Drivers/AcpiTables/foundation-v8/Dsdt.asl269
-rw-r--r--ArmPkg/Drivers/AcpiTables/foundation-v8/Ecdt.aslc70
-rw-r--r--ArmPkg/Drivers/AcpiTables/foundation-v8/Einj.aslc202
-rw-r--r--ArmPkg/Drivers/AcpiTables/foundation-v8/Erst.aslc319
-rw-r--r--ArmPkg/Drivers/AcpiTables/foundation-v8/Facp.aslc175
-rw-r--r--ArmPkg/Drivers/AcpiTables/foundation-v8/Facs.aslc86
-rw-r--r--ArmPkg/Drivers/AcpiTables/foundation-v8/Gtdt.aslc51
-rw-r--r--ArmPkg/Drivers/AcpiTables/foundation-v8/Hest.aslc84
-rw-r--r--ArmPkg/Drivers/AcpiTables/foundation-v8/Mcfg.aslc62
-rw-r--r--ArmPkg/Drivers/AcpiTables/foundation-v8/Mpst.aslc141
-rw-r--r--ArmPkg/Drivers/AcpiTables/foundation-v8/Msct.aslc106
-rw-r--r--ArmPkg/Drivers/AcpiTables/foundation-v8/Oem0.aslc48
-rw-r--r--ArmPkg/Drivers/AcpiTables/foundation-v8/Platform.h78
-rw-r--r--ArmPkg/Drivers/AcpiTables/foundation-v8/Pmtt.aslc216
-rw-r--r--ArmPkg/Drivers/AcpiTables/foundation-v8/Slit.aslc87
-rw-r--r--ArmPkg/Drivers/AcpiTables/foundation-v8/Spmi.aslc86
-rw-r--r--ArmPkg/Drivers/AcpiTables/foundation-v8/Srat.aslc106
-rw-r--r--ArmPkg/Drivers/AcpiTables/foundation-v8/Ssdt0.asl17
-rw-r--r--ArmPkg/Drivers/AcpiTables/foundation-v8/Uefi.aslc57
-rw-r--r--ArmPkg/Drivers/AcpiTables/rtsm_ve-aemv8a/AcpiTables.inf70
-rw-r--r--ArmPkg/Drivers/AcpiTables/rtsm_ve-aemv8a/Apic.aslc216
-rw-r--r--ArmPkg/Drivers/AcpiTables/rtsm_ve-aemv8a/Bert.aslc84
-rw-r--r--ArmPkg/Drivers/AcpiTables/rtsm_ve-aemv8a/Dsdt.asl255
-rw-r--r--ArmPkg/Drivers/AcpiTables/rtsm_ve-aemv8a/Ecdt.aslc70
-rw-r--r--ArmPkg/Drivers/AcpiTables/rtsm_ve-aemv8a/Einj.aslc202
-rw-r--r--ArmPkg/Drivers/AcpiTables/rtsm_ve-aemv8a/Erst.aslc319
-rw-r--r--ArmPkg/Drivers/AcpiTables/rtsm_ve-aemv8a/Facp.aslc175
-rw-r--r--ArmPkg/Drivers/AcpiTables/rtsm_ve-aemv8a/Facs.aslc86
-rw-r--r--ArmPkg/Drivers/AcpiTables/rtsm_ve-aemv8a/Gtdt.aslc51
-rw-r--r--ArmPkg/Drivers/AcpiTables/rtsm_ve-aemv8a/Hest.aslc84
-rw-r--r--ArmPkg/Drivers/AcpiTables/rtsm_ve-aemv8a/Mcfg.aslc62
-rw-r--r--ArmPkg/Drivers/AcpiTables/rtsm_ve-aemv8a/Mpst.aslc141
-rw-r--r--ArmPkg/Drivers/AcpiTables/rtsm_ve-aemv8a/Msct.aslc106
-rw-r--r--ArmPkg/Drivers/AcpiTables/rtsm_ve-aemv8a/Oem0.aslc48
-rw-r--r--ArmPkg/Drivers/AcpiTables/rtsm_ve-aemv8a/Platform.h75
-rw-r--r--ArmPkg/Drivers/AcpiTables/rtsm_ve-aemv8a/Pmtt.aslc216
-rw-r--r--ArmPkg/Drivers/AcpiTables/rtsm_ve-aemv8a/Slit.aslc87
-rw-r--r--ArmPkg/Drivers/AcpiTables/rtsm_ve-aemv8a/Spmi.aslc86
-rw-r--r--ArmPkg/Drivers/AcpiTables/rtsm_ve-aemv8a/Srat.aslc106
-rw-r--r--ArmPkg/Drivers/AcpiTables/rtsm_ve-aemv8a/Ssdt0.asl17
-rw-r--r--ArmPkg/Drivers/AcpiTables/rtsm_ve-aemv8a/Uefi.aslc57
-rw-r--r--ArmPkg/Drivers/AcpiTables/rtsm_ve-v7/AcpiTables.inf70
-rw-r--r--ArmPkg/Drivers/AcpiTables/rtsm_ve-v7/Apic.aslc216
-rw-r--r--ArmPkg/Drivers/AcpiTables/rtsm_ve-v7/Bert.aslc84
-rw-r--r--ArmPkg/Drivers/AcpiTables/rtsm_ve-v7/Dsdt.asl255
-rw-r--r--ArmPkg/Drivers/AcpiTables/rtsm_ve-v7/Ecdt.aslc70
-rw-r--r--ArmPkg/Drivers/AcpiTables/rtsm_ve-v7/Einj.aslc202
-rw-r--r--ArmPkg/Drivers/AcpiTables/rtsm_ve-v7/Erst.aslc319
-rw-r--r--ArmPkg/Drivers/AcpiTables/rtsm_ve-v7/Facp.aslc175
-rw-r--r--ArmPkg/Drivers/AcpiTables/rtsm_ve-v7/Facs.aslc86
-rw-r--r--ArmPkg/Drivers/AcpiTables/rtsm_ve-v7/Gtdt.aslc51
-rw-r--r--ArmPkg/Drivers/AcpiTables/rtsm_ve-v7/Hest.aslc84
-rw-r--r--ArmPkg/Drivers/AcpiTables/rtsm_ve-v7/Mcfg.aslc62
-rw-r--r--ArmPkg/Drivers/AcpiTables/rtsm_ve-v7/Mpst.aslc141
-rw-r--r--ArmPkg/Drivers/AcpiTables/rtsm_ve-v7/Msct.aslc106
-rw-r--r--ArmPkg/Drivers/AcpiTables/rtsm_ve-v7/Oem0.aslc48
-rw-r--r--ArmPkg/Drivers/AcpiTables/rtsm_ve-v7/Platform.h75
-rw-r--r--ArmPkg/Drivers/AcpiTables/rtsm_ve-v7/Pmtt.aslc216
-rw-r--r--ArmPkg/Drivers/AcpiTables/rtsm_ve-v7/Slit.aslc87
-rw-r--r--ArmPkg/Drivers/AcpiTables/rtsm_ve-v7/Spmi.aslc86
-rw-r--r--ArmPkg/Drivers/AcpiTables/rtsm_ve-v7/Srat.aslc106
-rw-r--r--ArmPkg/Drivers/AcpiTables/rtsm_ve-v7/Ssdt0.asl17
-rw-r--r--ArmPkg/Drivers/AcpiTables/rtsm_ve-v7/Uefi.aslc57
90 files changed, 11014 insertions, 0 deletions
diff --git a/ArmPkg/Drivers/AcpiTables/exynos5250-arndale/AcpiTables.inf b/ArmPkg/Drivers/AcpiTables/exynos5250-arndale/AcpiTables.inf
new file mode 100644
index 0000000..cced449
--- /dev/null
+++ b/ArmPkg/Drivers/AcpiTables/exynos5250-arndale/AcpiTables.inf
@@ -0,0 +1,87 @@
+## @file
+# Component description file for PlatformAcpiTables module.
+#
+# ACPI table data and ASL sources required to boot the platform.
+#
+# Copyright (c) 2008 - 2010, Intel Corporation. All rights reserved.<BR>
+# 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.
+#
+##
+
+/*
+ * Copyright (c) 2013 Linaro Limited
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the BSD License which accompanies
+ * this distribution, and is available at
+ * http://opensource.org/licenses/bsd-license.php
+ *
+ * Contributors:
+ * Yi Li - yi.li@linaro.org
+*/
+
+[Defines]
+ INF_VERSION = 0x00010005
+ BASE_NAME = PlatformAcpiTables
+ FILE_GUID = 7E374E25-8E01-4FEE-87F2-390C23C606CD
+ MODULE_TYPE = USER_DEFINED
+ VERSION_STRING = 1.0
+ FFS_EXT = SEC
+ COMPILE_SELECT = .c=acpi_c
+
+[Sources]
+ Platform.h
+ Apic.aslc
+ Bert.aslc
+ Csrt.aslc
+ Dsdt.asl
+ Ecdt.aslc
+ Einj.aslc
+ Erst.aslc
+ Facp.aslc
+ Facs.aslc
+ Gtdt.aslc
+ Hest.aslc
+ Mcfg.aslc
+ Mpst.aslc
+ Msct.aslc
+ Oem0.aslc
+ Pmtt.aslc
+ Slit.aslc
+ Spmi.aslc
+ Srat.aslc
+ Ssdt0.asl
+ Uefi.aslc
+
+ ###rsdp/xsdt created by building the acpi table
+ ###tables need to change format
+ #asf!.asl
+ #bgrt.asl
+ #boot.asl
+ #cpep.asl
+ #dbgp.asl
+ #dmar.asl
+ #fpdt.asl
+ #hpet.asl
+ #ivrs.asl
+ #mchi.asl
+ #r3pt.asl
+ #sbst.asl
+ #slic.asl
+ #spcr.asl
+ #tcpa.asl
+ #tpm2.asl
+ #waet.asl
+ #wadt.asl
+ #wddt.asl
+ #wdrt.asl
+ #wdrt.asl
+
+[Packages]
+ MdePkg/MdePkg.dec \ No newline at end of file
diff --git a/ArmPkg/Drivers/AcpiTables/exynos5250-arndale/Apic.aslc b/ArmPkg/Drivers/AcpiTables/exynos5250-arndale/Apic.aslc
new file mode 100644
index 0000000..5e81c5f
--- /dev/null
+++ b/ArmPkg/Drivers/AcpiTables/exynos5250-arndale/Apic.aslc
@@ -0,0 +1,246 @@
+/** @file
+ MADT Table
+
+ This file contains a structure definition for the ACPI 1.0 Multiple APIC
+ Description Table (MADT).
+
+ Copyright (c) 2008 - 2012, Intel Corporation. All rights reserved.<BR>
+ 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.
+
+**/
+
+/*
+ * Copyright (c) 2013 Linaro Limited
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the BSD License which accompanies
+ * this distribution, and is available at
+ * http://opensource.org/licenses/bsd-license.php
+ *
+ * Contributors:
+ * Yi Li - yi.li@linaro.org
+*/
+
+#include <IndustryStandard/Acpi.h>
+#include <Platform.h>
+
+//
+// Local APIC address
+//
+#define EFI_ACPI_LOCAL_APIC_ADDRESS 0x00000000 // TBD
+
+//
+// Multiple APIC Flags are defined in AcpiX.0.h
+//
+#define EFI_ACPI_5_0_MULTIPLE_APIC_FLAGS (EFI_ACPI_1_0_PCAT_COMPAT)
+
+#define ACPI_PROCESSOR_LOCAL_GIC 0xb
+#define ACPI_GIC_DISTRIBUTOR 0xc
+
+//These addresses are defined by the MP shared region defined in the UEFI memory map.
+#define MP_REGISTER_ADDRESS_GIC0 0x80301000
+#define DISTRIBUTOR_PHYSICAL_ADDRESS 0x02000000
+
+#define ACPI_GICC_NUM 0x8
+
+//
+// Ensure proper structure formats
+//
+#pragma pack (1)
+typedef struct
+{
+ EFI_ACPI_5_0_PROCESSOR_LOCAL_SAPIC_STRUCTURE stu;
+ UINT8 str[6];
+}EFI_ACPI_5_0_PROCESSOR_LOCAL_SAPIC_STRUCTURE_EX;
+
+//
+// ACPI 5.0 MADT structure
+//
+typedef struct {
+ EFI_ACPI_5_0_MULTIPLE_APIC_DESCRIPTION_TABLE_HEADER Header;
+ EFI_ACPI_5_0_PROCESSOR_LOCAL_APIC_STRUCTURE LocalGicApic;
+ EFI_ACPI_5_0_IO_APIC_STRUCTURE IOACPI;
+ EFI_ACPI_5_0_INTERRUPT_SOURCE_OVERRIDE_STRUCTURE IntSource;
+ EFI_ACPI_5_0_NON_MASKABLE_INTERRUPT_SOURCE_STRUCTURE Nmi;
+ EFI_ACPI_5_0_LOCAL_APIC_NMI_STRUCTURE LocalApicNmi;
+ EFI_ACPI_5_0_LOCAL_APIC_ADDRESS_OVERRIDE_STRUCTURE LocalAcpiAddr;
+ EFI_ACPI_5_0_IO_SAPIC_STRUCTURE IOSapic;
+ EFI_ACPI_5_0_PROCESSOR_LOCAL_SAPIC_STRUCTURE_EX LocalSapic;
+ EFI_ACPI_5_0_PLATFORM_INTERRUPT_SOURCES_STRUCTURE PlatFormIntSource;
+ EFI_ACPI_5_0_PROCESSOR_LOCAL_X2APIC_STRUCTURE LocalX2Apic;
+ EFI_ACPI_5_0_LOCAL_X2APIC_NMI_STRUCTURE LocalX2ApicNmi;
+ EFI_ACPI_5_0_GIC_STRUCTURE Gic;
+ EFI_ACPI_5_0_GIC_DISTRIBUTOR_STRUCTURE Distributor;
+} EFI_ACPI_5_0_MULTIPLE_APIC_DESCRIPTION_TABLE;
+
+#pragma pack ()
+
+//
+// Multiple APIC Description Table
+//
+EFI_ACPI_5_0_MULTIPLE_APIC_DESCRIPTION_TABLE Madt = {
+ {
+ {
+ EFI_ACPI_5_0_MULTIPLE_APIC_DESCRIPTION_TABLE_SIGNATURE,
+ sizeof (EFI_ACPI_5_0_MULTIPLE_APIC_DESCRIPTION_TABLE),
+ EFI_ACPI_5_0_MULTIPLE_APIC_DESCRIPTION_TABLE_REVISION,
+ 0x00, // Checksum will be updated at runtime
+ {EFI_ACPI_OEM_ID},
+ EFI_ACPI_OEM_TABLE_ID,
+ EFI_ACPI_OEM_REVISION,
+ EFI_ACPI_CREATOR_ID,
+ EFI_ACPI_CREATOR_REVISION
+ },
+
+ //
+ // MADT specific fields
+ //
+ EFI_ACPI_LOCAL_APIC_ADDRESS,
+ EFI_ACPI_5_0_MULTIPLE_APIC_FLAGS
+ },
+
+ //Processor Local APIC
+ {
+ 0x00, //Type:Processor Local APIC
+ sizeof (EFI_ACPI_5_0_PROCESSOR_LOCAL_APIC_STRUCTURE), //Length
+ 0x00, //Processor ID
+ 0x00, //Local Apic ID
+ 0x00000001, //Flags
+ },
+ //I/O APIC
+ {
+ 0x01, //Type:I/O APIC
+ sizeof (EFI_ACPI_5_0_IO_APIC_STRUCTURE), //Length
+ 0x01, //I/O Apic ID
+ 0x00, //Reserved
+ 0x00000000, //Address
+ 0x00000000, //Interrupt
+ },
+ //Interrupt Source Override
+ {
+ 0x02, //Type:Interrupt Source Override
+ sizeof (EFI_ACPI_5_0_INTERRUPT_SOURCE_OVERRIDE_STRUCTURE), //Length
+ 0x00, //Bus
+ 0x00, //Source
+ 0x0000000000, //Interrupt
+ 0x0000, //Flags
+ },
+ //NMI Source
+ {
+ 0x03, //Type:NMI Source
+ sizeof (EFI_ACPI_5_0_NON_MASKABLE_INTERRUPT_SOURCE_STRUCTURE), //Length
+ 0x000D, //Flags
+ 0x00000001, //Interrupt
+ },
+ //Local APIC NMI
+ {
+ 0x04, //Type:Local APIC NMI
+ sizeof (EFI_ACPI_5_0_LOCAL_APIC_NMI_STRUCTURE), //Length
+ 0x00, //Processor ID
+ 0x0005, //Flags
+ 0x01, //Interrupt Input LINT
+
+ },
+ //Local APIC Address Override
+ {
+ 0x05, //Type:Local APIC Address Override
+ sizeof (EFI_ACPI_5_0_LOCAL_APIC_ADDRESS_OVERRIDE_STRUCTURE), //Length
+ 0x00, //Reserved
+ 0x0000000000000000, //APIC Address
+ },
+ //I/O SAPIC
+ {
+ 0x06, //Type:I/O SAPIC
+ sizeof (EFI_ACPI_5_0_IO_SAPIC_STRUCTURE), //Length
+ 0x00, //I/O Sapic ID
+ 0x00, //Reserved
+ 0x00000000, //Interrupt Base
+ 0x0000000000000000 , //Address
+ },
+ //Local SAPIC
+ {
+ 0x07, //Type:Local SAPIC
+ sizeof (EFI_ACPI_5_0_PROCESSOR_LOCAL_SAPIC_STRUCTURE_EX), //Length
+ 0x00, //Processor ID
+ 0x00, //Local Sapic ID
+ 0x00, //Local Sapic EID
+ {0,0,0}, //Reserved
+ 0x00000001, //Flags
+ 0x00000000, //Processor UID
+ {'\\','C','P','U','0','\0'},
+ },
+ //Platform Interrupt Sources
+ {
+ 0x08, //Type:Platform Interrupt Sources
+ sizeof (EFI_ACPI_5_0_PLATFORM_INTERRUPT_SOURCES_STRUCTURE), //Length
+ 0x0005, //Flags
+ 0x00, //InterruptType
+ 0x00, //Processor ID
+ 0x00, //Processor EID
+ 0x00, //I/O Sapic Vector
+ 0x00000001, //Interrupt
+ 0x00000001, //Flags
+ },
+ //Processor Local x2APIC
+ {
+ 0x09, //Type:Processor Local x2APIC
+ sizeof (EFI_ACPI_5_0_PROCESSOR_LOCAL_X2APIC_STRUCTURE), //Length
+ {0,0}, //Reserved
+ 0x00000000, //Processor x2Apic ID
+ 0x00000001, //Flags
+ 0x00000000, //Processor UID
+ },
+ //Local x2APIC NMI
+ {
+ 0x0A, //Type:Local x2APIC NMI
+ sizeof (EFI_ACPI_5_0_LOCAL_X2APIC_NMI_STRUCTURE), //Length
+ 0x0005, //Flags
+ 0x00000000, //Processor UID
+ 0x00, //Interrupt Input LINT
+ {0,0,0}, //Reserved
+ },
+
+ //Generic Interrupt Controller
+ {
+ 0x0B, //Type:Generic Interrupt Controller
+ sizeof (EFI_ACPI_5_0_GIC_STRUCTURE), //Length
+ 0x00, //Reserved
+ 0x00, //Local GIC Hardware ID
+ 0x00, //AcpiProcessorUid
+ 0x00000001, //Flags
+ 0x00000000, //ParkingProtocolVersion
+ 0x00000000, //PerformanceInterruptGsiv
+ 0x0000000000000000, //ParkedAddress
+ 0x0000000000000000, //PhysicalBaseAddress
+ },
+ //Distributor
+ {
+ 0x0C, //Type
+ sizeof (EFI_ACPI_5_0_GIC_DISTRIBUTOR_STRUCTURE), //Length
+ 0, //Reserved1
+ 0, //GicId
+ 0x0000000000000000, //PhysicalBaseAddress
+ 0, //SystemVectorBase
+ 0 //Reserved2
+ }
+
+};
+
+
+VOID*
+ReferenceAcpiTable (
+ VOID
+ )
+{
+ //
+ // Reference the table being generated to prevent the optimizer from removing the
+ // data structure from the exeutable
+ //
+ return (VOID*)&Madt;
+}
diff --git a/ArmPkg/Drivers/AcpiTables/exynos5250-arndale/Bert.aslc b/ArmPkg/Drivers/AcpiTables/exynos5250-arndale/Bert.aslc
new file mode 100644
index 0000000..dac7b5d
--- /dev/null
+++ b/ArmPkg/Drivers/AcpiTables/exynos5250-arndale/Bert.aslc
@@ -0,0 +1,84 @@
+/*
+ * Copyright (c) 2013 Linaro Limited
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the BSD License which accompanies
+ * this distribution, and is available at
+ * http://opensource.org/licenses/bsd-license.php
+ *
+ * Contributors:
+ * Yi Li - yi.li@linaro.org
+*/
+
+#include <IndustryStandard/Acpi.h>
+#include <Platform.h>
+
+// Generic error severity in data entry
+#define BOOT_ERROR_SEVERITY_RECOVERABLE 0
+#define BOOT_ERROR_SEVERITY_FATAL 1
+#define BOOT_ERROR_SEVERITY_CORRECTED 2
+#define BOOT_ERROR_SEVERITY_NONE 3
+
+#pragma pack(1)
+
+// ErrorStatus block record definitions for various errors
+typedef struct {
+ UINT32 UeValid:1;
+ UINT32 CeValid:1;
+ UINT32 MultipleUeValid:1;
+ UINT32 MultipleCeValid:1;
+ UINT32 NumErrorDataEntry:10;
+ UINT32 Resv1:18;
+} BOOT_ERROR_BLOCK_STATUS;
+
+
+typedef struct {
+ // Error Status block
+ BOOT_ERROR_BLOCK_STATUS BlockStatus;
+ UINT32 RawDataOffset;
+ UINT32 RawDataSize;
+ UINT32 ErrDataSize;
+ UINT32 Severity;
+ // Error Status data...
+} EFI_ACPI_5_0_BOOT_ERROR_REGION;
+
+
+typedef struct {
+ EFI_ACPI_DESCRIPTION_HEADER Header;
+ UINT32 BootErrorRegionLen;
+ UINT64 BootErrorRegion;
+} EFI_ACPI_5_0_BOOT_ERROR_RECORD_TABLE;
+
+#pragma pack()
+
+
+
+EFI_ACPI_5_0_BOOT_ERROR_RECORD_TABLE Bert = {
+ {
+ EFI_ACPI_5_0_BOOT_ERROR_RECORD_TABLE_SIGNATURE,
+ sizeof (EFI_ACPI_5_0_BOOT_ERROR_RECORD_TABLE),
+ EFI_ACPI_5_0_BOOT_ERROR_RECORD_TABLE_REVISION,
+ 0x00, // Checksum will be updated at runtime
+ {EFI_ACPI_OEM_ID},
+ EFI_ACPI_OEM_TABLE_ID,
+ 0x02,
+ EFI_ACPI_CREATOR_ID,
+ EFI_ACPI_CREATOR_REVISION
+ },
+ 0x9D, //BootErrorRegionLen
+ 0x43000008 //BootErrorRegion
+
+};
+
+
+VOID*
+ReferenceAcpiTable (
+ VOID
+ )
+{
+ //
+ // Reference the table being generated to prevent the optimizer from removing the
+ // data structure from the exeutable
+ //
+ return (VOID*)&Bert;
+}
diff --git a/ArmPkg/Drivers/AcpiTables/exynos5250-arndale/Csrt.aslc b/ArmPkg/Drivers/AcpiTables/exynos5250-arndale/Csrt.aslc
new file mode 100644
index 0000000..44e516f
--- /dev/null
+++ b/ArmPkg/Drivers/AcpiTables/exynos5250-arndale/Csrt.aslc
@@ -0,0 +1,274 @@
+/*
+ * Copyright (c) 2013 Linaro Limited
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the BSD License which accompanies
+ * this distribution, and is available at
+ * http://opensource.org/licenses/bsd-license.php
+ *
+ * Contributors:
+ * Yi Li - yi.li@linaro.org
+*/
+
+#include <IndustryStandard/Acpi.h>
+#include <Platform.h>
+
+#define ACPI_5_0_CSRT_VERSION 0x1
+
+#define ACPI_RESOURCE_GROUP_NUM 0x2
+#define ACPI_RESOURCE_DESCRIPTOR_NUM0 0x7
+#define ACPI_RESOURCE_DESCRIPTOR_NUM1 0x9
+
+/*resource group header*/
+typedef struct
+{
+ UINT32 Length;
+ UINT32 VendorID;
+ UINT32 SubvendorID;
+ UINT16 DeviceID;
+ UINT16 SubdeviceID;
+ UINT16 Revision;
+ UINT16 Reserved;
+ UINT32 SharedInfoLength;
+}EFI_ACPI_5_0_CRST_RESOURCE_GROUP_HEADER;
+
+/*resource descriptor header*/
+typedef struct
+{
+ UINT32 Length;
+ UINT16 ResourceType;
+ UINT16 ResourceSubType;
+ UINT32 UID;
+}EFI_ACPI_5_0_CRST_RESOURCE_DESCRIPTOR;
+
+
+/*timer share info*/
+typedef struct
+{
+ UINT16 usMajorVersion;
+ UINT16 usMinorVersion;
+ UINT32 uwMMIOBaseAddressLow;
+ UINT32 uwMMIOBaseAddressHigh;
+ UINT32 uwGSIInterrupt;
+ UINT8 ucInterruptPolarity;
+ UINT8 ucInterruptMode;
+ UINT8 ucNumChannels;
+ UINT8 ucDMAAddressWidth;
+ UINT16 usDMAAddressWidth;
+ UINT16 usNumHandshakeSignals;
+ UINT32 uwMaxBlockSize;
+}EFI_ACPI_5_0_CRST_SHARE_INFO;
+
+
+
+/*timer resource group header*/
+typedef struct
+{
+ EFI_ACPI_5_0_CRST_RESOURCE_GROUP_HEADER head;
+ EFI_ACPI_5_0_CRST_SHARE_INFO ShareInfo; /*share info*/
+ EFI_ACPI_5_0_CRST_RESOURCE_DESCRIPTOR ResourceDescriptor[ACPI_RESOURCE_DESCRIPTOR_NUM0];
+}EFI_ACPI_5_0_CRST_RESOURCE_GROUP0;
+
+/*timer resource group header*/
+typedef struct
+{
+ EFI_ACPI_5_0_CRST_RESOURCE_GROUP_HEADER head;
+ EFI_ACPI_5_0_CRST_SHARE_INFO ShareInfo; /*share info*/
+ EFI_ACPI_5_0_CRST_RESOURCE_DESCRIPTOR ResourceDescriptor[ACPI_RESOURCE_DESCRIPTOR_NUM1];
+}EFI_ACPI_5_0_CRST_RESOURCE_GROUP1;
+
+
+
+
+/*CSRT structure*/
+typedef struct {
+ EFI_ACPI_DESCRIPTION_HEADER Header;
+ EFI_ACPI_5_0_CRST_RESOURCE_GROUP0 ResourceGroup0;
+ EFI_ACPI_5_0_CRST_RESOURCE_GROUP1 ResourceGroup1;
+} EFI_ACPI_5_0_CORE_SYSTEM_RESOURCE_TABLE;
+
+
+
+
+EFI_ACPI_5_0_CORE_SYSTEM_RESOURCE_TABLE Csrt = {
+ {
+ EFI_ACPI_5_0_CORE_SYSTEM_RESOURCE_TABLE_SIGNATURE,
+ sizeof (EFI_ACPI_5_0_CORE_SYSTEM_RESOURCE_TABLE),
+ ACPI_5_0_CSRT_VERSION,
+ 0x00, // Checksum will be updated at runtime
+ {EFI_ACPI_OEM_ID_INTEL},
+ EFI_ACPI_OEM_TABLE_ID_INTEL,
+ EFI_ACPI_OEM_REVISION,
+ EFI_ACPI_CREATOR_ID,
+ EFI_ACPI_CREATOR_REVISION
+ },
+ /*EFI_ACPI_5_0_CRST_RESOURCE_GROUP0*/
+ {
+ sizeof(EFI_ACPI_5_0_CRST_RESOURCE_GROUP0), /*Length*/
+ EFI_ACPI_CREATOR_ID, /*VendorID*/
+ 0, /*SubvendorID*/
+ 0x9C60, /*DeviceID*/
+ 0x0, /*SubdeviceID*/
+ 0002, /*Revision*/
+ 0, /*Reserved*/
+ sizeof(EFI_ACPI_5_0_CRST_SHARE_INFO), /*SharedInfoLength*/
+ /*share info*/
+ {
+ 0x1, /*Major Version*/
+ 0x0, /*Minor Version*/
+ 0xB3A00000, /*MMIO Base Address Low*/
+ 0x00000000, /*MMIO Base Address High*/
+ 0x0000002A, /*GSI Interrupt*/
+ 0x2, /*Interrupt Polarity*/
+ 0x0, /*Interrupt Mode*/
+ 0x6, /*Num Channels*/
+ 0x20, /*DMA Address Width*/
+ 0x0, /*Base Request Line*/
+ 0x10, /*Num Handshake Signals*/
+ 0xfff, /*Max Block Size*/
+ },
+ {
+ {
+ sizeof(EFI_ACPI_5_0_CRST_RESOURCE_DESCRIPTOR), /*Length*/
+ 0x3, /*ResourceType*/
+ 0x1, /*ResourceSubType*/
+ 0x20495053 /*UID*/
+ },
+ {
+ sizeof(EFI_ACPI_5_0_CRST_RESOURCE_DESCRIPTOR), /*Length*/
+ 0x3, /*ResourceType*/
+ 0x0, /*ResourceSubType*/
+ 0x30414843 /*UID*/
+ },
+ {
+ sizeof(EFI_ACPI_5_0_CRST_RESOURCE_DESCRIPTOR), /*Length*/
+ 0x3, /*ResourceType*/
+ 0x0, /*ResourceSubType*/
+ 0x31414843 /*UID*/
+ },
+ {
+ sizeof(EFI_ACPI_5_0_CRST_RESOURCE_DESCRIPTOR), /*Length*/
+ 0x3, /*ResourceType*/
+ 0x0, /*ResourceSubType*/
+ 0x32414843 /*UID*/
+ },
+ {
+ sizeof(EFI_ACPI_5_0_CRST_RESOURCE_DESCRIPTOR), /*Length*/
+ 0x3, /*ResourceType*/
+ 0x0, /*ResourceSubType*/
+ 0x33414843 /*UID*/
+ },
+ {
+ sizeof(EFI_ACPI_5_0_CRST_RESOURCE_DESCRIPTOR), /*Length*/
+ 0x3, /*ResourceType*/
+ 0x0, /*ResourceSubType*/
+ 0x34414843 /*UID*/
+ },
+ {
+ sizeof(EFI_ACPI_5_0_CRST_RESOURCE_DESCRIPTOR), /*Length*/
+ 0x3, /*ResourceType*/
+ 0x0, /*ResourceSubType*/
+ 0x35414843 /*UID*/
+ },
+ }
+ },
+ {
+ /*header*/
+ {
+ sizeof(EFI_ACPI_5_0_CRST_RESOURCE_GROUP1), /*Length*/
+ EFI_ACPI_CREATOR_ID, /*VendorID*/
+ 0, /*SubvendorID*/
+ 0x9C60, /*DeviceID*/
+ 0x0, /*SubdeviceID*/
+ 0003, /*Revision*/
+ 0, /*Reserved*/
+ sizeof(EFI_ACPI_5_0_CRST_SHARE_INFO), /*SharedInfoLength*/
+ },
+ /*share info*/
+ {
+ 0x1, /*Major Version*/
+ 0x0, /*Minor Version*/
+ 0x0, /*MMIO Base Address Low*/
+ 0x00000000, /*MMIO Base Address High*/
+ 0x0000002B, /*GSI Interrupt*/
+ 0x2, /*Interrupt Polarity*/
+ 0x0, /*Interrupt Mode*/
+ 0x8, /*Num Channels*/
+ 0x20, /*DMA Address Width*/
+ 0x10, /*Base Request Line*/
+ 0x10, /*Num Handshake Signals*/
+ 0xfff, /*Max Block Size*/
+ },
+ {
+ {
+ sizeof(EFI_ACPI_5_0_CRST_RESOURCE_DESCRIPTOR), /*Length*/
+ 0x3, /*ResourceType*/
+ 0x1, /*ResourceSubType*/
+ 0x20433249 /*UID*/
+ },
+ {
+ sizeof(EFI_ACPI_5_0_CRST_RESOURCE_DESCRIPTOR), /*Length*/
+ 0x3, /*ResourceType*/
+ 0x0, /*ResourceSubType*/
+ 0x30414843 /*UID*/
+ },
+ {
+ sizeof(EFI_ACPI_5_0_CRST_RESOURCE_DESCRIPTOR), /*Length*/
+ 0x3, /*ResourceType*/
+ 0x0, /*ResourceSubType*/
+ 0x31414843 /*UID*/
+ },
+ {
+ sizeof(EFI_ACPI_5_0_CRST_RESOURCE_DESCRIPTOR), /*Length*/
+ 0x3, /*ResourceType*/
+ 0x0, /*ResourceSubType*/
+ 0x32414843 /*UID*/
+ },
+ {
+ sizeof(EFI_ACPI_5_0_CRST_RESOURCE_DESCRIPTOR), /*Length*/
+ 0x3, /*ResourceType*/
+ 0x0, /*ResourceSubType*/
+ 0x33414843 /*UID*/
+ },
+ {
+ sizeof(EFI_ACPI_5_0_CRST_RESOURCE_DESCRIPTOR), /*Length*/
+ 0x3, /*ResourceType*/
+ 0x0, /*ResourceSubType*/
+ 0x34414843 /*UID*/
+ },
+ {
+ sizeof(EFI_ACPI_5_0_CRST_RESOURCE_DESCRIPTOR), /*Length*/
+ 0x3, /*ResourceType*/
+ 0x0, /*ResourceSubType*/
+ 0x35414843 /*UID*/
+ },
+ {
+ sizeof(EFI_ACPI_5_0_CRST_RESOURCE_DESCRIPTOR), /*Length*/
+ 0x3, /*ResourceType*/
+ 0x0, /*ResourceSubType*/
+ 0x36414843 /*UID*/
+ },
+ {
+ sizeof(EFI_ACPI_5_0_CRST_RESOURCE_DESCRIPTOR), /*Length*/
+ 0x3, /*ResourceType*/
+ 0x0, /*ResourceSubType*/
+ 0x37414843 /*UID*/
+ },
+ },
+ },
+
+
+};
+
+
+VOID*
+ReferenceAcpiTable (
+ VOID
+ )
+{
+ //
+ // Reference the table being generated to prevent the optimizer from removing the
+ // data structure from the exeutable
+ //
+ return (VOID*)&Csrt;
+}
diff --git a/ArmPkg/Drivers/AcpiTables/exynos5250-arndale/Dsdt.asl b/ArmPkg/Drivers/AcpiTables/exynos5250-arndale/Dsdt.asl
new file mode 100644
index 0000000..4f97ba9
--- /dev/null
+++ b/ArmPkg/Drivers/AcpiTables/exynos5250-arndale/Dsdt.asl
@@ -0,0 +1,172 @@
+/*
+ * Copyright (c) 2013, Al Stone <al.stone@linaro.org>
+ *
+ * [DSDT] Description of the Arndale board (exynos5250)
+ *
+ * This source is released under the terms of the GPLv2.
+ */
+
+DefinitionBlock (
+ "dsdt.aml", // output filename
+ "DSDT", // table signature
+ 2, // DSDT compliance revision
+ "LINARO", // OEM ID
+ "ARNDALE ", // table ID
+ 0x00000003) // OEM revision
+{
+ Scope (\_SB)
+ {
+ Device (GPB3) {
+ }
+
+ Device (I2C) {
+ Name (_HID, "LINA0001")
+ Name (_UID, 0)
+
+ Method (_CRS, 0x0, Serialized) {
+ Name (RBUF, ResourceTemplate ()
+ {
+ Memory32Fixed (ReadWrite, 0x12C60000, 0x00000100)
+ Interrupt (ResourceConsumer, Level, ActiveLow, Exclusive, , , ) {0x58}
+ GpioIo (Exclusive, PullDefault, , , , "\\_SB.GPB3") {0x2A, 0x2B}
+ })
+ Return (RBUF)
+ }
+
+ Method (DLAY, 0x0, NotSerialized) {
+ Return (100)
+ }
+
+ Method (SADD, 0x0, NotSerialized) {
+ Return (0x66)
+ }
+
+ Method (FREQ, 0x0, NotSerialized) {
+ Return (20000)
+ }
+ }
+
+ Method (_OSC, 4, NotSerialized)
+ {
+ /* Platform-Wide OSPM Capabilities */
+ If(LEqual(Arg0,ToUUID("0811B06E-4A27-44F9-8D60-3CBBC22E7B48")))
+ {
+ /* APEI support unconditionally */
+ Return (Arg3)
+ } Else {
+ CreateDWordField (Arg3, Zero, CDW1)
+ /* Set invalid UUID error bit */
+ Or (CDW1, 0x04, CDW1)
+ Return (Arg3)
+ }
+ }
+
+ Device (HED)
+ {
+ Name (_HID, EisaId ("PNP0C33"))
+ Name (_UID, 0x00)
+ }
+
+ Device (SCK0)
+ {
+ Name (_HID, "ACPI0004")
+ Name (_UID, 0x00)
+ Method (_STA, 0, NotSerialized)
+ {
+ Return (0x0F)
+ }
+
+ Device (PRC0)
+ {
+ Name (_HID, "ACPI0007")
+ Name (_UID, 0x00)
+
+ /* CPU0 will be always present */
+ Method (_STA, 0, NotSerialized)
+ {
+ Return (0x0F)
+ }
+
+ Name (MAT0, Buffer (0x28)
+ {
+ /* 0000 */ 0x0B, 0x28, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* type, len, reserved, gic_id */
+ /* 0008 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, /* uid, flags */
+ /* 0010 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* parking_version, performance_interrupt */
+ /* 0018 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* parked_address */
+ /* 0020 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 /* base_address */
+ })
+
+ Name (MAT1, Buffer (0x28)
+ {
+ /* 0000 */ 0x0B, 0x28, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ /* 0008 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ /* 0010 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ /* 0018 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ /* 0020 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
+ })
+
+ Method (_MAT, 0, NotSerialized)
+ {
+ If (_STA())
+ {
+ Return (MAT0)
+ }
+ Else
+ {
+ Return (MAT1)
+ }
+ }
+ }
+
+ Device (PRC1)
+ {
+ Name (_HID, "ACPI0007")
+ Name (_UID, 0x01)
+
+ Name (STA1, 0x0F)
+ Method (_STA, 0, NotSerialized)
+ {
+ Return (STA1)
+ }
+
+ Method (_EJ0, 1, NotSerialized)
+ {
+ If (LEqual (STA1, 0x0F))
+ {
+ Store (0x00, STA1)
+ }
+ }
+
+ Name (MAT0, Buffer (0x28)
+ {
+ /* 0000 */ 0x0B, 0x28, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, /* type, len, reserved, gic_id */
+ /* 0008 */ 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, /* uid, flags */
+ /* 0010 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* parking_version, performance_interrupt */
+ /* 0018 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* parked_address */
+ /* 0020 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 /* base_address */
+ })
+
+ Name (MAT1, Buffer (0x28)
+ {
+ /* 0000 */ 0x0B, 0x28, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
+ /* 0008 */ 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00,
+ /* 0010 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ /* 0018 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ /* 0020 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
+ })
+
+ Method (_MAT, 0, NotSerialized)
+ {
+ If (_STA())
+ {
+ Return (MAT0)
+ }
+ Else
+ {
+ Return (MAT1)
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/ArmPkg/Drivers/AcpiTables/exynos5250-arndale/Ecdt.aslc b/ArmPkg/Drivers/AcpiTables/exynos5250-arndale/Ecdt.aslc
new file mode 100644
index 0000000..d817d59
--- /dev/null
+++ b/ArmPkg/Drivers/AcpiTables/exynos5250-arndale/Ecdt.aslc
@@ -0,0 +1,70 @@
+/*
+ * Copyright (c) 2013 Linaro Limited
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the BSD License which accompanies
+ * this distribution, and is available at
+ * http://opensource.org/licenses/bsd-license.php
+ *
+ * Contributors:
+ * Yi Li - yi.li@linaro.org
+*/
+
+#include <IndustryStandard/Acpi.h>
+#include <Platform.h>
+
+typedef struct
+{
+ EFI_ACPI_5_0_EMBEDDED_CONTROLLER_BOOT_RESOURCES_TABLE table;
+ UINT8 ucNamepath;
+}EFI_ACPI_5_0_EMBEDDED_CONTROLLER_BOOT_RESOURCES_TABLE_EX;
+
+
+EFI_ACPI_5_0_EMBEDDED_CONTROLLER_BOOT_RESOURCES_TABLE_EX Ecdt= {
+ {
+ {
+ EFI_ACPI_5_0_EMBEDDED_CONTROLLER_BOOT_RESOURCES_TABLE_SIGNATURE,
+ sizeof (EFI_ACPI_5_0_EMBEDDED_CONTROLLER_BOOT_RESOURCES_TABLE_EX),
+ EFI_ACPI_5_0_EMBEDDED_CONTROLLER_BOOT_RESOURCES_TABLE_REVISION,
+ 0x00, // Checksum will be updated at runtime
+ {EFI_ACPI_OEM_ID},
+ EFI_ACPI_OEM_TABLE_ID,
+ EFI_ACPI_OEM_REVISION,
+ EFI_ACPI_CREATOR_ID,
+ EFI_ACPI_CREATOR_REVISION
+ },
+ /*Command/Status Register Generic Address Structure*/
+ {
+ 0x01, //Space ID:SystemIO
+ 0x08, //Bit Width
+ 0x00, //Bit Offset
+ 0x00, //Encoded Access Width
+ 0x0000000000000066, //Address
+ },
+ /*Data Register Generic Address Structure*/
+ {
+ 0x01, //Space ID:SystemIO
+ 0x08, //Bit Width
+ 0x00, //Bit Offset
+ 0x00, //Encoded Access Width
+ 0x0000000000000062, //Address
+ },
+ 0x00000000, //UID
+ 0x9, //GPE Number
+ },
+ 0x0 //Namepath
+};
+
+
+VOID*
+ReferenceAcpiTable (
+ VOID
+ )
+{
+ //
+ // Reference the table being generated to prevent the optimizer from removing the
+ // data structure from the exeutable
+ //
+ return (VOID*)&Ecdt;
+}
+
diff --git a/ArmPkg/Drivers/AcpiTables/exynos5250-arndale/Einj.aslc b/ArmPkg/Drivers/AcpiTables/exynos5250-arndale/Einj.aslc
new file mode 100644
index 0000000..7392cc2
--- /dev/null
+++ b/ArmPkg/Drivers/AcpiTables/exynos5250-arndale/Einj.aslc
@@ -0,0 +1,202 @@
+/*
+ * Copyright (c) 2013 Linaro Limited
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the BSD License which accompanies
+ * this distribution, and is available at
+ * http://opensource.org/licenses/bsd-license.php
+ *
+ * Contributors:
+ * Yi Li - yi.li@linaro.org
+*/
+
+#include <IndustryStandard/Acpi.h>
+#include <Platform.h>
+
+#pragma pack (1)
+typedef struct {
+ UINT8 Operation;
+ UINT8 Instruction;
+ UINT8 Flags;
+ UINT8 Reserved8;
+ EFI_ACPI_5_0_GENERIC_ADDRESS_STRUCTURE Register;
+ UINT64 Value;
+ UINT64 Mask;
+} EFI_ACPI_WHEA_SERIALIZATION_ACTION;
+
+typedef struct {
+ EFI_ACPI_DESCRIPTION_HEADER Header;
+ UINT32 InjectionHeaderSize;
+ UINT32 Resv1;
+ UINT32 InstructionEntryCount;
+} EFI_ACPI_WHEA_ERROR_INJECTION_HEADER;
+
+typedef struct {
+ EFI_ACPI_WHEA_ERROR_INJECTION_HEADER header;
+ EFI_ACPI_WHEA_SERIALIZATION_ACTION InstructionEntry[8];
+} EFI_ACPI_5_0_ERROR_INJECTION_TABLE;
+
+#pragma pack ()
+
+
+EFI_ACPI_5_0_ERROR_INJECTION_TABLE Einj = {
+ {
+ {
+ EFI_ACPI_5_0_ERROR_INJECTION_TABLE_SIGNATURE,
+ sizeof (EFI_ACPI_5_0_ERROR_INJECTION_TABLE),
+ EFI_ACPI_5_0_ERROR_INJECTION_TABLE_REVISION,
+ 0x00, // Checksum will be updated at runtime
+ {EFI_ACPI_OEM_ID},
+ EFI_ACPI_OEM_TABLE_ID,
+ 0x00000002,
+ EFI_ACPI_CREATOR_ID,
+ EFI_ACPI_CREATOR_REVISION
+ },
+ sizeof(EFI_ACPI_WHEA_ERROR_INJECTION_HEADER),
+ EFI_ACPI_RESERVED_DWORD,
+ 0x08, /*Injection Entry Count*/
+ },
+
+ {
+ { //Action0
+ 0x00, // Action:Begin Operation
+ 0x0, // Instruction:Read Register
+ 0x0, // Flags
+ 0x00, // Reserved
+ /*Register Region*/
+ {
+ EFI_ACPI_3_0_SYSTEM_MEMORY, //Space ID
+ 0x40, //Bit Width
+ 0x0, //Bit Offset
+ 0x4, //Encoded Access Width
+ 0x0000000000000000, //Address
+ },
+ 0x0000000000000000, // Value for InjectError()
+ 0xFFFFFFFFFFFFFFFF // Mask is only valid for 32-bits
+ },
+ { //Action1
+ 0x01, // Action:Get Trigger Table
+ 0x0, // Instruction:Read Register
+ 0x0, // Flags
+ 0x00, // Reserved
+ /*Register Region*/
+ {
+ EFI_ACPI_3_0_SYSTEM_MEMORY, //Space ID
+ 0x40, //Bit Width
+ 0x0, //Bit Offset
+ 0x4, //Encoded Access Width
+ 0x0000000000000000, //Address
+ },
+ 0x0000000000000000, // Value for InjectError()
+ 0xFFFFFFFFFFFFFFFF // Mask is only valid for 32-bits
+ },
+ { //Action2
+ 0x02, // Action:Set Error Type
+ 0x2, // Instruction:Write Register
+ 0x1, // Flags
+ 0x00, // Reserved
+ /*Register Region*/
+ {
+ EFI_ACPI_3_0_SYSTEM_MEMORY, //Space ID
+ 0x40, //Bit Width
+ 0x0, //Bit Offset
+ 0x4, //Encoded Access Width
+ 0x0000000000000000, //Address
+ },
+ 0x0000000000000000, // Value for InjectError()
+ 0xFFFFFFFFFFFFFFFF // Mask is only valid for 32-bits
+ },
+ { //Action3
+ 0x03, // Action:Get Error Type
+ 0x0, // Instruction:Read Register
+ 0x0, // Flags
+ 0x00, // Reserved
+ /*Register Region*/
+ {
+ EFI_ACPI_3_0_SYSTEM_MEMORY, //Space ID
+ 0x40, //Bit Width
+ 0x0, //Bit Offset
+ 0x4, //Encoded Access Width
+ 0x0000000000000000, //Address
+ },
+ 0x0000000000000000, // Value for InjectError()
+ 0xFFFFFFFFFFFFFFFF // Mask is only valid for 32-bits
+ },
+ { //Action4
+ 0x04, // Action:End Operation
+ 0x3, // Instruction:Write Register
+ 0x1, // Flags
+ 0x00, // Reserved
+ /*Register Region*/
+ {
+ EFI_ACPI_3_0_SYSTEM_MEMORY, //Space ID
+ 0x40, //Bit Width
+ 0x0, //Bit Offset
+ 0x4, //Encoded Access Width
+ 0x0000000000000000, //Address
+ },
+ 0x0000000000000000, // Value for InjectError()
+ 0xFFFFFFFFFFFFFFFF // Mask is only valid for 32-bits
+ },
+ { //Action5
+ 0x05, // Action:Execute Operation
+ 0x3, // Instruction:Write Register
+ 0x1, // Flags
+ 0x00, // Reserved
+ /*Register Region*/
+ {
+ EFI_ACPI_3_0_SYSTEM_IO, //Space ID
+ 0x10, //Bit Width
+ 0x0, //Bit Offset
+ 0x2, //Encoded Access Width
+ 0x0000000000000000, //Address
+ },
+ 0x0000000000000000, // Value for InjectError()
+ 0xFFFFFFFFFFFFFFFF // Mask is only valid for 32-bits
+ },
+ { //Action6
+ 0x06, // Action:Check Busy Status
+ 0x1, // Instruction:Read Register
+ 0x0, // Flags
+ 0x00, // Reserved
+ /*Register Region*/
+ {
+ EFI_ACPI_3_0_SYSTEM_MEMORY, //Space ID
+ 0x40, //Bit Width
+ 0x0, //Bit Offset
+ 0x4, //Encoded Access Width
+ 0x0000000000000000, //Address
+ },
+ 0x0000000000000000, // Value for InjectError()
+ 0xFFFFFFFFFFFFFFFF // Mask is only valid for 32-bits
+ },
+ { //Action7
+ 0x07, // Action:Get Command Status
+ 0x0, // Instruction:Read Register
+ 0x1, // Flags
+ 0x00, // Reserved
+ /*Register Region*/
+ {
+ EFI_ACPI_3_0_SYSTEM_MEMORY, //Space ID
+ 0x40, //Bit Width
+ 0x0, //Bit Offset
+ 0x4, //Encoded Access Width
+ 0x0000000000000000, //Address
+ },
+ 0x0000000000000000, // Value for InjectError()
+ 0xFFFFFFFFFFFFFFFF // Mask is only valid for 32-bits
+ },
+ },
+};
+
+VOID*
+ReferenceAcpiTable (
+ VOID
+ )
+{
+ //
+ // Reference the table being generated to prevent the optimizer from removing the
+ // data structure from the exeutable
+ //
+ return (VOID*)&Einj;
+}
diff --git a/ArmPkg/Drivers/AcpiTables/exynos5250-arndale/Erst.aslc b/ArmPkg/Drivers/AcpiTables/exynos5250-arndale/Erst.aslc
new file mode 100644
index 0000000..cbceeb2
--- /dev/null
+++ b/ArmPkg/Drivers/AcpiTables/exynos5250-arndale/Erst.aslc
@@ -0,0 +1,319 @@
+/*
+ * Copyright (c) 2013 Linaro Limited
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the BSD License which accompanies
+ * this distribution, and is available at
+ * http://opensource.org/licenses/bsd-license.php
+ *
+ * Contributors:
+ * Yi Li - yi.li@linaro.org
+*/
+
+#include <IndustryStandard/Acpi.h>
+#include <Platform.h>
+
+#define ACTION_BEGIN_WRITE_OPERATION 0x00
+#define ACTION_BEGIN_READ_OPERATION 0x01
+#define ACTION_BEGIN_CLEAR_OPERATION 0x02
+#define ACTION_END_OPERATION 0x03
+#define ACTION_SET_RECORD_OFFSET 0x04
+#define ACTION_EXECUTE_OPEARTION 0x05
+#define ACTION_CHECK_BUSY_STATUS 0x06
+#define ACTION_GET_COMMAND_STATUS 0x07
+#define ACTION_GET_RECORD_IDENTIFIER 0x08
+#define ACTION_SET_RECORD_IDENTIFIER 0x09
+#define ACTION_GET_RECORD_COUNT 0x0A
+#define ACTION_BEGIN_DUMMY_WRITE_OPERATION 0x0B
+#define ACTION_GET_NEXT_RECORD_IDENTIFIER 0x0C
+#define ACTION_GET_ERROR_LOG_ADDRESS_RANGE 0x0D
+#define ACTION_GET_ERROR_LOG_ADDRESS_RANGE_LENGTH 0x0E
+#define ACTION_GET_ERROR_LOG_ADDRESS_RANGE_ATTRIBUTES 0x0F
+
+
+#pragma pack (1)
+
+typedef struct {
+ UINT8 Operation;
+ UINT8 Instruction;
+ UINT8 Flags;
+ UINT8 Reserved8;
+ EFI_ACPI_5_0_GENERIC_ADDRESS_STRUCTURE Register;
+ UINT64 Value;
+ UINT64 Mask;
+} EFI_ACPI_5_0_SERIALIZATION_ACTION;
+
+
+typedef struct {
+ EFI_ACPI_DESCRIPTION_HEADER Header;
+ UINT32 SerializationHeaderSize;
+ UINT32 Resv1;
+ UINT32 InstructionEntryCount;
+ EFI_ACPI_5_0_SERIALIZATION_ACTION InstructionEntry[16];
+} EFI_ACPI_5_0_BOOT_ERROR_RECORD_SERIALIZATION_TABLE;
+
+typedef struct {
+ EFI_ACPI_DESCRIPTION_HEADER Header;
+ UINT32 SerializationHeaderSize;
+ UINT32 Resv1;
+ UINT32 InstructionEntryCount;
+} EFI_ACPI_5_0_SERIALIZATION_ACTION_HEADER;
+#pragma pack ()
+
+
+
+EFI_ACPI_5_0_BOOT_ERROR_RECORD_SERIALIZATION_TABLE Erst = {
+ {
+ EFI_ACPI_5_0_ERROR_RECORD_SERIALIZATION_TABLE_SIGNATURE,
+ sizeof (EFI_ACPI_5_0_BOOT_ERROR_RECORD_SERIALIZATION_TABLE),
+ EFI_ACPI_5_0_ERROR_RECORD_SERIALIZATION_TABLE_REVISION,
+ 0x00, // Checksum will be updated at runtime
+ {EFI_ACPI_OEM_ID},
+ EFI_ACPI_OEM_TABLE_ID,
+ 0x00000002,
+ EFI_ACPI_CREATOR_ID,
+ EFI_ACPI_CREATOR_REVISION
+ },
+ sizeof(EFI_ACPI_5_0_SERIALIZATION_ACTION_HEADER),
+ EFI_ACPI_RESERVED_DWORD,
+ 0x10,
+ {
+ { //Action0
+ 0x00, // Action:Begin Operation
+ 0x3, // Instruction:Write Register
+ 0x0, // Flags
+ 0x00, // Reserved
+ /*Register Region*/
+ EFI_ACPI_3_0_SYSTEM_MEMORY, //Space ID
+ 0x40, //Bit Width
+ 0x0, //Bit Offset
+ 0x4, //Encoded Access Width
+ 0x43000100, //Address
+ 0x0000000000000000, // Value for InjectError()
+ 0xFFFFFFFFFFFFFFFF // Mask is only valid for 32-bits
+ },
+ { //Action1
+ 0x01, // Action:Begin Read Operation
+ 0x3, // Instruction:Write Register
+ 0x0, // Flags
+ 0x00, // Reserved
+ /*Register Region*/
+ EFI_ACPI_3_0_SYSTEM_MEMORY, //Space ID
+ 0x40, //Bit Width
+ 0x0, //Bit Offset
+ 0x4, //Encoded Access Width
+ 0x43000108, //Address
+ 0x0000000000000000, // Value for InjectError()
+ 0xFFFFFFFFFFFFFFFF // Mask is only valid for 32-bits
+ },
+ { //Action2
+ 0x02, // Action:Begin Clear Operation
+ 0x3, // Instruction:Write Register
+ 0x0, // Flags
+ 0x00, // Reserved
+ /*Register Region*/
+ EFI_ACPI_3_0_SYSTEM_MEMORY, //Space ID
+ 0x40, //Bit Width
+ 0x0, //Bit Offset
+ 0x4, //Encoded Access Width
+ 0x43000110, //Address
+ 0x0000000000000000, // Value for InjectError()
+ 0xFFFFFFFFFFFFFFFF // Mask is only valid for 32-bits
+ },
+ { //Action3
+ 0x03, // Action:Begin Clear Operation
+ 0x4, // Instruction:Noop
+ 0x1, // Flags
+ 0x00, // Reserved
+ /*Register Region*/
+ EFI_ACPI_3_0_SYSTEM_MEMORY, //Space ID
+ 0x40, //Bit Width
+ 0x0, //Bit Offset
+ 0x4, //Encoded Access Width
+ 0x43000118, //Address
+ 0x0000000000000000, // Value for InjectError()
+ 0xFFFFFFFFFFFFFFFF // Mask is only valid for 32-bits
+ },
+ { //Action4
+ 0x04, // Action:Begin Clear Operation
+ 0x2, // Instruction:Write Register
+ 0x0, // Flags
+ 0x00, // Reserved
+ /*Register Region*/
+ EFI_ACPI_3_0_SYSTEM_MEMORY, //Space ID
+ 0x40, //Bit Width
+ 0x0, //Bit Offset
+ 0x4, //Encoded Access Width
+ 0x43000120, //Address
+ 0x0000000000000000, // Value for InjectError()
+ 0xFFFFFFFFFFFFFFFF // Mask is only valid for 32-bits
+ },
+ { //Action5
+ 0x05, // Action:Execute Operation
+ 0x3, // Instruction:Write Register
+ 0x0, // Flags
+ 0x00, // Reserved
+ /*Register Region*/
+ EFI_ACPI_5_0_SYSTEM_MEMORY, //Space ID
+ 0x8, //Bit Width
+ 0x0, //Bit Offset
+ 0x1, //Encoded Access Width
+ 0x43000128, //Address
+ 0x0000000000000000, // Value for InjectError()
+ 0xFFFFFFFFFFFFFFFF // Mask is only valid for 32-bits
+ },
+ { //Action6
+ 0x06, // Action:Check Busy Status
+ 0x1, // Instruction:Read Register
+ 0x0, // Flags
+ 0x00, // Reserved
+ /*Register Region*/
+ EFI_ACPI_3_0_SYSTEM_MEMORY, //Space ID
+ 0x40, //Bit Width
+ 0x0, //Bit Offset
+ 0x4, //Encoded Access Width
+ 0x43000130, //Address
+ 0x0000000000000000, // Value for InjectError()
+ 0xFFFFFFFFFFFFFFFF // Mask is only valid for 32-bits
+ },
+ { //Action7
+ 0x07, // Action:Get Command Status
+ 0x0, // Instruction:Read Register
+ 0x0, // Flags
+ 0x00, // Reserved
+ /*Register Region*/
+ EFI_ACPI_3_0_SYSTEM_MEMORY, //Space ID
+ 0x40, //Bit Width
+ 0x0, //Bit Offset
+ 0x4, //Encoded Access Width
+ 0x43000138, //Address
+ 0x0000000000000000, // Value for InjectError()
+ 0xFFFFFFFFFFFFFFFF // Mask is only valid for 32-bits
+ },
+ { //Action8
+ 0x08, // Action:Get Command Status
+ 0x0, // Instruction:Read Register
+ 0x0, // Flags
+ 0x00, // Reserved
+ /*Register Region*/
+ EFI_ACPI_3_0_SYSTEM_MEMORY, //Space ID
+ 0x40, //Bit Width
+ 0x0, //Bit Offset
+ 0x4, //Encoded Access Width
+ 0x43000140, //Address
+ 0x0000000000000000, // Value for InjectError()
+ 0xFFFFFFFFFFFFFFFF // Mask is only valid for 32-bits
+ },
+ { //Action9
+ 0x09, // Action:Set Record Identifier
+ 0x2, // Instruction:Write Register
+ 0x0, // Flags
+ 0x00, // Reserved
+ /*Register Region*/
+ EFI_ACPI_3_0_SYSTEM_MEMORY, //Space ID
+ 0x40, //Bit Width
+ 0x0, //Bit Offset
+ 0x4, //Encoded Access Width
+ 0x43000148, //Address
+ 0x0000000000000000, // Value for InjectError()
+ 0xFFFFFFFFFFFFFFFF // Mask is only valid for 32-bits
+ },
+ { //Action10
+ 0x0A, // Action:Get Record Count
+ 0x0, // Instruction:Read Register
+ 0x0, // Flags
+ 0x00, // Reserved
+ /*Register Region*/
+ EFI_ACPI_3_0_SYSTEM_MEMORY, //Space ID
+ 0x40, //Bit Width
+ 0x0, //Bit Offset
+ 0x4, //Encoded Access Width
+ 0x43000150, //Address
+ 0x0000000000000000, // Value for InjectError()
+ 0xFFFFFFFFFFFFFFFF // Mask is only valid for 32-bits
+ },
+ { //Action11
+ 0x0B, // Action:Begin Dummy Write
+ 0x3, // Instruction:Write Register
+ 0x0, // Flags
+ 0x00, // Reserved
+ /*Register Region*/
+ EFI_ACPI_3_0_SYSTEM_MEMORY, //Space ID
+ 0x40, //Bit Width
+ 0x0, //Bit Offset
+ 0x4, //Encoded Access Width
+ 0x43000158, //Address
+ 0x0000000000000000, // Value for InjectError()
+ 0xFFFFFFFFFFFFFFFF // Mask is only valid for 32-bits
+ },
+ { //Action12
+ 0x0C, // Action:Unused/Unknown Action
+ 0x0, // Instruction:Read Register
+ 0x0, // Flags
+ 0x00, // Reserved
+ /*Register Region*/
+ EFI_ACPI_3_0_SYSTEM_MEMORY, //Space ID
+ 0x40, //Bit Width
+ 0x0, //Bit Offset
+ 0x4, //Encoded Access Width
+ 0x43000160, //Address
+ 0x0000000000000000, // Value for InjectError()
+ 0xFFFFFFFFFFFFFFFF // Mask is only valid for 32-bits
+ },
+ { //Action13
+ 0x0D, // Action:Get Error Address Range
+ 0x0, // Instruction:Read Register
+ 0x0, // Flags
+ 0x00, // Reserved
+ /*Register Region*/
+ EFI_ACPI_3_0_SYSTEM_MEMORY, //Space ID
+ 0x40, //Bit Width
+ 0x0, //Bit Offset
+ 0x4, //Encoded Access Width
+ 0x43000168, //Address
+ 0x0000000000000000, // Value for InjectError()
+ 0xFFFFFFFFFFFFFFFF // Mask is only valid for 32-bits
+ },
+ { //Action14
+ 0x0E, // Action:Get Error Address Length
+ 0x0, // Instruction:Read Register
+ 0x0, // Flags
+ 0x00, // Reserved
+ /*Register Region*/
+ EFI_ACPI_3_0_SYSTEM_MEMORY, //Space ID
+ 0x40, //Bit Width
+ 0x0, //Bit Offset
+ 0x4, //Encoded Access Width
+ 0x43000170, //Address
+ 0x0000000000000000, // Value for InjectError()
+ 0xFFFFFFFFFFFFFFFF // Mask is only valid for 32-bits
+ },
+ { //Action15
+ 0x0F, // Action:Get Error Attributes
+ 0x0, // Instruction:Read Register
+ 0x0, // Flags
+ 0x00, // Reserved
+ /*Register Region*/
+ EFI_ACPI_3_0_SYSTEM_MEMORY, //Space ID
+ 0x40, //Bit Width
+ 0x0, //Bit Offset
+ 0x4, //Encoded Access Width
+ 0x43000178, //Address
+ 0x0000000000000000, // Value for InjectError()
+ 0xFFFFFFFFFFFFFFFF // Mask is only valid for 32-bits
+ },
+ }
+
+};
+
+VOID*
+ReferenceAcpiTable (
+ VOID
+ )
+{
+ //
+ // Reference the table being generated to prevent the optimizer from removing the
+ // data structure from the exeutable
+ //
+ return (VOID*)&Erst;
+}
diff --git a/ArmPkg/Drivers/AcpiTables/exynos5250-arndale/Facp.aslc b/ArmPkg/Drivers/AcpiTables/exynos5250-arndale/Facp.aslc
new file mode 100644
index 0000000..686a3d2
--- /dev/null
+++ b/ArmPkg/Drivers/AcpiTables/exynos5250-arndale/Facp.aslc
@@ -0,0 +1,177 @@
+/** @file
+ FACP Table
+
+ Copyright (c) 2008 - 2012, Intel Corporation. All rights reserved.<BR>
+ 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.
+
+**/
+/*
+ * Copyright (c) 2013 Linaro Limited
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the BSD License which accompanies
+ * this distribution, and is available at
+ * http://opensource.org/licenses/bsd-license.php
+ *
+ * Contributors:
+ * Yi Li - yi.li@linaro.org
+*/
+
+#include "Platform.h"
+
+EFI_ACPI_5_0_FIXED_ACPI_DESCRIPTION_TABLE Facp = {
+ {
+ EFI_ACPI_5_0_FIXED_ACPI_DESCRIPTION_TABLE_SIGNATURE,
+ sizeof (EFI_ACPI_5_0_FIXED_ACPI_DESCRIPTION_TABLE),
+ EFI_ACPI_5_0_FIXED_ACPI_DESCRIPTION_TABLE_REVISION,
+ 0, // to make sum of entire table == 0
+ {EFI_ACPI_OEM_ID}, // OEMID is a 6 bytes long field
+ EFI_ACPI_OEM_TABLE_ID, // OEM table identification(8 bytes long)
+ 0x00, // OEM revision number
+ EFI_ACPI_CREATOR_ID, // ASL compiler vendor ID
+ EFI_ACPI_CREATOR_REVISION // ASL compiler revision number
+ },
+ 0, // Physical addesss of FACS
+ 0x00000010, // Physical address of DSDT
+ 0x0, // System Interrupt Model
+ 0x4, // PM Profile
+ SCI_INT_VECTOR, // System vector of SCI interrupt
+ SMI_CMD_IO_PORT, // Port address of SMI command port
+ ACPI_ENABLE, // value to write to port smi_cmd to enable ACPI
+ ACPI_DISABLE, // value to write to port smi_cmd to disable ACPI
+ S4BIOS_REQ, // Value to write to SMI CMD port to enter the S4BIOS state
+ 0, // PState control
+ PM1a_EVT_BLK, // Port address of Power Mgt 1a Event Reg Blk
+ PM1b_EVT_BLK, // Port address of Power Mgt 1b Event Reg Blk
+ PM1a_CNT_BLK, // Port address of Power Mgt 1a Ctrl Reg Blk
+ PM1b_CNT_BLK, // Port address of Power Mgt 1b Ctrl Reg Blk
+ PM2_CNT_BLK, // Port address of Power Mgt 2 Ctrl Reg Blk
+ PM_TMR_BLK, // Port address of Power Mgt Timer Ctrl Reg Blk
+ GPE0_BLK, // Port addr of General Purpose Event 0 Reg Blk
+ GPE1_BLK, // Port addr of General Purpose Event 1 Reg Blk
+ PM1_EVT_LEN, // Byte Length of ports at pm1X_evt_blk
+ PM1_CNT_LEN, // Byte Length of ports at pm1X_cnt_blk
+ PM2_CNT_LEN, // Byte Length of ports at pm2_cnt_blk
+ PM_TM_LEN, // Byte Length of ports at pm_tm_blk
+ GPE0_BLK_LEN, // Byte Length of ports at gpe0_blk
+ GPE1_BLK_LEN, // Byte Length of ports at gpe1_blk
+ GPE1_BASE, // offset in gpe model where gpe1 events start
+ 0, // _CST support
+ P_LVL2_LAT, // worst case HW latency to enter/exit C2 state
+ P_LVL3_LAT, // worst case HW latency to enter/exit C3 state
+ FLUSH_SIZE, // Size of area read to flush caches
+ FLUSH_STRIDE, // Stride used in flushing caches
+ DUTY_OFFSET, // bit location of duty cycle field in p_cnt reg
+ DUTY_WIDTH, // bit width of duty cycle field in p_cnt reg
+ DAY_ALRM, // index to day-of-month alarm in RTC CMOS RAM
+ MON_ALRM, // index to month-of-year alarm in RTC CMOS RAM
+ CENTURY, // index to century in RTC CMOS RAM
+ 0x0000, // Boot architecture flag
+ 0x00, // reserved
+ FLAG,
+
+ {
+ 0x01, //Space ID
+ 0x8, //Bit Width
+ 0x0, //Bit Offset
+ 0x1, //Encoded Access Width
+ 0x0000000000000001,//Address
+ },
+
+ 0x0, //Value to cause reset
+ {0,0,0}, //Reserved
+ 0x0000000000000000,//FACS Address
+ 0x0000000000000010,//DSDT Address
+
+
+ /*PM1A Event Block*/
+ 0x1, //Space ID:SystemIO
+ 0x20, //Bit Width
+ 0x0, //Bit Offset
+ 0x2, //Encoded Access Width
+ 0x0000000000000001, //Address
+
+ /*PM1B Event Block*/
+ 0x1, //Space ID:SystemIO
+ 0x0, //Bit Width
+ 0x0, //Bit Offset
+ 0x0, //Encoded Access Width
+ 0x0000000000000000, //Address
+
+ /*PM1A Control Block*/
+ 0x1, //Space ID:SystemIO
+ 0x10, //Bit Width
+ 0x0, //Bit Offset
+ 0x02, //Encoded Access Width
+ 0000000000000001, //Address
+
+ /*PM1B Control Block*/
+ 0x1, //Space ID:SystemIO
+ 0x00, //Bit Width
+ 0x0, //Bit Offset
+ 0x0, //Encoded Access Width
+ 0x0000000000000000, //Address
+
+ /*PM2 Control Block*/
+ 0x1, //Space ID:SystemIO
+ 0x08, //Bit Width
+ 0x0, //Bit Offset
+ 0x0, //Encoded Access Width
+ 0x0000000000000001, //Address
+
+ /*PM Timer Block*/
+ 0x1, //Space ID:SystemIO
+ 0x20, //Bit Width
+ 0x0, //Bit Offset
+ 0x3, //Encoded Access Width
+ 0x0000000000000001, //Address
+
+ /*GPE0 Block*/
+ 0x1, //Space ID:SystemIO
+ 0x80, //Bit Width
+ 0x0, //Bit Offset
+ 0x1, //Encoded Access Width
+ 0x0000000000000001, //Address
+
+ /*GPE1 Block*/
+ 0x1, //Space ID:SystemIO
+ 0x00, //Bit Width
+ 0x0, //Bit Offset
+ 0x0, //Encoded Access Width
+ 0x0000000000000000, //Address
+
+ /*Sleep Control Register*/
+ 0x1, //Space ID:SystemIO
+ 0x08, //Bit Width
+ 0x0, //Bit Offset
+ 0x1, //Encoded Access Width
+ 0x0000000000000000, //Address
+
+ /*Sleep Status Register*/
+ 0x1, //Space ID:SystemIO
+ 0x08, //Bit Width
+ 0x0, //Bit Offset
+ 0x1, //Encoded Access Width
+ 0x0000000000000000, //Address
+
+};
+
+
+
+VOID*
+ReferenceAcpiTable (
+ VOID
+ )
+{
+ //
+ // Reference the table being generated to prevent the optimizer from removing the
+ // data structure from the exeutable
+ //
+ return (VOID*)&Facp;
+}
diff --git a/ArmPkg/Drivers/AcpiTables/exynos5250-arndale/Facs.aslc b/ArmPkg/Drivers/AcpiTables/exynos5250-arndale/Facs.aslc
new file mode 100644
index 0000000..14a10d4
--- /dev/null
+++ b/ArmPkg/Drivers/AcpiTables/exynos5250-arndale/Facs.aslc
@@ -0,0 +1,88 @@
+/** @file
+ FACS Table
+
+ Copyright (c) 2008 - 2012, Intel Corporation. All rights reserved.<BR>
+ 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.
+
+**/
+
+/*
+ * Copyright (c) 2013 Linaro Limited
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the BSD License which accompanies
+ * this distribution, and is available at
+ * http://opensource.org/licenses/bsd-license.php
+ *
+ * Contributors:
+ * Yi Li - yi.li@linaro.org
+*/
+
+#include <IndustryStandard/Acpi.h>
+
+EFI_ACPI_5_0_FIRMWARE_ACPI_CONTROL_STRUCTURE Facs = {
+ EFI_ACPI_5_0_FIRMWARE_ACPI_CONTROL_STRUCTURE_SIGNATURE,
+ sizeof (EFI_ACPI_5_0_FIRMWARE_ACPI_CONTROL_STRUCTURE),
+
+ //
+ // Hardware Signature will be updated at runtime
+ //
+ 0x00000000, //HardwareSignature
+ 0x00, //FirmwareWakingVector
+ 0x00, //GlobalLock
+ 0x00, //Flags
+ 0x0000000000000000, //XFirmwareWakingVector
+ 0x02, //Version
+ {
+ EFI_ACPI_RESERVED_BYTE,
+ EFI_ACPI_RESERVED_BYTE,
+ EFI_ACPI_RESERVED_BYTE
+ },
+ 0x00,
+ {
+ EFI_ACPI_RESERVED_BYTE,
+ EFI_ACPI_RESERVED_BYTE,
+ EFI_ACPI_RESERVED_BYTE,
+ EFI_ACPI_RESERVED_BYTE,
+ EFI_ACPI_RESERVED_BYTE,
+ EFI_ACPI_RESERVED_BYTE,
+ EFI_ACPI_RESERVED_BYTE,
+ EFI_ACPI_RESERVED_BYTE,
+ EFI_ACPI_RESERVED_BYTE,
+ EFI_ACPI_RESERVED_BYTE,
+ EFI_ACPI_RESERVED_BYTE,
+ EFI_ACPI_RESERVED_BYTE,
+ EFI_ACPI_RESERVED_BYTE,
+ EFI_ACPI_RESERVED_BYTE,
+ EFI_ACPI_RESERVED_BYTE,
+ EFI_ACPI_RESERVED_BYTE,
+ EFI_ACPI_RESERVED_BYTE,
+ EFI_ACPI_RESERVED_BYTE,
+ EFI_ACPI_RESERVED_BYTE,
+ EFI_ACPI_RESERVED_BYTE,
+ EFI_ACPI_RESERVED_BYTE,
+ EFI_ACPI_RESERVED_BYTE,
+ EFI_ACPI_RESERVED_BYTE,
+ EFI_ACPI_RESERVED_BYTE
+ }
+};
+
+
+VOID*
+ReferenceAcpiTable (
+ VOID
+ )
+{
+ //
+ // Reference the table being generated to prevent the optimizer from removing the
+ // data structure from the exeutable
+ //
+ return (VOID*)&Facs;
+}
+
diff --git a/ArmPkg/Drivers/AcpiTables/exynos5250-arndale/Gtdt.aslc b/ArmPkg/Drivers/AcpiTables/exynos5250-arndale/Gtdt.aslc
new file mode 100644
index 0000000..dbde66f
--- /dev/null
+++ b/ArmPkg/Drivers/AcpiTables/exynos5250-arndale/Gtdt.aslc
@@ -0,0 +1,53 @@
+/*
+ * Copyright (c) 2013 Linaro Limited
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the BSD License which accompanies
+ * this distribution, and is available at
+ * http://opensource.org/licenses/bsd-license.php
+ *
+ * Contributors:
+ * Yi Li - yi.li@linaro.org
+*/
+
+#include <IndustryStandard/Acpi.h>
+#include <Platform.h>
+
+EFI_ACPI_5_0_GENERIC_TIMER_DESCRIPTION_TABLE Gtdt =
+{
+ {
+ EFI_ACPI_5_0_GENERIC_TIMER_DESCRIPTION_TABLE_SIGNATURE,
+ sizeof (EFI_ACPI_5_0_GENERIC_TIMER_DESCRIPTION_TABLE),
+ EFI_ACPI_5_0_GENERIC_TIMER_DESCRIPTION_TABLE_REVISION,
+ 0x00, // Checksum will be updated at runtime
+ {EFI_ACPI_OEM_ID},
+ EFI_ACPI_OEM_TABLE_ID,
+ EFI_ACPI_OEM_REVISION,
+ EFI_ACPI_CREATOR_ID,
+ EFI_ACPI_CREATOR_REVISION
+ },
+ 0x0000000000000000, //Timer Address
+ 0x00000001, //Flags
+ 0x00000000, //Secure PL1 Interrupt
+ 0x00000000, //SPL1 Flags
+ 0x00000000, //Non-Secure PL1 Interrupt
+ 0x00000000, //NSPL1 Flags
+ 0x00000000, //Virtual Timer Interrupt
+ 0x00000000, //VT Flags
+ 0x00000000, //Non-Secure PL2 Interrupt
+ 0x00000000, //NSPL2 Flags
+};
+
+VOID*
+ReferenceAcpiTable (
+ VOID
+ )
+{
+ //
+ // Reference the table being generated to prevent the optimizer from removing the
+ // data structure from the exeutable
+ //
+ return (VOID*)&Gtdt;
+}
+
+
diff --git a/ArmPkg/Drivers/AcpiTables/exynos5250-arndale/Hest.aslc b/ArmPkg/Drivers/AcpiTables/exynos5250-arndale/Hest.aslc
new file mode 100644
index 0000000..4c4868d
--- /dev/null
+++ b/ArmPkg/Drivers/AcpiTables/exynos5250-arndale/Hest.aslc
@@ -0,0 +1,86 @@
+/*
+ * Copyright (c) 2013 Linaro Limited
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the BSD License which accompanies
+ * this distribution, and is available at
+ * http://opensource.org/licenses/bsd-license.php
+ *
+ * Contributors:
+ * Yi Li - yi.li@linaro.org
+*/
+
+#include <IndustryStandard/Acpi.h>
+#include <Platform.h>
+
+#pragma pack(1)
+
+typedef struct {
+ EFI_ACPI_DESCRIPTION_HEADER Header;
+ UINT32 ErrorEntryCount;
+ EFI_ACPI_5_0_GENERIC_HARDWARE_ERROR_SOURCE_STRUCTURE GenHardWareError;
+
+} EFI_ACPI_5_0_HARDWARE_ERROR_SOURCE_TABLE;
+
+#pragma pack()
+
+EFI_ACPI_5_0_HARDWARE_ERROR_SOURCE_TABLE Hest = {
+ {
+ EFI_ACPI_5_0_HARDWARE_ERROR_SOURCE_TABLE_SIGNATURE,
+ sizeof (EFI_ACPI_5_0_HARDWARE_ERROR_SOURCE_TABLE),
+ EFI_ACPI_5_0_HARDWARE_ERROR_SOURCE_TABLE_REVISION,
+ 0x00, // Checksum will be updated at runtime
+ {EFI_ACPI_OEM_ID},
+ EFI_ACPI_OEM_TABLE_ID,
+ 0x02,
+ EFI_ACPI_CREATOR_ID,
+ EFI_ACPI_CREATOR_REVISION
+ },
+ 0x00000001, //Error Source Count
+{
+ 0x0009, //Subtable Type:Generic Hardware Error Source
+ 0x0002, //Source Id
+ 0xFFFF, //Related Source Id
+ 0x00, //Reserved
+ 0x01, //Enabled
+ 0x00000001, //Records To Preallocate
+ 0x00000001, //Max Sections Per Record
+ 0x00001000, //Max Raw Data Length
+
+ /* Error Status Address : [Generic Address Structure]*/
+ {
+ 0x00, //Space ID:SystemMemory
+ 0x40, //Bit Width
+ 0x00, //Bit Offset
+ 0x04, //Encoded Access Width
+ 0x43000000, //Address
+ },
+ /*Notify : [Hardware Error Notification Structure]*/
+ {
+ 0x03, //Notify Type:SCI
+ 0x1c, //Notify Length
+ 0x0000, //Configuration Write Enable
+ 0x00000000, //PollInterval
+ 0x00000000, //Vector
+ 0x00000000, //Polling Threshold Value
+ 0x00000000, //Polling Threshold Window
+ 0x00000000, //Error Threshold Value
+ 0x00000000, //Error Threshold Window
+ },
+ 0x00001000, //Error Status Block Length
+},
+
+};
+
+
+VOID*
+ReferenceAcpiTable (
+ VOID
+ )
+{
+ //
+ // Reference the table being generated to prevent the optimizer from removing the
+ // data structure from the exeutable
+ //
+ return (VOID*)&Hest;
+}
diff --git a/ArmPkg/Drivers/AcpiTables/exynos5250-arndale/Mcfg.aslc b/ArmPkg/Drivers/AcpiTables/exynos5250-arndale/Mcfg.aslc
new file mode 100644
index 0000000..d7e855f
--- /dev/null
+++ b/ArmPkg/Drivers/AcpiTables/exynos5250-arndale/Mcfg.aslc
@@ -0,0 +1,66 @@
+/*
+ * Copyright (c) 2013 Linaro Limited
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the BSD License which accompanies
+ * this distribution, and is available at
+ * http://opensource.org/licenses/bsd-license.php
+ *
+ * Contributors:
+ * Yi Li - yi.li@linaro.org
+*/
+
+#include <IndustryStandard/Acpi.h>
+#include <Platform.h>
+
+#define ACPI_5_0_MCFG_VERSION 0x1
+
+#pragma pack(1)
+typedef struct
+{
+ EFI_ACPI_DESCRIPTION_HEADER Header;
+ UINT64 Reserved1;
+ UINT64 ullBaseAddress;
+ UINT16 usSegGroupNum;
+ UINT8 ucStartBusNum;
+ UINT8 ucEndBusNum;
+ UINT32 Reserved2;
+}EFI_ACPI_5_0_PCI_EXPRESS_MEMORY_MAPPED_CONFIGURATION_SPACE_TABLE;
+#pragma pack()
+
+EFI_ACPI_5_0_PCI_EXPRESS_MEMORY_MAPPED_CONFIGURATION_SPACE_TABLE Mcfg=
+{
+ {
+ EFI_ACPI_5_0_PCI_EXPRESS_MEMORY_MAPPED_CONFIGURATION_SPACE_BASE_ADDRESS_DESCRIPTION_TABLE_SIGNATURE,
+ sizeof (EFI_ACPI_5_0_PCI_EXPRESS_MEMORY_MAPPED_CONFIGURATION_SPACE_TABLE),
+ ACPI_5_0_MCFG_VERSION,
+ 0x00, // Checksum will be updated at runtime
+ {EFI_ACPI_OEM_ID},
+ EFI_ACPI_OEM_TABLE_ID,
+ EFI_ACPI_OEM_REVISION,
+ EFI_ACPI_CREATOR_ID,
+ EFI_ACPI_CREATOR_REVISION
+ },
+ 0x0000000000000000, //Reserved
+ 0x0000000000000000, //Base Address
+ 0x0000, //Segment Group Number
+ 0x00, //Start Bus Number
+ 0x00, //End Bus Number
+ 0x00000000, //Reserved
+};
+
+VOID*
+ReferenceAcpiTable (
+ VOID
+ )
+{
+ //
+ // Reference the table being generated to prevent the optimizer from removing the
+ // data structure from the exeutable
+ //
+ return (VOID*)&Mcfg;
+}
+
+
+
+
diff --git a/ArmPkg/Drivers/AcpiTables/exynos5250-arndale/Mpst.aslc b/ArmPkg/Drivers/AcpiTables/exynos5250-arndale/Mpst.aslc
new file mode 100644
index 0000000..7a46496
--- /dev/null
+++ b/ArmPkg/Drivers/AcpiTables/exynos5250-arndale/Mpst.aslc
@@ -0,0 +1,142 @@
+/*
+ * Copyright (c) 2013 Linaro Limited
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the BSD License which accompanies
+ * this distribution, and is available at
+ * http://opensource.org/licenses/bsd-license.php
+ *
+ * Contributors:
+ * Yi Li - yi.li@linaro.org
+*/
+
+#include <IndustryStandard/Acpi.h>
+#include <Platform.h>
+
+#define MAX_POWER_STATES_NUM 0x2
+#define MAX_PHYSICAL_COMPONENTS_NUM 0x3
+#define MAX_MEMORY_POWER_NODE_COUNT 0x2
+#define MAX_CHARACTERISTICS_COUNT 0x2
+
+#pragma pack (1)
+typedef struct
+{
+ EFI_ACPI_5_0_MPST_MEMORY_POWER_STRUCTURE structre;
+ EFI_ACPI_5_0_MPST_MEMORY_POWER_STATE state[MAX_POWER_STATES_NUM];
+ UINT16 components[MAX_PHYSICAL_COMPONENTS_NUM];
+}EFI_ACPI_5_0_MPST_MEMORY_POWER_STRUCTURE_EX;
+
+typedef struct
+{
+ EFI_ACPI_5_0_MPST_MEMORY_POWER_STATE_CHARACTERISTICS_STRUCTURE structre;
+ UINT64 ulResverd;
+}EFI_ACPI_5_0_MPST_MEMORY_POWER_STATE_CHARACTERISTICS_STRUCTURE_EX;
+
+typedef struct
+{
+ EFI_ACPI_5_0_MEMORY_POWER_STATUS_TABLE table;
+ EFI_ACPI_5_0_MPST_MEMORY_POWER_NODE_TABLE node;
+ EFI_ACPI_5_0_MPST_MEMORY_POWER_STRUCTURE_EX powerNode[MAX_MEMORY_POWER_NODE_COUNT];
+ EFI_ACPI_5_0_MPST_MEMORY_POWER_STATE_CHARACTERISTICS_TABLE Characteristics;
+ EFI_ACPI_5_0_MPST_MEMORY_POWER_STATE_CHARACTERISTICS_STRUCTURE_EX powerChar[MAX_CHARACTERISTICS_COUNT];
+}EFI_ACPI_5_0_MEMORY_POWER_STATUS_TABLE_EX;
+#pragma pack ()
+
+
+EFI_ACPI_5_0_MEMORY_POWER_STATUS_TABLE_EX Mpst ={
+ {
+ {
+ EFI_ACPI_5_0_MEMORY_POWER_STATE_TABLE_SIGNATURE,
+ 0x000000B6,
+ EFI_ACPI_5_0_MEMORY_POWER_STATE_TABLE_REVISION,
+ 0x00, // Checksum will be updated at runtime
+ {EFI_ACPI_OEM_ID},
+ EFI_ACPI_OEM_TABLE_ID,
+ EFI_ACPI_OEM_REVISION,
+ EFI_ACPI_CREATOR_ID,
+ EFI_ACPI_CREATOR_REVISION
+ },
+ 0x00, //Channel ID
+ {0,0,0}, //Reserved
+
+ },
+ 0x0002, //Power Node Count
+ {0,0}, //Reserved
+ {
+ {
+ 0x00, //Flags
+ 0x00, //Reserved
+ 0x0000, //Node ID
+ 0x0000000000, //Length
+ 0x00000000000000000000, //ange Address
+ 0x00000000000000000000, //Range Length
+ 0x00000002, // Num Power
+ 0x00000003, // Num Physical Components
+ {
+ {
+ 0x00, //Power State
+ 0x00, //InfoIndex
+ },
+ {
+ 0x00, //Power State
+ 0x00, //InfoIndex
+ },
+ },
+ 0x0000, //Component Id
+ 0x0001, //Component Id
+ 0x0002, //Component Id
+ },
+ {
+ 0x00, //Flags
+ 0x00, //Reserved
+ 0x0000, //Node ID
+ 0x0000000000, //Length
+ 0x00000000000000000000, //ange Address
+ 0x00000000000000000000, //Range Length
+ 0x00000001, // Num Power
+ 0x00000001, // Num Physical Components
+ {
+ 0x00, //Power State
+ 0x00, //InfoIndex
+ },
+ 0x0000, //Component Id
+
+ },
+ },
+
+ 0x0002, //Characteristics Count
+ {0,0}, //Reserved
+ {
+ {
+ 0x01, //Structure ID
+ 0x00, //Flags
+ 0x0000, //Reserved
+ 0x00000000, //Average Power
+ 0x00000000, //Power Saving
+ 0x0000000000000000, //Exit Latency
+ 0x0000000000000000, //Reserved
+ },
+ {
+ 0x01, //Structure ID
+ 0x00, //Flags
+ 0x0000, //Reserved
+ 0x00000000, //Average Power
+ 0x00000000, //Power Saving
+ 0x0000000000000000, //Exit Latency
+ 0x0000000000000000, //Reserved
+ },
+ },
+};
+
+
+VOID*
+ReferenceAcpiTable (
+ VOID
+ )
+{
+ //
+ // Reference the table being generated to prevent the optimizer from removing the
+ // data structure from the exeutable
+ //
+ return (VOID*)&Mpst;
+}
diff --git a/ArmPkg/Drivers/AcpiTables/exynos5250-arndale/Msct.aslc b/ArmPkg/Drivers/AcpiTables/exynos5250-arndale/Msct.aslc
new file mode 100644
index 0000000..80c9d59
--- /dev/null
+++ b/ArmPkg/Drivers/AcpiTables/exynos5250-arndale/Msct.aslc
@@ -0,0 +1,106 @@
+/*
+ * Copyright (c) 2013 Linaro Limited
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the BSD License which accompanies
+ * this distribution, and is available at
+ * http://opensource.org/licenses/bsd-license.php
+ *
+ * Contributors:
+ * Yi Li - yi.li@linaro.org
+*/
+
+#include <IndustryStandard/Acpi.h>
+#include <Platform.h>
+
+#define EFI_ACPI_MAXIMUM_PROXIMITY_DOMAIN_INFORMATION_STRUCTURE_REVISION 0x1
+//
+// MSCT Table definition
+//
+#pragma pack (1)
+typedef struct {
+ UINT8 Revision;
+ UINT8 Length;
+ UINT32 ProxDomRangeLow;
+ UINT32 ProxDomRangeHigh;
+ UINT32 MaxProcessorCapacity;
+ UINT64 MaxMemoryCapacity;
+} EFI_ACPI_MAXIMUM_PROXIMITY_DOMAIN_INFORMATION_STRUCTURE;
+
+typedef struct {
+ EFI_ACPI_5_0_MAXIMUM_SYSTEM_CHARACTERISTICS_TABLE_HEADER Header;
+ EFI_ACPI_MAXIMUM_PROXIMITY_DOMAIN_INFORMATION_STRUCTURE ProxDomInfoStructure[4];
+} EFI_ACPI_MAXIMUM_SYSTEM_CHARACTERISTICS_TABLE;
+
+#pragma pack ()
+
+EFI_ACPI_MAXIMUM_SYSTEM_CHARACTERISTICS_TABLE Msct = {
+ {
+ {
+ EFI_ACPI_5_0_MAXIMUM_SYSTEM_CHARACTERISTICS_TABLE_SIGNATURE,
+ sizeof (EFI_ACPI_MAXIMUM_SYSTEM_CHARACTERISTICS_TABLE),
+ EFI_ACPI_5_0_MAXIMUM_SYSTEM_CHARACTERISTICS_TABLE_REVISION,
+ 0x00, // Checksum will be updated at runtime
+ {EFI_ACPI_OEM_ID},
+ EFI_ACPI_OEM_TABLE_ID,
+ EFI_ACPI_OEM_REVISION,
+ EFI_ACPI_CREATOR_ID,
+ EFI_ACPI_CREATOR_REVISION
+ },
+ //
+ // Beginning of MSCT specific fields
+ //
+ 0x00000038, // OffsetProxDomInfo
+ 4 - 1, // MaxNumProxDom
+ 0x00000000, // MaxNumClockDom
+ 0x00000FFFFFFFFFFF, // MaxPhysicalAddress
+ },
+ {
+ {
+ EFI_ACPI_MAXIMUM_PROXIMITY_DOMAIN_INFORMATION_STRUCTURE_REVISION, // Revision
+ sizeof (EFI_ACPI_MAXIMUM_PROXIMITY_DOMAIN_INFORMATION_STRUCTURE), // Length
+ 0x00000000, // ProxDomRangeLow
+ 0x00000003, // ProxDomRangeHigh
+ 0x00000010, // MaxProcessorCapacity
+ 0x0000004000000000 // MaxMemoryCapacity
+ },
+ {
+ EFI_ACPI_MAXIMUM_PROXIMITY_DOMAIN_INFORMATION_STRUCTURE_REVISION, // Revision
+ sizeof (EFI_ACPI_MAXIMUM_PROXIMITY_DOMAIN_INFORMATION_STRUCTURE), // Length
+ 0x00000000, // ProxDomRangeLow
+ 0x00000000, // ProxDomRangeHigh
+ 0x00000000, // MaxProcessorCapacity
+ 0x0000000000000000, // MaxMemoryCapacity
+ },
+
+ {
+ EFI_ACPI_MAXIMUM_PROXIMITY_DOMAIN_INFORMATION_STRUCTURE_REVISION, // Revision
+ sizeof (EFI_ACPI_MAXIMUM_PROXIMITY_DOMAIN_INFORMATION_STRUCTURE), // Length
+ 0x00000000, // ProxDomRangeLow
+ 0x00000000, // ProxDomRangeHigh
+ 0x00000000, // MaxProcessorCapacity
+ 0x0000000000000000, // MaxMemoryCapacity
+ },
+
+ {
+ EFI_ACPI_MAXIMUM_PROXIMITY_DOMAIN_INFORMATION_STRUCTURE_REVISION, // Revision
+ sizeof (EFI_ACPI_MAXIMUM_PROXIMITY_DOMAIN_INFORMATION_STRUCTURE), // Length
+ 0x00000000, // ProxDomRangeLow
+ 0x00000000, // ProxDomRangeHigh
+ 0x00000000, // MaxProcessorCapacity
+ 0x0000000000000000, // MaxMemoryCapacity
+ },
+ },
+};
+
+VOID*
+ReferenceAcpiTable (
+ VOID
+ )
+{
+ //
+ // Reference the table being generated to prevent the optimizer from removing the
+ // data structure from the exeutable
+ //
+ return (VOID*)&Msct;
+}
diff --git a/ArmPkg/Drivers/AcpiTables/exynos5250-arndale/Oem0.aslc b/ArmPkg/Drivers/AcpiTables/exynos5250-arndale/Oem0.aslc
new file mode 100644
index 0000000..c69bb02
--- /dev/null
+++ b/ArmPkg/Drivers/AcpiTables/exynos5250-arndale/Oem0.aslc
@@ -0,0 +1,49 @@
+/*
+ * Copyright (c) 2013 Linaro Limited
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the BSD License which accompanies
+ * this distribution, and is available at
+ * http://opensource.org/licenses/bsd-license.php
+ *
+ * Contributors:
+ * Yi Li - yi.li@linaro.org
+*/
+
+#include <IndustryStandard/Acpi.h>
+#include <Platform.h>
+
+#define EFI_ACPI_5_0_OEM0_SIGNATURE SIGNATURE_32('O', 'E', 'M', '0')
+#define ACPI_5_0_OEM0_REVISION 0x1
+
+typedef struct{
+ EFI_ACPI_DESCRIPTION_HEADER Header;
+}EFI_ACPI_5_0_OEM0_TABLE;
+
+EFI_ACPI_5_0_OEM0_TABLE Oem0=
+{
+ {
+ EFI_ACPI_5_0_OEM0_SIGNATURE,
+ sizeof (EFI_ACPI_5_0_OEM0_TABLE),
+ ACPI_5_0_OEM0_REVISION,
+ 0x00, // Checksum will be updated at runtime
+ {EFI_ACPI_OEM_ID},
+ EFI_ACPI_OEM_TABLE_ID,
+ 0x0000000A,
+ EFI_ACPI_CREATOR_ID,
+ EFI_ACPI_CREATOR_REVISION
+ },
+};
+
+
+VOID*
+ReferenceAcpiTable (
+ VOID
+ )
+{
+ //
+ // Reference the table being generated to prevent the optimizer from removing the
+ // data structure from the exeutable
+ //
+ return (VOID*)&Oem0;
+}
diff --git a/ArmPkg/Drivers/AcpiTables/exynos5250-arndale/Platform.h b/ArmPkg/Drivers/AcpiTables/exynos5250-arndale/Platform.h
new file mode 100644
index 0000000..ae35f99
--- /dev/null
+++ b/ArmPkg/Drivers/AcpiTables/exynos5250-arndale/Platform.h
@@ -0,0 +1,78 @@
+/** @file
+ Platform specific defines for constructing ACPI tables
+
+ Copyright (c) 2008, Intel Corporation. All rights reserved.<BR>
+ 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.
+
+**/
+
+/*
+ * Copyright (c) 2013 Linaro Limited
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the BSD License which accompanies
+ * this distribution, and is available at
+ * http://opensource.org/licenses/bsd-license.php
+ *
+ * Contributors:
+ * Yi Li - yi.li@linaro.org
+*/
+
+#ifndef _Platform_h_INCLUDED_
+#define _Platform_h_INCLUDED_
+
+#include <PiDxe.h>
+#include <IndustryStandard/Acpi.h>
+
+//
+// ACPI table information used to initialize tables.
+//
+#define EFI_ACPI_OEM_ID 'L','I','N','A','R','O' // OEMID 6 bytes long
+#define EFI_ACPI_OEM_TABLE_ID SIGNATURE_64('A','R','N','D','A','L','E',' ' ) // OEM table id 8 bytes long
+#define EFI_ACPI_OEM_REVISION 0x00000001
+#define EFI_ACPI_CREATOR_ID SIGNATURE_32('I','N','T','L')
+#define EFI_ACPI_CREATOR_REVISION 0x20130517
+
+#define EFI_ACPI_OEM_ID_INTEL 'I','N','T','E','L',' ' // OEMID 6 bytes long
+#define EFI_ACPI_OEM_TABLE_ID_INTEL SIGNATURE_64('T','E','M','P','L','A','T','E' ) // OEM table id 8 bytes long
+
+
+#define INT_MODEL 0x01
+#define SCI_INT_VECTOR 0x0
+#define SMI_CMD_IO_PORT 0x0
+#define ACPI_ENABLE 0x0
+#define ACPI_DISABLE 0x0
+#define S4BIOS_REQ 0x00
+#define PM1a_EVT_BLK 0x00000001
+#define PM1b_EVT_BLK 0x00000000
+#define PM1a_CNT_BLK 0x00000001
+#define PM1b_CNT_BLK 0x00000000
+#define PM2_CNT_BLK 0x00000001
+#define PM_TMR_BLK 0x00000001
+#define GPE0_BLK 0x00000001
+#define GPE1_BLK 0x00000000
+#define PM1_EVT_LEN 0x04
+#define PM1_CNT_LEN 0x02
+#define PM2_CNT_LEN 0x01
+#define PM_TM_LEN 0x04
+#define GPE0_BLK_LEN 0x08
+#define GPE1_BLK_LEN 0x00
+#define GPE1_BASE 0x00
+#define RESERVED 0x00
+#define P_LVL2_LAT 0x0000
+#define P_LVL3_LAT 0x0000
+#define FLUSH_SIZE 0x0000
+#define FLUSH_STRIDE 0x0000
+#define DUTY_OFFSET 0x00
+#define DUTY_WIDTH 0x00
+#define DAY_ALRM 0x00
+#define MON_ALRM 0x00
+#define CENTURY 0x00
+#define FLAG 0x00321033
+#endif
diff --git a/ArmPkg/Drivers/AcpiTables/exynos5250-arndale/Pmtt.aslc b/ArmPkg/Drivers/AcpiTables/exynos5250-arndale/Pmtt.aslc
new file mode 100644
index 0000000..f0b4f6c
--- /dev/null
+++ b/ArmPkg/Drivers/AcpiTables/exynos5250-arndale/Pmtt.aslc
@@ -0,0 +1,216 @@
+/*
+ * Copyright (c) 2013 Linaro Limited
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the BSD License which accompanies
+ * this distribution, and is available at
+ * http://opensource.org/licenses/bsd-license.php
+ *
+ * Contributors:
+ * Yi Li - yi.li@linaro.org
+*/
+
+#include <IndustryStandard/Acpi.h>
+#include <Platform.h>
+
+#define EFI_ACPI_MEMORY_AGGREGATOR_TYPE_SOCKET 00 //socket
+#define EFI_ACPI_MEMORY_AGGREGATOR_TYPE_MEMCTRL 01 //Memory Controller
+#define EFI_ACPI_MEMORY_AGGREGATOR_TYPE_DIMM 02 //DIMM
+#define EFI_ACPI_MEMORY_AGGREGATOR_TYPE_RESVERVED 03 //RESVERVED
+
+#define EFI_ACPI_MEMORY_AGGREGATOR_FLAG_TLAD 01
+#define EFI_ACPI_MEMORY_AGGREGATOR_FLAG_PHYELEMENT 02 // BIT1 - set to 1 since socket is a physical element of the topology
+//Bit 2 and 3 - If 00, indicates that all components aggregated by this device implements volatile memory
+// If 01, indicates that components aggregated by this device implements both volatile and non-volatile memory
+// If 10, indicates that all components aggregated by this device implements non-volatile memory
+#define EFI_ACPI_MEMORY_AGGREGATOR_FLAG__VOLATILE 00
+#define EFI_ACPI_MEMORY_AGGREGATOR_FLAG__MIXED 4
+#define EFI_ACPI_MEMORY_AGGREGATOR_FLAG__NONVOLATILE 0x08
+#define EFI_ACPI_MEMORY_AGGREGATOR_FLAG__RSVD 0x0C
+
+#define MAXNUMBER_OF_PROXIMITY_DOMAINS 0x3
+
+#define MAX_SOCKET 0x2
+#define NUM_MEM_CONTROLLERS 0x2
+#define MAX_DIMM 0x02
+
+#pragma pack (1)
+// PMMT Table fields
+typedef struct {
+ UINT32 ReadLatency;
+ UINT32 WriteLatency;
+ UINT32 ReadBW;
+ UINT32 WriteBW;
+ UINT16 OptimalAccUnit;
+ UINT16 OptimalAccAlignment;
+} EFI_ACPI_MEMCTRL_CHAR_TABLE;
+
+typedef struct {
+ UINT8 Type;
+ UINT8 Rsvd;
+ UINT16 Length;
+ UINT16 Flag;
+ UINT16 Rsvd1;
+ UINT16 PhyCompIdentifier;
+ UINT16 Rsvd2;
+ UINT32 Size;
+ UINT32 SmBiosHandle;
+} EFI_ACPI_MEMORY_AGGREGATOR_DIMM_STRUC;
+
+typedef struct {
+ UINT8 Type;
+ UINT8 Rsvd;
+ UINT16 Length;
+ UINT16 Flag;
+ UINT16 Rsvd1;
+ EFI_ACPI_MEMCTRL_CHAR_TABLE MemCtrlCharTable;
+ UINT16 Rsvd2;
+ UINT16 NumProxDomains;
+ UINT32 ProxDomain[MAXNUMBER_OF_PROXIMITY_DOMAINS];
+ EFI_ACPI_MEMORY_AGGREGATOR_DIMM_STRUC PhyCompIdentStruc[MAX_DIMM];
+} EFI_ACPI_MEMORY_AGGREGATOR_MEMCTRL_STRUC;
+
+typedef struct {
+ UINT8 Type;
+ UINT8 Rsvd;
+ UINT16 Length;
+ UINT16 Flag;
+ UINT16 Rsvd1;
+ UINT16 SckIdent;
+ UINT16 Rsvd2;
+ EFI_ACPI_MEMORY_AGGREGATOR_MEMCTRL_STRUC MemCtrlStruc[NUM_MEM_CONTROLLERS];
+} EFI_ACPI_MEMORY_AGGREGATOR_SOCKET_STRUC;
+
+typedef struct {
+ EFI_ACPI_5_0_MEMORY_TOPOLOGY_TABLE Header;
+ EFI_ACPI_MEMORY_AGGREGATOR_SOCKET_STRUC TopLevelmemAggrDevStruc[MAX_SOCKET];
+} EFI_ACPI_5_0_PLATFORM_MEMORY_TOPOLOGY_TABLE;
+#pragma pack ()
+
+
+EFI_ACPI_5_0_PLATFORM_MEMORY_TOPOLOGY_TABLE Pmtt = {
+ {
+ {
+ EFI_ACPI_5_0_PLATFORM_MEMORY_TOPOLOGY_TABLE_SIGNATURE,
+ sizeof (EFI_ACPI_5_0_PLATFORM_MEMORY_TOPOLOGY_TABLE), // Length
+ EFI_ACPI_5_0_MEMORY_TOPOLOGY_TABLE_REVISION, // Revision
+ 0x00, // Checksum will be updated at runtime
+ {EFI_ACPI_OEM_ID},
+ EFI_ACPI_OEM_TABLE_ID,
+ EFI_ACPI_OEM_REVISION,
+ EFI_ACPI_CREATOR_ID,
+ EFI_ACPI_CREATOR_REVISION
+ },
+ EFI_ACPI_RESERVED_DWORD, // Reserved[0]
+ },
+ {
+ /*Socket 0*/
+ {
+ 0x00, //Subtable Type:Socket
+ 0x00, //Reserved
+ 0x0080, //Length
+ 0x0001, //Flags
+ 0x0000, //Reserved
+ 0x0000, //Socket ID
+ 0x0000, //Reserved
+ {
+ /*Memory Controller 1*/
+
+ {
+ 0x01, //Subtable Type:Memory Controller
+ 0x00, //Reserved
+ 0x0054, //Length
+ 0x0005, //Flags
+ 0x0000, //Reserved
+ {
+ 0x00000000, //Read Latency
+ 0x00000000, //Write Latency
+ 0x00000000, //Read Bandwidth
+ 0x00000000, //Write Bandwidth
+ 0x0000, //Access Width
+ 0x0000, //Alignment
+ },
+ 0x0000, //Reserved
+ MAXNUMBER_OF_PROXIMITY_DOMAINS, //Domain Count
+ 0x00000000, //Proximity Domain
+ 0x00000000, //Proximity Domain
+ 0x00000000, //Proximity Domain
+ {
+ /*DIMM 0*/
+ {
+ 0x02, //Subtable Type:Physical Component (DIMM)
+ 0x00, //Reserved
+ 0x0014, //Length
+ 0x0002, //Flags
+ 0x0000, //Reserved
+ 0x0000, //Component ID
+ 0x0000, //Reserved
+ 0x00000000, //Memory Size
+ 0x00000000, //Bios Handle
+ },
+ /*DIMM 1*/
+ {
+ 0x02, //Subtable Type:Physical Component (DIMM)
+ 0x00, //Reserved
+ 0x0014, //Length
+ 0x0002, //Flags
+ 0x0000, //Reserved
+ 0x0000, //Component ID
+ 0x0000, //Reserved
+ 0x00000000, //Memory Size
+ 0x00000000, //Bios Handle
+ },
+ },
+ },
+
+ /*Memory Controller 2*/
+ {
+ 0x01, //Subtable Type:Memory Controller
+ 0x00, //Reserved
+ 0x0020, //Length
+ 0x0001, //Flags
+ 0x0000, //Reserved
+ {
+ 0x00000000, //Read Latency
+ 0x00000000, //Write Latency
+ 0x00000000, //Read Bandwidth
+ 0x00000000, //Write Bandwidth
+ 0x0000, //Access Width
+ 0x0000 //Alignment
+ },
+ 0x0000, //Reserved
+ 0x0000, //Domain Count
+ {0},
+ {0},
+
+ },
+ },
+ },
+
+
+ /*Socket 1*/
+ {
+ 0x00, //Subtable Type:Socket
+ 0x00, //Reserved
+ 0x000c, //Length
+ 0x0001, //Flags
+ 0x0000, //Reserved
+ 0x0000, //Socket ID
+ 0x0000 //Reserved
+ },
+ },
+
+
+};
+
+VOID*
+ReferenceAcpiTable (
+ VOID
+ )
+{
+ //
+ // Reference the table being generated to prevent the optimizer from removing the
+ // data structure from the exeutable
+ //
+ return (VOID*)&Pmtt;
+}
diff --git a/ArmPkg/Drivers/AcpiTables/exynos5250-arndale/Slit.aslc b/ArmPkg/Drivers/AcpiTables/exynos5250-arndale/Slit.aslc
new file mode 100644
index 0000000..05d96e0
--- /dev/null
+++ b/ArmPkg/Drivers/AcpiTables/exynos5250-arndale/Slit.aslc
@@ -0,0 +1,87 @@
+/*
+ * Copyright (c) 2013 Linaro Limited
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the BSD License which accompanies
+ * this distribution, and is available at
+ * http://opensource.org/licenses/bsd-license.php
+ *
+ * Contributors:
+ * Yi Li - yi.li@linaro.org
+*/
+
+#include <IndustryStandard/Acpi.h>
+#include <Platform.h>
+
+#define EFI_ACPI_SYSTEM_LOCALITIES_ENTRY_COUNT 0x0000000000000014
+
+#pragma pack(1)
+typedef struct {
+ UINT8 Entry[EFI_ACPI_SYSTEM_LOCALITIES_ENTRY_COUNT];
+} EFI_ACPI_5_0_NUMBER_OF_SYSTEM_LOCALITIES_STRUCTURE;
+
+typedef struct {
+ EFI_ACPI_5_0_SYSTEM_LOCALITY_DISTANCE_INFORMATION_TABLE_HEADER Header;
+ EFI_ACPI_5_0_NUMBER_OF_SYSTEM_LOCALITIES_STRUCTURE NumSlit[EFI_ACPI_SYSTEM_LOCALITIES_ENTRY_COUNT];
+
+} EFI_ACPI_5_0_SYSTEM_LOCALITY_INFORMATION_TABLE;
+#pragma pack()
+
+//
+// System Locality Information Table
+// Please modify all values in Slit.h only.
+//
+EFI_ACPI_5_0_SYSTEM_LOCALITY_INFORMATION_TABLE Slit = {
+ {
+ {
+ EFI_ACPI_5_0_SYSTEM_LOCALITY_INFORMATION_TABLE_SIGNATURE,
+ sizeof (EFI_ACPI_5_0_SYSTEM_LOCALITY_INFORMATION_TABLE),
+ EFI_ACPI_5_0_SYSTEM_LOCALITY_DISTANCE_INFORMATION_TABLE_REVISION,
+ 0x00, // Checksum will be updated at runtime
+ {EFI_ACPI_OEM_ID},
+ EFI_ACPI_OEM_TABLE_ID,
+ EFI_ACPI_OEM_REVISION,
+ EFI_ACPI_CREATOR_ID,
+ EFI_ACPI_CREATOR_REVISION,
+ },
+ //
+ // Beginning of SLIT specific fields
+ //
+ EFI_ACPI_SYSTEM_LOCALITIES_ENTRY_COUNT,
+ },
+ {
+ {0x0A, 0x10, 0x16, 0x17, 0x18, 0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F, 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27}, //Locality 0
+ {0x10, 0x0A, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F, 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26,}, //Locality 1
+ {0x16, 0x15, 0x0A, 0x10, 0x16, 0x17, 0x18, 0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F, 0x20, 0x21, 0x22, 0x23, 0x24, 0x25,}, //Locality 2
+ {0x17, 0x16, 0x10, 0x0A, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F, 0x20, 0x21, 0x22, 0x23, 0x24,}, //Locality 3
+ {0x18, 0x17, 0x16, 0x15, 0x0A, 0x10, 0x16, 0x17, 0x18, 0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F, 0x20, 0x21, 0x22, 0x23,}, //Locality 4
+ {0x19, 0x18, 0x17, 0x16, 0x10, 0x0A, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F, 0x20, 0x21, 0x22,}, //Locality 5
+ {0x1A, 0x19, 0x18, 0x17, 0x16, 0x15, 0x0A, 0x10, 0x16, 0x17, 0x18, 0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F, 0x20, 0x21,}, //Locality 6
+ {0x1B, 0x1A, 0x19, 0x18, 0x17, 0x16, 0x10, 0x0A, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F, 0x20,}, //Locality 7
+ {0x1C, 0x1B, 0x1A, 0x19, 0x18, 0x17, 0x16, 0x15, 0x0A, 0x10, 0x16, 0x17, 0x18, 0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F,}, //Locality 8
+ {0x1D, 0x1C, 0x1B, 0x1A, 0x19, 0x18, 0x17, 0x16, 0x10, 0x0A, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E,}, //Locality 9
+ {0x1E, 0x1D, 0x1C, 0x1B, 0x1A, 0x19, 0x18, 0x17, 0x16, 0x15, 0x0A, 0x10, 0x16, 0x17, 0x18, 0x19, 0x1A, 0x1B, 0x1C, 0x1D,}, //Locality 10
+ {0x1F, 0x1E, 0x1D, 0x1C, 0x1B, 0x1A, 0x19, 0x18, 0x17, 0x16, 0x10, 0x0A, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1A, 0x1B, 0x1C,}, //Locality 11
+ {0x20, 0x1F, 0x1E, 0x1D, 0x1C, 0x1B, 0x1A, 0x19, 0x18, 0x17, 0x16, 0x15, 0x0A, 0x10, 0x16, 0x17, 0x18, 0x19, 0x1A, 0x1B,}, //Locality 12
+ {0x21, 0x20, 0x1F, 0x1E, 0x1D, 0x1C, 0x1B, 0x1A, 0x19, 0x18, 0x17, 0x16, 0x10, 0x0A, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1A,}, //Locality 13
+ {0x22, 0x21, 0x20, 0x1F, 0x1E, 0x1D, 0x1C, 0x1B, 0x1A, 0x19, 0x18, 0x17, 0x16, 0x15, 0x0A, 0x10, 0x16, 0x17, 0x18, 0x19,}, //Locality 14
+ {0x23, 0x22, 0x21, 0x20, 0x1F, 0x1E, 0x1D, 0x1C, 0x1B, 0x1A, 0x19, 0x18, 0x17, 0x16, 0x10, 0x0A, 0x15, 0x16, 0x17, 0x18,}, //Locality 15
+ {0x24, 0x23, 0x22, 0x21, 0x20, 0x1F, 0x1E, 0x1D, 0x1C, 0x1B, 0x1A, 0x19, 0x18, 0x17, 0x16, 0x15, 0x0A, 0x10, 0x16, 0x17,}, //Locality 16
+ {0x25, 0x24, 0x23, 0x22, 0x21, 0x20, 0x1F, 0x1E, 0x1D, 0x1C, 0x1B, 0x1A, 0x19, 0x18, 0x17, 0x16, 0x10, 0x0A, 0x15, 0x16,}, //Locality 17
+ {0x26, 0x25, 0x24, 0x23, 0x22, 0x21, 0x20, 0x1F, 0x1E, 0x1D, 0x1C, 0x1B, 0x1A, 0x19, 0x18, 0x17, 0x16, 0x15, 0x0A, 0x10,}, //Locality 18
+ {0x27, 0x26, 0x25, 0x24, 0x23, 0x22, 0x21, 0x20, 0x1F, 0x1E, 0x1D, 0x1C, 0x1B, 0x1A, 0x19, 0x18, 0x17, 0x16, 0x10, 0x0A,}, //Locality 19
+ },
+};
+
+
+VOID*
+ReferenceAcpiTable (
+ VOID
+ )
+{
+ //
+ // Reference the table being generated to prevent the optimizer from removing the
+ // data structure from the exeutable
+ //
+ return (VOID*)&Slit;
+}
diff --git a/ArmPkg/Drivers/AcpiTables/exynos5250-arndale/Spmi.aslc b/ArmPkg/Drivers/AcpiTables/exynos5250-arndale/Spmi.aslc
new file mode 100644
index 0000000..77836a4
--- /dev/null
+++ b/ArmPkg/Drivers/AcpiTables/exynos5250-arndale/Spmi.aslc
@@ -0,0 +1,86 @@
+/*
+ * Copyright (c) 2013 Linaro Limited
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the BSD License which accompanies
+ * this distribution, and is available at
+ * http://opensource.org/licenses/bsd-license.php
+ *
+ * Contributors:
+ * Yi Li - yi.li@linaro.org
+*/
+
+#include <IndustryStandard/Acpi.h>
+#include <Platform.h>
+
+#define ACPI_5_0_SPMI_REVISION 0x4
+
+#pragma pack(1)
+typedef struct
+{
+
+ EFI_ACPI_DESCRIPTION_HEADER Header;
+ UINT8 ucInterfaceType;
+ UINT8 Reserved;
+ UINT16 usIPMISpecVersion;
+ UINT8 ucInterruptType;
+ UINT8 ucGPENumber;
+ UINT8 Reserved2;
+ UINT8 ucPCIDeviceFlag;
+ UINT32 uwInterrupt;
+ EFI_ACPI_5_0_GENERIC_ADDRESS_STRUCTURE IPMIRegister;
+ UINT8 ucPCISegment;
+ UINT8 ucPCIBus;
+ UINT8 ucPCIDevice;
+ UINT8 ucPCIFunction;
+ UINT8 Reserved3;
+}EFI_ACPI_5_0_SERVER_PLATFORM_MANAGEMENT_INTERFACE_TABLE;
+#pragma pack()
+
+EFI_ACPI_5_0_SERVER_PLATFORM_MANAGEMENT_INTERFACE_TABLE Spmi =
+{
+ {
+ EFI_ACPI_5_0_SERVER_PLATFORM_MANAGEMENT_INTERFACE_TABLE_SIGNATURE,
+ sizeof (EFI_ACPI_5_0_SERVER_PLATFORM_MANAGEMENT_INTERFACE_TABLE),
+ ACPI_5_0_SPMI_REVISION,
+ 0x00, // Checksum will be updated at runtime
+ {EFI_ACPI_OEM_ID},
+ EFI_ACPI_OEM_TABLE_ID,
+ 0x00,
+ EFI_ACPI_CREATOR_ID,
+ EFI_ACPI_CREATOR_REVISION
+ },
+ 0x00, //Interface Type
+ 0x00, //Reserved
+ 0x0000, //IPMI Spec Version
+ 0x00, //Interrupt Type
+ 0x00, //GPE Number
+ 0x00, //Reserved
+ 0x00, //PCI Device Flag
+ 0x00000000, //Interrupt
+ {
+ 0x00, //Space ID:SystemMemory
+ 0x08, //Bit Width
+ 0x00, //Bit Offset
+ 0x01, //Encoded Access Width
+ 0x0000000000000000, //Address
+ },
+ 0x00, //PCI Segment
+ 0x00, //PCI Bus
+ 0x00, //PCI Device
+ 0x00, //PCI Function
+ 0x00, //Reserved
+};
+
+VOID*
+ReferenceAcpiTable (
+ VOID
+ )
+{
+
+ //
+ // Reference the table being generated to prevent the optimizer from removing the
+ // data structure from the exeutable
+ //
+ return (VOID*)&Spmi;
+}
diff --git a/ArmPkg/Drivers/AcpiTables/exynos5250-arndale/Srat.aslc b/ArmPkg/Drivers/AcpiTables/exynos5250-arndale/Srat.aslc
new file mode 100644
index 0000000..d5c433f
--- /dev/null
+++ b/ArmPkg/Drivers/AcpiTables/exynos5250-arndale/Srat.aslc
@@ -0,0 +1,106 @@
+/*
+ * Copyright (c) 2013 Linaro Limited
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the BSD License which accompanies
+ * this distribution, and is available at
+ * http://opensource.org/licenses/bsd-license.php
+ *
+ * Contributors:
+ * Yi Li - yi.li@linaro.org
+*/
+
+#include <IndustryStandard/Acpi.h>
+#include <Platform.h>
+
+
+//
+// Define the number of each table type.
+// This is where the table layout is modified.
+//
+#define EFI_ACPI_PROCESSOR_LOCAL_APIC_SAPIC_AFFINITY_STRUCTURE_COUNT 4
+#define EFI_ACPI_MEMORY_AFFINITY_STRUCTURE_COUNT 4
+
+
+#pragma pack(1)
+typedef struct {
+ EFI_ACPI_5_0_SYSTEM_RESOURCE_AFFINITY_TABLE_HEADER Header;
+ EFI_ACPI_5_0_PROCESSOR_LOCAL_APIC_SAPIC_AFFINITY_STRUCTURE Apic;
+ EFI_ACPI_5_0_MEMORY_AFFINITY_STRUCTURE Memory;
+ EFI_ACPI_5_0_PROCESSOR_LOCAL_X2APIC_AFFINITY_STRUCTURE x2APIC;
+} EFI_ACPI_5_0_SYSTEM_RESOURCE_AFFINITY_TABLE;
+
+#pragma pack()
+
+
+//
+// Static Resource Affinity Table definition
+//
+EFI_ACPI_5_0_SYSTEM_RESOURCE_AFFINITY_TABLE Srat = {
+ {
+ EFI_ACPI_5_0_SYSTEM_RESOURCE_AFFINITY_TABLE_SIGNATURE,
+ sizeof (EFI_ACPI_5_0_SYSTEM_RESOURCE_AFFINITY_TABLE),
+ EFI_ACPI_5_0_SYSTEM_RESOURCE_AFFINITY_TABLE_REVISION,
+ 0x00, // Checksum will be updated at runtime
+ {EFI_ACPI_OEM_ID},
+ EFI_ACPI_OEM_TABLE_ID,
+ EFI_ACPI_OEM_REVISION,
+ EFI_ACPI_CREATOR_ID,
+ EFI_ACPI_CREATOR_REVISION,
+ /*Reserved*/
+ 0x00000001, // Reserved to be 1 for backward compatibility
+ EFI_ACPI_RESERVED_QWORD
+ },
+ /**/
+ {
+ 0x00, // Subtable Type:Processor Local APIC/SAPIC Affinity
+ sizeof(EFI_ACPI_5_0_PROCESSOR_LOCAL_APIC_SAPIC_AFFINITY_STRUCTURE), //Length
+ 0x00, //Proximity Domain Low(8)
+ 0x00, //Apic ID
+ 0x00000001, //Flags
+ 0x00, //Local Sapic EID
+ {0,0,0}, //Proximity Domain High(24)
+ 0x00000000, //ClockDomain
+ },
+ //
+ //
+ // Memory Affinity
+ //
+ {
+ 0x01, // Subtable Type:Memory Affinity
+ sizeof (EFI_ACPI_5_0_MEMORY_AFFINITY_STRUCTURE), // Length
+ 0x00000000, // Proximity Domain
+ EFI_ACPI_RESERVED_WORD, // Reserved
+ 0x00000000, // Address Base Low
+ 0x00000000, // Address Base High
+ 0x0009FC00, // Length Low
+ 0x00000000, // Length High
+ EFI_ACPI_RESERVED_DWORD, // Reserved
+ 0x00000001, // Flags disabled, until enabled by Platform driver
+ EFI_ACPI_RESERVED_QWORD , // Reserved
+ },
+
+ /*Processor Local x2APIC Affinity*/
+ {
+ 0x02, // Subtable Type:Processor Local x2APIC Affinity
+ sizeof(EFI_ACPI_5_0_PROCESSOR_LOCAL_X2APIC_AFFINITY_STRUCTURE),
+ {0,0}, //Reserved1
+ 0x00000000, //Proximity Domain
+ 0x00000000, //Apic ID
+ 0x00000001, //Flags
+ 0x00000000, //Clock Domain
+ {0,0,0,0}, //Reserved2
+ },
+};
+
+VOID*
+ReferenceAcpiTable (
+ VOID
+ )
+{
+ //
+ // Reference the table being generated to prevent the optimizer from removing the
+ // data structure from the exeutable
+ //
+ return (VOID*)&Srat;
+}
diff --git a/ArmPkg/Drivers/AcpiTables/exynos5250-arndale/Ssdt0.asl b/ArmPkg/Drivers/AcpiTables/exynos5250-arndale/Ssdt0.asl
new file mode 100644
index 0000000..69dce10
--- /dev/null
+++ b/ArmPkg/Drivers/AcpiTables/exynos5250-arndale/Ssdt0.asl
@@ -0,0 +1,17 @@
+/*
+ * Copyright (c) 2013, Al Stone <al.stone@linaro.org>
+ *
+ * [SSDT] Description of the Arndale board (exynos5250) GPIO structure
+ *
+ * This source is released under the terms of the GPLv2.
+ */
+
+DefinitionBlock (
+ "ssdt0.aml", // output filename
+ "SSDT", // table signature
+ 2, // SSDT compliance revision
+ "LINARO", // OEM ID
+ "ARNDALE ", // table ID
+ 0x00000001) // OEM revision
+{
+}
diff --git a/ArmPkg/Drivers/AcpiTables/exynos5250-arndale/Uefi.aslc b/ArmPkg/Drivers/AcpiTables/exynos5250-arndale/Uefi.aslc
new file mode 100644
index 0000000..c3bbce3
--- /dev/null
+++ b/ArmPkg/Drivers/AcpiTables/exynos5250-arndale/Uefi.aslc
@@ -0,0 +1,57 @@
+/*
+ * Copyright (c) 2013 Linaro Limited
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the BSD License which accompanies
+ * this distribution, and is available at
+ * http://opensource.org/licenses/bsd-license.php
+ *
+ * Contributors:
+ * Yi Li - yi.li@linaro.org
+*/
+
+#include <IndustryStandard/Acpi.h>
+#include <Platform.h>
+
+
+#define ACPI_5_0_UEFI_REVISION 0x1
+
+#pragma pack(1)
+
+typedef struct
+{
+ EFI_ACPI_DESCRIPTION_HEADER Header;
+ EFI_GUID guid;
+ UINT16 usDataOffset;
+}EFI_ACPI_5_0_UEFI_TABLE;
+#pragma pack()
+
+EFI_ACPI_5_0_UEFI_TABLE Uefi=
+{
+ {
+ EFI_ACPI_5_0_UEFI_ACPI_DATA_TABLE_SIGNATURE,
+ sizeof (EFI_ACPI_5_0_UEFI_TABLE),
+ ACPI_5_0_UEFI_REVISION,
+ 0x00, // Checksum will be updated at runtime
+ {EFI_ACPI_OEM_ID},
+ EFI_ACPI_OEM_TABLE_ID,
+ EFI_ACPI_OEM_REVISION,
+ EFI_ACPI_CREATOR_ID,
+ EFI_ACPI_CREATOR_REVISION
+ },
+ //03020100-0504-0706-0809-0A0B0C0D0E0F
+ { 0x03020100, 0x0504, 0x0706, { 0x08, 0x09, 0x0A, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f } },
+ 0x0036 //Data Offset
+};
+
+VOID*
+ReferenceAcpiTable (
+ VOID
+ )
+{
+ //
+ // Reference the table being generated to prevent the optimizer from removing the
+ // data structure from the exeutable
+ //
+ return (VOID*)&Uefi;
+}
diff --git a/ArmPkg/Drivers/AcpiTables/foundation-v8/AcpiTables.inf b/ArmPkg/Drivers/AcpiTables/foundation-v8/AcpiTables.inf
new file mode 100644
index 0000000..2157280
--- /dev/null
+++ b/ArmPkg/Drivers/AcpiTables/foundation-v8/AcpiTables.inf
@@ -0,0 +1,86 @@
+## @file
+# Component description file for PlatformAcpiTables module.
+#
+# ACPI table data and ASL sources required to boot the platform.
+#
+# Copyright (c) 2008 - 2010, Intel Corporation. All rights reserved.<BR>
+# 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.
+#
+##
+
+/*
+ * Copyright (c) 2013 Linaro Limited
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the BSD License which accompanies
+ * this distribution, and is available at
+ * http://opensource.org/licenses/bsd-license.php
+ *
+ * Contributors:
+ * Yi Li - yi.li@linaro.org
+*/
+[Defines]
+ INF_VERSION = 0x00010005
+ BASE_NAME = PlatformAcpiTables
+ FILE_GUID = 7E374E25-8E01-4FEE-87F2-390C23C606CD
+ MODULE_TYPE = USER_DEFINED
+ VERSION_STRING = 1.0
+ FFS_EXT = SEC
+ COMPILE_SELECT = .c=acpi_c
+
+[Sources]
+ Platform.h
+ Apic.aslc
+ Bert.aslc
+ Csrt.aslc
+ Dsdt.asl
+ Ecdt.aslc
+ Einj.aslc
+ Erst.aslc
+ Facp.aslc
+ Facs.aslc
+ Gtdt.aslc
+ Hest.aslc
+ Mcfg.aslc
+ Mpst.aslc
+ Msct.aslc
+ Oem0.aslc
+ Pmtt.aslc
+ Slit.aslc
+ Spmi.aslc
+ Srat.aslc
+ Ssdt0.asl
+ Uefi.aslc
+
+ ###rsdp/xsdt created by building the acpi table
+ ###tables need to change format
+ #asf!.asl
+ #bgrt.asl
+ #boot.asl
+ #cpep.asl
+ #dbgp.asl
+ #dmar.asl
+ #fpdt.asl
+ #hpet.asl
+ #ivrs.asl
+ #mchi.asl
+ #r3pt.asl
+ #sbst.asl
+ #slic.asl
+ #spcr.asl
+ #tcpa.asl
+ #tpm2.asl
+ #waet.asl
+ #wadt.asl
+ #wddt.asl
+ #wdrt.asl
+ #wdrt.asl
+
+[Packages]
+ MdePkg/MdePkg.dec
diff --git a/ArmPkg/Drivers/AcpiTables/foundation-v8/Apic.aslc b/ArmPkg/Drivers/AcpiTables/foundation-v8/Apic.aslc
new file mode 100644
index 0000000..e18c1a5
--- /dev/null
+++ b/ArmPkg/Drivers/AcpiTables/foundation-v8/Apic.aslc
@@ -0,0 +1,216 @@
+/** @file
+ MADT Table
+
+ This file contains a structure definition for the ACPI 1.0 Multiple APIC
+ Description Table (MADT).
+
+ Copyright (c) 2008 - 2012, Intel Corporation. All rights reserved.<BR>
+ 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.
+
+**/
+
+/*
+ * Copyright (c) 2013 Linaro Limited
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the BSD License which accompanies
+ * this distribution, and is available at
+ * http://opensource.org/licenses/bsd-license.php
+ *
+ * Contributors:
+ * Yi Li - yi.li@linaro.org
+*/
+#include <IndustryStandard/Acpi.h>
+#include <Platform.h>
+
+//
+// Local APIC address
+//
+#define EFI_ACPI_LOCAL_APIC_ADDRESS 0x2C002000 // TBD
+
+
+#define ACPI_PROCESSOR_LOCAL_GIC 0xb
+#define ACPI_GIC_DISTRIBUTOR 0xc
+
+//These addresses are defined by the MP shared region defined in the UEFI memory map.
+#define MP_REGISTER_ADDRESS_GIC0 0x80301000
+#define DISTRIBUTOR_PHYSICAL_ADDRESS 0x02000000
+
+#define ACPI_GICC_NUM 0x8
+
+//
+// Ensure proper structure formats
+//
+#pragma pack (1)
+//
+// ACPI 5.0 MADT structure
+//
+typedef struct {
+ EFI_ACPI_5_0_MULTIPLE_APIC_DESCRIPTION_TABLE_HEADER Header;
+ EFI_ACPI_5_0_GIC_STRUCTURE Gic[ACPI_GICC_NUM];
+ EFI_ACPI_5_0_GIC_DISTRIBUTOR_STRUCTURE Distributor;
+
+} EFI_ACPI_5_0_MULTIPLE_APIC_DESCRIPTION_TABLE;
+
+#pragma pack ()
+
+//
+// Multiple APIC Description Table
+//
+EFI_ACPI_5_0_MULTIPLE_APIC_DESCRIPTION_TABLE Madt = {
+ {
+ {
+ EFI_ACPI_5_0_MULTIPLE_APIC_DESCRIPTION_TABLE_SIGNATURE,
+ sizeof (EFI_ACPI_5_0_MULTIPLE_APIC_DESCRIPTION_TABLE),
+ EFI_ACPI_5_0_MULTIPLE_APIC_DESCRIPTION_TABLE_REVISION,
+ 0x00, // Checksum will be updated at runtime
+ {EFI_ACPI_OEM_ID},
+ EFI_ACPI_OEM_TABLE_ID,
+ EFI_ACPI_OEM_REVISION,
+ EFI_ACPI_CREATOR_ID,
+ EFI_ACPI_CREATOR_REVISION
+ },
+
+ //
+ // MADT specific fields
+ //
+ EFI_ACPI_LOCAL_APIC_ADDRESS,
+ 0x00000000
+ },
+ {
+ //LocalGic0
+ {
+ ACPI_PROCESSOR_LOCAL_GIC, //Type
+ sizeof (EFI_ACPI_5_0_GIC_STRUCTURE), //Length
+ 0x00, //Reserved
+ 0x00, //GicId
+ 0x00, //AcpiProcessorUid
+ 0x00000001, //Flags
+ 0x00000000, //ParkingProtocolVersion
+ 0x00000000, //PerformanceInterruptGsiv
+ 0x0000000000000000, //ParkedAddress
+ 0x000000002C002000, //PhysicalBaseAddress
+ },
+ //LocalGic1
+ {
+ ACPI_PROCESSOR_LOCAL_GIC, //Type
+ sizeof (EFI_ACPI_5_0_GIC_STRUCTURE), //Length
+ 0x00, //Reserved
+ 0x01, //GicId
+ 0x01, //AcpiProcessorUid
+ EFI_ACPI_5_0_GIC_ENABLED, //Flags
+ 0x00000000, //ParkingProtocolVersion
+ 0x00000000, //PerformanceInterruptGsiv
+ 0x0000000000000000, //ParkedAddress
+ 0x000000002C002000 //PhysicalBaseAddress
+ },
+ //LocalGic2
+ {
+ ACPI_PROCESSOR_LOCAL_GIC, //Type:
+ sizeof (EFI_ACPI_5_0_GIC_STRUCTURE), //Length
+ 0x00, //Reserved
+ 0x02, //GicId
+ 0x02, //AcpiProcessorUid
+ EFI_ACPI_5_0_GIC_ENABLED, //Flags
+ 0x00000000, //ParkingProtocolVersion
+ 0x00000000, //PerformanceInterruptGsiv
+ 0x0000000000000000, //ParkedAddress
+ 0x000000002C002000, //PhysicalBaseAddress
+ },
+ //LocalGic3
+ {
+ ACPI_PROCESSOR_LOCAL_GIC, //Type
+ sizeof (EFI_ACPI_5_0_GIC_STRUCTURE), //Length
+ 0x00, //Reserved
+ 0x03, //GicId
+ 0x03, //AcpiProcessorUid
+ EFI_ACPI_5_0_GIC_ENABLED, //Flags
+ 0x00000000, //ParkingProtocolVersion
+ 0x00000000, //PerformanceInterruptGsiv
+ 0x0000000000000000, //ParkedAddress
+ 0x000000002C002000, //PhysicalBaseAddress
+ },
+ //LocalGic4
+ {
+ ACPI_PROCESSOR_LOCAL_GIC, //Type
+ sizeof (EFI_ACPI_5_0_GIC_STRUCTURE), //Length
+ 0x00, //Reserved
+ 0x04, //GicId
+ 0x04, //AcpiProcessorUid
+ 0, //Flags
+ 0x00000000, //ParkingProtocolVersion
+ 0x00000000, //PerformanceInterruptGsiv
+ 0x0000000000000000, //ParkedAddress
+ 0x000000002C002000, //PhysicalBaseAddress
+ },
+ //LocalGic5
+ {
+ ACPI_PROCESSOR_LOCAL_GIC, //Type
+ sizeof (EFI_ACPI_5_0_GIC_STRUCTURE), //Length
+ 0x00, //Reserved
+ 0x05, //GicId
+ 0x05, //AcpiProcessorUid
+ 0x0, //Flags
+ 0x00000000, //ParkingProtocolVersion
+ 0x00000000, //PerformanceInterruptGsiv
+ 0x0000000000000000, //ParkedAddress
+ 0x000000002C002000, //PhysicalBaseAddress
+ },
+ //LocalGic6
+ {
+ ACPI_PROCESSOR_LOCAL_GIC, //Type
+ sizeof (EFI_ACPI_5_0_GIC_STRUCTURE), //Length
+ 0x00, //Reserved
+ 0x06, //GicId
+ 0x06, //AcpiProcessorUid
+ 0x0, //Flags
+ 0x00000000, //ParkingProtocolVersion
+ 0x00000000, //PerformanceInterruptGsiv
+ 0x0000000000000000, //ParkedAddress
+ 0x000000002C002000 , //PhysicalBaseAddress
+ },
+ //LocalGic7
+ {
+ ACPI_PROCESSOR_LOCAL_GIC, //Type
+ sizeof (EFI_ACPI_5_0_GIC_STRUCTURE), //Length
+ 0x00, //Reserved
+ 0x07, //GicId
+ 0x07, //AcpiProcessorUid
+ 0x0, //Flags
+ 0x00000000, //ParkingProtocolVersion
+ 0x00000000, //PerformanceInterruptGsiv
+ 0x0000000000000000, //ParkedAddress
+ 0x000000002C002000, //PhysicalBaseAddress
+ },
+ },
+ //Distributor
+ {
+ ACPI_GIC_DISTRIBUTOR, //Type
+ sizeof (EFI_ACPI_5_0_GIC_DISTRIBUTOR_STRUCTURE), //Length
+ 0, //Reserved1
+ 0, //GicId
+ 0x000000002C001000, //PhysicalBaseAddress
+ 0, //SystemVectorBase
+ 0 //Reserved2
+ }
+
+};
+
+
+VOID*
+ReferenceAcpiTable (
+ VOID
+ )
+{
+ //
+ // Reference the table being generated to prevent the optimizer from removing the
+ // data structure from the exeutable
+ //
+ return (VOID*)&Madt;
+}
diff --git a/ArmPkg/Drivers/AcpiTables/foundation-v8/Bert.aslc b/ArmPkg/Drivers/AcpiTables/foundation-v8/Bert.aslc
new file mode 100644
index 0000000..0fe2bc4
--- /dev/null
+++ b/ArmPkg/Drivers/AcpiTables/foundation-v8/Bert.aslc
@@ -0,0 +1,84 @@
+/*
+ * Copyright (c) 2013 Linaro Limited
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the BSD License which accompanies
+ * this distribution, and is available at
+ * http://opensource.org/licenses/bsd-license.php
+ *
+ * Contributors:
+ * Yi Li - yi.li@linaro.org
+*/
+
+#include <IndustryStandard/Acpi.h>
+#include <Platform.h>
+
+// Generic error severity in data entry
+#define BOOT_ERROR_SEVERITY_RECOVERABLE 0
+#define BOOT_ERROR_SEVERITY_FATAL 1
+#define BOOT_ERROR_SEVERITY_CORRECTED 2
+#define BOOT_ERROR_SEVERITY_NONE 3
+
+#pragma pack(1)
+
+// ErrorStatus block record definitions for various errors
+typedef struct {
+ UINT32 UeValid:1;
+ UINT32 CeValid:1;
+ UINT32 MultipleUeValid:1;
+ UINT32 MultipleCeValid:1;
+ UINT32 NumErrorDataEntry:10;
+ UINT32 Resv1:18;
+} BOOT_ERROR_BLOCK_STATUS;
+
+
+typedef struct {
+ // Error Status block
+ BOOT_ERROR_BLOCK_STATUS BlockStatus;
+ UINT32 RawDataOffset;
+ UINT32 RawDataSize;
+ UINT32 ErrDataSize;
+ UINT32 Severity;
+ // Error Status data...
+} EFI_ACPI_5_0_BOOT_ERROR_REGION;
+
+
+typedef struct {
+ EFI_ACPI_DESCRIPTION_HEADER Header;
+ UINT32 BootErrorRegionLen;
+ UINT64 BootErrorRegion;
+} EFI_ACPI_5_0_BOOT_ERROR_RECORD_TABLE;
+
+#pragma pack()
+
+
+
+EFI_ACPI_5_0_BOOT_ERROR_RECORD_TABLE Bert = {
+ {
+ EFI_ACPI_5_0_BOOT_ERROR_RECORD_TABLE_SIGNATURE,
+ sizeof (EFI_ACPI_5_0_BOOT_ERROR_RECORD_TABLE),
+ EFI_ACPI_5_0_BOOT_ERROR_RECORD_TABLE_REVISION,
+ 0x00, // Checksum will be updated at runtime
+ {EFI_ACPI_OEM_ID},
+ EFI_ACPI_OEM_TABLE_ID,
+ 0x02,
+ EFI_ACPI_CREATOR_ID,
+ EFI_ACPI_CREATOR_REVISION
+ },
+ 0x9D, //BootErrorRegionLen
+ 0xFFFF0008 //BootErrorRegion
+
+};
+
+
+VOID*
+ReferenceAcpiTable (
+ VOID
+ )
+{
+ //
+ // Reference the table being generated to prevent the optimizer from removing the
+ // data structure from the exeutable
+ //
+ return (VOID*)&Bert;
+}
diff --git a/ArmPkg/Drivers/AcpiTables/foundation-v8/Csrt.aslc b/ArmPkg/Drivers/AcpiTables/foundation-v8/Csrt.aslc
new file mode 100644
index 0000000..44e516f
--- /dev/null
+++ b/ArmPkg/Drivers/AcpiTables/foundation-v8/Csrt.aslc
@@ -0,0 +1,274 @@
+/*
+ * Copyright (c) 2013 Linaro Limited
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the BSD License which accompanies
+ * this distribution, and is available at
+ * http://opensource.org/licenses/bsd-license.php
+ *
+ * Contributors:
+ * Yi Li - yi.li@linaro.org
+*/
+
+#include <IndustryStandard/Acpi.h>
+#include <Platform.h>
+
+#define ACPI_5_0_CSRT_VERSION 0x1
+
+#define ACPI_RESOURCE_GROUP_NUM 0x2
+#define ACPI_RESOURCE_DESCRIPTOR_NUM0 0x7
+#define ACPI_RESOURCE_DESCRIPTOR_NUM1 0x9
+
+/*resource group header*/
+typedef struct
+{
+ UINT32 Length;
+ UINT32 VendorID;
+ UINT32 SubvendorID;
+ UINT16 DeviceID;
+ UINT16 SubdeviceID;
+ UINT16 Revision;
+ UINT16 Reserved;
+ UINT32 SharedInfoLength;
+}EFI_ACPI_5_0_CRST_RESOURCE_GROUP_HEADER;
+
+/*resource descriptor header*/
+typedef struct
+{
+ UINT32 Length;
+ UINT16 ResourceType;
+ UINT16 ResourceSubType;
+ UINT32 UID;
+}EFI_ACPI_5_0_CRST_RESOURCE_DESCRIPTOR;
+
+
+/*timer share info*/
+typedef struct
+{
+ UINT16 usMajorVersion;
+ UINT16 usMinorVersion;
+ UINT32 uwMMIOBaseAddressLow;
+ UINT32 uwMMIOBaseAddressHigh;
+ UINT32 uwGSIInterrupt;
+ UINT8 ucInterruptPolarity;
+ UINT8 ucInterruptMode;
+ UINT8 ucNumChannels;
+ UINT8 ucDMAAddressWidth;
+ UINT16 usDMAAddressWidth;
+ UINT16 usNumHandshakeSignals;
+ UINT32 uwMaxBlockSize;
+}EFI_ACPI_5_0_CRST_SHARE_INFO;
+
+
+
+/*timer resource group header*/
+typedef struct
+{
+ EFI_ACPI_5_0_CRST_RESOURCE_GROUP_HEADER head;
+ EFI_ACPI_5_0_CRST_SHARE_INFO ShareInfo; /*share info*/
+ EFI_ACPI_5_0_CRST_RESOURCE_DESCRIPTOR ResourceDescriptor[ACPI_RESOURCE_DESCRIPTOR_NUM0];
+}EFI_ACPI_5_0_CRST_RESOURCE_GROUP0;
+
+/*timer resource group header*/
+typedef struct
+{
+ EFI_ACPI_5_0_CRST_RESOURCE_GROUP_HEADER head;
+ EFI_ACPI_5_0_CRST_SHARE_INFO ShareInfo; /*share info*/
+ EFI_ACPI_5_0_CRST_RESOURCE_DESCRIPTOR ResourceDescriptor[ACPI_RESOURCE_DESCRIPTOR_NUM1];
+}EFI_ACPI_5_0_CRST_RESOURCE_GROUP1;
+
+
+
+
+/*CSRT structure*/
+typedef struct {
+ EFI_ACPI_DESCRIPTION_HEADER Header;
+ EFI_ACPI_5_0_CRST_RESOURCE_GROUP0 ResourceGroup0;
+ EFI_ACPI_5_0_CRST_RESOURCE_GROUP1 ResourceGroup1;
+} EFI_ACPI_5_0_CORE_SYSTEM_RESOURCE_TABLE;
+
+
+
+
+EFI_ACPI_5_0_CORE_SYSTEM_RESOURCE_TABLE Csrt = {
+ {
+ EFI_ACPI_5_0_CORE_SYSTEM_RESOURCE_TABLE_SIGNATURE,
+ sizeof (EFI_ACPI_5_0_CORE_SYSTEM_RESOURCE_TABLE),
+ ACPI_5_0_CSRT_VERSION,
+ 0x00, // Checksum will be updated at runtime
+ {EFI_ACPI_OEM_ID_INTEL},
+ EFI_ACPI_OEM_TABLE_ID_INTEL,
+ EFI_ACPI_OEM_REVISION,
+ EFI_ACPI_CREATOR_ID,
+ EFI_ACPI_CREATOR_REVISION
+ },
+ /*EFI_ACPI_5_0_CRST_RESOURCE_GROUP0*/
+ {
+ sizeof(EFI_ACPI_5_0_CRST_RESOURCE_GROUP0), /*Length*/
+ EFI_ACPI_CREATOR_ID, /*VendorID*/
+ 0, /*SubvendorID*/
+ 0x9C60, /*DeviceID*/
+ 0x0, /*SubdeviceID*/
+ 0002, /*Revision*/
+ 0, /*Reserved*/
+ sizeof(EFI_ACPI_5_0_CRST_SHARE_INFO), /*SharedInfoLength*/
+ /*share info*/
+ {
+ 0x1, /*Major Version*/
+ 0x0, /*Minor Version*/
+ 0xB3A00000, /*MMIO Base Address Low*/
+ 0x00000000, /*MMIO Base Address High*/
+ 0x0000002A, /*GSI Interrupt*/
+ 0x2, /*Interrupt Polarity*/
+ 0x0, /*Interrupt Mode*/
+ 0x6, /*Num Channels*/
+ 0x20, /*DMA Address Width*/
+ 0x0, /*Base Request Line*/
+ 0x10, /*Num Handshake Signals*/
+ 0xfff, /*Max Block Size*/
+ },
+ {
+ {
+ sizeof(EFI_ACPI_5_0_CRST_RESOURCE_DESCRIPTOR), /*Length*/
+ 0x3, /*ResourceType*/
+ 0x1, /*ResourceSubType*/
+ 0x20495053 /*UID*/
+ },
+ {
+ sizeof(EFI_ACPI_5_0_CRST_RESOURCE_DESCRIPTOR), /*Length*/
+ 0x3, /*ResourceType*/
+ 0x0, /*ResourceSubType*/
+ 0x30414843 /*UID*/
+ },
+ {
+ sizeof(EFI_ACPI_5_0_CRST_RESOURCE_DESCRIPTOR), /*Length*/
+ 0x3, /*ResourceType*/
+ 0x0, /*ResourceSubType*/
+ 0x31414843 /*UID*/
+ },
+ {
+ sizeof(EFI_ACPI_5_0_CRST_RESOURCE_DESCRIPTOR), /*Length*/
+ 0x3, /*ResourceType*/
+ 0x0, /*ResourceSubType*/
+ 0x32414843 /*UID*/
+ },
+ {
+ sizeof(EFI_ACPI_5_0_CRST_RESOURCE_DESCRIPTOR), /*Length*/
+ 0x3, /*ResourceType*/
+ 0x0, /*ResourceSubType*/
+ 0x33414843 /*UID*/
+ },
+ {
+ sizeof(EFI_ACPI_5_0_CRST_RESOURCE_DESCRIPTOR), /*Length*/
+ 0x3, /*ResourceType*/
+ 0x0, /*ResourceSubType*/
+ 0x34414843 /*UID*/
+ },
+ {
+ sizeof(EFI_ACPI_5_0_CRST_RESOURCE_DESCRIPTOR), /*Length*/
+ 0x3, /*ResourceType*/
+ 0x0, /*ResourceSubType*/
+ 0x35414843 /*UID*/
+ },
+ }
+ },
+ {
+ /*header*/
+ {
+ sizeof(EFI_ACPI_5_0_CRST_RESOURCE_GROUP1), /*Length*/
+ EFI_ACPI_CREATOR_ID, /*VendorID*/
+ 0, /*SubvendorID*/
+ 0x9C60, /*DeviceID*/
+ 0x0, /*SubdeviceID*/
+ 0003, /*Revision*/
+ 0, /*Reserved*/
+ sizeof(EFI_ACPI_5_0_CRST_SHARE_INFO), /*SharedInfoLength*/
+ },
+ /*share info*/
+ {
+ 0x1, /*Major Version*/
+ 0x0, /*Minor Version*/
+ 0x0, /*MMIO Base Address Low*/
+ 0x00000000, /*MMIO Base Address High*/
+ 0x0000002B, /*GSI Interrupt*/
+ 0x2, /*Interrupt Polarity*/
+ 0x0, /*Interrupt Mode*/
+ 0x8, /*Num Channels*/
+ 0x20, /*DMA Address Width*/
+ 0x10, /*Base Request Line*/
+ 0x10, /*Num Handshake Signals*/
+ 0xfff, /*Max Block Size*/
+ },
+ {
+ {
+ sizeof(EFI_ACPI_5_0_CRST_RESOURCE_DESCRIPTOR), /*Length*/
+ 0x3, /*ResourceType*/
+ 0x1, /*ResourceSubType*/
+ 0x20433249 /*UID*/
+ },
+ {
+ sizeof(EFI_ACPI_5_0_CRST_RESOURCE_DESCRIPTOR), /*Length*/
+ 0x3, /*ResourceType*/
+ 0x0, /*ResourceSubType*/
+ 0x30414843 /*UID*/
+ },
+ {
+ sizeof(EFI_ACPI_5_0_CRST_RESOURCE_DESCRIPTOR), /*Length*/
+ 0x3, /*ResourceType*/
+ 0x0, /*ResourceSubType*/
+ 0x31414843 /*UID*/
+ },
+ {
+ sizeof(EFI_ACPI_5_0_CRST_RESOURCE_DESCRIPTOR), /*Length*/
+ 0x3, /*ResourceType*/
+ 0x0, /*ResourceSubType*/
+ 0x32414843 /*UID*/
+ },
+ {
+ sizeof(EFI_ACPI_5_0_CRST_RESOURCE_DESCRIPTOR), /*Length*/
+ 0x3, /*ResourceType*/
+ 0x0, /*ResourceSubType*/
+ 0x33414843 /*UID*/
+ },
+ {
+ sizeof(EFI_ACPI_5_0_CRST_RESOURCE_DESCRIPTOR), /*Length*/
+ 0x3, /*ResourceType*/
+ 0x0, /*ResourceSubType*/
+ 0x34414843 /*UID*/
+ },
+ {
+ sizeof(EFI_ACPI_5_0_CRST_RESOURCE_DESCRIPTOR), /*Length*/
+ 0x3, /*ResourceType*/
+ 0x0, /*ResourceSubType*/
+ 0x35414843 /*UID*/
+ },
+ {
+ sizeof(EFI_ACPI_5_0_CRST_RESOURCE_DESCRIPTOR), /*Length*/
+ 0x3, /*ResourceType*/
+ 0x0, /*ResourceSubType*/
+ 0x36414843 /*UID*/
+ },
+ {
+ sizeof(EFI_ACPI_5_0_CRST_RESOURCE_DESCRIPTOR), /*Length*/
+ 0x3, /*ResourceType*/
+ 0x0, /*ResourceSubType*/
+ 0x37414843 /*UID*/
+ },
+ },
+ },
+
+
+};
+
+
+VOID*
+ReferenceAcpiTable (
+ VOID
+ )
+{
+ //
+ // Reference the table being generated to prevent the optimizer from removing the
+ // data structure from the exeutable
+ //
+ return (VOID*)&Csrt;
+}
diff --git a/ArmPkg/Drivers/AcpiTables/foundation-v8/Dsdt.asl b/ArmPkg/Drivers/AcpiTables/foundation-v8/Dsdt.asl
new file mode 100644
index 0000000..58dfd12
--- /dev/null
+++ b/ArmPkg/Drivers/AcpiTables/foundation-v8/Dsdt.asl
@@ -0,0 +1,269 @@
+/*
+ * Copyright (c) 2013, Al Stone <al.stone@linaro.org>
+ *
+ * [DSDT] Description of the ARMv8 foundation model
+ *
+ * This source is released under the terms of the GPLv2.
+ */
+
+DefinitionBlock (
+ "dsdt.aml", // output filename
+ "DSDT", // table signature
+ 2, // DSDT compliance revision
+ "LINARO", // OEM ID
+ "FOUNDATI", // table ID
+ 0x00000003) // OEM revision
+{
+ Scope (\_SB)
+ {
+ Method (_OSC, 4, NotSerialized)
+ {
+ /* Platform-Wide OSPM Capabilities */
+ If(LEqual(Arg0,ToUUID("0811B06E-4A27-44F9-8D60-3CBBC22E7B48")))
+ {
+ /* APEI support unconditionally */
+ Return (Arg3)
+ } Else {
+ CreateDWordField (Arg3, Zero, CDW1)
+ /* Set invalid UUID error bit */
+ Or (CDW1, 0x04, CDW1)
+ Return (Arg3)
+ }
+ }
+
+ Device (HED)
+ {
+ Name (_HID, EisaId ("PNP0C33"))
+ Name (_UID, 0x00)
+ }
+
+ Device (SCK0)
+ {
+ Name (_HID, "ACPI0004")
+ Name (_UID, 0x00)
+ Method (_STA, 0, NotSerialized)
+ {
+ Return (0x0F)
+ }
+
+ Device (PRC0)
+ {
+ Name (_HID, "ACPI0007")
+ Name (_UID, 0x00)
+
+ /* CPU0 will be always present */
+ Method (_STA, 0, NotSerialized)
+ {
+ Return (0x0F)
+ }
+
+ Name (MAT0, Buffer (0x28)
+ {
+ /* Be careful, little-endian here */
+ /* 0000 */ 0x0B, 0x28, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* type, len, reserved, gic_id */
+ /* 0008 */ 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, /* uid, flags */
+ /* 0010 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* parking_version, performance_interrupt */
+ /* 0018 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* parked_address */
+ /* 0020 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 /* base_address */
+ })
+
+ Name (MAT1, Buffer (0x28)
+ {
+ /* 0000 */ 0x0B, 0x28, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ /* 0008 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ /* 0010 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ /* 0018 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ /* 0020 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
+ })
+
+ Method (_MAT, 0, NotSerialized)
+ {
+ If (_STA())
+ {
+ Return (MAT0)
+ }
+ Else
+ {
+ Return (MAT1)
+ }
+ }
+ }
+
+ Device (PRC1)
+ {
+ Name (_HID, "ACPI0007")
+ Name (_UID, 0x01)
+
+ Name (STA1, 0x0F)
+ Method (_STA, 0, NotSerialized)
+ {
+ Return (STA1)
+ }
+
+ Method (_EJ0, 1, NotSerialized)
+ {
+ If (LEqual (STA1, 0x0F))
+ {
+ Store (0x00, STA1)
+ }
+ }
+
+ Name (MAT0, Buffer (0x28)
+ {
+ /* 0000 */ 0x0B, 0x28, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
+ /* 0008 */ 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
+ /* 0010 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ /* 0018 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ /* 0020 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
+ })
+
+ Name (MAT1, Buffer (0x28)
+ {
+ /* 0000 */ 0x0B, 0x28, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
+ /* 0008 */ 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ /* 0010 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ /* 0018 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ /* 0020 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
+ })
+
+ Method (_MAT, 0, NotSerialized)
+ {
+ If (_STA())
+ {
+ Return (MAT0)
+ }
+ Else
+ {
+ Return (MAT1)
+ }
+ }
+ }
+
+ Device (PRC2)
+ {
+ Name (_HID, "ACPI0007")
+ Name (_UID, 0x02)
+
+ Name (STA2, 0x0F)
+ Method (_STA, 0, NotSerialized)
+ {
+ Return (STA2)
+ }
+
+ Method (_EJ0, 1, NotSerialized)
+ {
+ If (LEqual (STA2, 0x0F))
+ {
+ Store (0x00, STA2)
+ }
+ }
+
+ Name (MAT0, Buffer (0x28)
+ {
+ /* 0000 */ 0x0B, 0x28, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
+ /* 0008 */ 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
+ /* 0010 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ /* 0018 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ /* 0020 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
+ })
+
+ Name (MAT1, Buffer (0x28)
+ {
+ /* 0000 */ 0x0B, 0x28, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
+ /* 0008 */ 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ /* 0010 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ /* 0018 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ /* 0020 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
+ })
+
+ Method (_MAT, 0, NotSerialized)
+ {
+ If (_STA())
+ {
+ Return (MAT0)
+ }
+ Else
+ {
+ Return (MAT1)
+ }
+ }
+ }
+
+ Device (PRC3)
+ {
+ Name (_HID, "ACPI0007")
+ Name (_UID, 0x03)
+
+ Name (STA3, 0x0F)
+ Method (_STA, 0, NotSerialized)
+ {
+ Return (STA3)
+ }
+
+ Method (_EJ0, 1, NotSerialized)
+ {
+ If (LEqual (STA3, 0x0F))
+ {
+ Store (0x00, STA3)
+ }
+ }
+
+ Name (MAT0, Buffer (0x28)
+ {
+ /* 0000 */ 0x0B, 0x28, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
+ /* 0008 */ 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
+ /* 0010 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ /* 0018 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ /* 0020 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
+ })
+
+ Name (MAT1, Buffer (0x28)
+ {
+ /* 0000 */ 0x0B, 0x28, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
+ /* 0008 */ 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ /* 0010 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ /* 0018 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ /* 0020 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
+ })
+
+ Method (_MAT, 0, NotSerialized)
+ {
+ If (_STA())
+ {
+ Return (MAT0)
+ }
+ Else
+ {
+ Return (MAT1)
+ }
+ }
+ }
+ }
+
+ Device (NET0) {
+ Name (_HID, "LINA0003")
+ Name (_UID, 0)
+
+ Method (_CRS, 0x0, Serialized) {
+ Name (RBUF, ResourceTemplate () {
+ Memory32Fixed (ReadWrite, 0x1a000000, 0x00010000)
+ Interrupt (ResourceConsumer, Edge, ActiveBoth, Exclusive, , , ) {0x2F}
+ })
+ Return (RBUF)
+ }
+ }
+
+ Device (VIRT) {
+ Name (_HID, "LINA0005")
+ Name (_UID, 0)
+
+ Method (_CRS, 0x0, Serialized) {
+ Name (RBUF, ResourceTemplate() {
+ Memory32Fixed (ReadWrite, 0x1c130000, 0x1000)
+ Interrupt (ResourceConsumer, Edge, ActiveBoth, Exclusive, , , ) {0x4A}
+ })
+ Return (RBUF)
+ }
+ }
+ }
+}
diff --git a/ArmPkg/Drivers/AcpiTables/foundation-v8/Ecdt.aslc b/ArmPkg/Drivers/AcpiTables/foundation-v8/Ecdt.aslc
new file mode 100644
index 0000000..d817d59
--- /dev/null
+++ b/ArmPkg/Drivers/AcpiTables/foundation-v8/Ecdt.aslc
@@ -0,0 +1,70 @@
+/*
+ * Copyright (c) 2013 Linaro Limited
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the BSD License which accompanies
+ * this distribution, and is available at
+ * http://opensource.org/licenses/bsd-license.php
+ *
+ * Contributors:
+ * Yi Li - yi.li@linaro.org
+*/
+
+#include <IndustryStandard/Acpi.h>
+#include <Platform.h>
+
+typedef struct
+{
+ EFI_ACPI_5_0_EMBEDDED_CONTROLLER_BOOT_RESOURCES_TABLE table;
+ UINT8 ucNamepath;
+}EFI_ACPI_5_0_EMBEDDED_CONTROLLER_BOOT_RESOURCES_TABLE_EX;
+
+
+EFI_ACPI_5_0_EMBEDDED_CONTROLLER_BOOT_RESOURCES_TABLE_EX Ecdt= {
+ {
+ {
+ EFI_ACPI_5_0_EMBEDDED_CONTROLLER_BOOT_RESOURCES_TABLE_SIGNATURE,
+ sizeof (EFI_ACPI_5_0_EMBEDDED_CONTROLLER_BOOT_RESOURCES_TABLE_EX),
+ EFI_ACPI_5_0_EMBEDDED_CONTROLLER_BOOT_RESOURCES_TABLE_REVISION,
+ 0x00, // Checksum will be updated at runtime
+ {EFI_ACPI_OEM_ID},
+ EFI_ACPI_OEM_TABLE_ID,
+ EFI_ACPI_OEM_REVISION,
+ EFI_ACPI_CREATOR_ID,
+ EFI_ACPI_CREATOR_REVISION
+ },
+ /*Command/Status Register Generic Address Structure*/
+ {
+ 0x01, //Space ID:SystemIO
+ 0x08, //Bit Width
+ 0x00, //Bit Offset
+ 0x00, //Encoded Access Width
+ 0x0000000000000066, //Address
+ },
+ /*Data Register Generic Address Structure*/
+ {
+ 0x01, //Space ID:SystemIO
+ 0x08, //Bit Width
+ 0x00, //Bit Offset
+ 0x00, //Encoded Access Width
+ 0x0000000000000062, //Address
+ },
+ 0x00000000, //UID
+ 0x9, //GPE Number
+ },
+ 0x0 //Namepath
+};
+
+
+VOID*
+ReferenceAcpiTable (
+ VOID
+ )
+{
+ //
+ // Reference the table being generated to prevent the optimizer from removing the
+ // data structure from the exeutable
+ //
+ return (VOID*)&Ecdt;
+}
+
diff --git a/ArmPkg/Drivers/AcpiTables/foundation-v8/Einj.aslc b/ArmPkg/Drivers/AcpiTables/foundation-v8/Einj.aslc
new file mode 100644
index 0000000..7392cc2
--- /dev/null
+++ b/ArmPkg/Drivers/AcpiTables/foundation-v8/Einj.aslc
@@ -0,0 +1,202 @@
+/*
+ * Copyright (c) 2013 Linaro Limited
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the BSD License which accompanies
+ * this distribution, and is available at
+ * http://opensource.org/licenses/bsd-license.php
+ *
+ * Contributors:
+ * Yi Li - yi.li@linaro.org
+*/
+
+#include <IndustryStandard/Acpi.h>
+#include <Platform.h>
+
+#pragma pack (1)
+typedef struct {
+ UINT8 Operation;
+ UINT8 Instruction;
+ UINT8 Flags;
+ UINT8 Reserved8;
+ EFI_ACPI_5_0_GENERIC_ADDRESS_STRUCTURE Register;
+ UINT64 Value;
+ UINT64 Mask;
+} EFI_ACPI_WHEA_SERIALIZATION_ACTION;
+
+typedef struct {
+ EFI_ACPI_DESCRIPTION_HEADER Header;
+ UINT32 InjectionHeaderSize;
+ UINT32 Resv1;
+ UINT32 InstructionEntryCount;
+} EFI_ACPI_WHEA_ERROR_INJECTION_HEADER;
+
+typedef struct {
+ EFI_ACPI_WHEA_ERROR_INJECTION_HEADER header;
+ EFI_ACPI_WHEA_SERIALIZATION_ACTION InstructionEntry[8];
+} EFI_ACPI_5_0_ERROR_INJECTION_TABLE;
+
+#pragma pack ()
+
+
+EFI_ACPI_5_0_ERROR_INJECTION_TABLE Einj = {
+ {
+ {
+ EFI_ACPI_5_0_ERROR_INJECTION_TABLE_SIGNATURE,
+ sizeof (EFI_ACPI_5_0_ERROR_INJECTION_TABLE),
+ EFI_ACPI_5_0_ERROR_INJECTION_TABLE_REVISION,
+ 0x00, // Checksum will be updated at runtime
+ {EFI_ACPI_OEM_ID},
+ EFI_ACPI_OEM_TABLE_ID,
+ 0x00000002,
+ EFI_ACPI_CREATOR_ID,
+ EFI_ACPI_CREATOR_REVISION
+ },
+ sizeof(EFI_ACPI_WHEA_ERROR_INJECTION_HEADER),
+ EFI_ACPI_RESERVED_DWORD,
+ 0x08, /*Injection Entry Count*/
+ },
+
+ {
+ { //Action0
+ 0x00, // Action:Begin Operation
+ 0x0, // Instruction:Read Register
+ 0x0, // Flags
+ 0x00, // Reserved
+ /*Register Region*/
+ {
+ EFI_ACPI_3_0_SYSTEM_MEMORY, //Space ID
+ 0x40, //Bit Width
+ 0x0, //Bit Offset
+ 0x4, //Encoded Access Width
+ 0x0000000000000000, //Address
+ },
+ 0x0000000000000000, // Value for InjectError()
+ 0xFFFFFFFFFFFFFFFF // Mask is only valid for 32-bits
+ },
+ { //Action1
+ 0x01, // Action:Get Trigger Table
+ 0x0, // Instruction:Read Register
+ 0x0, // Flags
+ 0x00, // Reserved
+ /*Register Region*/
+ {
+ EFI_ACPI_3_0_SYSTEM_MEMORY, //Space ID
+ 0x40, //Bit Width
+ 0x0, //Bit Offset
+ 0x4, //Encoded Access Width
+ 0x0000000000000000, //Address
+ },
+ 0x0000000000000000, // Value for InjectError()
+ 0xFFFFFFFFFFFFFFFF // Mask is only valid for 32-bits
+ },
+ { //Action2
+ 0x02, // Action:Set Error Type
+ 0x2, // Instruction:Write Register
+ 0x1, // Flags
+ 0x00, // Reserved
+ /*Register Region*/
+ {
+ EFI_ACPI_3_0_SYSTEM_MEMORY, //Space ID
+ 0x40, //Bit Width
+ 0x0, //Bit Offset
+ 0x4, //Encoded Access Width
+ 0x0000000000000000, //Address
+ },
+ 0x0000000000000000, // Value for InjectError()
+ 0xFFFFFFFFFFFFFFFF // Mask is only valid for 32-bits
+ },
+ { //Action3
+ 0x03, // Action:Get Error Type
+ 0x0, // Instruction:Read Register
+ 0x0, // Flags
+ 0x00, // Reserved
+ /*Register Region*/
+ {
+ EFI_ACPI_3_0_SYSTEM_MEMORY, //Space ID
+ 0x40, //Bit Width
+ 0x0, //Bit Offset
+ 0x4, //Encoded Access Width
+ 0x0000000000000000, //Address
+ },
+ 0x0000000000000000, // Value for InjectError()
+ 0xFFFFFFFFFFFFFFFF // Mask is only valid for 32-bits
+ },
+ { //Action4
+ 0x04, // Action:End Operation
+ 0x3, // Instruction:Write Register
+ 0x1, // Flags
+ 0x00, // Reserved
+ /*Register Region*/
+ {
+ EFI_ACPI_3_0_SYSTEM_MEMORY, //Space ID
+ 0x40, //Bit Width
+ 0x0, //Bit Offset
+ 0x4, //Encoded Access Width
+ 0x0000000000000000, //Address
+ },
+ 0x0000000000000000, // Value for InjectError()
+ 0xFFFFFFFFFFFFFFFF // Mask is only valid for 32-bits
+ },
+ { //Action5
+ 0x05, // Action:Execute Operation
+ 0x3, // Instruction:Write Register
+ 0x1, // Flags
+ 0x00, // Reserved
+ /*Register Region*/
+ {
+ EFI_ACPI_3_0_SYSTEM_IO, //Space ID
+ 0x10, //Bit Width
+ 0x0, //Bit Offset
+ 0x2, //Encoded Access Width
+ 0x0000000000000000, //Address
+ },
+ 0x0000000000000000, // Value for InjectError()
+ 0xFFFFFFFFFFFFFFFF // Mask is only valid for 32-bits
+ },
+ { //Action6
+ 0x06, // Action:Check Busy Status
+ 0x1, // Instruction:Read Register
+ 0x0, // Flags
+ 0x00, // Reserved
+ /*Register Region*/
+ {
+ EFI_ACPI_3_0_SYSTEM_MEMORY, //Space ID
+ 0x40, //Bit Width
+ 0x0, //Bit Offset
+ 0x4, //Encoded Access Width
+ 0x0000000000000000, //Address
+ },
+ 0x0000000000000000, // Value for InjectError()
+ 0xFFFFFFFFFFFFFFFF // Mask is only valid for 32-bits
+ },
+ { //Action7
+ 0x07, // Action:Get Command Status
+ 0x0, // Instruction:Read Register
+ 0x1, // Flags
+ 0x00, // Reserved
+ /*Register Region*/
+ {
+ EFI_ACPI_3_0_SYSTEM_MEMORY, //Space ID
+ 0x40, //Bit Width
+ 0x0, //Bit Offset
+ 0x4, //Encoded Access Width
+ 0x0000000000000000, //Address
+ },
+ 0x0000000000000000, // Value for InjectError()
+ 0xFFFFFFFFFFFFFFFF // Mask is only valid for 32-bits
+ },
+ },
+};
+
+VOID*
+ReferenceAcpiTable (
+ VOID
+ )
+{
+ //
+ // Reference the table being generated to prevent the optimizer from removing the
+ // data structure from the exeutable
+ //
+ return (VOID*)&Einj;
+}
diff --git a/ArmPkg/Drivers/AcpiTables/foundation-v8/Erst.aslc b/ArmPkg/Drivers/AcpiTables/foundation-v8/Erst.aslc
new file mode 100644
index 0000000..0170b99
--- /dev/null
+++ b/ArmPkg/Drivers/AcpiTables/foundation-v8/Erst.aslc
@@ -0,0 +1,319 @@
+/*
+ * Copyright (c) 2013 Linaro Limited
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the BSD License which accompanies
+ * this distribution, and is available at
+ * http://opensource.org/licenses/bsd-license.php
+ *
+ * Contributors:
+ * Yi Li - yi.li@linaro.org
+*/
+
+#include <IndustryStandard/Acpi.h>
+#include <Platform.h>
+
+#define ACTION_BEGIN_WRITE_OPERATION 0x00
+#define ACTION_BEGIN_READ_OPERATION 0x01
+#define ACTION_BEGIN_CLEAR_OPERATION 0x02
+#define ACTION_END_OPERATION 0x03
+#define ACTION_SET_RECORD_OFFSET 0x04
+#define ACTION_EXECUTE_OPEARTION 0x05
+#define ACTION_CHECK_BUSY_STATUS 0x06
+#define ACTION_GET_COMMAND_STATUS 0x07
+#define ACTION_GET_RECORD_IDENTIFIER 0x08
+#define ACTION_SET_RECORD_IDENTIFIER 0x09
+#define ACTION_GET_RECORD_COUNT 0x0A
+#define ACTION_BEGIN_DUMMY_WRITE_OPERATION 0x0B
+#define ACTION_GET_NEXT_RECORD_IDENTIFIER 0x0C
+#define ACTION_GET_ERROR_LOG_ADDRESS_RANGE 0x0D
+#define ACTION_GET_ERROR_LOG_ADDRESS_RANGE_LENGTH 0x0E
+#define ACTION_GET_ERROR_LOG_ADDRESS_RANGE_ATTRIBUTES 0x0F
+
+
+#pragma pack (1)
+
+typedef struct {
+ UINT8 Operation;
+ UINT8 Instruction;
+ UINT8 Flags;
+ UINT8 Reserved8;
+ EFI_ACPI_5_0_GENERIC_ADDRESS_STRUCTURE Register;
+ UINT64 Value;
+ UINT64 Mask;
+} EFI_ACPI_5_0_SERIALIZATION_ACTION;
+
+
+typedef struct {
+ EFI_ACPI_DESCRIPTION_HEADER Header;
+ UINT32 SerializationHeaderSize;
+ UINT32 Resv1;
+ UINT32 InstructionEntryCount;
+ EFI_ACPI_5_0_SERIALIZATION_ACTION InstructionEntry[16];
+} EFI_ACPI_5_0_BOOT_ERROR_RECORD_SERIALIZATION_TABLE;
+
+typedef struct {
+ EFI_ACPI_DESCRIPTION_HEADER Header;
+ UINT32 SerializationHeaderSize;
+ UINT32 Resv1;
+ UINT32 InstructionEntryCount;
+} EFI_ACPI_5_0_SERIALIZATION_ACTION_HEADER;
+#pragma pack ()
+
+
+
+EFI_ACPI_5_0_BOOT_ERROR_RECORD_SERIALIZATION_TABLE Erst = {
+ {
+ EFI_ACPI_5_0_ERROR_RECORD_SERIALIZATION_TABLE_SIGNATURE,
+ sizeof (EFI_ACPI_5_0_BOOT_ERROR_RECORD_SERIALIZATION_TABLE),
+ EFI_ACPI_5_0_ERROR_RECORD_SERIALIZATION_TABLE_REVISION,
+ 0x00, // Checksum will be updated at runtime
+ {EFI_ACPI_OEM_ID},
+ EFI_ACPI_OEM_TABLE_ID,
+ 0x00000002,
+ EFI_ACPI_CREATOR_ID,
+ EFI_ACPI_CREATOR_REVISION
+ },
+ sizeof(EFI_ACPI_5_0_SERIALIZATION_ACTION_HEADER),
+ EFI_ACPI_RESERVED_DWORD,
+ 0x10,
+ {
+ { //Action0
+ 0x00, // Action:Begin Operation
+ 0x3, // Instruction:Write Register
+ 0x0, // Flags
+ 0x00, // Reserved
+ /*Register Region*/
+ EFI_ACPI_3_0_SYSTEM_MEMORY, //Space ID
+ 0x40, //Bit Width
+ 0x0, //Bit Offset
+ 0x4, //Encoded Access Width
+ 0xFFFF0100, //Address
+ 0x0000000000000000, // Value for InjectError()
+ 0xFFFFFFFFFFFFFFFF // Mask is only valid for 32-bits
+ },
+ { //Action1
+ 0x01, // Action:Begin Read Operation
+ 0x3, // Instruction:Write Register
+ 0x0, // Flags
+ 0x00, // Reserved
+ /*Register Region*/
+ EFI_ACPI_3_0_SYSTEM_MEMORY, //Space ID
+ 0x40, //Bit Width
+ 0x0, //Bit Offset
+ 0x4, //Encoded Access Width
+ 0xFFFF0108, //Address
+ 0x0000000000000000, // Value for InjectError()
+ 0xFFFFFFFFFFFFFFFF // Mask is only valid for 32-bits
+ },
+ { //Action2
+ 0x02, // Action:Begin Clear Operation
+ 0x3, // Instruction:Write Register
+ 0x0, // Flags
+ 0x00, // Reserved
+ /*Register Region*/
+ EFI_ACPI_3_0_SYSTEM_MEMORY, //Space ID
+ 0x40, //Bit Width
+ 0x0, //Bit Offset
+ 0x4, //Encoded Access Width
+ 0xFFFF0110, //Address
+ 0x0000000000000000, // Value for InjectError()
+ 0xFFFFFFFFFFFFFFFF // Mask is only valid for 32-bits
+ },
+ { //Action3
+ 0x03, // Action:Begin Clear Operation
+ 0x4, // Instruction:Noop
+ 0x1, // Flags
+ 0x00, // Reserved
+ /*Register Region*/
+ EFI_ACPI_3_0_SYSTEM_MEMORY, //Space ID
+ 0x40, //Bit Width
+ 0x0, //Bit Offset
+ 0x4, //Encoded Access Width
+ 0xFFFF0118, //Address
+ 0x0000000000000000, // Value for InjectError()
+ 0xFFFFFFFFFFFFFFFF // Mask is only valid for 32-bits
+ },
+ { //Action4
+ 0x04, // Action:Begin Clear Operation
+ 0x2, // Instruction:Write Register
+ 0x0, // Flags
+ 0x00, // Reserved
+ /*Register Region*/
+ EFI_ACPI_3_0_SYSTEM_MEMORY, //Space ID
+ 0x40, //Bit Width
+ 0x0, //Bit Offset
+ 0x4, //Encoded Access Width
+ 0xFFFF0120, //Address
+ 0x0000000000000000, // Value for InjectError()
+ 0xFFFFFFFFFFFFFFFF // Mask is only valid for 32-bits
+ },
+ { //Action5
+ 0x05, // Action:Execute Operation
+ 0x3, // Instruction:Write Register
+ 0x0, // Flags
+ 0x00, // Reserved
+ /*Register Region*/
+ EFI_ACPI_5_0_SYSTEM_MEMORY, //Space ID
+ 0x8, //Bit Width
+ 0x0, //Bit Offset
+ 0x1, //Encoded Access Width
+ 0xFFFF0128, //Address
+ 0x0000000000000000, // Value for InjectError()
+ 0xFFFFFFFFFFFFFFFF // Mask is only valid for 32-bits
+ },
+ { //Action6
+ 0x06, // Action:Check Busy Status
+ 0x1, // Instruction:Read Register
+ 0x0, // Flags
+ 0x00, // Reserved
+ /*Register Region*/
+ EFI_ACPI_3_0_SYSTEM_MEMORY, //Space ID
+ 0x40, //Bit Width
+ 0x0, //Bit Offset
+ 0x4, //Encoded Access Width
+ 0xFFFF0130, //Address
+ 0x0000000000000000, // Value for InjectError()
+ 0xFFFFFFFFFFFFFFFF // Mask is only valid for 32-bits
+ },
+ { //Action7
+ 0x07, // Action:Get Command Status
+ 0x0, // Instruction:Read Register
+ 0x0, // Flags
+ 0x00, // Reserved
+ /*Register Region*/
+ EFI_ACPI_3_0_SYSTEM_MEMORY, //Space ID
+ 0x40, //Bit Width
+ 0x0, //Bit Offset
+ 0x4, //Encoded Access Width
+ 0xFFFF0138, //Address
+ 0x0000000000000000, // Value for InjectError()
+ 0xFFFFFFFFFFFFFFFF // Mask is only valid for 32-bits
+ },
+ { //Action8
+ 0x08, // Action:Get Command Status
+ 0x0, // Instruction:Read Register
+ 0x0, // Flags
+ 0x00, // Reserved
+ /*Register Region*/
+ EFI_ACPI_3_0_SYSTEM_MEMORY, //Space ID
+ 0x40, //Bit Width
+ 0x0, //Bit Offset
+ 0x4, //Encoded Access Width
+ 0xFFFF0140, //Address
+ 0x0000000000000000, // Value for InjectError()
+ 0xFFFFFFFFFFFFFFFF // Mask is only valid for 32-bits
+ },
+ { //Action9
+ 0x09, // Action:Set Record Identifier
+ 0x2, // Instruction:Write Register
+ 0x0, // Flags
+ 0x00, // Reserved
+ /*Register Region*/
+ EFI_ACPI_3_0_SYSTEM_MEMORY, //Space ID
+ 0x40, //Bit Width
+ 0x0, //Bit Offset
+ 0x4, //Encoded Access Width
+ 0xFFFF0148, //Address
+ 0x0000000000000000, // Value for InjectError()
+ 0xFFFFFFFFFFFFFFFF // Mask is only valid for 32-bits
+ },
+ { //Action10
+ 0x0A, // Action:Get Record Count
+ 0x0, // Instruction:Read Register
+ 0x0, // Flags
+ 0x00, // Reserved
+ /*Register Region*/
+ EFI_ACPI_3_0_SYSTEM_MEMORY, //Space ID
+ 0x40, //Bit Width
+ 0x0, //Bit Offset
+ 0x4, //Encoded Access Width
+ 0xFFFF0150, //Address
+ 0x0000000000000000, // Value for InjectError()
+ 0xFFFFFFFFFFFFFFFF // Mask is only valid for 32-bits
+ },
+ { //Action11
+ 0x0B, // Action:Begin Dummy Write
+ 0x3, // Instruction:Write Register
+ 0x0, // Flags
+ 0x00, // Reserved
+ /*Register Region*/
+ EFI_ACPI_3_0_SYSTEM_MEMORY, //Space ID
+ 0x40, //Bit Width
+ 0x0, //Bit Offset
+ 0x4, //Encoded Access Width
+ 0xFFFF0158, //Address
+ 0x0000000000000000, // Value for InjectError()
+ 0xFFFFFFFFFFFFFFFF // Mask is only valid for 32-bits
+ },
+ { //Action12
+ 0x0C, // Action:Unused/Unknown Action
+ 0x0, // Instruction:Read Register
+ 0x0, // Flags
+ 0x00, // Reserved
+ /*Register Region*/
+ EFI_ACPI_3_0_SYSTEM_MEMORY, //Space ID
+ 0x40, //Bit Width
+ 0x0, //Bit Offset
+ 0x4, //Encoded Access Width
+ 0xFFFF0160, //Address
+ 0x0000000000000000, // Value for InjectError()
+ 0xFFFFFFFFFFFFFFFF // Mask is only valid for 32-bits
+ },
+ { //Action13
+ 0x0D, // Action:Get Error Address Range
+ 0x0, // Instruction:Read Register
+ 0x0, // Flags
+ 0x00, // Reserved
+ /*Register Region*/
+ EFI_ACPI_3_0_SYSTEM_MEMORY, //Space ID
+ 0x40, //Bit Width
+ 0x0, //Bit Offset
+ 0x4, //Encoded Access Width
+ 0xFFFF0168, //Address
+ 0x0000000000000000, // Value for InjectError()
+ 0xFFFFFFFFFFFFFFFF // Mask is only valid for 32-bits
+ },
+ { //Action14
+ 0x0E, // Action:Get Error Address Length
+ 0x0, // Instruction:Read Register
+ 0x0, // Flags
+ 0x00, // Reserved
+ /*Register Region*/
+ EFI_ACPI_3_0_SYSTEM_MEMORY, //Space ID
+ 0x40, //Bit Width
+ 0x0, //Bit Offset
+ 0x4, //Encoded Access Width
+ 0xFFFF0170, //Address
+ 0x0000000000000000, // Value for InjectError()
+ 0xFFFFFFFFFFFFFFFF // Mask is only valid for 32-bits
+ },
+ { //Action15
+ 0x0F, // Action:Get Error Attributes
+ 0x0, // Instruction:Read Register
+ 0x0, // Flags
+ 0x00, // Reserved
+ /*Register Region*/
+ EFI_ACPI_3_0_SYSTEM_MEMORY, //Space ID
+ 0x40, //Bit Width
+ 0x0, //Bit Offset
+ 0x4, //Encoded Access Width
+ 0xFFFF0178, //Address
+ 0x0000000000000000, // Value for InjectError()
+ 0xFFFFFFFFFFFFFFFF // Mask is only valid for 32-bits
+ },
+ }
+
+};
+
+VOID*
+ReferenceAcpiTable (
+ VOID
+ )
+{
+ //
+ // Reference the table being generated to prevent the optimizer from removing the
+ // data structure from the exeutable
+ //
+ return (VOID*)&Erst;
+}
diff --git a/ArmPkg/Drivers/AcpiTables/foundation-v8/Facp.aslc b/ArmPkg/Drivers/AcpiTables/foundation-v8/Facp.aslc
new file mode 100644
index 0000000..729c5bc
--- /dev/null
+++ b/ArmPkg/Drivers/AcpiTables/foundation-v8/Facp.aslc
@@ -0,0 +1,175 @@
+/** @file
+ FACP Table
+
+ Copyright (c) 2008 - 2012, Intel Corporation. All rights reserved.<BR>
+ 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.
+
+**/
+/*
+ * Copyright (c) 2013 Linaro Limited
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the BSD License which accompanies
+ * this distribution, and is available at
+ * http://opensource.org/licenses/bsd-license.php
+ *
+ * Contributors:
+ * Yi Li - yi.li@linaro.org
+*/
+
+#include "Platform.h"
+
+EFI_ACPI_5_0_FIXED_ACPI_DESCRIPTION_TABLE Facp = {
+ {
+ EFI_ACPI_5_0_FIXED_ACPI_DESCRIPTION_TABLE_SIGNATURE,
+ sizeof (EFI_ACPI_5_0_FIXED_ACPI_DESCRIPTION_TABLE),
+ EFI_ACPI_5_0_FIXED_ACPI_DESCRIPTION_TABLE_REVISION,
+ 0, // to make sum of entire table == 0
+ {EFI_ACPI_OEM_ID}, // OEMID is a 6 bytes long field
+ EFI_ACPI_OEM_TABLE_ID, // OEM table identification(8 bytes long)
+ 0x00, // OEM revision number
+ EFI_ACPI_CREATOR_ID, // ASL compiler vendor ID
+ EFI_ACPI_CREATOR_REVISION // ASL compiler revision number
+ },
+ 0, // Physical addesss of FACS
+ 0x00000010, // Physical address of DSDT
+ 0x0, // System Interrupt Model
+ 0x4, // PM Profile
+ SCI_INT_VECTOR, // System vector of SCI interrupt
+ SMI_CMD_IO_PORT, // Port address of SMI command port
+ ACPI_ENABLE, // value to write to port smi_cmd to enable ACPI
+ ACPI_DISABLE, // value to write to port smi_cmd to disable ACPI
+ S4BIOS_REQ, // Value to write to SMI CMD port to enter the S4BIOS state
+ 0, // PState control
+ PM1a_EVT_BLK, // Port address of Power Mgt 1a Event Reg Blk
+ PM1b_EVT_BLK, // Port address of Power Mgt 1b Event Reg Blk
+ PM1a_CNT_BLK, // Port address of Power Mgt 1a Ctrl Reg Blk
+ PM1b_CNT_BLK, // Port address of Power Mgt 1b Ctrl Reg Blk
+ PM2_CNT_BLK, // Port address of Power Mgt 2 Ctrl Reg Blk
+ PM_TMR_BLK, // Port address of Power Mgt Timer Ctrl Reg Blk
+ GPE0_BLK, // Port addr of General Purpose Event 0 Reg Blk
+ GPE1_BLK, // Port addr of General Purpose Event 1 Reg Blk
+ PM1_EVT_LEN, // Byte Length of ports at pm1X_evt_blk
+ PM1_CNT_LEN, // Byte Length of ports at pm1X_cnt_blk
+ PM2_CNT_LEN, // Byte Length of ports at pm2_cnt_blk
+ PM_TM_LEN, // Byte Length of ports at pm_tm_blk
+ GPE0_BLK_LEN, // Byte Length of ports at gpe0_blk
+ GPE1_BLK_LEN, // Byte Length of ports at gpe1_blk
+ GPE1_BASE, // offset in gpe model where gpe1 events start
+ 0, // _CST support
+ P_LVL2_LAT, // worst case HW latency to enter/exit C2 state
+ P_LVL3_LAT, // worst case HW latency to enter/exit C3 state
+ FLUSH_SIZE, // Size of area read to flush caches
+ FLUSH_STRIDE, // Stride used in flushing caches
+ DUTY_OFFSET, // bit location of duty cycle field in p_cnt reg
+ DUTY_WIDTH, // bit width of duty cycle field in p_cnt reg
+ DAY_ALRM, // index to day-of-month alarm in RTC CMOS RAM
+ MON_ALRM, // index to month-of-year alarm in RTC CMOS RAM
+ CENTURY, // index to century in RTC CMOS RAM
+ 0x0000, // Boot architecture flag
+ 0x00, // reserved
+ FLAG,
+
+ {
+ 0x01, //Space ID
+ 0x8, //Bit Width
+ 0x0, //Bit Offset
+ 0x1, //Encoded Access Width
+ 0x0000000000000001,//Address
+ },
+
+ 0x0, //Value to cause reset
+ {0,0,0}, //Reserved
+ 0x0000000000000000,//FACS Address
+ 0x0000000000000010,//DSDT Address
+
+
+ /*PM1A Event Block*/
+ 0x1, //Space ID:SystemIO
+ 0x20, //Bit Width
+ 0x0, //Bit Offset
+ 0x2, //Encoded Access Width
+ 0x0000000000000001, //Address
+
+ /*PM1B Event Block*/
+ 0x1, //Space ID:SystemIO
+ 0x0, //Bit Width
+ 0x0, //Bit Offset
+ 0x0, //Encoded Access Width
+ 0x0000000000000000, //Address
+
+ /*PM1A Control Block*/
+ 0x1, //Space ID:SystemIO
+ 0x10, //Bit Width
+ 0x0, //Bit Offset
+ 0x02, //Encoded Access Width
+ 0000000000000001, //Address
+
+ /*PM1B Control Block*/
+ 0x1, //Space ID:SystemIO
+ 0x00, //Bit Width
+ 0x0, //Bit Offset
+ 0x0, //Encoded Access Width
+ 0x0000000000000000, //Address
+
+ /*PM2 Control Block*/
+ 0x1, //Space ID:SystemIO
+ 0x08, //Bit Width
+ 0x0, //Bit Offset
+ 0x0, //Encoded Access Width
+ 0x0000000000000001, //Address
+
+ /*PM Timer Block*/
+ 0x1, //Space ID:SystemIO
+ 0x20, //Bit Width
+ 0x0, //Bit Offset
+ 0x3, //Encoded Access Width
+ 0x0000000000000001, //Address
+
+ /*GPE0 Block*/
+ 0x1, //Space ID:SystemIO
+ 0x80, //Bit Width
+ 0x0, //Bit Offset
+ 0x1, //Encoded Access Width
+ 0x0000000000000001, //Address
+
+ /*GPE1 Block*/
+ 0x1, //Space ID:SystemIO
+ 0x00, //Bit Width
+ 0x0, //Bit Offset
+ 0x0, //Encoded Access Width
+ 0x0000000000000000, //Address
+
+ /*Sleep Control Register*/
+ 0x1, //Space ID:SystemIO
+ 0x08, //Bit Width
+ 0x0, //Bit Offset
+ 0x1, //Encoded Access Width
+ 0x0000000000000000, //Address
+
+ /*Sleep Status Register*/
+ 0x1, //Space ID:SystemIO
+ 0x08, //Bit Width
+ 0x0, //Bit Offset
+ 0x1, //Encoded Access Width
+ 0x0000000000000000, //Address
+
+};
+
+VOID*
+ReferenceAcpiTable (
+ VOID
+ )
+{
+ //
+ // Reference the table being generated to prevent the optimizer from removing the
+ // data structure from the exeutable
+ //
+ return (VOID*)&Facp;
+}
diff --git a/ArmPkg/Drivers/AcpiTables/foundation-v8/Facs.aslc b/ArmPkg/Drivers/AcpiTables/foundation-v8/Facs.aslc
new file mode 100644
index 0000000..9bcddea
--- /dev/null
+++ b/ArmPkg/Drivers/AcpiTables/foundation-v8/Facs.aslc
@@ -0,0 +1,86 @@
+/** @file
+ FACS Table
+
+ Copyright (c) 2008 - 2012, Intel Corporation. All rights reserved.<BR>
+ 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.
+
+**/
+
+/*
+ * Copyright (c) 2013 Linaro Limited
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the BSD License which accompanies
+ * this distribution, and is available at
+ * http://opensource.org/licenses/bsd-license.php
+ *
+ * Contributors:
+ * Yi Li - yi.li@linaro.org
+*/
+
+#include <IndustryStandard/Acpi.h>
+
+EFI_ACPI_5_0_FIRMWARE_ACPI_CONTROL_STRUCTURE Facs = {
+ EFI_ACPI_5_0_FIRMWARE_ACPI_CONTROL_STRUCTURE_SIGNATURE,
+ sizeof (EFI_ACPI_5_0_FIRMWARE_ACPI_CONTROL_STRUCTURE),
+
+ //
+ // Hardware Signature will be updated at runtime
+ //
+ 0x00000000, //HardwareSignature
+ 0x00, //FirmwareWakingVector
+ 0x00, //GlobalLock
+ 0x00, //Flags
+ 0x0000000000000000, //XFirmwareWakingVector
+ 0x02, //Version
+ {
+ EFI_ACPI_RESERVED_BYTE,
+ EFI_ACPI_RESERVED_BYTE,
+ EFI_ACPI_RESERVED_BYTE
+ },
+ 0x00,
+ {
+ EFI_ACPI_RESERVED_BYTE,
+ EFI_ACPI_RESERVED_BYTE,
+ EFI_ACPI_RESERVED_BYTE,
+ EFI_ACPI_RESERVED_BYTE,
+ EFI_ACPI_RESERVED_BYTE,
+ EFI_ACPI_RESERVED_BYTE,
+ EFI_ACPI_RESERVED_BYTE,
+ EFI_ACPI_RESERVED_BYTE,
+ EFI_ACPI_RESERVED_BYTE,
+ EFI_ACPI_RESERVED_BYTE,
+ EFI_ACPI_RESERVED_BYTE,
+ EFI_ACPI_RESERVED_BYTE,
+ EFI_ACPI_RESERVED_BYTE,
+ EFI_ACPI_RESERVED_BYTE,
+ EFI_ACPI_RESERVED_BYTE,
+ EFI_ACPI_RESERVED_BYTE,
+ EFI_ACPI_RESERVED_BYTE,
+ EFI_ACPI_RESERVED_BYTE,
+ EFI_ACPI_RESERVED_BYTE,
+ EFI_ACPI_RESERVED_BYTE,
+ EFI_ACPI_RESERVED_BYTE,
+ EFI_ACPI_RESERVED_BYTE,
+ EFI_ACPI_RESERVED_BYTE,
+ EFI_ACPI_RESERVED_BYTE
+ }
+};
+
+VOID*
+ReferenceAcpiTable (
+ VOID
+ )
+{
+ //
+ // Reference the table being generated to prevent the optimizer from removing the
+ // data structure from the exeutable
+ //
+ return (VOID*)&Facs;
+}
diff --git a/ArmPkg/Drivers/AcpiTables/foundation-v8/Gtdt.aslc b/ArmPkg/Drivers/AcpiTables/foundation-v8/Gtdt.aslc
new file mode 100644
index 0000000..ab8a60a
--- /dev/null
+++ b/ArmPkg/Drivers/AcpiTables/foundation-v8/Gtdt.aslc
@@ -0,0 +1,51 @@
+/*
+ * Copyright (c) 2013 Linaro Limited
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the BSD License which accompanies
+ * this distribution, and is available at
+ * http://opensource.org/licenses/bsd-license.php
+ *
+ * Contributors:
+ * Yi Li - yi.li@linaro.org
+*/
+
+#include <IndustryStandard/Acpi.h>
+#include <Platform.h>
+
+EFI_ACPI_5_0_GENERIC_TIMER_DESCRIPTION_TABLE Gtdt =
+{
+ {
+ EFI_ACPI_5_0_GENERIC_TIMER_DESCRIPTION_TABLE_SIGNATURE,
+ sizeof (EFI_ACPI_5_0_GENERIC_TIMER_DESCRIPTION_TABLE),
+ EFI_ACPI_5_0_GENERIC_TIMER_DESCRIPTION_TABLE_REVISION,
+ 0x00, // Checksum will be updated at runtime
+ {EFI_ACPI_OEM_ID},
+ EFI_ACPI_OEM_TABLE_ID,
+ EFI_ACPI_OEM_REVISION,
+ EFI_ACPI_CREATOR_ID,
+ EFI_ACPI_CREATOR_REVISION
+ },
+ 0x0000000000000000, //Timer Address
+ 0x00000001, //Flags
+ 0x00000000, //Secure PL1 Interrupt
+ 0x00000000, //SPL1 Flags
+ 0x00000000, //Non-Secure PL1 Interrupt
+ 0x00000000, //NSPL1 Flags
+ 0x00000000, //Virtual Timer Interrupt
+ 0x00000000, //VT Flags
+ 0x00000000, //Non-Secure PL2 Interrupt
+ 0x00000000, //NSPL2 Flags
+};
+
+VOID*
+ReferenceAcpiTable (
+ VOID
+ )
+{
+ //
+ // Reference the table being generated to prevent the optimizer from removing the
+ // data structure from the exeutable
+ //
+ return (VOID*)&Gtdt;
+}
diff --git a/ArmPkg/Drivers/AcpiTables/foundation-v8/Hest.aslc b/ArmPkg/Drivers/AcpiTables/foundation-v8/Hest.aslc
new file mode 100644
index 0000000..08092ac
--- /dev/null
+++ b/ArmPkg/Drivers/AcpiTables/foundation-v8/Hest.aslc
@@ -0,0 +1,84 @@
+/*
+ * Copyright (c) 2013 Linaro Limited
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the BSD License which accompanies
+ * this distribution, and is available at
+ * http://opensource.org/licenses/bsd-license.php
+ *
+ * Contributors:
+ * Yi Li - yi.li@linaro.org
+*/
+
+#include <IndustryStandard/Acpi.h>
+#include <Platform.h>
+
+#pragma pack(1)
+
+typedef struct {
+ EFI_ACPI_DESCRIPTION_HEADER Header;
+ UINT32 ErrorEntryCount;
+ EFI_ACPI_5_0_GENERIC_HARDWARE_ERROR_SOURCE_STRUCTURE GenHardWareError;
+
+} EFI_ACPI_5_0_HARDWARE_ERROR_SOURCE_TABLE;
+
+#pragma pack()
+
+EFI_ACPI_5_0_HARDWARE_ERROR_SOURCE_TABLE Hest = {
+ {
+ EFI_ACPI_5_0_HARDWARE_ERROR_SOURCE_TABLE_SIGNATURE,
+ sizeof (EFI_ACPI_5_0_HARDWARE_ERROR_SOURCE_TABLE),
+ EFI_ACPI_5_0_HARDWARE_ERROR_SOURCE_TABLE_REVISION,
+ 0x00, // Checksum will be updated at runtime
+ {EFI_ACPI_OEM_ID},
+ EFI_ACPI_OEM_TABLE_ID,
+ 0x02,
+ EFI_ACPI_CREATOR_ID,
+ EFI_ACPI_CREATOR_REVISION
+ },
+ 0x00000001, //Error Source Count
+{
+ 0x0009, //Subtable Type:Generic Hardware Error Source
+ 0x0002, //Source Id
+ 0xFFFF, //Related Source Id
+ 0x00, //Reserved
+ 0x01, //Enabled
+ 0x00000001, //Records To Preallocate
+ 0x00000001, //Max Sections Per Record
+ 0x00001000, //Max Raw Data Length
+
+ /* Error Status Address : [Generic Address Structure]*/
+ {
+ 0x00, //Space ID:SystemMemory
+ 0x40, //Bit Width
+ 0x00, //Bit Offset
+ 0x04, //Encoded Access Width
+ 0xFFFF0000, //Address
+ },
+ /*Notify : [Hardware Error Notification Structure]*/
+ {
+ 0x03, //Notify Type:SCI
+ 0x1c, //Notify Length
+ 0x0000, //Configuration Write Enable
+ 0x00000000, //PollInterval
+ 0x00000000, //Vector
+ 0x00000000, //Polling Threshold Value
+ 0x00000000, //Polling Threshold Window
+ 0x00000000, //Error Threshold Value
+ 0x00000000, //Error Threshold Window
+ },
+ 0x00001000, //Error Status Block Length
+},
+};
+
+VOID*
+ReferenceAcpiTable (
+ VOID
+ )
+{
+ //
+ // Reference the table being generated to prevent the optimizer from removing the
+ // data structure from the exeutable
+ //
+ return (VOID*)&Hest;
+}
diff --git a/ArmPkg/Drivers/AcpiTables/foundation-v8/Mcfg.aslc b/ArmPkg/Drivers/AcpiTables/foundation-v8/Mcfg.aslc
new file mode 100644
index 0000000..9451e9c
--- /dev/null
+++ b/ArmPkg/Drivers/AcpiTables/foundation-v8/Mcfg.aslc
@@ -0,0 +1,62 @@
+/*
+ * Copyright (c) 2013 Linaro Limited
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the BSD License which accompanies
+ * this distribution, and is available at
+ * http://opensource.org/licenses/bsd-license.php
+ *
+ * Contributors:
+ * Yi Li - yi.li@linaro.org
+*/
+
+#include <IndustryStandard/Acpi.h>
+#include <Platform.h>
+
+#define ACPI_5_0_MCFG_VERSION 0x1
+
+#pragma pack(1)
+typedef struct
+{
+ EFI_ACPI_DESCRIPTION_HEADER Header;
+ UINT64 Reserved1;
+ UINT64 ullBaseAddress;
+ UINT16 usSegGroupNum;
+ UINT8 ucStartBusNum;
+ UINT8 ucEndBusNum;
+ UINT32 Reserved2;
+}EFI_ACPI_5_0_PCI_EXPRESS_MEMORY_MAPPED_CONFIGURATION_SPACE_TABLE;
+#pragma pack()
+
+EFI_ACPI_5_0_PCI_EXPRESS_MEMORY_MAPPED_CONFIGURATION_SPACE_TABLE Mcfg=
+{
+ {
+ EFI_ACPI_5_0_PCI_EXPRESS_MEMORY_MAPPED_CONFIGURATION_SPACE_BASE_ADDRESS_DESCRIPTION_TABLE_SIGNATURE,
+ sizeof (EFI_ACPI_5_0_PCI_EXPRESS_MEMORY_MAPPED_CONFIGURATION_SPACE_TABLE),
+ ACPI_5_0_MCFG_VERSION,
+ 0x00, // Checksum will be updated at runtime
+ {EFI_ACPI_OEM_ID},
+ EFI_ACPI_OEM_TABLE_ID,
+ EFI_ACPI_OEM_REVISION,
+ EFI_ACPI_CREATOR_ID,
+ EFI_ACPI_CREATOR_REVISION
+ },
+ 0x0000000000000000, //Reserved
+ 0x0000000000000000, //Base Address
+ 0x0000, //Segment Group Number
+ 0x00, //Start Bus Number
+ 0x00, //End Bus Number
+ 0x00000000, //Reserved
+};
+
+VOID*
+ReferenceAcpiTable (
+ VOID
+ )
+{
+ //
+ // Reference the table being generated to prevent the optimizer from removing the
+ // data structure from the exeutable
+ //
+ return (VOID*)&Mcfg;
+}
diff --git a/ArmPkg/Drivers/AcpiTables/foundation-v8/Mpst.aslc b/ArmPkg/Drivers/AcpiTables/foundation-v8/Mpst.aslc
new file mode 100644
index 0000000..dfdda34
--- /dev/null
+++ b/ArmPkg/Drivers/AcpiTables/foundation-v8/Mpst.aslc
@@ -0,0 +1,141 @@
+/*
+ * Copyright (c) 2013 Linaro Limited
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the BSD License which accompanies
+ * this distribution, and is available at
+ * http://opensource.org/licenses/bsd-license.php
+ *
+ * Contributors:
+ * Yi Li - yi.li@linaro.org
+*/
+
+#include <IndustryStandard/Acpi.h>
+#include <Platform.h>
+
+#define MAX_POWER_STATES_NUM 0x2
+#define MAX_PHYSICAL_COMPONENTS_NUM 0x3
+#define MAX_MEMORY_POWER_NODE_COUNT 0x2
+#define MAX_CHARACTERISTICS_COUNT 0x2
+
+#pragma pack (1)
+typedef struct
+{
+ EFI_ACPI_5_0_MPST_MEMORY_POWER_STRUCTURE structre;
+ EFI_ACPI_5_0_MPST_MEMORY_POWER_STATE state[MAX_POWER_STATES_NUM];
+ UINT16 components[MAX_PHYSICAL_COMPONENTS_NUM];
+}EFI_ACPI_5_0_MPST_MEMORY_POWER_STRUCTURE_EX;
+
+typedef struct
+{
+ EFI_ACPI_5_0_MPST_MEMORY_POWER_STATE_CHARACTERISTICS_STRUCTURE structre;
+ UINT64 ulResverd;
+}EFI_ACPI_5_0_MPST_MEMORY_POWER_STATE_CHARACTERISTICS_STRUCTURE_EX;
+
+typedef struct
+{
+ EFI_ACPI_5_0_MEMORY_POWER_STATUS_TABLE table;
+ EFI_ACPI_5_0_MPST_MEMORY_POWER_NODE_TABLE node;
+ EFI_ACPI_5_0_MPST_MEMORY_POWER_STRUCTURE_EX powerNode[MAX_MEMORY_POWER_NODE_COUNT];
+ EFI_ACPI_5_0_MPST_MEMORY_POWER_STATE_CHARACTERISTICS_TABLE Characteristics;
+ EFI_ACPI_5_0_MPST_MEMORY_POWER_STATE_CHARACTERISTICS_STRUCTURE_EX powerChar[MAX_CHARACTERISTICS_COUNT];
+}EFI_ACPI_5_0_MEMORY_POWER_STATUS_TABLE_EX;
+#pragma pack ()
+
+
+EFI_ACPI_5_0_MEMORY_POWER_STATUS_TABLE_EX Mpst ={
+ {
+ {
+ EFI_ACPI_5_0_MEMORY_POWER_STATE_TABLE_SIGNATURE,
+ 0x000000B6,
+ EFI_ACPI_5_0_MEMORY_POWER_STATE_TABLE_REVISION,
+ 0x00, // Checksum will be updated at runtime
+ {EFI_ACPI_OEM_ID},
+ EFI_ACPI_OEM_TABLE_ID,
+ EFI_ACPI_OEM_REVISION,
+ EFI_ACPI_CREATOR_ID,
+ EFI_ACPI_CREATOR_REVISION
+ },
+ 0x00, //Channel ID
+ {0,0,0}, //Reserved
+
+ },
+ 0x0002, //Power Node Count
+ {0,0}, //Reserved
+ {
+ {
+ 0x00, //Flags
+ 0x00, //Reserved
+ 0x0000, //Node ID
+ 0x0000000000, //Length
+ 0x00000000000000000000, //ange Address
+ 0x00000000000000000000, //Range Length
+ 0x00000002, // Num Power
+ 0x00000003, // Num Physical Components
+ {
+ {
+ 0x00, //Power State
+ 0x00, //InfoIndex
+ },
+ {
+ 0x00, //Power State
+ 0x00, //InfoIndex
+ },
+ },
+ 0x0000, //Component Id
+ 0x0001, //Component Id
+ 0x0002, //Component Id
+ },
+ {
+ 0x00, //Flags
+ 0x00, //Reserved
+ 0x0000, //Node ID
+ 0x0000000000, //Length
+ 0x00000000000000000000, //ange Address
+ 0x00000000000000000000, //Range Length
+ 0x00000001, // Num Power
+ 0x00000001, // Num Physical Components
+ {
+ 0x00, //Power State
+ 0x00, //InfoIndex
+ },
+ 0x0000, //Component Id
+
+ },
+ },
+
+ 0x0002, //Characteristics Count
+ {0,0}, //Reserved
+ {
+ {
+ 0x01, //Structure ID
+ 0x00, //Flags
+ 0x0000, //Reserved
+ 0x00000000, //Average Power
+ 0x00000000, //Power Saving
+ 0x0000000000000000, //Exit Latency
+ 0x0000000000000000, //Reserved
+ },
+ {
+ 0x01, //Structure ID
+ 0x00, //Flags
+ 0x0000, //Reserved
+ 0x00000000, //Average Power
+ 0x00000000, //Power Saving
+ 0x0000000000000000, //Exit Latency
+ 0x0000000000000000, //Reserved
+ },
+ },
+};
+
+VOID*
+ReferenceAcpiTable (
+ VOID
+ )
+{
+ //
+ // Reference the table being generated to prevent the optimizer from removing the
+ // data structure from the exeutable
+ //
+ return (VOID*)&Mpst;
+}
diff --git a/ArmPkg/Drivers/AcpiTables/foundation-v8/Msct.aslc b/ArmPkg/Drivers/AcpiTables/foundation-v8/Msct.aslc
new file mode 100644
index 0000000..80c9d59
--- /dev/null
+++ b/ArmPkg/Drivers/AcpiTables/foundation-v8/Msct.aslc
@@ -0,0 +1,106 @@
+/*
+ * Copyright (c) 2013 Linaro Limited
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the BSD License which accompanies
+ * this distribution, and is available at
+ * http://opensource.org/licenses/bsd-license.php
+ *
+ * Contributors:
+ * Yi Li - yi.li@linaro.org
+*/
+
+#include <IndustryStandard/Acpi.h>
+#include <Platform.h>
+
+#define EFI_ACPI_MAXIMUM_PROXIMITY_DOMAIN_INFORMATION_STRUCTURE_REVISION 0x1
+//
+// MSCT Table definition
+//
+#pragma pack (1)
+typedef struct {
+ UINT8 Revision;
+ UINT8 Length;
+ UINT32 ProxDomRangeLow;
+ UINT32 ProxDomRangeHigh;
+ UINT32 MaxProcessorCapacity;
+ UINT64 MaxMemoryCapacity;
+} EFI_ACPI_MAXIMUM_PROXIMITY_DOMAIN_INFORMATION_STRUCTURE;
+
+typedef struct {
+ EFI_ACPI_5_0_MAXIMUM_SYSTEM_CHARACTERISTICS_TABLE_HEADER Header;
+ EFI_ACPI_MAXIMUM_PROXIMITY_DOMAIN_INFORMATION_STRUCTURE ProxDomInfoStructure[4];
+} EFI_ACPI_MAXIMUM_SYSTEM_CHARACTERISTICS_TABLE;
+
+#pragma pack ()
+
+EFI_ACPI_MAXIMUM_SYSTEM_CHARACTERISTICS_TABLE Msct = {
+ {
+ {
+ EFI_ACPI_5_0_MAXIMUM_SYSTEM_CHARACTERISTICS_TABLE_SIGNATURE,
+ sizeof (EFI_ACPI_MAXIMUM_SYSTEM_CHARACTERISTICS_TABLE),
+ EFI_ACPI_5_0_MAXIMUM_SYSTEM_CHARACTERISTICS_TABLE_REVISION,
+ 0x00, // Checksum will be updated at runtime
+ {EFI_ACPI_OEM_ID},
+ EFI_ACPI_OEM_TABLE_ID,
+ EFI_ACPI_OEM_REVISION,
+ EFI_ACPI_CREATOR_ID,
+ EFI_ACPI_CREATOR_REVISION
+ },
+ //
+ // Beginning of MSCT specific fields
+ //
+ 0x00000038, // OffsetProxDomInfo
+ 4 - 1, // MaxNumProxDom
+ 0x00000000, // MaxNumClockDom
+ 0x00000FFFFFFFFFFF, // MaxPhysicalAddress
+ },
+ {
+ {
+ EFI_ACPI_MAXIMUM_PROXIMITY_DOMAIN_INFORMATION_STRUCTURE_REVISION, // Revision
+ sizeof (EFI_ACPI_MAXIMUM_PROXIMITY_DOMAIN_INFORMATION_STRUCTURE), // Length
+ 0x00000000, // ProxDomRangeLow
+ 0x00000003, // ProxDomRangeHigh
+ 0x00000010, // MaxProcessorCapacity
+ 0x0000004000000000 // MaxMemoryCapacity
+ },
+ {
+ EFI_ACPI_MAXIMUM_PROXIMITY_DOMAIN_INFORMATION_STRUCTURE_REVISION, // Revision
+ sizeof (EFI_ACPI_MAXIMUM_PROXIMITY_DOMAIN_INFORMATION_STRUCTURE), // Length
+ 0x00000000, // ProxDomRangeLow
+ 0x00000000, // ProxDomRangeHigh
+ 0x00000000, // MaxProcessorCapacity
+ 0x0000000000000000, // MaxMemoryCapacity
+ },
+
+ {
+ EFI_ACPI_MAXIMUM_PROXIMITY_DOMAIN_INFORMATION_STRUCTURE_REVISION, // Revision
+ sizeof (EFI_ACPI_MAXIMUM_PROXIMITY_DOMAIN_INFORMATION_STRUCTURE), // Length
+ 0x00000000, // ProxDomRangeLow
+ 0x00000000, // ProxDomRangeHigh
+ 0x00000000, // MaxProcessorCapacity
+ 0x0000000000000000, // MaxMemoryCapacity
+ },
+
+ {
+ EFI_ACPI_MAXIMUM_PROXIMITY_DOMAIN_INFORMATION_STRUCTURE_REVISION, // Revision
+ sizeof (EFI_ACPI_MAXIMUM_PROXIMITY_DOMAIN_INFORMATION_STRUCTURE), // Length
+ 0x00000000, // ProxDomRangeLow
+ 0x00000000, // ProxDomRangeHigh
+ 0x00000000, // MaxProcessorCapacity
+ 0x0000000000000000, // MaxMemoryCapacity
+ },
+ },
+};
+
+VOID*
+ReferenceAcpiTable (
+ VOID
+ )
+{
+ //
+ // Reference the table being generated to prevent the optimizer from removing the
+ // data structure from the exeutable
+ //
+ return (VOID*)&Msct;
+}
diff --git a/ArmPkg/Drivers/AcpiTables/foundation-v8/Oem0.aslc b/ArmPkg/Drivers/AcpiTables/foundation-v8/Oem0.aslc
new file mode 100644
index 0000000..2e84daf
--- /dev/null
+++ b/ArmPkg/Drivers/AcpiTables/foundation-v8/Oem0.aslc
@@ -0,0 +1,48 @@
+/*
+ * Copyright (c) 2013 Linaro Limited
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the BSD License which accompanies
+ * this distribution, and is available at
+ * http://opensource.org/licenses/bsd-license.php
+ *
+ * Contributors:
+ * Yi Li - yi.li@linaro.org
+*/
+
+#include <IndustryStandard/Acpi.h>
+#include <Platform.h>
+
+#define EFI_ACPI_5_0_OEM0_SIGNATURE SIGNATURE_32('O', 'E', 'M', '0')
+#define ACPI_5_0_OEM0_REVISION 0x1
+
+typedef struct{
+ EFI_ACPI_DESCRIPTION_HEADER Header;
+}EFI_ACPI_5_0_OEM0_TABLE;
+
+EFI_ACPI_5_0_OEM0_TABLE Oem0=
+{
+ {
+ EFI_ACPI_5_0_OEM0_SIGNATURE,
+ sizeof (EFI_ACPI_5_0_OEM0_TABLE),
+ ACPI_5_0_OEM0_REVISION,
+ 0x00, // Checksum will be updated at runtime
+ {EFI_ACPI_OEM_ID},
+ EFI_ACPI_OEM_TABLE_ID,
+ 0x0000000A,
+ EFI_ACPI_CREATOR_ID,
+ EFI_ACPI_CREATOR_REVISION
+ },
+};
+
+VOID*
+ReferenceAcpiTable (
+ VOID
+ )
+{
+ //
+ // Reference the table being generated to prevent the optimizer from removing the
+ // data structure from the exeutable
+ //
+ return (VOID*)&Oem0;
+}
diff --git a/ArmPkg/Drivers/AcpiTables/foundation-v8/Platform.h b/ArmPkg/Drivers/AcpiTables/foundation-v8/Platform.h
new file mode 100644
index 0000000..c2b7165
--- /dev/null
+++ b/ArmPkg/Drivers/AcpiTables/foundation-v8/Platform.h
@@ -0,0 +1,78 @@
+/** @file
+ Platform specific defines for constructing ACPI tables
+
+ Copyright (c) 2008, Intel Corporation. All rights reserved.<BR>
+ 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.
+
+**/
+
+/*
+ * Copyright (c) 2013 Linaro Limited
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the BSD License which accompanies
+ * this distribution, and is available at
+ * http://opensource.org/licenses/bsd-license.php
+ *
+ * Contributors:
+ * Yi Li - yi.li@linaro.org
+*/
+
+#ifndef _Platform_h_INCLUDED_
+#define _Platform_h_INCLUDED_
+
+#include <PiDxe.h>
+#include <IndustryStandard/Acpi.h>
+
+//
+// ACPI table information used to initialize tables.
+//
+#define EFI_ACPI_OEM_ID 'L','I','N','A','R','O' // OEMID 6 bytes long
+#define EFI_ACPI_OEM_TABLE_ID SIGNATURE_64('F','O','U','N','D','A','T','I') // OEM table id 8 bytes long
+#define EFI_ACPI_OEM_REVISION 0x00000001
+#define EFI_ACPI_CREATOR_ID SIGNATURE_32('I','N','T','L')
+#define EFI_ACPI_CREATOR_REVISION 0x20130517
+
+#define EFI_ACPI_OEM_ID_INTEL 'I','N','T','E','L',' ' // OEMID 6 bytes long
+#define EFI_ACPI_OEM_TABLE_ID_INTEL SIGNATURE_64('T','E','M','P','L','A','T','E' ) // OEM table id 8 bytes long
+
+
+#define INT_MODEL 0x01
+#define SCI_INT_VECTOR 0x0
+#define SMI_CMD_IO_PORT 0x0
+#define ACPI_ENABLE 0x0
+#define ACPI_DISABLE 0x0
+#define S4BIOS_REQ 0x00
+#define PM1a_EVT_BLK 0x00000001
+#define PM1b_EVT_BLK 0x00000000
+#define PM1a_CNT_BLK 0x00000001
+#define PM1b_CNT_BLK 0x00000000
+#define PM2_CNT_BLK 0x00000001
+#define PM_TMR_BLK 0x00000001
+#define GPE0_BLK 0x00000001
+#define GPE1_BLK 0x00000000
+#define PM1_EVT_LEN 0x04
+#define PM1_CNT_LEN 0x02
+#define PM2_CNT_LEN 0x01
+#define PM_TM_LEN 0x04
+#define GPE0_BLK_LEN 0x08
+#define GPE1_BLK_LEN 0x00
+#define GPE1_BASE 0x00
+#define RESERVED 0x00
+#define P_LVL2_LAT 0x0000
+#define P_LVL3_LAT 0x0000
+#define FLUSH_SIZE 0x0000
+#define FLUSH_STRIDE 0x0000
+#define DUTY_OFFSET 0x00
+#define DUTY_WIDTH 0x00
+#define DAY_ALRM 0x00
+#define MON_ALRM 0x00
+#define CENTURY 0x00
+#define FLAG 0x00321033
+#endif
diff --git a/ArmPkg/Drivers/AcpiTables/foundation-v8/Pmtt.aslc b/ArmPkg/Drivers/AcpiTables/foundation-v8/Pmtt.aslc
new file mode 100644
index 0000000..f0b4f6c
--- /dev/null
+++ b/ArmPkg/Drivers/AcpiTables/foundation-v8/Pmtt.aslc
@@ -0,0 +1,216 @@
+/*
+ * Copyright (c) 2013 Linaro Limited
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the BSD License which accompanies
+ * this distribution, and is available at
+ * http://opensource.org/licenses/bsd-license.php
+ *
+ * Contributors:
+ * Yi Li - yi.li@linaro.org
+*/
+
+#include <IndustryStandard/Acpi.h>
+#include <Platform.h>
+
+#define EFI_ACPI_MEMORY_AGGREGATOR_TYPE_SOCKET 00 //socket
+#define EFI_ACPI_MEMORY_AGGREGATOR_TYPE_MEMCTRL 01 //Memory Controller
+#define EFI_ACPI_MEMORY_AGGREGATOR_TYPE_DIMM 02 //DIMM
+#define EFI_ACPI_MEMORY_AGGREGATOR_TYPE_RESVERVED 03 //RESVERVED
+
+#define EFI_ACPI_MEMORY_AGGREGATOR_FLAG_TLAD 01
+#define EFI_ACPI_MEMORY_AGGREGATOR_FLAG_PHYELEMENT 02 // BIT1 - set to 1 since socket is a physical element of the topology
+//Bit 2 and 3 - If 00, indicates that all components aggregated by this device implements volatile memory
+// If 01, indicates that components aggregated by this device implements both volatile and non-volatile memory
+// If 10, indicates that all components aggregated by this device implements non-volatile memory
+#define EFI_ACPI_MEMORY_AGGREGATOR_FLAG__VOLATILE 00
+#define EFI_ACPI_MEMORY_AGGREGATOR_FLAG__MIXED 4
+#define EFI_ACPI_MEMORY_AGGREGATOR_FLAG__NONVOLATILE 0x08
+#define EFI_ACPI_MEMORY_AGGREGATOR_FLAG__RSVD 0x0C
+
+#define MAXNUMBER_OF_PROXIMITY_DOMAINS 0x3
+
+#define MAX_SOCKET 0x2
+#define NUM_MEM_CONTROLLERS 0x2
+#define MAX_DIMM 0x02
+
+#pragma pack (1)
+// PMMT Table fields
+typedef struct {
+ UINT32 ReadLatency;
+ UINT32 WriteLatency;
+ UINT32 ReadBW;
+ UINT32 WriteBW;
+ UINT16 OptimalAccUnit;
+ UINT16 OptimalAccAlignment;
+} EFI_ACPI_MEMCTRL_CHAR_TABLE;
+
+typedef struct {
+ UINT8 Type;
+ UINT8 Rsvd;
+ UINT16 Length;
+ UINT16 Flag;
+ UINT16 Rsvd1;
+ UINT16 PhyCompIdentifier;
+ UINT16 Rsvd2;
+ UINT32 Size;
+ UINT32 SmBiosHandle;
+} EFI_ACPI_MEMORY_AGGREGATOR_DIMM_STRUC;
+
+typedef struct {
+ UINT8 Type;
+ UINT8 Rsvd;
+ UINT16 Length;
+ UINT16 Flag;
+ UINT16 Rsvd1;
+ EFI_ACPI_MEMCTRL_CHAR_TABLE MemCtrlCharTable;
+ UINT16 Rsvd2;
+ UINT16 NumProxDomains;
+ UINT32 ProxDomain[MAXNUMBER_OF_PROXIMITY_DOMAINS];
+ EFI_ACPI_MEMORY_AGGREGATOR_DIMM_STRUC PhyCompIdentStruc[MAX_DIMM];
+} EFI_ACPI_MEMORY_AGGREGATOR_MEMCTRL_STRUC;
+
+typedef struct {
+ UINT8 Type;
+ UINT8 Rsvd;
+ UINT16 Length;
+ UINT16 Flag;
+ UINT16 Rsvd1;
+ UINT16 SckIdent;
+ UINT16 Rsvd2;
+ EFI_ACPI_MEMORY_AGGREGATOR_MEMCTRL_STRUC MemCtrlStruc[NUM_MEM_CONTROLLERS];
+} EFI_ACPI_MEMORY_AGGREGATOR_SOCKET_STRUC;
+
+typedef struct {
+ EFI_ACPI_5_0_MEMORY_TOPOLOGY_TABLE Header;
+ EFI_ACPI_MEMORY_AGGREGATOR_SOCKET_STRUC TopLevelmemAggrDevStruc[MAX_SOCKET];
+} EFI_ACPI_5_0_PLATFORM_MEMORY_TOPOLOGY_TABLE;
+#pragma pack ()
+
+
+EFI_ACPI_5_0_PLATFORM_MEMORY_TOPOLOGY_TABLE Pmtt = {
+ {
+ {
+ EFI_ACPI_5_0_PLATFORM_MEMORY_TOPOLOGY_TABLE_SIGNATURE,
+ sizeof (EFI_ACPI_5_0_PLATFORM_MEMORY_TOPOLOGY_TABLE), // Length
+ EFI_ACPI_5_0_MEMORY_TOPOLOGY_TABLE_REVISION, // Revision
+ 0x00, // Checksum will be updated at runtime
+ {EFI_ACPI_OEM_ID},
+ EFI_ACPI_OEM_TABLE_ID,
+ EFI_ACPI_OEM_REVISION,
+ EFI_ACPI_CREATOR_ID,
+ EFI_ACPI_CREATOR_REVISION
+ },
+ EFI_ACPI_RESERVED_DWORD, // Reserved[0]
+ },
+ {
+ /*Socket 0*/
+ {
+ 0x00, //Subtable Type:Socket
+ 0x00, //Reserved
+ 0x0080, //Length
+ 0x0001, //Flags
+ 0x0000, //Reserved
+ 0x0000, //Socket ID
+ 0x0000, //Reserved
+ {
+ /*Memory Controller 1*/
+
+ {
+ 0x01, //Subtable Type:Memory Controller
+ 0x00, //Reserved
+ 0x0054, //Length
+ 0x0005, //Flags
+ 0x0000, //Reserved
+ {
+ 0x00000000, //Read Latency
+ 0x00000000, //Write Latency
+ 0x00000000, //Read Bandwidth
+ 0x00000000, //Write Bandwidth
+ 0x0000, //Access Width
+ 0x0000, //Alignment
+ },
+ 0x0000, //Reserved
+ MAXNUMBER_OF_PROXIMITY_DOMAINS, //Domain Count
+ 0x00000000, //Proximity Domain
+ 0x00000000, //Proximity Domain
+ 0x00000000, //Proximity Domain
+ {
+ /*DIMM 0*/
+ {
+ 0x02, //Subtable Type:Physical Component (DIMM)
+ 0x00, //Reserved
+ 0x0014, //Length
+ 0x0002, //Flags
+ 0x0000, //Reserved
+ 0x0000, //Component ID
+ 0x0000, //Reserved
+ 0x00000000, //Memory Size
+ 0x00000000, //Bios Handle
+ },
+ /*DIMM 1*/
+ {
+ 0x02, //Subtable Type:Physical Component (DIMM)
+ 0x00, //Reserved
+ 0x0014, //Length
+ 0x0002, //Flags
+ 0x0000, //Reserved
+ 0x0000, //Component ID
+ 0x0000, //Reserved
+ 0x00000000, //Memory Size
+ 0x00000000, //Bios Handle
+ },
+ },
+ },
+
+ /*Memory Controller 2*/
+ {
+ 0x01, //Subtable Type:Memory Controller
+ 0x00, //Reserved
+ 0x0020, //Length
+ 0x0001, //Flags
+ 0x0000, //Reserved
+ {
+ 0x00000000, //Read Latency
+ 0x00000000, //Write Latency
+ 0x00000000, //Read Bandwidth
+ 0x00000000, //Write Bandwidth
+ 0x0000, //Access Width
+ 0x0000 //Alignment
+ },
+ 0x0000, //Reserved
+ 0x0000, //Domain Count
+ {0},
+ {0},
+
+ },
+ },
+ },
+
+
+ /*Socket 1*/
+ {
+ 0x00, //Subtable Type:Socket
+ 0x00, //Reserved
+ 0x000c, //Length
+ 0x0001, //Flags
+ 0x0000, //Reserved
+ 0x0000, //Socket ID
+ 0x0000 //Reserved
+ },
+ },
+
+
+};
+
+VOID*
+ReferenceAcpiTable (
+ VOID
+ )
+{
+ //
+ // Reference the table being generated to prevent the optimizer from removing the
+ // data structure from the exeutable
+ //
+ return (VOID*)&Pmtt;
+}
diff --git a/ArmPkg/Drivers/AcpiTables/foundation-v8/Slit.aslc b/ArmPkg/Drivers/AcpiTables/foundation-v8/Slit.aslc
new file mode 100644
index 0000000..05d96e0
--- /dev/null
+++ b/ArmPkg/Drivers/AcpiTables/foundation-v8/Slit.aslc
@@ -0,0 +1,87 @@
+/*
+ * Copyright (c) 2013 Linaro Limited
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the BSD License which accompanies
+ * this distribution, and is available at
+ * http://opensource.org/licenses/bsd-license.php
+ *
+ * Contributors:
+ * Yi Li - yi.li@linaro.org
+*/
+
+#include <IndustryStandard/Acpi.h>
+#include <Platform.h>
+
+#define EFI_ACPI_SYSTEM_LOCALITIES_ENTRY_COUNT 0x0000000000000014
+
+#pragma pack(1)
+typedef struct {
+ UINT8 Entry[EFI_ACPI_SYSTEM_LOCALITIES_ENTRY_COUNT];
+} EFI_ACPI_5_0_NUMBER_OF_SYSTEM_LOCALITIES_STRUCTURE;
+
+typedef struct {
+ EFI_ACPI_5_0_SYSTEM_LOCALITY_DISTANCE_INFORMATION_TABLE_HEADER Header;
+ EFI_ACPI_5_0_NUMBER_OF_SYSTEM_LOCALITIES_STRUCTURE NumSlit[EFI_ACPI_SYSTEM_LOCALITIES_ENTRY_COUNT];
+
+} EFI_ACPI_5_0_SYSTEM_LOCALITY_INFORMATION_TABLE;
+#pragma pack()
+
+//
+// System Locality Information Table
+// Please modify all values in Slit.h only.
+//
+EFI_ACPI_5_0_SYSTEM_LOCALITY_INFORMATION_TABLE Slit = {
+ {
+ {
+ EFI_ACPI_5_0_SYSTEM_LOCALITY_INFORMATION_TABLE_SIGNATURE,
+ sizeof (EFI_ACPI_5_0_SYSTEM_LOCALITY_INFORMATION_TABLE),
+ EFI_ACPI_5_0_SYSTEM_LOCALITY_DISTANCE_INFORMATION_TABLE_REVISION,
+ 0x00, // Checksum will be updated at runtime
+ {EFI_ACPI_OEM_ID},
+ EFI_ACPI_OEM_TABLE_ID,
+ EFI_ACPI_OEM_REVISION,
+ EFI_ACPI_CREATOR_ID,
+ EFI_ACPI_CREATOR_REVISION,
+ },
+ //
+ // Beginning of SLIT specific fields
+ //
+ EFI_ACPI_SYSTEM_LOCALITIES_ENTRY_COUNT,
+ },
+ {
+ {0x0A, 0x10, 0x16, 0x17, 0x18, 0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F, 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27}, //Locality 0
+ {0x10, 0x0A, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F, 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26,}, //Locality 1
+ {0x16, 0x15, 0x0A, 0x10, 0x16, 0x17, 0x18, 0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F, 0x20, 0x21, 0x22, 0x23, 0x24, 0x25,}, //Locality 2
+ {0x17, 0x16, 0x10, 0x0A, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F, 0x20, 0x21, 0x22, 0x23, 0x24,}, //Locality 3
+ {0x18, 0x17, 0x16, 0x15, 0x0A, 0x10, 0x16, 0x17, 0x18, 0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F, 0x20, 0x21, 0x22, 0x23,}, //Locality 4
+ {0x19, 0x18, 0x17, 0x16, 0x10, 0x0A, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F, 0x20, 0x21, 0x22,}, //Locality 5
+ {0x1A, 0x19, 0x18, 0x17, 0x16, 0x15, 0x0A, 0x10, 0x16, 0x17, 0x18, 0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F, 0x20, 0x21,}, //Locality 6
+ {0x1B, 0x1A, 0x19, 0x18, 0x17, 0x16, 0x10, 0x0A, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F, 0x20,}, //Locality 7
+ {0x1C, 0x1B, 0x1A, 0x19, 0x18, 0x17, 0x16, 0x15, 0x0A, 0x10, 0x16, 0x17, 0x18, 0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F,}, //Locality 8
+ {0x1D, 0x1C, 0x1B, 0x1A, 0x19, 0x18, 0x17, 0x16, 0x10, 0x0A, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E,}, //Locality 9
+ {0x1E, 0x1D, 0x1C, 0x1B, 0x1A, 0x19, 0x18, 0x17, 0x16, 0x15, 0x0A, 0x10, 0x16, 0x17, 0x18, 0x19, 0x1A, 0x1B, 0x1C, 0x1D,}, //Locality 10
+ {0x1F, 0x1E, 0x1D, 0x1C, 0x1B, 0x1A, 0x19, 0x18, 0x17, 0x16, 0x10, 0x0A, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1A, 0x1B, 0x1C,}, //Locality 11
+ {0x20, 0x1F, 0x1E, 0x1D, 0x1C, 0x1B, 0x1A, 0x19, 0x18, 0x17, 0x16, 0x15, 0x0A, 0x10, 0x16, 0x17, 0x18, 0x19, 0x1A, 0x1B,}, //Locality 12
+ {0x21, 0x20, 0x1F, 0x1E, 0x1D, 0x1C, 0x1B, 0x1A, 0x19, 0x18, 0x17, 0x16, 0x10, 0x0A, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1A,}, //Locality 13
+ {0x22, 0x21, 0x20, 0x1F, 0x1E, 0x1D, 0x1C, 0x1B, 0x1A, 0x19, 0x18, 0x17, 0x16, 0x15, 0x0A, 0x10, 0x16, 0x17, 0x18, 0x19,}, //Locality 14
+ {0x23, 0x22, 0x21, 0x20, 0x1F, 0x1E, 0x1D, 0x1C, 0x1B, 0x1A, 0x19, 0x18, 0x17, 0x16, 0x10, 0x0A, 0x15, 0x16, 0x17, 0x18,}, //Locality 15
+ {0x24, 0x23, 0x22, 0x21, 0x20, 0x1F, 0x1E, 0x1D, 0x1C, 0x1B, 0x1A, 0x19, 0x18, 0x17, 0x16, 0x15, 0x0A, 0x10, 0x16, 0x17,}, //Locality 16
+ {0x25, 0x24, 0x23, 0x22, 0x21, 0x20, 0x1F, 0x1E, 0x1D, 0x1C, 0x1B, 0x1A, 0x19, 0x18, 0x17, 0x16, 0x10, 0x0A, 0x15, 0x16,}, //Locality 17
+ {0x26, 0x25, 0x24, 0x23, 0x22, 0x21, 0x20, 0x1F, 0x1E, 0x1D, 0x1C, 0x1B, 0x1A, 0x19, 0x18, 0x17, 0x16, 0x15, 0x0A, 0x10,}, //Locality 18
+ {0x27, 0x26, 0x25, 0x24, 0x23, 0x22, 0x21, 0x20, 0x1F, 0x1E, 0x1D, 0x1C, 0x1B, 0x1A, 0x19, 0x18, 0x17, 0x16, 0x10, 0x0A,}, //Locality 19
+ },
+};
+
+
+VOID*
+ReferenceAcpiTable (
+ VOID
+ )
+{
+ //
+ // Reference the table being generated to prevent the optimizer from removing the
+ // data structure from the exeutable
+ //
+ return (VOID*)&Slit;
+}
diff --git a/ArmPkg/Drivers/AcpiTables/foundation-v8/Spmi.aslc b/ArmPkg/Drivers/AcpiTables/foundation-v8/Spmi.aslc
new file mode 100644
index 0000000..77836a4
--- /dev/null
+++ b/ArmPkg/Drivers/AcpiTables/foundation-v8/Spmi.aslc
@@ -0,0 +1,86 @@
+/*
+ * Copyright (c) 2013 Linaro Limited
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the BSD License which accompanies
+ * this distribution, and is available at
+ * http://opensource.org/licenses/bsd-license.php
+ *
+ * Contributors:
+ * Yi Li - yi.li@linaro.org
+*/
+
+#include <IndustryStandard/Acpi.h>
+#include <Platform.h>
+
+#define ACPI_5_0_SPMI_REVISION 0x4
+
+#pragma pack(1)
+typedef struct
+{
+
+ EFI_ACPI_DESCRIPTION_HEADER Header;
+ UINT8 ucInterfaceType;
+ UINT8 Reserved;
+ UINT16 usIPMISpecVersion;
+ UINT8 ucInterruptType;
+ UINT8 ucGPENumber;
+ UINT8 Reserved2;
+ UINT8 ucPCIDeviceFlag;
+ UINT32 uwInterrupt;
+ EFI_ACPI_5_0_GENERIC_ADDRESS_STRUCTURE IPMIRegister;
+ UINT8 ucPCISegment;
+ UINT8 ucPCIBus;
+ UINT8 ucPCIDevice;
+ UINT8 ucPCIFunction;
+ UINT8 Reserved3;
+}EFI_ACPI_5_0_SERVER_PLATFORM_MANAGEMENT_INTERFACE_TABLE;
+#pragma pack()
+
+EFI_ACPI_5_0_SERVER_PLATFORM_MANAGEMENT_INTERFACE_TABLE Spmi =
+{
+ {
+ EFI_ACPI_5_0_SERVER_PLATFORM_MANAGEMENT_INTERFACE_TABLE_SIGNATURE,
+ sizeof (EFI_ACPI_5_0_SERVER_PLATFORM_MANAGEMENT_INTERFACE_TABLE),
+ ACPI_5_0_SPMI_REVISION,
+ 0x00, // Checksum will be updated at runtime
+ {EFI_ACPI_OEM_ID},
+ EFI_ACPI_OEM_TABLE_ID,
+ 0x00,
+ EFI_ACPI_CREATOR_ID,
+ EFI_ACPI_CREATOR_REVISION
+ },
+ 0x00, //Interface Type
+ 0x00, //Reserved
+ 0x0000, //IPMI Spec Version
+ 0x00, //Interrupt Type
+ 0x00, //GPE Number
+ 0x00, //Reserved
+ 0x00, //PCI Device Flag
+ 0x00000000, //Interrupt
+ {
+ 0x00, //Space ID:SystemMemory
+ 0x08, //Bit Width
+ 0x00, //Bit Offset
+ 0x01, //Encoded Access Width
+ 0x0000000000000000, //Address
+ },
+ 0x00, //PCI Segment
+ 0x00, //PCI Bus
+ 0x00, //PCI Device
+ 0x00, //PCI Function
+ 0x00, //Reserved
+};
+
+VOID*
+ReferenceAcpiTable (
+ VOID
+ )
+{
+
+ //
+ // Reference the table being generated to prevent the optimizer from removing the
+ // data structure from the exeutable
+ //
+ return (VOID*)&Spmi;
+}
diff --git a/ArmPkg/Drivers/AcpiTables/foundation-v8/Srat.aslc b/ArmPkg/Drivers/AcpiTables/foundation-v8/Srat.aslc
new file mode 100644
index 0000000..d5c433f
--- /dev/null
+++ b/ArmPkg/Drivers/AcpiTables/foundation-v8/Srat.aslc
@@ -0,0 +1,106 @@
+/*
+ * Copyright (c) 2013 Linaro Limited
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the BSD License which accompanies
+ * this distribution, and is available at
+ * http://opensource.org/licenses/bsd-license.php
+ *
+ * Contributors:
+ * Yi Li - yi.li@linaro.org
+*/
+
+#include <IndustryStandard/Acpi.h>
+#include <Platform.h>
+
+
+//
+// Define the number of each table type.
+// This is where the table layout is modified.
+//
+#define EFI_ACPI_PROCESSOR_LOCAL_APIC_SAPIC_AFFINITY_STRUCTURE_COUNT 4
+#define EFI_ACPI_MEMORY_AFFINITY_STRUCTURE_COUNT 4
+
+
+#pragma pack(1)
+typedef struct {
+ EFI_ACPI_5_0_SYSTEM_RESOURCE_AFFINITY_TABLE_HEADER Header;
+ EFI_ACPI_5_0_PROCESSOR_LOCAL_APIC_SAPIC_AFFINITY_STRUCTURE Apic;
+ EFI_ACPI_5_0_MEMORY_AFFINITY_STRUCTURE Memory;
+ EFI_ACPI_5_0_PROCESSOR_LOCAL_X2APIC_AFFINITY_STRUCTURE x2APIC;
+} EFI_ACPI_5_0_SYSTEM_RESOURCE_AFFINITY_TABLE;
+
+#pragma pack()
+
+
+//
+// Static Resource Affinity Table definition
+//
+EFI_ACPI_5_0_SYSTEM_RESOURCE_AFFINITY_TABLE Srat = {
+ {
+ EFI_ACPI_5_0_SYSTEM_RESOURCE_AFFINITY_TABLE_SIGNATURE,
+ sizeof (EFI_ACPI_5_0_SYSTEM_RESOURCE_AFFINITY_TABLE),
+ EFI_ACPI_5_0_SYSTEM_RESOURCE_AFFINITY_TABLE_REVISION,
+ 0x00, // Checksum will be updated at runtime
+ {EFI_ACPI_OEM_ID},
+ EFI_ACPI_OEM_TABLE_ID,
+ EFI_ACPI_OEM_REVISION,
+ EFI_ACPI_CREATOR_ID,
+ EFI_ACPI_CREATOR_REVISION,
+ /*Reserved*/
+ 0x00000001, // Reserved to be 1 for backward compatibility
+ EFI_ACPI_RESERVED_QWORD
+ },
+ /**/
+ {
+ 0x00, // Subtable Type:Processor Local APIC/SAPIC Affinity
+ sizeof(EFI_ACPI_5_0_PROCESSOR_LOCAL_APIC_SAPIC_AFFINITY_STRUCTURE), //Length
+ 0x00, //Proximity Domain Low(8)
+ 0x00, //Apic ID
+ 0x00000001, //Flags
+ 0x00, //Local Sapic EID
+ {0,0,0}, //Proximity Domain High(24)
+ 0x00000000, //ClockDomain
+ },
+ //
+ //
+ // Memory Affinity
+ //
+ {
+ 0x01, // Subtable Type:Memory Affinity
+ sizeof (EFI_ACPI_5_0_MEMORY_AFFINITY_STRUCTURE), // Length
+ 0x00000000, // Proximity Domain
+ EFI_ACPI_RESERVED_WORD, // Reserved
+ 0x00000000, // Address Base Low
+ 0x00000000, // Address Base High
+ 0x0009FC00, // Length Low
+ 0x00000000, // Length High
+ EFI_ACPI_RESERVED_DWORD, // Reserved
+ 0x00000001, // Flags disabled, until enabled by Platform driver
+ EFI_ACPI_RESERVED_QWORD , // Reserved
+ },
+
+ /*Processor Local x2APIC Affinity*/
+ {
+ 0x02, // Subtable Type:Processor Local x2APIC Affinity
+ sizeof(EFI_ACPI_5_0_PROCESSOR_LOCAL_X2APIC_AFFINITY_STRUCTURE),
+ {0,0}, //Reserved1
+ 0x00000000, //Proximity Domain
+ 0x00000000, //Apic ID
+ 0x00000001, //Flags
+ 0x00000000, //Clock Domain
+ {0,0,0,0}, //Reserved2
+ },
+};
+
+VOID*
+ReferenceAcpiTable (
+ VOID
+ )
+{
+ //
+ // Reference the table being generated to prevent the optimizer from removing the
+ // data structure from the exeutable
+ //
+ return (VOID*)&Srat;
+}
diff --git a/ArmPkg/Drivers/AcpiTables/foundation-v8/Ssdt0.asl b/ArmPkg/Drivers/AcpiTables/foundation-v8/Ssdt0.asl
new file mode 100644
index 0000000..9796ebd
--- /dev/null
+++ b/ArmPkg/Drivers/AcpiTables/foundation-v8/Ssdt0.asl
@@ -0,0 +1,17 @@
+/*
+ * Copyright (c) 2013, Al Stone <al.stone@linaro.org>
+ *
+ * [SSDT] Description of the ARMv8 foundation model GPIO structure
+ *
+ * This source is released under the terms of the GPLv2.
+ */
+
+DefinitionBlock (
+ "ssdt0.aml", // output filename
+ "SSDT", // table signature
+ 2, // SSDT compliance revision
+ "LINARO", // OEM ID
+ "FOUNDATI", // table ID
+ 0x00000001) // OEM revision
+{
+}
diff --git a/ArmPkg/Drivers/AcpiTables/foundation-v8/Uefi.aslc b/ArmPkg/Drivers/AcpiTables/foundation-v8/Uefi.aslc
new file mode 100644
index 0000000..c3bbce3
--- /dev/null
+++ b/ArmPkg/Drivers/AcpiTables/foundation-v8/Uefi.aslc
@@ -0,0 +1,57 @@
+/*
+ * Copyright (c) 2013 Linaro Limited
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the BSD License which accompanies
+ * this distribution, and is available at
+ * http://opensource.org/licenses/bsd-license.php
+ *
+ * Contributors:
+ * Yi Li - yi.li@linaro.org
+*/
+
+#include <IndustryStandard/Acpi.h>
+#include <Platform.h>
+
+
+#define ACPI_5_0_UEFI_REVISION 0x1
+
+#pragma pack(1)
+
+typedef struct
+{
+ EFI_ACPI_DESCRIPTION_HEADER Header;
+ EFI_GUID guid;
+ UINT16 usDataOffset;
+}EFI_ACPI_5_0_UEFI_TABLE;
+#pragma pack()
+
+EFI_ACPI_5_0_UEFI_TABLE Uefi=
+{
+ {
+ EFI_ACPI_5_0_UEFI_ACPI_DATA_TABLE_SIGNATURE,
+ sizeof (EFI_ACPI_5_0_UEFI_TABLE),
+ ACPI_5_0_UEFI_REVISION,
+ 0x00, // Checksum will be updated at runtime
+ {EFI_ACPI_OEM_ID},
+ EFI_ACPI_OEM_TABLE_ID,
+ EFI_ACPI_OEM_REVISION,
+ EFI_ACPI_CREATOR_ID,
+ EFI_ACPI_CREATOR_REVISION
+ },
+ //03020100-0504-0706-0809-0A0B0C0D0E0F
+ { 0x03020100, 0x0504, 0x0706, { 0x08, 0x09, 0x0A, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f } },
+ 0x0036 //Data Offset
+};
+
+VOID*
+ReferenceAcpiTable (
+ VOID
+ )
+{
+ //
+ // Reference the table being generated to prevent the optimizer from removing the
+ // data structure from the exeutable
+ //
+ return (VOID*)&Uefi;
+}
diff --git a/ArmPkg/Drivers/AcpiTables/rtsm_ve-aemv8a/AcpiTables.inf b/ArmPkg/Drivers/AcpiTables/rtsm_ve-aemv8a/AcpiTables.inf
new file mode 100644
index 0000000..ae3a66b
--- /dev/null
+++ b/ArmPkg/Drivers/AcpiTables/rtsm_ve-aemv8a/AcpiTables.inf
@@ -0,0 +1,70 @@
+## @file
+# Component description file for PlatformAcpiTables module.
+#
+# ACPI table data and ASL sources required to boot the platform.
+#
+# Copyright (c) 2008 - 2010, Intel Corporation. All rights reserved.<BR>
+# 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.
+#
+##
+
+/*
+ * Copyright (c) 2013 Linaro Limited
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the BSD License which accompanies
+ * this distribution, and is available at
+ * http://opensource.org/licenses/bsd-license.php
+ *
+ * Contributors:
+ * Yi Li - yi.li@linaro.org
+*/
+[Defines]
+ INF_VERSION = 0x00010005
+ BASE_NAME = PlatformAcpiTables
+ FILE_GUID = 7E374E25-8E01-4FEE-87F2-390C23C606CD
+ MODULE_TYPE = USER_DEFINED
+ VERSION_STRING = 1.0
+ FFS_EXT = SEC
+ COMPILE_SELECT = .c=acpi_c
+
+[Sources]
+ Platform.h
+ Apic.aslc
+ Bert.aslc
+ Dsdt.asl
+ Ecdt.aslc
+ Einj.aslc
+ Erst.aslc
+ Facp.aslc
+ Facs.aslc
+ Gtdt.aslc
+ Hest.aslc
+ Mcfg.aslc
+ Mpst.aslc
+ Msct.aslc
+ Oem0.aslc
+ Pmtt.aslc
+ Slit.aslc
+ Spmi.aslc
+ Srat.aslc
+ Ssdt0.asl
+ Uefi.aslc
+
+ ###rsdp/xsdt created by building the acpi table
+ ###tables need to change format
+ #asf!.asl
+ #bgrt.asl
+ #boot.asl
+ #cpep.asl
+ #fpdt.asl
+ #tpm2.asl
+
+[Packages]
+ MdePkg/MdePkg.dec
diff --git a/ArmPkg/Drivers/AcpiTables/rtsm_ve-aemv8a/Apic.aslc b/ArmPkg/Drivers/AcpiTables/rtsm_ve-aemv8a/Apic.aslc
new file mode 100644
index 0000000..e18c1a5
--- /dev/null
+++ b/ArmPkg/Drivers/AcpiTables/rtsm_ve-aemv8a/Apic.aslc
@@ -0,0 +1,216 @@
+/** @file
+ MADT Table
+
+ This file contains a structure definition for the ACPI 1.0 Multiple APIC
+ Description Table (MADT).
+
+ Copyright (c) 2008 - 2012, Intel Corporation. All rights reserved.<BR>
+ 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.
+
+**/
+
+/*
+ * Copyright (c) 2013 Linaro Limited
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the BSD License which accompanies
+ * this distribution, and is available at
+ * http://opensource.org/licenses/bsd-license.php
+ *
+ * Contributors:
+ * Yi Li - yi.li@linaro.org
+*/
+#include <IndustryStandard/Acpi.h>
+#include <Platform.h>
+
+//
+// Local APIC address
+//
+#define EFI_ACPI_LOCAL_APIC_ADDRESS 0x2C002000 // TBD
+
+
+#define ACPI_PROCESSOR_LOCAL_GIC 0xb
+#define ACPI_GIC_DISTRIBUTOR 0xc
+
+//These addresses are defined by the MP shared region defined in the UEFI memory map.
+#define MP_REGISTER_ADDRESS_GIC0 0x80301000
+#define DISTRIBUTOR_PHYSICAL_ADDRESS 0x02000000
+
+#define ACPI_GICC_NUM 0x8
+
+//
+// Ensure proper structure formats
+//
+#pragma pack (1)
+//
+// ACPI 5.0 MADT structure
+//
+typedef struct {
+ EFI_ACPI_5_0_MULTIPLE_APIC_DESCRIPTION_TABLE_HEADER Header;
+ EFI_ACPI_5_0_GIC_STRUCTURE Gic[ACPI_GICC_NUM];
+ EFI_ACPI_5_0_GIC_DISTRIBUTOR_STRUCTURE Distributor;
+
+} EFI_ACPI_5_0_MULTIPLE_APIC_DESCRIPTION_TABLE;
+
+#pragma pack ()
+
+//
+// Multiple APIC Description Table
+//
+EFI_ACPI_5_0_MULTIPLE_APIC_DESCRIPTION_TABLE Madt = {
+ {
+ {
+ EFI_ACPI_5_0_MULTIPLE_APIC_DESCRIPTION_TABLE_SIGNATURE,
+ sizeof (EFI_ACPI_5_0_MULTIPLE_APIC_DESCRIPTION_TABLE),
+ EFI_ACPI_5_0_MULTIPLE_APIC_DESCRIPTION_TABLE_REVISION,
+ 0x00, // Checksum will be updated at runtime
+ {EFI_ACPI_OEM_ID},
+ EFI_ACPI_OEM_TABLE_ID,
+ EFI_ACPI_OEM_REVISION,
+ EFI_ACPI_CREATOR_ID,
+ EFI_ACPI_CREATOR_REVISION
+ },
+
+ //
+ // MADT specific fields
+ //
+ EFI_ACPI_LOCAL_APIC_ADDRESS,
+ 0x00000000
+ },
+ {
+ //LocalGic0
+ {
+ ACPI_PROCESSOR_LOCAL_GIC, //Type
+ sizeof (EFI_ACPI_5_0_GIC_STRUCTURE), //Length
+ 0x00, //Reserved
+ 0x00, //GicId
+ 0x00, //AcpiProcessorUid
+ 0x00000001, //Flags
+ 0x00000000, //ParkingProtocolVersion
+ 0x00000000, //PerformanceInterruptGsiv
+ 0x0000000000000000, //ParkedAddress
+ 0x000000002C002000, //PhysicalBaseAddress
+ },
+ //LocalGic1
+ {
+ ACPI_PROCESSOR_LOCAL_GIC, //Type
+ sizeof (EFI_ACPI_5_0_GIC_STRUCTURE), //Length
+ 0x00, //Reserved
+ 0x01, //GicId
+ 0x01, //AcpiProcessorUid
+ EFI_ACPI_5_0_GIC_ENABLED, //Flags
+ 0x00000000, //ParkingProtocolVersion
+ 0x00000000, //PerformanceInterruptGsiv
+ 0x0000000000000000, //ParkedAddress
+ 0x000000002C002000 //PhysicalBaseAddress
+ },
+ //LocalGic2
+ {
+ ACPI_PROCESSOR_LOCAL_GIC, //Type:
+ sizeof (EFI_ACPI_5_0_GIC_STRUCTURE), //Length
+ 0x00, //Reserved
+ 0x02, //GicId
+ 0x02, //AcpiProcessorUid
+ EFI_ACPI_5_0_GIC_ENABLED, //Flags
+ 0x00000000, //ParkingProtocolVersion
+ 0x00000000, //PerformanceInterruptGsiv
+ 0x0000000000000000, //ParkedAddress
+ 0x000000002C002000, //PhysicalBaseAddress
+ },
+ //LocalGic3
+ {
+ ACPI_PROCESSOR_LOCAL_GIC, //Type
+ sizeof (EFI_ACPI_5_0_GIC_STRUCTURE), //Length
+ 0x00, //Reserved
+ 0x03, //GicId
+ 0x03, //AcpiProcessorUid
+ EFI_ACPI_5_0_GIC_ENABLED, //Flags
+ 0x00000000, //ParkingProtocolVersion
+ 0x00000000, //PerformanceInterruptGsiv
+ 0x0000000000000000, //ParkedAddress
+ 0x000000002C002000, //PhysicalBaseAddress
+ },
+ //LocalGic4
+ {
+ ACPI_PROCESSOR_LOCAL_GIC, //Type
+ sizeof (EFI_ACPI_5_0_GIC_STRUCTURE), //Length
+ 0x00, //Reserved
+ 0x04, //GicId
+ 0x04, //AcpiProcessorUid
+ 0, //Flags
+ 0x00000000, //ParkingProtocolVersion
+ 0x00000000, //PerformanceInterruptGsiv
+ 0x0000000000000000, //ParkedAddress
+ 0x000000002C002000, //PhysicalBaseAddress
+ },
+ //LocalGic5
+ {
+ ACPI_PROCESSOR_LOCAL_GIC, //Type
+ sizeof (EFI_ACPI_5_0_GIC_STRUCTURE), //Length
+ 0x00, //Reserved
+ 0x05, //GicId
+ 0x05, //AcpiProcessorUid
+ 0x0, //Flags
+ 0x00000000, //ParkingProtocolVersion
+ 0x00000000, //PerformanceInterruptGsiv
+ 0x0000000000000000, //ParkedAddress
+ 0x000000002C002000, //PhysicalBaseAddress
+ },
+ //LocalGic6
+ {
+ ACPI_PROCESSOR_LOCAL_GIC, //Type
+ sizeof (EFI_ACPI_5_0_GIC_STRUCTURE), //Length
+ 0x00, //Reserved
+ 0x06, //GicId
+ 0x06, //AcpiProcessorUid
+ 0x0, //Flags
+ 0x00000000, //ParkingProtocolVersion
+ 0x00000000, //PerformanceInterruptGsiv
+ 0x0000000000000000, //ParkedAddress
+ 0x000000002C002000 , //PhysicalBaseAddress
+ },
+ //LocalGic7
+ {
+ ACPI_PROCESSOR_LOCAL_GIC, //Type
+ sizeof (EFI_ACPI_5_0_GIC_STRUCTURE), //Length
+ 0x00, //Reserved
+ 0x07, //GicId
+ 0x07, //AcpiProcessorUid
+ 0x0, //Flags
+ 0x00000000, //ParkingProtocolVersion
+ 0x00000000, //PerformanceInterruptGsiv
+ 0x0000000000000000, //ParkedAddress
+ 0x000000002C002000, //PhysicalBaseAddress
+ },
+ },
+ //Distributor
+ {
+ ACPI_GIC_DISTRIBUTOR, //Type
+ sizeof (EFI_ACPI_5_0_GIC_DISTRIBUTOR_STRUCTURE), //Length
+ 0, //Reserved1
+ 0, //GicId
+ 0x000000002C001000, //PhysicalBaseAddress
+ 0, //SystemVectorBase
+ 0 //Reserved2
+ }
+
+};
+
+
+VOID*
+ReferenceAcpiTable (
+ VOID
+ )
+{
+ //
+ // Reference the table being generated to prevent the optimizer from removing the
+ // data structure from the exeutable
+ //
+ return (VOID*)&Madt;
+}
diff --git a/ArmPkg/Drivers/AcpiTables/rtsm_ve-aemv8a/Bert.aslc b/ArmPkg/Drivers/AcpiTables/rtsm_ve-aemv8a/Bert.aslc
new file mode 100644
index 0000000..0fe2bc4
--- /dev/null
+++ b/ArmPkg/Drivers/AcpiTables/rtsm_ve-aemv8a/Bert.aslc
@@ -0,0 +1,84 @@
+/*
+ * Copyright (c) 2013 Linaro Limited
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the BSD License which accompanies
+ * this distribution, and is available at
+ * http://opensource.org/licenses/bsd-license.php
+ *
+ * Contributors:
+ * Yi Li - yi.li@linaro.org
+*/
+
+#include <IndustryStandard/Acpi.h>
+#include <Platform.h>
+
+// Generic error severity in data entry
+#define BOOT_ERROR_SEVERITY_RECOVERABLE 0
+#define BOOT_ERROR_SEVERITY_FATAL 1
+#define BOOT_ERROR_SEVERITY_CORRECTED 2
+#define BOOT_ERROR_SEVERITY_NONE 3
+
+#pragma pack(1)
+
+// ErrorStatus block record definitions for various errors
+typedef struct {
+ UINT32 UeValid:1;
+ UINT32 CeValid:1;
+ UINT32 MultipleUeValid:1;
+ UINT32 MultipleCeValid:1;
+ UINT32 NumErrorDataEntry:10;
+ UINT32 Resv1:18;
+} BOOT_ERROR_BLOCK_STATUS;
+
+
+typedef struct {
+ // Error Status block
+ BOOT_ERROR_BLOCK_STATUS BlockStatus;
+ UINT32 RawDataOffset;
+ UINT32 RawDataSize;
+ UINT32 ErrDataSize;
+ UINT32 Severity;
+ // Error Status data...
+} EFI_ACPI_5_0_BOOT_ERROR_REGION;
+
+
+typedef struct {
+ EFI_ACPI_DESCRIPTION_HEADER Header;
+ UINT32 BootErrorRegionLen;
+ UINT64 BootErrorRegion;
+} EFI_ACPI_5_0_BOOT_ERROR_RECORD_TABLE;
+
+#pragma pack()
+
+
+
+EFI_ACPI_5_0_BOOT_ERROR_RECORD_TABLE Bert = {
+ {
+ EFI_ACPI_5_0_BOOT_ERROR_RECORD_TABLE_SIGNATURE,
+ sizeof (EFI_ACPI_5_0_BOOT_ERROR_RECORD_TABLE),
+ EFI_ACPI_5_0_BOOT_ERROR_RECORD_TABLE_REVISION,
+ 0x00, // Checksum will be updated at runtime
+ {EFI_ACPI_OEM_ID},
+ EFI_ACPI_OEM_TABLE_ID,
+ 0x02,
+ EFI_ACPI_CREATOR_ID,
+ EFI_ACPI_CREATOR_REVISION
+ },
+ 0x9D, //BootErrorRegionLen
+ 0xFFFF0008 //BootErrorRegion
+
+};
+
+
+VOID*
+ReferenceAcpiTable (
+ VOID
+ )
+{
+ //
+ // Reference the table being generated to prevent the optimizer from removing the
+ // data structure from the exeutable
+ //
+ return (VOID*)&Bert;
+}
diff --git a/ArmPkg/Drivers/AcpiTables/rtsm_ve-aemv8a/Dsdt.asl b/ArmPkg/Drivers/AcpiTables/rtsm_ve-aemv8a/Dsdt.asl
new file mode 100644
index 0000000..c4185fe
--- /dev/null
+++ b/ArmPkg/Drivers/AcpiTables/rtsm_ve-aemv8a/Dsdt.asl
@@ -0,0 +1,255 @@
+/*
+ * Copyright (c) 2013, Al Stone <al.stone@linaro.org>
+ *
+ * [DSDT] Description of the armv8 VE Model
+ *
+ * This source is released under the terms of the GPLv2.
+ */
+
+DefinitionBlock (
+ "dsdt.aml", // output filename
+ "DSDT", // table signature
+ 2, // DSDT compliance revision
+ "LINARO", // OEM ID
+ "RTSMVEV8", // table ID
+ 0x00000003) // OEM revision
+{
+ Scope (\_SB)
+ {
+ Method (_OSC, 4, NotSerialized)
+ {
+ /* Platform-Wide OSPM Capabilities */
+ If(LEqual(Arg0,ToUUID("0811B06E-4A27-44F9-8D60-3CBBC22E7B48")))
+ {
+ /* APEI support unconditionally */
+ Return (Arg3)
+ } Else {
+ CreateDWordField (Arg3, Zero, CDW1)
+ /* Set invalid UUID error bit */
+ Or (CDW1, 0x04, CDW1)
+ Return (Arg3)
+ }
+ }
+
+ Device (HED)
+ {
+ Name (_HID, EisaId ("PNP0C33"))
+ Name (_UID, 0x00)
+ }
+
+ Device (SCK0)
+ {
+ Name (_HID, "ACPI0004")
+ Name (_UID, 0x00)
+ Method (_STA, 0, NotSerialized)
+ {
+ Return (0x0F)
+ }
+
+ Device (PRC0)
+ {
+ Name (_HID, "ACPI0007")
+ Name (_UID, 0x00)
+
+ /* CPU0 will be always present */
+ Method (_STA, 0, NotSerialized)
+ {
+ Return (0x0F)
+ }
+
+ Name (MAT0, Buffer (0x28)
+ {
+ /* 0000 */ 0x0B, 0x28, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* type, len, reserved, gic_id */
+ /* 0008 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, /* uid, flags */
+ /* 0010 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* parking_version, performance_interrupt */
+ /* 0018 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* parked_address */
+ /* 0020 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 /* base_address */
+ })
+
+ Name (MAT1, Buffer (0x28)
+ {
+ /* 0000 */ 0x0B, 0x28, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ /* 0008 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ /* 0010 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ /* 0018 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ /* 0020 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
+ })
+
+ Method (_MAT, 0, NotSerialized)
+ {
+ If (_STA())
+ {
+ Return (MAT0)
+ }
+ Else
+ {
+ Return (MAT1)
+ }
+ }
+ }
+
+ Device (PRC1)
+ {
+ Name (_HID, "ACPI0007")
+ Name (_UID, 0x01)
+
+ Name (STA1, 0x0F)
+ Method (_STA, 0, NotSerialized)
+ {
+ Return (STA1)
+ }
+
+ Method (_EJ0, 1, NotSerialized)
+ {
+ If (LEqual (STA1, 0x0F))
+ {
+ Store (0x00, STA1)
+ }
+ }
+
+ Name (MAT0, Buffer (0x28)
+ {
+ /* 0000 */ 0x0B, 0x28, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
+ /* 0008 */ 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01,
+ /* 0010 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ /* 0018 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ /* 0020 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
+ })
+
+ Name (MAT1, Buffer (0x28)
+ {
+ /* 0000 */ 0x0B, 0x28, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
+ /* 0008 */ 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00,
+ /* 0010 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ /* 0018 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ /* 0020 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
+ })
+
+ Method (_MAT, 0, NotSerialized)
+ {
+ If (_STA())
+ {
+ Return (MAT0)
+ }
+ Else
+ {
+ Return (MAT1)
+ }
+ }
+ }
+
+ Device (PRC2)
+ {
+ Name (_HID, "ACPI0007")
+ Name (_UID, 0x02)
+
+ Name (STA2, 0x0F)
+ Method (_STA, 0, NotSerialized)
+ {
+ Return (STA2)
+ }
+
+ Method (_EJ0, 1, NotSerialized)
+ {
+ If (LEqual (STA2, 0x0F))
+ {
+ Store (0x00, STA2)
+ }
+ }
+
+ Name (MAT0, Buffer (0x28)
+ {
+ /* 0000 */ 0x0B, 0x28, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02,
+ /* 0008 */ 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01,
+ /* 0010 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ /* 0018 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ /* 0020 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
+ })
+
+ Name (MAT1, Buffer (0x28)
+ {
+ /* 0000 */ 0x0B, 0x28, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02,
+ /* 0008 */ 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00,
+ /* 0010 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ /* 0018 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ /* 0020 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
+ })
+
+ Method (_MAT, 0, NotSerialized)
+ {
+ If (_STA())
+ {
+ Return (MAT0)
+ }
+ Else
+ {
+ Return (MAT1)
+ }
+ }
+ }
+
+ Device (PRC3)
+ {
+ Name (_HID, "ACPI0007")
+ Name (_UID, 0x03)
+
+ Name (STA3, 0x0F)
+ Method (_STA, 0, NotSerialized)
+ {
+ Return (STA3)
+ }
+
+ Method (_EJ0, 1, NotSerialized)
+ {
+ If (LEqual (STA3, 0x0F))
+ {
+ Store (0x00, STA3)
+ }
+ }
+
+ Name (MAT0, Buffer (0x28)
+ {
+ /* 0000 */ 0x0B, 0x28, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03,
+ /* 0008 */ 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01,
+ /* 0010 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ /* 0018 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ /* 0020 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
+ })
+
+ Name (MAT1, Buffer (0x28)
+ {
+ /* 0000 */ 0x0B, 0x28, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03,
+ /* 0008 */ 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00,
+ /* 0010 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ /* 0018 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ /* 0020 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
+ })
+
+ Method (_MAT, 0, NotSerialized)
+ {
+ If (_STA())
+ {
+ Return (MAT0)
+ }
+ Else
+ {
+ Return (MAT1)
+ }
+ }
+ }
+ }
+
+ Device (NET0) {
+ Name (_HID, "LINA0003")
+ Name (_UID, 0)
+
+ Method (_CRS, 0x0, Serialized) {
+ Name (RBUF, ResourceTemplate () {
+ Memory32Fixed (ReadWrite, 0x1a000000, 0x00010000)
+ Interrupt (ResourceConsumer, Edge, ActiveBoth, Exclusive, , , ) {0x2F}
+ })
+ Return (RBUF)
+ }
+ }
+ }
+}
diff --git a/ArmPkg/Drivers/AcpiTables/rtsm_ve-aemv8a/Ecdt.aslc b/ArmPkg/Drivers/AcpiTables/rtsm_ve-aemv8a/Ecdt.aslc
new file mode 100644
index 0000000..d817d59
--- /dev/null
+++ b/ArmPkg/Drivers/AcpiTables/rtsm_ve-aemv8a/Ecdt.aslc
@@ -0,0 +1,70 @@
+/*
+ * Copyright (c) 2013 Linaro Limited
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the BSD License which accompanies
+ * this distribution, and is available at
+ * http://opensource.org/licenses/bsd-license.php
+ *
+ * Contributors:
+ * Yi Li - yi.li@linaro.org
+*/
+
+#include <IndustryStandard/Acpi.h>
+#include <Platform.h>
+
+typedef struct
+{
+ EFI_ACPI_5_0_EMBEDDED_CONTROLLER_BOOT_RESOURCES_TABLE table;
+ UINT8 ucNamepath;
+}EFI_ACPI_5_0_EMBEDDED_CONTROLLER_BOOT_RESOURCES_TABLE_EX;
+
+
+EFI_ACPI_5_0_EMBEDDED_CONTROLLER_BOOT_RESOURCES_TABLE_EX Ecdt= {
+ {
+ {
+ EFI_ACPI_5_0_EMBEDDED_CONTROLLER_BOOT_RESOURCES_TABLE_SIGNATURE,
+ sizeof (EFI_ACPI_5_0_EMBEDDED_CONTROLLER_BOOT_RESOURCES_TABLE_EX),
+ EFI_ACPI_5_0_EMBEDDED_CONTROLLER_BOOT_RESOURCES_TABLE_REVISION,
+ 0x00, // Checksum will be updated at runtime
+ {EFI_ACPI_OEM_ID},
+ EFI_ACPI_OEM_TABLE_ID,
+ EFI_ACPI_OEM_REVISION,
+ EFI_ACPI_CREATOR_ID,
+ EFI_ACPI_CREATOR_REVISION
+ },
+ /*Command/Status Register Generic Address Structure*/
+ {
+ 0x01, //Space ID:SystemIO
+ 0x08, //Bit Width
+ 0x00, //Bit Offset
+ 0x00, //Encoded Access Width
+ 0x0000000000000066, //Address
+ },
+ /*Data Register Generic Address Structure*/
+ {
+ 0x01, //Space ID:SystemIO
+ 0x08, //Bit Width
+ 0x00, //Bit Offset
+ 0x00, //Encoded Access Width
+ 0x0000000000000062, //Address
+ },
+ 0x00000000, //UID
+ 0x9, //GPE Number
+ },
+ 0x0 //Namepath
+};
+
+
+VOID*
+ReferenceAcpiTable (
+ VOID
+ )
+{
+ //
+ // Reference the table being generated to prevent the optimizer from removing the
+ // data structure from the exeutable
+ //
+ return (VOID*)&Ecdt;
+}
+
diff --git a/ArmPkg/Drivers/AcpiTables/rtsm_ve-aemv8a/Einj.aslc b/ArmPkg/Drivers/AcpiTables/rtsm_ve-aemv8a/Einj.aslc
new file mode 100644
index 0000000..7392cc2
--- /dev/null
+++ b/ArmPkg/Drivers/AcpiTables/rtsm_ve-aemv8a/Einj.aslc
@@ -0,0 +1,202 @@
+/*
+ * Copyright (c) 2013 Linaro Limited
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the BSD License which accompanies
+ * this distribution, and is available at
+ * http://opensource.org/licenses/bsd-license.php
+ *
+ * Contributors:
+ * Yi Li - yi.li@linaro.org
+*/
+
+#include <IndustryStandard/Acpi.h>
+#include <Platform.h>
+
+#pragma pack (1)
+typedef struct {
+ UINT8 Operation;
+ UINT8 Instruction;
+ UINT8 Flags;
+ UINT8 Reserved8;
+ EFI_ACPI_5_0_GENERIC_ADDRESS_STRUCTURE Register;
+ UINT64 Value;
+ UINT64 Mask;
+} EFI_ACPI_WHEA_SERIALIZATION_ACTION;
+
+typedef struct {
+ EFI_ACPI_DESCRIPTION_HEADER Header;
+ UINT32 InjectionHeaderSize;
+ UINT32 Resv1;
+ UINT32 InstructionEntryCount;
+} EFI_ACPI_WHEA_ERROR_INJECTION_HEADER;
+
+typedef struct {
+ EFI_ACPI_WHEA_ERROR_INJECTION_HEADER header;
+ EFI_ACPI_WHEA_SERIALIZATION_ACTION InstructionEntry[8];
+} EFI_ACPI_5_0_ERROR_INJECTION_TABLE;
+
+#pragma pack ()
+
+
+EFI_ACPI_5_0_ERROR_INJECTION_TABLE Einj = {
+ {
+ {
+ EFI_ACPI_5_0_ERROR_INJECTION_TABLE_SIGNATURE,
+ sizeof (EFI_ACPI_5_0_ERROR_INJECTION_TABLE),
+ EFI_ACPI_5_0_ERROR_INJECTION_TABLE_REVISION,
+ 0x00, // Checksum will be updated at runtime
+ {EFI_ACPI_OEM_ID},
+ EFI_ACPI_OEM_TABLE_ID,
+ 0x00000002,
+ EFI_ACPI_CREATOR_ID,
+ EFI_ACPI_CREATOR_REVISION
+ },
+ sizeof(EFI_ACPI_WHEA_ERROR_INJECTION_HEADER),
+ EFI_ACPI_RESERVED_DWORD,
+ 0x08, /*Injection Entry Count*/
+ },
+
+ {
+ { //Action0
+ 0x00, // Action:Begin Operation
+ 0x0, // Instruction:Read Register
+ 0x0, // Flags
+ 0x00, // Reserved
+ /*Register Region*/
+ {
+ EFI_ACPI_3_0_SYSTEM_MEMORY, //Space ID
+ 0x40, //Bit Width
+ 0x0, //Bit Offset
+ 0x4, //Encoded Access Width
+ 0x0000000000000000, //Address
+ },
+ 0x0000000000000000, // Value for InjectError()
+ 0xFFFFFFFFFFFFFFFF // Mask is only valid for 32-bits
+ },
+ { //Action1
+ 0x01, // Action:Get Trigger Table
+ 0x0, // Instruction:Read Register
+ 0x0, // Flags
+ 0x00, // Reserved
+ /*Register Region*/
+ {
+ EFI_ACPI_3_0_SYSTEM_MEMORY, //Space ID
+ 0x40, //Bit Width
+ 0x0, //Bit Offset
+ 0x4, //Encoded Access Width
+ 0x0000000000000000, //Address
+ },
+ 0x0000000000000000, // Value for InjectError()
+ 0xFFFFFFFFFFFFFFFF // Mask is only valid for 32-bits
+ },
+ { //Action2
+ 0x02, // Action:Set Error Type
+ 0x2, // Instruction:Write Register
+ 0x1, // Flags
+ 0x00, // Reserved
+ /*Register Region*/
+ {
+ EFI_ACPI_3_0_SYSTEM_MEMORY, //Space ID
+ 0x40, //Bit Width
+ 0x0, //Bit Offset
+ 0x4, //Encoded Access Width
+ 0x0000000000000000, //Address
+ },
+ 0x0000000000000000, // Value for InjectError()
+ 0xFFFFFFFFFFFFFFFF // Mask is only valid for 32-bits
+ },
+ { //Action3
+ 0x03, // Action:Get Error Type
+ 0x0, // Instruction:Read Register
+ 0x0, // Flags
+ 0x00, // Reserved
+ /*Register Region*/
+ {
+ EFI_ACPI_3_0_SYSTEM_MEMORY, //Space ID
+ 0x40, //Bit Width
+ 0x0, //Bit Offset
+ 0x4, //Encoded Access Width
+ 0x0000000000000000, //Address
+ },
+ 0x0000000000000000, // Value for InjectError()
+ 0xFFFFFFFFFFFFFFFF // Mask is only valid for 32-bits
+ },
+ { //Action4
+ 0x04, // Action:End Operation
+ 0x3, // Instruction:Write Register
+ 0x1, // Flags
+ 0x00, // Reserved
+ /*Register Region*/
+ {
+ EFI_ACPI_3_0_SYSTEM_MEMORY, //Space ID
+ 0x40, //Bit Width
+ 0x0, //Bit Offset
+ 0x4, //Encoded Access Width
+ 0x0000000000000000, //Address
+ },
+ 0x0000000000000000, // Value for InjectError()
+ 0xFFFFFFFFFFFFFFFF // Mask is only valid for 32-bits
+ },
+ { //Action5
+ 0x05, // Action:Execute Operation
+ 0x3, // Instruction:Write Register
+ 0x1, // Flags
+ 0x00, // Reserved
+ /*Register Region*/
+ {
+ EFI_ACPI_3_0_SYSTEM_IO, //Space ID
+ 0x10, //Bit Width
+ 0x0, //Bit Offset
+ 0x2, //Encoded Access Width
+ 0x0000000000000000, //Address
+ },
+ 0x0000000000000000, // Value for InjectError()
+ 0xFFFFFFFFFFFFFFFF // Mask is only valid for 32-bits
+ },
+ { //Action6
+ 0x06, // Action:Check Busy Status
+ 0x1, // Instruction:Read Register
+ 0x0, // Flags
+ 0x00, // Reserved
+ /*Register Region*/
+ {
+ EFI_ACPI_3_0_SYSTEM_MEMORY, //Space ID
+ 0x40, //Bit Width
+ 0x0, //Bit Offset
+ 0x4, //Encoded Access Width
+ 0x0000000000000000, //Address
+ },
+ 0x0000000000000000, // Value for InjectError()
+ 0xFFFFFFFFFFFFFFFF // Mask is only valid for 32-bits
+ },
+ { //Action7
+ 0x07, // Action:Get Command Status
+ 0x0, // Instruction:Read Register
+ 0x1, // Flags
+ 0x00, // Reserved
+ /*Register Region*/
+ {
+ EFI_ACPI_3_0_SYSTEM_MEMORY, //Space ID
+ 0x40, //Bit Width
+ 0x0, //Bit Offset
+ 0x4, //Encoded Access Width
+ 0x0000000000000000, //Address
+ },
+ 0x0000000000000000, // Value for InjectError()
+ 0xFFFFFFFFFFFFFFFF // Mask is only valid for 32-bits
+ },
+ },
+};
+
+VOID*
+ReferenceAcpiTable (
+ VOID
+ )
+{
+ //
+ // Reference the table being generated to prevent the optimizer from removing the
+ // data structure from the exeutable
+ //
+ return (VOID*)&Einj;
+}
diff --git a/ArmPkg/Drivers/AcpiTables/rtsm_ve-aemv8a/Erst.aslc b/ArmPkg/Drivers/AcpiTables/rtsm_ve-aemv8a/Erst.aslc
new file mode 100644
index 0000000..0170b99
--- /dev/null
+++ b/ArmPkg/Drivers/AcpiTables/rtsm_ve-aemv8a/Erst.aslc
@@ -0,0 +1,319 @@
+/*
+ * Copyright (c) 2013 Linaro Limited
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the BSD License which accompanies
+ * this distribution, and is available at
+ * http://opensource.org/licenses/bsd-license.php
+ *
+ * Contributors:
+ * Yi Li - yi.li@linaro.org
+*/
+
+#include <IndustryStandard/Acpi.h>
+#include <Platform.h>
+
+#define ACTION_BEGIN_WRITE_OPERATION 0x00
+#define ACTION_BEGIN_READ_OPERATION 0x01
+#define ACTION_BEGIN_CLEAR_OPERATION 0x02
+#define ACTION_END_OPERATION 0x03
+#define ACTION_SET_RECORD_OFFSET 0x04
+#define ACTION_EXECUTE_OPEARTION 0x05
+#define ACTION_CHECK_BUSY_STATUS 0x06
+#define ACTION_GET_COMMAND_STATUS 0x07
+#define ACTION_GET_RECORD_IDENTIFIER 0x08
+#define ACTION_SET_RECORD_IDENTIFIER 0x09
+#define ACTION_GET_RECORD_COUNT 0x0A
+#define ACTION_BEGIN_DUMMY_WRITE_OPERATION 0x0B
+#define ACTION_GET_NEXT_RECORD_IDENTIFIER 0x0C
+#define ACTION_GET_ERROR_LOG_ADDRESS_RANGE 0x0D
+#define ACTION_GET_ERROR_LOG_ADDRESS_RANGE_LENGTH 0x0E
+#define ACTION_GET_ERROR_LOG_ADDRESS_RANGE_ATTRIBUTES 0x0F
+
+
+#pragma pack (1)
+
+typedef struct {
+ UINT8 Operation;
+ UINT8 Instruction;
+ UINT8 Flags;
+ UINT8 Reserved8;
+ EFI_ACPI_5_0_GENERIC_ADDRESS_STRUCTURE Register;
+ UINT64 Value;
+ UINT64 Mask;
+} EFI_ACPI_5_0_SERIALIZATION_ACTION;
+
+
+typedef struct {
+ EFI_ACPI_DESCRIPTION_HEADER Header;
+ UINT32 SerializationHeaderSize;
+ UINT32 Resv1;
+ UINT32 InstructionEntryCount;
+ EFI_ACPI_5_0_SERIALIZATION_ACTION InstructionEntry[16];
+} EFI_ACPI_5_0_BOOT_ERROR_RECORD_SERIALIZATION_TABLE;
+
+typedef struct {
+ EFI_ACPI_DESCRIPTION_HEADER Header;
+ UINT32 SerializationHeaderSize;
+ UINT32 Resv1;
+ UINT32 InstructionEntryCount;
+} EFI_ACPI_5_0_SERIALIZATION_ACTION_HEADER;
+#pragma pack ()
+
+
+
+EFI_ACPI_5_0_BOOT_ERROR_RECORD_SERIALIZATION_TABLE Erst = {
+ {
+ EFI_ACPI_5_0_ERROR_RECORD_SERIALIZATION_TABLE_SIGNATURE,
+ sizeof (EFI_ACPI_5_0_BOOT_ERROR_RECORD_SERIALIZATION_TABLE),
+ EFI_ACPI_5_0_ERROR_RECORD_SERIALIZATION_TABLE_REVISION,
+ 0x00, // Checksum will be updated at runtime
+ {EFI_ACPI_OEM_ID},
+ EFI_ACPI_OEM_TABLE_ID,
+ 0x00000002,
+ EFI_ACPI_CREATOR_ID,
+ EFI_ACPI_CREATOR_REVISION
+ },
+ sizeof(EFI_ACPI_5_0_SERIALIZATION_ACTION_HEADER),
+ EFI_ACPI_RESERVED_DWORD,
+ 0x10,
+ {
+ { //Action0
+ 0x00, // Action:Begin Operation
+ 0x3, // Instruction:Write Register
+ 0x0, // Flags
+ 0x00, // Reserved
+ /*Register Region*/
+ EFI_ACPI_3_0_SYSTEM_MEMORY, //Space ID
+ 0x40, //Bit Width
+ 0x0, //Bit Offset
+ 0x4, //Encoded Access Width
+ 0xFFFF0100, //Address
+ 0x0000000000000000, // Value for InjectError()
+ 0xFFFFFFFFFFFFFFFF // Mask is only valid for 32-bits
+ },
+ { //Action1
+ 0x01, // Action:Begin Read Operation
+ 0x3, // Instruction:Write Register
+ 0x0, // Flags
+ 0x00, // Reserved
+ /*Register Region*/
+ EFI_ACPI_3_0_SYSTEM_MEMORY, //Space ID
+ 0x40, //Bit Width
+ 0x0, //Bit Offset
+ 0x4, //Encoded Access Width
+ 0xFFFF0108, //Address
+ 0x0000000000000000, // Value for InjectError()
+ 0xFFFFFFFFFFFFFFFF // Mask is only valid for 32-bits
+ },
+ { //Action2
+ 0x02, // Action:Begin Clear Operation
+ 0x3, // Instruction:Write Register
+ 0x0, // Flags
+ 0x00, // Reserved
+ /*Register Region*/
+ EFI_ACPI_3_0_SYSTEM_MEMORY, //Space ID
+ 0x40, //Bit Width
+ 0x0, //Bit Offset
+ 0x4, //Encoded Access Width
+ 0xFFFF0110, //Address
+ 0x0000000000000000, // Value for InjectError()
+ 0xFFFFFFFFFFFFFFFF // Mask is only valid for 32-bits
+ },
+ { //Action3
+ 0x03, // Action:Begin Clear Operation
+ 0x4, // Instruction:Noop
+ 0x1, // Flags
+ 0x00, // Reserved
+ /*Register Region*/
+ EFI_ACPI_3_0_SYSTEM_MEMORY, //Space ID
+ 0x40, //Bit Width
+ 0x0, //Bit Offset
+ 0x4, //Encoded Access Width
+ 0xFFFF0118, //Address
+ 0x0000000000000000, // Value for InjectError()
+ 0xFFFFFFFFFFFFFFFF // Mask is only valid for 32-bits
+ },
+ { //Action4
+ 0x04, // Action:Begin Clear Operation
+ 0x2, // Instruction:Write Register
+ 0x0, // Flags
+ 0x00, // Reserved
+ /*Register Region*/
+ EFI_ACPI_3_0_SYSTEM_MEMORY, //Space ID
+ 0x40, //Bit Width
+ 0x0, //Bit Offset
+ 0x4, //Encoded Access Width
+ 0xFFFF0120, //Address
+ 0x0000000000000000, // Value for InjectError()
+ 0xFFFFFFFFFFFFFFFF // Mask is only valid for 32-bits
+ },
+ { //Action5
+ 0x05, // Action:Execute Operation
+ 0x3, // Instruction:Write Register
+ 0x0, // Flags
+ 0x00, // Reserved
+ /*Register Region*/
+ EFI_ACPI_5_0_SYSTEM_MEMORY, //Space ID
+ 0x8, //Bit Width
+ 0x0, //Bit Offset
+ 0x1, //Encoded Access Width
+ 0xFFFF0128, //Address
+ 0x0000000000000000, // Value for InjectError()
+ 0xFFFFFFFFFFFFFFFF // Mask is only valid for 32-bits
+ },
+ { //Action6
+ 0x06, // Action:Check Busy Status
+ 0x1, // Instruction:Read Register
+ 0x0, // Flags
+ 0x00, // Reserved
+ /*Register Region*/
+ EFI_ACPI_3_0_SYSTEM_MEMORY, //Space ID
+ 0x40, //Bit Width
+ 0x0, //Bit Offset
+ 0x4, //Encoded Access Width
+ 0xFFFF0130, //Address
+ 0x0000000000000000, // Value for InjectError()
+ 0xFFFFFFFFFFFFFFFF // Mask is only valid for 32-bits
+ },
+ { //Action7
+ 0x07, // Action:Get Command Status
+ 0x0, // Instruction:Read Register
+ 0x0, // Flags
+ 0x00, // Reserved
+ /*Register Region*/
+ EFI_ACPI_3_0_SYSTEM_MEMORY, //Space ID
+ 0x40, //Bit Width
+ 0x0, //Bit Offset
+ 0x4, //Encoded Access Width
+ 0xFFFF0138, //Address
+ 0x0000000000000000, // Value for InjectError()
+ 0xFFFFFFFFFFFFFFFF // Mask is only valid for 32-bits
+ },
+ { //Action8
+ 0x08, // Action:Get Command Status
+ 0x0, // Instruction:Read Register
+ 0x0, // Flags
+ 0x00, // Reserved
+ /*Register Region*/
+ EFI_ACPI_3_0_SYSTEM_MEMORY, //Space ID
+ 0x40, //Bit Width
+ 0x0, //Bit Offset
+ 0x4, //Encoded Access Width
+ 0xFFFF0140, //Address
+ 0x0000000000000000, // Value for InjectError()
+ 0xFFFFFFFFFFFFFFFF // Mask is only valid for 32-bits
+ },
+ { //Action9
+ 0x09, // Action:Set Record Identifier
+ 0x2, // Instruction:Write Register
+ 0x0, // Flags
+ 0x00, // Reserved
+ /*Register Region*/
+ EFI_ACPI_3_0_SYSTEM_MEMORY, //Space ID
+ 0x40, //Bit Width
+ 0x0, //Bit Offset
+ 0x4, //Encoded Access Width
+ 0xFFFF0148, //Address
+ 0x0000000000000000, // Value for InjectError()
+ 0xFFFFFFFFFFFFFFFF // Mask is only valid for 32-bits
+ },
+ { //Action10
+ 0x0A, // Action:Get Record Count
+ 0x0, // Instruction:Read Register
+ 0x0, // Flags
+ 0x00, // Reserved
+ /*Register Region*/
+ EFI_ACPI_3_0_SYSTEM_MEMORY, //Space ID
+ 0x40, //Bit Width
+ 0x0, //Bit Offset
+ 0x4, //Encoded Access Width
+ 0xFFFF0150, //Address
+ 0x0000000000000000, // Value for InjectError()
+ 0xFFFFFFFFFFFFFFFF // Mask is only valid for 32-bits
+ },
+ { //Action11
+ 0x0B, // Action:Begin Dummy Write
+ 0x3, // Instruction:Write Register
+ 0x0, // Flags
+ 0x00, // Reserved
+ /*Register Region*/
+ EFI_ACPI_3_0_SYSTEM_MEMORY, //Space ID
+ 0x40, //Bit Width
+ 0x0, //Bit Offset
+ 0x4, //Encoded Access Width
+ 0xFFFF0158, //Address
+ 0x0000000000000000, // Value for InjectError()
+ 0xFFFFFFFFFFFFFFFF // Mask is only valid for 32-bits
+ },
+ { //Action12
+ 0x0C, // Action:Unused/Unknown Action
+ 0x0, // Instruction:Read Register
+ 0x0, // Flags
+ 0x00, // Reserved
+ /*Register Region*/
+ EFI_ACPI_3_0_SYSTEM_MEMORY, //Space ID
+ 0x40, //Bit Width
+ 0x0, //Bit Offset
+ 0x4, //Encoded Access Width
+ 0xFFFF0160, //Address
+ 0x0000000000000000, // Value for InjectError()
+ 0xFFFFFFFFFFFFFFFF // Mask is only valid for 32-bits
+ },
+ { //Action13
+ 0x0D, // Action:Get Error Address Range
+ 0x0, // Instruction:Read Register
+ 0x0, // Flags
+ 0x00, // Reserved
+ /*Register Region*/
+ EFI_ACPI_3_0_SYSTEM_MEMORY, //Space ID
+ 0x40, //Bit Width
+ 0x0, //Bit Offset
+ 0x4, //Encoded Access Width
+ 0xFFFF0168, //Address
+ 0x0000000000000000, // Value for InjectError()
+ 0xFFFFFFFFFFFFFFFF // Mask is only valid for 32-bits
+ },
+ { //Action14
+ 0x0E, // Action:Get Error Address Length
+ 0x0, // Instruction:Read Register
+ 0x0, // Flags
+ 0x00, // Reserved
+ /*Register Region*/
+ EFI_ACPI_3_0_SYSTEM_MEMORY, //Space ID
+ 0x40, //Bit Width
+ 0x0, //Bit Offset
+ 0x4, //Encoded Access Width
+ 0xFFFF0170, //Address
+ 0x0000000000000000, // Value for InjectError()
+ 0xFFFFFFFFFFFFFFFF // Mask is only valid for 32-bits
+ },
+ { //Action15
+ 0x0F, // Action:Get Error Attributes
+ 0x0, // Instruction:Read Register
+ 0x0, // Flags
+ 0x00, // Reserved
+ /*Register Region*/
+ EFI_ACPI_3_0_SYSTEM_MEMORY, //Space ID
+ 0x40, //Bit Width
+ 0x0, //Bit Offset
+ 0x4, //Encoded Access Width
+ 0xFFFF0178, //Address
+ 0x0000000000000000, // Value for InjectError()
+ 0xFFFFFFFFFFFFFFFF // Mask is only valid for 32-bits
+ },
+ }
+
+};
+
+VOID*
+ReferenceAcpiTable (
+ VOID
+ )
+{
+ //
+ // Reference the table being generated to prevent the optimizer from removing the
+ // data structure from the exeutable
+ //
+ return (VOID*)&Erst;
+}
diff --git a/ArmPkg/Drivers/AcpiTables/rtsm_ve-aemv8a/Facp.aslc b/ArmPkg/Drivers/AcpiTables/rtsm_ve-aemv8a/Facp.aslc
new file mode 100644
index 0000000..729c5bc
--- /dev/null
+++ b/ArmPkg/Drivers/AcpiTables/rtsm_ve-aemv8a/Facp.aslc
@@ -0,0 +1,175 @@
+/** @file
+ FACP Table
+
+ Copyright (c) 2008 - 2012, Intel Corporation. All rights reserved.<BR>
+ 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.
+
+**/
+/*
+ * Copyright (c) 2013 Linaro Limited
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the BSD License which accompanies
+ * this distribution, and is available at
+ * http://opensource.org/licenses/bsd-license.php
+ *
+ * Contributors:
+ * Yi Li - yi.li@linaro.org
+*/
+
+#include "Platform.h"
+
+EFI_ACPI_5_0_FIXED_ACPI_DESCRIPTION_TABLE Facp = {
+ {
+ EFI_ACPI_5_0_FIXED_ACPI_DESCRIPTION_TABLE_SIGNATURE,
+ sizeof (EFI_ACPI_5_0_FIXED_ACPI_DESCRIPTION_TABLE),
+ EFI_ACPI_5_0_FIXED_ACPI_DESCRIPTION_TABLE_REVISION,
+ 0, // to make sum of entire table == 0
+ {EFI_ACPI_OEM_ID}, // OEMID is a 6 bytes long field
+ EFI_ACPI_OEM_TABLE_ID, // OEM table identification(8 bytes long)
+ 0x00, // OEM revision number
+ EFI_ACPI_CREATOR_ID, // ASL compiler vendor ID
+ EFI_ACPI_CREATOR_REVISION // ASL compiler revision number
+ },
+ 0, // Physical addesss of FACS
+ 0x00000010, // Physical address of DSDT
+ 0x0, // System Interrupt Model
+ 0x4, // PM Profile
+ SCI_INT_VECTOR, // System vector of SCI interrupt
+ SMI_CMD_IO_PORT, // Port address of SMI command port
+ ACPI_ENABLE, // value to write to port smi_cmd to enable ACPI
+ ACPI_DISABLE, // value to write to port smi_cmd to disable ACPI
+ S4BIOS_REQ, // Value to write to SMI CMD port to enter the S4BIOS state
+ 0, // PState control
+ PM1a_EVT_BLK, // Port address of Power Mgt 1a Event Reg Blk
+ PM1b_EVT_BLK, // Port address of Power Mgt 1b Event Reg Blk
+ PM1a_CNT_BLK, // Port address of Power Mgt 1a Ctrl Reg Blk
+ PM1b_CNT_BLK, // Port address of Power Mgt 1b Ctrl Reg Blk
+ PM2_CNT_BLK, // Port address of Power Mgt 2 Ctrl Reg Blk
+ PM_TMR_BLK, // Port address of Power Mgt Timer Ctrl Reg Blk
+ GPE0_BLK, // Port addr of General Purpose Event 0 Reg Blk
+ GPE1_BLK, // Port addr of General Purpose Event 1 Reg Blk
+ PM1_EVT_LEN, // Byte Length of ports at pm1X_evt_blk
+ PM1_CNT_LEN, // Byte Length of ports at pm1X_cnt_blk
+ PM2_CNT_LEN, // Byte Length of ports at pm2_cnt_blk
+ PM_TM_LEN, // Byte Length of ports at pm_tm_blk
+ GPE0_BLK_LEN, // Byte Length of ports at gpe0_blk
+ GPE1_BLK_LEN, // Byte Length of ports at gpe1_blk
+ GPE1_BASE, // offset in gpe model where gpe1 events start
+ 0, // _CST support
+ P_LVL2_LAT, // worst case HW latency to enter/exit C2 state
+ P_LVL3_LAT, // worst case HW latency to enter/exit C3 state
+ FLUSH_SIZE, // Size of area read to flush caches
+ FLUSH_STRIDE, // Stride used in flushing caches
+ DUTY_OFFSET, // bit location of duty cycle field in p_cnt reg
+ DUTY_WIDTH, // bit width of duty cycle field in p_cnt reg
+ DAY_ALRM, // index to day-of-month alarm in RTC CMOS RAM
+ MON_ALRM, // index to month-of-year alarm in RTC CMOS RAM
+ CENTURY, // index to century in RTC CMOS RAM
+ 0x0000, // Boot architecture flag
+ 0x00, // reserved
+ FLAG,
+
+ {
+ 0x01, //Space ID
+ 0x8, //Bit Width
+ 0x0, //Bit Offset
+ 0x1, //Encoded Access Width
+ 0x0000000000000001,//Address
+ },
+
+ 0x0, //Value to cause reset
+ {0,0,0}, //Reserved
+ 0x0000000000000000,//FACS Address
+ 0x0000000000000010,//DSDT Address
+
+
+ /*PM1A Event Block*/
+ 0x1, //Space ID:SystemIO
+ 0x20, //Bit Width
+ 0x0, //Bit Offset
+ 0x2, //Encoded Access Width
+ 0x0000000000000001, //Address
+
+ /*PM1B Event Block*/
+ 0x1, //Space ID:SystemIO
+ 0x0, //Bit Width
+ 0x0, //Bit Offset
+ 0x0, //Encoded Access Width
+ 0x0000000000000000, //Address
+
+ /*PM1A Control Block*/
+ 0x1, //Space ID:SystemIO
+ 0x10, //Bit Width
+ 0x0, //Bit Offset
+ 0x02, //Encoded Access Width
+ 0000000000000001, //Address
+
+ /*PM1B Control Block*/
+ 0x1, //Space ID:SystemIO
+ 0x00, //Bit Width
+ 0x0, //Bit Offset
+ 0x0, //Encoded Access Width
+ 0x0000000000000000, //Address
+
+ /*PM2 Control Block*/
+ 0x1, //Space ID:SystemIO
+ 0x08, //Bit Width
+ 0x0, //Bit Offset
+ 0x0, //Encoded Access Width
+ 0x0000000000000001, //Address
+
+ /*PM Timer Block*/
+ 0x1, //Space ID:SystemIO
+ 0x20, //Bit Width
+ 0x0, //Bit Offset
+ 0x3, //Encoded Access Width
+ 0x0000000000000001, //Address
+
+ /*GPE0 Block*/
+ 0x1, //Space ID:SystemIO
+ 0x80, //Bit Width
+ 0x0, //Bit Offset
+ 0x1, //Encoded Access Width
+ 0x0000000000000001, //Address
+
+ /*GPE1 Block*/
+ 0x1, //Space ID:SystemIO
+ 0x00, //Bit Width
+ 0x0, //Bit Offset
+ 0x0, //Encoded Access Width
+ 0x0000000000000000, //Address
+
+ /*Sleep Control Register*/
+ 0x1, //Space ID:SystemIO
+ 0x08, //Bit Width
+ 0x0, //Bit Offset
+ 0x1, //Encoded Access Width
+ 0x0000000000000000, //Address
+
+ /*Sleep Status Register*/
+ 0x1, //Space ID:SystemIO
+ 0x08, //Bit Width
+ 0x0, //Bit Offset
+ 0x1, //Encoded Access Width
+ 0x0000000000000000, //Address
+
+};
+
+VOID*
+ReferenceAcpiTable (
+ VOID
+ )
+{
+ //
+ // Reference the table being generated to prevent the optimizer from removing the
+ // data structure from the exeutable
+ //
+ return (VOID*)&Facp;
+}
diff --git a/ArmPkg/Drivers/AcpiTables/rtsm_ve-aemv8a/Facs.aslc b/ArmPkg/Drivers/AcpiTables/rtsm_ve-aemv8a/Facs.aslc
new file mode 100644
index 0000000..9bcddea
--- /dev/null
+++ b/ArmPkg/Drivers/AcpiTables/rtsm_ve-aemv8a/Facs.aslc
@@ -0,0 +1,86 @@
+/** @file
+ FACS Table
+
+ Copyright (c) 2008 - 2012, Intel Corporation. All rights reserved.<BR>
+ 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.
+
+**/
+
+/*
+ * Copyright (c) 2013 Linaro Limited
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the BSD License which accompanies
+ * this distribution, and is available at
+ * http://opensource.org/licenses/bsd-license.php
+ *
+ * Contributors:
+ * Yi Li - yi.li@linaro.org
+*/
+
+#include <IndustryStandard/Acpi.h>
+
+EFI_ACPI_5_0_FIRMWARE_ACPI_CONTROL_STRUCTURE Facs = {
+ EFI_ACPI_5_0_FIRMWARE_ACPI_CONTROL_STRUCTURE_SIGNATURE,
+ sizeof (EFI_ACPI_5_0_FIRMWARE_ACPI_CONTROL_STRUCTURE),
+
+ //
+ // Hardware Signature will be updated at runtime
+ //
+ 0x00000000, //HardwareSignature
+ 0x00, //FirmwareWakingVector
+ 0x00, //GlobalLock
+ 0x00, //Flags
+ 0x0000000000000000, //XFirmwareWakingVector
+ 0x02, //Version
+ {
+ EFI_ACPI_RESERVED_BYTE,
+ EFI_ACPI_RESERVED_BYTE,
+ EFI_ACPI_RESERVED_BYTE
+ },
+ 0x00,
+ {
+ EFI_ACPI_RESERVED_BYTE,
+ EFI_ACPI_RESERVED_BYTE,
+ EFI_ACPI_RESERVED_BYTE,
+ EFI_ACPI_RESERVED_BYTE,
+ EFI_ACPI_RESERVED_BYTE,
+ EFI_ACPI_RESERVED_BYTE,
+ EFI_ACPI_RESERVED_BYTE,
+ EFI_ACPI_RESERVED_BYTE,
+ EFI_ACPI_RESERVED_BYTE,
+ EFI_ACPI_RESERVED_BYTE,
+ EFI_ACPI_RESERVED_BYTE,
+ EFI_ACPI_RESERVED_BYTE,
+ EFI_ACPI_RESERVED_BYTE,
+ EFI_ACPI_RESERVED_BYTE,
+ EFI_ACPI_RESERVED_BYTE,
+ EFI_ACPI_RESERVED_BYTE,
+ EFI_ACPI_RESERVED_BYTE,
+ EFI_ACPI_RESERVED_BYTE,
+ EFI_ACPI_RESERVED_BYTE,
+ EFI_ACPI_RESERVED_BYTE,
+ EFI_ACPI_RESERVED_BYTE,
+ EFI_ACPI_RESERVED_BYTE,
+ EFI_ACPI_RESERVED_BYTE,
+ EFI_ACPI_RESERVED_BYTE
+ }
+};
+
+VOID*
+ReferenceAcpiTable (
+ VOID
+ )
+{
+ //
+ // Reference the table being generated to prevent the optimizer from removing the
+ // data structure from the exeutable
+ //
+ return (VOID*)&Facs;
+}
diff --git a/ArmPkg/Drivers/AcpiTables/rtsm_ve-aemv8a/Gtdt.aslc b/ArmPkg/Drivers/AcpiTables/rtsm_ve-aemv8a/Gtdt.aslc
new file mode 100644
index 0000000..ab8a60a
--- /dev/null
+++ b/ArmPkg/Drivers/AcpiTables/rtsm_ve-aemv8a/Gtdt.aslc
@@ -0,0 +1,51 @@
+/*
+ * Copyright (c) 2013 Linaro Limited
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the BSD License which accompanies
+ * this distribution, and is available at
+ * http://opensource.org/licenses/bsd-license.php
+ *
+ * Contributors:
+ * Yi Li - yi.li@linaro.org
+*/
+
+#include <IndustryStandard/Acpi.h>
+#include <Platform.h>
+
+EFI_ACPI_5_0_GENERIC_TIMER_DESCRIPTION_TABLE Gtdt =
+{
+ {
+ EFI_ACPI_5_0_GENERIC_TIMER_DESCRIPTION_TABLE_SIGNATURE,
+ sizeof (EFI_ACPI_5_0_GENERIC_TIMER_DESCRIPTION_TABLE),
+ EFI_ACPI_5_0_GENERIC_TIMER_DESCRIPTION_TABLE_REVISION,
+ 0x00, // Checksum will be updated at runtime
+ {EFI_ACPI_OEM_ID},
+ EFI_ACPI_OEM_TABLE_ID,
+ EFI_ACPI_OEM_REVISION,
+ EFI_ACPI_CREATOR_ID,
+ EFI_ACPI_CREATOR_REVISION
+ },
+ 0x0000000000000000, //Timer Address
+ 0x00000001, //Flags
+ 0x00000000, //Secure PL1 Interrupt
+ 0x00000000, //SPL1 Flags
+ 0x00000000, //Non-Secure PL1 Interrupt
+ 0x00000000, //NSPL1 Flags
+ 0x00000000, //Virtual Timer Interrupt
+ 0x00000000, //VT Flags
+ 0x00000000, //Non-Secure PL2 Interrupt
+ 0x00000000, //NSPL2 Flags
+};
+
+VOID*
+ReferenceAcpiTable (
+ VOID
+ )
+{
+ //
+ // Reference the table being generated to prevent the optimizer from removing the
+ // data structure from the exeutable
+ //
+ return (VOID*)&Gtdt;
+}
diff --git a/ArmPkg/Drivers/AcpiTables/rtsm_ve-aemv8a/Hest.aslc b/ArmPkg/Drivers/AcpiTables/rtsm_ve-aemv8a/Hest.aslc
new file mode 100644
index 0000000..08092ac
--- /dev/null
+++ b/ArmPkg/Drivers/AcpiTables/rtsm_ve-aemv8a/Hest.aslc
@@ -0,0 +1,84 @@
+/*
+ * Copyright (c) 2013 Linaro Limited
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the BSD License which accompanies
+ * this distribution, and is available at
+ * http://opensource.org/licenses/bsd-license.php
+ *
+ * Contributors:
+ * Yi Li - yi.li@linaro.org
+*/
+
+#include <IndustryStandard/Acpi.h>
+#include <Platform.h>
+
+#pragma pack(1)
+
+typedef struct {
+ EFI_ACPI_DESCRIPTION_HEADER Header;
+ UINT32 ErrorEntryCount;
+ EFI_ACPI_5_0_GENERIC_HARDWARE_ERROR_SOURCE_STRUCTURE GenHardWareError;
+
+} EFI_ACPI_5_0_HARDWARE_ERROR_SOURCE_TABLE;
+
+#pragma pack()
+
+EFI_ACPI_5_0_HARDWARE_ERROR_SOURCE_TABLE Hest = {
+ {
+ EFI_ACPI_5_0_HARDWARE_ERROR_SOURCE_TABLE_SIGNATURE,
+ sizeof (EFI_ACPI_5_0_HARDWARE_ERROR_SOURCE_TABLE),
+ EFI_ACPI_5_0_HARDWARE_ERROR_SOURCE_TABLE_REVISION,
+ 0x00, // Checksum will be updated at runtime
+ {EFI_ACPI_OEM_ID},
+ EFI_ACPI_OEM_TABLE_ID,
+ 0x02,
+ EFI_ACPI_CREATOR_ID,
+ EFI_ACPI_CREATOR_REVISION
+ },
+ 0x00000001, //Error Source Count
+{
+ 0x0009, //Subtable Type:Generic Hardware Error Source
+ 0x0002, //Source Id
+ 0xFFFF, //Related Source Id
+ 0x00, //Reserved
+ 0x01, //Enabled
+ 0x00000001, //Records To Preallocate
+ 0x00000001, //Max Sections Per Record
+ 0x00001000, //Max Raw Data Length
+
+ /* Error Status Address : [Generic Address Structure]*/
+ {
+ 0x00, //Space ID:SystemMemory
+ 0x40, //Bit Width
+ 0x00, //Bit Offset
+ 0x04, //Encoded Access Width
+ 0xFFFF0000, //Address
+ },
+ /*Notify : [Hardware Error Notification Structure]*/
+ {
+ 0x03, //Notify Type:SCI
+ 0x1c, //Notify Length
+ 0x0000, //Configuration Write Enable
+ 0x00000000, //PollInterval
+ 0x00000000, //Vector
+ 0x00000000, //Polling Threshold Value
+ 0x00000000, //Polling Threshold Window
+ 0x00000000, //Error Threshold Value
+ 0x00000000, //Error Threshold Window
+ },
+ 0x00001000, //Error Status Block Length
+},
+};
+
+VOID*
+ReferenceAcpiTable (
+ VOID
+ )
+{
+ //
+ // Reference the table being generated to prevent the optimizer from removing the
+ // data structure from the exeutable
+ //
+ return (VOID*)&Hest;
+}
diff --git a/ArmPkg/Drivers/AcpiTables/rtsm_ve-aemv8a/Mcfg.aslc b/ArmPkg/Drivers/AcpiTables/rtsm_ve-aemv8a/Mcfg.aslc
new file mode 100644
index 0000000..9451e9c
--- /dev/null
+++ b/ArmPkg/Drivers/AcpiTables/rtsm_ve-aemv8a/Mcfg.aslc
@@ -0,0 +1,62 @@
+/*
+ * Copyright (c) 2013 Linaro Limited
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the BSD License which accompanies
+ * this distribution, and is available at
+ * http://opensource.org/licenses/bsd-license.php
+ *
+ * Contributors:
+ * Yi Li - yi.li@linaro.org
+*/
+
+#include <IndustryStandard/Acpi.h>
+#include <Platform.h>
+
+#define ACPI_5_0_MCFG_VERSION 0x1
+
+#pragma pack(1)
+typedef struct
+{
+ EFI_ACPI_DESCRIPTION_HEADER Header;
+ UINT64 Reserved1;
+ UINT64 ullBaseAddress;
+ UINT16 usSegGroupNum;
+ UINT8 ucStartBusNum;
+ UINT8 ucEndBusNum;
+ UINT32 Reserved2;
+}EFI_ACPI_5_0_PCI_EXPRESS_MEMORY_MAPPED_CONFIGURATION_SPACE_TABLE;
+#pragma pack()
+
+EFI_ACPI_5_0_PCI_EXPRESS_MEMORY_MAPPED_CONFIGURATION_SPACE_TABLE Mcfg=
+{
+ {
+ EFI_ACPI_5_0_PCI_EXPRESS_MEMORY_MAPPED_CONFIGURATION_SPACE_BASE_ADDRESS_DESCRIPTION_TABLE_SIGNATURE,
+ sizeof (EFI_ACPI_5_0_PCI_EXPRESS_MEMORY_MAPPED_CONFIGURATION_SPACE_TABLE),
+ ACPI_5_0_MCFG_VERSION,
+ 0x00, // Checksum will be updated at runtime
+ {EFI_ACPI_OEM_ID},
+ EFI_ACPI_OEM_TABLE_ID,
+ EFI_ACPI_OEM_REVISION,
+ EFI_ACPI_CREATOR_ID,
+ EFI_ACPI_CREATOR_REVISION
+ },
+ 0x0000000000000000, //Reserved
+ 0x0000000000000000, //Base Address
+ 0x0000, //Segment Group Number
+ 0x00, //Start Bus Number
+ 0x00, //End Bus Number
+ 0x00000000, //Reserved
+};
+
+VOID*
+ReferenceAcpiTable (
+ VOID
+ )
+{
+ //
+ // Reference the table being generated to prevent the optimizer from removing the
+ // data structure from the exeutable
+ //
+ return (VOID*)&Mcfg;
+}
diff --git a/ArmPkg/Drivers/AcpiTables/rtsm_ve-aemv8a/Mpst.aslc b/ArmPkg/Drivers/AcpiTables/rtsm_ve-aemv8a/Mpst.aslc
new file mode 100644
index 0000000..dfdda34
--- /dev/null
+++ b/ArmPkg/Drivers/AcpiTables/rtsm_ve-aemv8a/Mpst.aslc
@@ -0,0 +1,141 @@
+/*
+ * Copyright (c) 2013 Linaro Limited
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the BSD License which accompanies
+ * this distribution, and is available at
+ * http://opensource.org/licenses/bsd-license.php
+ *
+ * Contributors:
+ * Yi Li - yi.li@linaro.org
+*/
+
+#include <IndustryStandard/Acpi.h>
+#include <Platform.h>
+
+#define MAX_POWER_STATES_NUM 0x2
+#define MAX_PHYSICAL_COMPONENTS_NUM 0x3
+#define MAX_MEMORY_POWER_NODE_COUNT 0x2
+#define MAX_CHARACTERISTICS_COUNT 0x2
+
+#pragma pack (1)
+typedef struct
+{
+ EFI_ACPI_5_0_MPST_MEMORY_POWER_STRUCTURE structre;
+ EFI_ACPI_5_0_MPST_MEMORY_POWER_STATE state[MAX_POWER_STATES_NUM];
+ UINT16 components[MAX_PHYSICAL_COMPONENTS_NUM];
+}EFI_ACPI_5_0_MPST_MEMORY_POWER_STRUCTURE_EX;
+
+typedef struct
+{
+ EFI_ACPI_5_0_MPST_MEMORY_POWER_STATE_CHARACTERISTICS_STRUCTURE structre;
+ UINT64 ulResverd;
+}EFI_ACPI_5_0_MPST_MEMORY_POWER_STATE_CHARACTERISTICS_STRUCTURE_EX;
+
+typedef struct
+{
+ EFI_ACPI_5_0_MEMORY_POWER_STATUS_TABLE table;
+ EFI_ACPI_5_0_MPST_MEMORY_POWER_NODE_TABLE node;
+ EFI_ACPI_5_0_MPST_MEMORY_POWER_STRUCTURE_EX powerNode[MAX_MEMORY_POWER_NODE_COUNT];
+ EFI_ACPI_5_0_MPST_MEMORY_POWER_STATE_CHARACTERISTICS_TABLE Characteristics;
+ EFI_ACPI_5_0_MPST_MEMORY_POWER_STATE_CHARACTERISTICS_STRUCTURE_EX powerChar[MAX_CHARACTERISTICS_COUNT];
+}EFI_ACPI_5_0_MEMORY_POWER_STATUS_TABLE_EX;
+#pragma pack ()
+
+
+EFI_ACPI_5_0_MEMORY_POWER_STATUS_TABLE_EX Mpst ={
+ {
+ {
+ EFI_ACPI_5_0_MEMORY_POWER_STATE_TABLE_SIGNATURE,
+ 0x000000B6,
+ EFI_ACPI_5_0_MEMORY_POWER_STATE_TABLE_REVISION,
+ 0x00, // Checksum will be updated at runtime
+ {EFI_ACPI_OEM_ID},
+ EFI_ACPI_OEM_TABLE_ID,
+ EFI_ACPI_OEM_REVISION,
+ EFI_ACPI_CREATOR_ID,
+ EFI_ACPI_CREATOR_REVISION
+ },
+ 0x00, //Channel ID
+ {0,0,0}, //Reserved
+
+ },
+ 0x0002, //Power Node Count
+ {0,0}, //Reserved
+ {
+ {
+ 0x00, //Flags
+ 0x00, //Reserved
+ 0x0000, //Node ID
+ 0x0000000000, //Length
+ 0x00000000000000000000, //ange Address
+ 0x00000000000000000000, //Range Length
+ 0x00000002, // Num Power
+ 0x00000003, // Num Physical Components
+ {
+ {
+ 0x00, //Power State
+ 0x00, //InfoIndex
+ },
+ {
+ 0x00, //Power State
+ 0x00, //InfoIndex
+ },
+ },
+ 0x0000, //Component Id
+ 0x0001, //Component Id
+ 0x0002, //Component Id
+ },
+ {
+ 0x00, //Flags
+ 0x00, //Reserved
+ 0x0000, //Node ID
+ 0x0000000000, //Length
+ 0x00000000000000000000, //ange Address
+ 0x00000000000000000000, //Range Length
+ 0x00000001, // Num Power
+ 0x00000001, // Num Physical Components
+ {
+ 0x00, //Power State
+ 0x00, //InfoIndex
+ },
+ 0x0000, //Component Id
+
+ },
+ },
+
+ 0x0002, //Characteristics Count
+ {0,0}, //Reserved
+ {
+ {
+ 0x01, //Structure ID
+ 0x00, //Flags
+ 0x0000, //Reserved
+ 0x00000000, //Average Power
+ 0x00000000, //Power Saving
+ 0x0000000000000000, //Exit Latency
+ 0x0000000000000000, //Reserved
+ },
+ {
+ 0x01, //Structure ID
+ 0x00, //Flags
+ 0x0000, //Reserved
+ 0x00000000, //Average Power
+ 0x00000000, //Power Saving
+ 0x0000000000000000, //Exit Latency
+ 0x0000000000000000, //Reserved
+ },
+ },
+};
+
+VOID*
+ReferenceAcpiTable (
+ VOID
+ )
+{
+ //
+ // Reference the table being generated to prevent the optimizer from removing the
+ // data structure from the exeutable
+ //
+ return (VOID*)&Mpst;
+}
diff --git a/ArmPkg/Drivers/AcpiTables/rtsm_ve-aemv8a/Msct.aslc b/ArmPkg/Drivers/AcpiTables/rtsm_ve-aemv8a/Msct.aslc
new file mode 100644
index 0000000..80c9d59
--- /dev/null
+++ b/ArmPkg/Drivers/AcpiTables/rtsm_ve-aemv8a/Msct.aslc
@@ -0,0 +1,106 @@
+/*
+ * Copyright (c) 2013 Linaro Limited
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the BSD License which accompanies
+ * this distribution, and is available at
+ * http://opensource.org/licenses/bsd-license.php
+ *
+ * Contributors:
+ * Yi Li - yi.li@linaro.org
+*/
+
+#include <IndustryStandard/Acpi.h>
+#include <Platform.h>
+
+#define EFI_ACPI_MAXIMUM_PROXIMITY_DOMAIN_INFORMATION_STRUCTURE_REVISION 0x1
+//
+// MSCT Table definition
+//
+#pragma pack (1)
+typedef struct {
+ UINT8 Revision;
+ UINT8 Length;
+ UINT32 ProxDomRangeLow;
+ UINT32 ProxDomRangeHigh;
+ UINT32 MaxProcessorCapacity;
+ UINT64 MaxMemoryCapacity;
+} EFI_ACPI_MAXIMUM_PROXIMITY_DOMAIN_INFORMATION_STRUCTURE;
+
+typedef struct {
+ EFI_ACPI_5_0_MAXIMUM_SYSTEM_CHARACTERISTICS_TABLE_HEADER Header;
+ EFI_ACPI_MAXIMUM_PROXIMITY_DOMAIN_INFORMATION_STRUCTURE ProxDomInfoStructure[4];
+} EFI_ACPI_MAXIMUM_SYSTEM_CHARACTERISTICS_TABLE;
+
+#pragma pack ()
+
+EFI_ACPI_MAXIMUM_SYSTEM_CHARACTERISTICS_TABLE Msct = {
+ {
+ {
+ EFI_ACPI_5_0_MAXIMUM_SYSTEM_CHARACTERISTICS_TABLE_SIGNATURE,
+ sizeof (EFI_ACPI_MAXIMUM_SYSTEM_CHARACTERISTICS_TABLE),
+ EFI_ACPI_5_0_MAXIMUM_SYSTEM_CHARACTERISTICS_TABLE_REVISION,
+ 0x00, // Checksum will be updated at runtime
+ {EFI_ACPI_OEM_ID},
+ EFI_ACPI_OEM_TABLE_ID,
+ EFI_ACPI_OEM_REVISION,
+ EFI_ACPI_CREATOR_ID,
+ EFI_ACPI_CREATOR_REVISION
+ },
+ //
+ // Beginning of MSCT specific fields
+ //
+ 0x00000038, // OffsetProxDomInfo
+ 4 - 1, // MaxNumProxDom
+ 0x00000000, // MaxNumClockDom
+ 0x00000FFFFFFFFFFF, // MaxPhysicalAddress
+ },
+ {
+ {
+ EFI_ACPI_MAXIMUM_PROXIMITY_DOMAIN_INFORMATION_STRUCTURE_REVISION, // Revision
+ sizeof (EFI_ACPI_MAXIMUM_PROXIMITY_DOMAIN_INFORMATION_STRUCTURE), // Length
+ 0x00000000, // ProxDomRangeLow
+ 0x00000003, // ProxDomRangeHigh
+ 0x00000010, // MaxProcessorCapacity
+ 0x0000004000000000 // MaxMemoryCapacity
+ },
+ {
+ EFI_ACPI_MAXIMUM_PROXIMITY_DOMAIN_INFORMATION_STRUCTURE_REVISION, // Revision
+ sizeof (EFI_ACPI_MAXIMUM_PROXIMITY_DOMAIN_INFORMATION_STRUCTURE), // Length
+ 0x00000000, // ProxDomRangeLow
+ 0x00000000, // ProxDomRangeHigh
+ 0x00000000, // MaxProcessorCapacity
+ 0x0000000000000000, // MaxMemoryCapacity
+ },
+
+ {
+ EFI_ACPI_MAXIMUM_PROXIMITY_DOMAIN_INFORMATION_STRUCTURE_REVISION, // Revision
+ sizeof (EFI_ACPI_MAXIMUM_PROXIMITY_DOMAIN_INFORMATION_STRUCTURE), // Length
+ 0x00000000, // ProxDomRangeLow
+ 0x00000000, // ProxDomRangeHigh
+ 0x00000000, // MaxProcessorCapacity
+ 0x0000000000000000, // MaxMemoryCapacity
+ },
+
+ {
+ EFI_ACPI_MAXIMUM_PROXIMITY_DOMAIN_INFORMATION_STRUCTURE_REVISION, // Revision
+ sizeof (EFI_ACPI_MAXIMUM_PROXIMITY_DOMAIN_INFORMATION_STRUCTURE), // Length
+ 0x00000000, // ProxDomRangeLow
+ 0x00000000, // ProxDomRangeHigh
+ 0x00000000, // MaxProcessorCapacity
+ 0x0000000000000000, // MaxMemoryCapacity
+ },
+ },
+};
+
+VOID*
+ReferenceAcpiTable (
+ VOID
+ )
+{
+ //
+ // Reference the table being generated to prevent the optimizer from removing the
+ // data structure from the exeutable
+ //
+ return (VOID*)&Msct;
+}
diff --git a/ArmPkg/Drivers/AcpiTables/rtsm_ve-aemv8a/Oem0.aslc b/ArmPkg/Drivers/AcpiTables/rtsm_ve-aemv8a/Oem0.aslc
new file mode 100644
index 0000000..2e84daf
--- /dev/null
+++ b/ArmPkg/Drivers/AcpiTables/rtsm_ve-aemv8a/Oem0.aslc
@@ -0,0 +1,48 @@
+/*
+ * Copyright (c) 2013 Linaro Limited
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the BSD License which accompanies
+ * this distribution, and is available at
+ * http://opensource.org/licenses/bsd-license.php
+ *
+ * Contributors:
+ * Yi Li - yi.li@linaro.org
+*/
+
+#include <IndustryStandard/Acpi.h>
+#include <Platform.h>
+
+#define EFI_ACPI_5_0_OEM0_SIGNATURE SIGNATURE_32('O', 'E', 'M', '0')
+#define ACPI_5_0_OEM0_REVISION 0x1
+
+typedef struct{
+ EFI_ACPI_DESCRIPTION_HEADER Header;
+}EFI_ACPI_5_0_OEM0_TABLE;
+
+EFI_ACPI_5_0_OEM0_TABLE Oem0=
+{
+ {
+ EFI_ACPI_5_0_OEM0_SIGNATURE,
+ sizeof (EFI_ACPI_5_0_OEM0_TABLE),
+ ACPI_5_0_OEM0_REVISION,
+ 0x00, // Checksum will be updated at runtime
+ {EFI_ACPI_OEM_ID},
+ EFI_ACPI_OEM_TABLE_ID,
+ 0x0000000A,
+ EFI_ACPI_CREATOR_ID,
+ EFI_ACPI_CREATOR_REVISION
+ },
+};
+
+VOID*
+ReferenceAcpiTable (
+ VOID
+ )
+{
+ //
+ // Reference the table being generated to prevent the optimizer from removing the
+ // data structure from the exeutable
+ //
+ return (VOID*)&Oem0;
+}
diff --git a/ArmPkg/Drivers/AcpiTables/rtsm_ve-aemv8a/Platform.h b/ArmPkg/Drivers/AcpiTables/rtsm_ve-aemv8a/Platform.h
new file mode 100644
index 0000000..147d332
--- /dev/null
+++ b/ArmPkg/Drivers/AcpiTables/rtsm_ve-aemv8a/Platform.h
@@ -0,0 +1,75 @@
+/** @file
+ Platform specific defines for constructing ACPI tables
+
+ Copyright (c) 2008, Intel Corporation. All rights reserved.<BR>
+ 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.
+
+**/
+
+/*
+ * Copyright (c) 2013 Linaro Limited
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the BSD License which accompanies
+ * this distribution, and is available at
+ * http://opensource.org/licenses/bsd-license.php
+ *
+ * Contributors:
+ * Yi Li - yi.li@linaro.org
+*/
+
+#ifndef _Platform_h_INCLUDED_
+#define _Platform_h_INCLUDED_
+
+#include <PiDxe.h>
+#include <IndustryStandard/Acpi.h>
+
+//
+// ACPI table information used to initialize tables.RTSMVEV8
+//
+#define EFI_ACPI_OEM_ID 'L','I','N','A','R','O' // OEMID 6 bytes long
+#define EFI_ACPI_OEM_TABLE_ID SIGNATURE_64('R','T','S','M','V','E','V','8' ) // OEM table id 8 bytes long
+#define EFI_ACPI_OEM_REVISION 0x00000001
+#define EFI_ACPI_CREATOR_ID SIGNATURE_32('I','N','T','L')
+#define EFI_ACPI_CREATOR_REVISION 0x20130517
+
+#define INT_MODEL 0x01
+#define SCI_INT_VECTOR 0x0
+#define SMI_CMD_IO_PORT 0x0
+#define ACPI_ENABLE 0x0
+#define ACPI_DISABLE 0x0
+#define S4BIOS_REQ 0x00
+#define PM1a_EVT_BLK 0x00000001
+#define PM1b_EVT_BLK 0x00000000
+#define PM1a_CNT_BLK 0x00000001
+#define PM1b_CNT_BLK 0x00000000
+#define PM2_CNT_BLK 0x00000001
+#define PM_TMR_BLK 0x00000001
+#define GPE0_BLK 0x00000001
+#define GPE1_BLK 0x00000000
+#define PM1_EVT_LEN 0x04
+#define PM1_CNT_LEN 0x02
+#define PM2_CNT_LEN 0x01
+#define PM_TM_LEN 0x04
+#define GPE0_BLK_LEN 0x08
+#define GPE1_BLK_LEN 0x00
+#define GPE1_BASE 0x00
+#define RESERVED 0x00
+#define P_LVL2_LAT 0x0000
+#define P_LVL3_LAT 0x0000
+#define FLUSH_SIZE 0x0000
+#define FLUSH_STRIDE 0x0000
+#define DUTY_OFFSET 0x00
+#define DUTY_WIDTH 0x00
+#define DAY_ALRM 0x00
+#define MON_ALRM 0x00
+#define CENTURY 0x00
+#define FLAG 0x00321033
+#endif
+
diff --git a/ArmPkg/Drivers/AcpiTables/rtsm_ve-aemv8a/Pmtt.aslc b/ArmPkg/Drivers/AcpiTables/rtsm_ve-aemv8a/Pmtt.aslc
new file mode 100644
index 0000000..f0b4f6c
--- /dev/null
+++ b/ArmPkg/Drivers/AcpiTables/rtsm_ve-aemv8a/Pmtt.aslc
@@ -0,0 +1,216 @@
+/*
+ * Copyright (c) 2013 Linaro Limited
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the BSD License which accompanies
+ * this distribution, and is available at
+ * http://opensource.org/licenses/bsd-license.php
+ *
+ * Contributors:
+ * Yi Li - yi.li@linaro.org
+*/
+
+#include <IndustryStandard/Acpi.h>
+#include <Platform.h>
+
+#define EFI_ACPI_MEMORY_AGGREGATOR_TYPE_SOCKET 00 //socket
+#define EFI_ACPI_MEMORY_AGGREGATOR_TYPE_MEMCTRL 01 //Memory Controller
+#define EFI_ACPI_MEMORY_AGGREGATOR_TYPE_DIMM 02 //DIMM
+#define EFI_ACPI_MEMORY_AGGREGATOR_TYPE_RESVERVED 03 //RESVERVED
+
+#define EFI_ACPI_MEMORY_AGGREGATOR_FLAG_TLAD 01
+#define EFI_ACPI_MEMORY_AGGREGATOR_FLAG_PHYELEMENT 02 // BIT1 - set to 1 since socket is a physical element of the topology
+//Bit 2 and 3 - If 00, indicates that all components aggregated by this device implements volatile memory
+// If 01, indicates that components aggregated by this device implements both volatile and non-volatile memory
+// If 10, indicates that all components aggregated by this device implements non-volatile memory
+#define EFI_ACPI_MEMORY_AGGREGATOR_FLAG__VOLATILE 00
+#define EFI_ACPI_MEMORY_AGGREGATOR_FLAG__MIXED 4
+#define EFI_ACPI_MEMORY_AGGREGATOR_FLAG__NONVOLATILE 0x08
+#define EFI_ACPI_MEMORY_AGGREGATOR_FLAG__RSVD 0x0C
+
+#define MAXNUMBER_OF_PROXIMITY_DOMAINS 0x3
+
+#define MAX_SOCKET 0x2
+#define NUM_MEM_CONTROLLERS 0x2
+#define MAX_DIMM 0x02
+
+#pragma pack (1)
+// PMMT Table fields
+typedef struct {
+ UINT32 ReadLatency;
+ UINT32 WriteLatency;
+ UINT32 ReadBW;
+ UINT32 WriteBW;
+ UINT16 OptimalAccUnit;
+ UINT16 OptimalAccAlignment;
+} EFI_ACPI_MEMCTRL_CHAR_TABLE;
+
+typedef struct {
+ UINT8 Type;
+ UINT8 Rsvd;
+ UINT16 Length;
+ UINT16 Flag;
+ UINT16 Rsvd1;
+ UINT16 PhyCompIdentifier;
+ UINT16 Rsvd2;
+ UINT32 Size;
+ UINT32 SmBiosHandle;
+} EFI_ACPI_MEMORY_AGGREGATOR_DIMM_STRUC;
+
+typedef struct {
+ UINT8 Type;
+ UINT8 Rsvd;
+ UINT16 Length;
+ UINT16 Flag;
+ UINT16 Rsvd1;
+ EFI_ACPI_MEMCTRL_CHAR_TABLE MemCtrlCharTable;
+ UINT16 Rsvd2;
+ UINT16 NumProxDomains;
+ UINT32 ProxDomain[MAXNUMBER_OF_PROXIMITY_DOMAINS];
+ EFI_ACPI_MEMORY_AGGREGATOR_DIMM_STRUC PhyCompIdentStruc[MAX_DIMM];
+} EFI_ACPI_MEMORY_AGGREGATOR_MEMCTRL_STRUC;
+
+typedef struct {
+ UINT8 Type;
+ UINT8 Rsvd;
+ UINT16 Length;
+ UINT16 Flag;
+ UINT16 Rsvd1;
+ UINT16 SckIdent;
+ UINT16 Rsvd2;
+ EFI_ACPI_MEMORY_AGGREGATOR_MEMCTRL_STRUC MemCtrlStruc[NUM_MEM_CONTROLLERS];
+} EFI_ACPI_MEMORY_AGGREGATOR_SOCKET_STRUC;
+
+typedef struct {
+ EFI_ACPI_5_0_MEMORY_TOPOLOGY_TABLE Header;
+ EFI_ACPI_MEMORY_AGGREGATOR_SOCKET_STRUC TopLevelmemAggrDevStruc[MAX_SOCKET];
+} EFI_ACPI_5_0_PLATFORM_MEMORY_TOPOLOGY_TABLE;
+#pragma pack ()
+
+
+EFI_ACPI_5_0_PLATFORM_MEMORY_TOPOLOGY_TABLE Pmtt = {
+ {
+ {
+ EFI_ACPI_5_0_PLATFORM_MEMORY_TOPOLOGY_TABLE_SIGNATURE,
+ sizeof (EFI_ACPI_5_0_PLATFORM_MEMORY_TOPOLOGY_TABLE), // Length
+ EFI_ACPI_5_0_MEMORY_TOPOLOGY_TABLE_REVISION, // Revision
+ 0x00, // Checksum will be updated at runtime
+ {EFI_ACPI_OEM_ID},
+ EFI_ACPI_OEM_TABLE_ID,
+ EFI_ACPI_OEM_REVISION,
+ EFI_ACPI_CREATOR_ID,
+ EFI_ACPI_CREATOR_REVISION
+ },
+ EFI_ACPI_RESERVED_DWORD, // Reserved[0]
+ },
+ {
+ /*Socket 0*/
+ {
+ 0x00, //Subtable Type:Socket
+ 0x00, //Reserved
+ 0x0080, //Length
+ 0x0001, //Flags
+ 0x0000, //Reserved
+ 0x0000, //Socket ID
+ 0x0000, //Reserved
+ {
+ /*Memory Controller 1*/
+
+ {
+ 0x01, //Subtable Type:Memory Controller
+ 0x00, //Reserved
+ 0x0054, //Length
+ 0x0005, //Flags
+ 0x0000, //Reserved
+ {
+ 0x00000000, //Read Latency
+ 0x00000000, //Write Latency
+ 0x00000000, //Read Bandwidth
+ 0x00000000, //Write Bandwidth
+ 0x0000, //Access Width
+ 0x0000, //Alignment
+ },
+ 0x0000, //Reserved
+ MAXNUMBER_OF_PROXIMITY_DOMAINS, //Domain Count
+ 0x00000000, //Proximity Domain
+ 0x00000000, //Proximity Domain
+ 0x00000000, //Proximity Domain
+ {
+ /*DIMM 0*/
+ {
+ 0x02, //Subtable Type:Physical Component (DIMM)
+ 0x00, //Reserved
+ 0x0014, //Length
+ 0x0002, //Flags
+ 0x0000, //Reserved
+ 0x0000, //Component ID
+ 0x0000, //Reserved
+ 0x00000000, //Memory Size
+ 0x00000000, //Bios Handle
+ },
+ /*DIMM 1*/
+ {
+ 0x02, //Subtable Type:Physical Component (DIMM)
+ 0x00, //Reserved
+ 0x0014, //Length
+ 0x0002, //Flags
+ 0x0000, //Reserved
+ 0x0000, //Component ID
+ 0x0000, //Reserved
+ 0x00000000, //Memory Size
+ 0x00000000, //Bios Handle
+ },
+ },
+ },
+
+ /*Memory Controller 2*/
+ {
+ 0x01, //Subtable Type:Memory Controller
+ 0x00, //Reserved
+ 0x0020, //Length
+ 0x0001, //Flags
+ 0x0000, //Reserved
+ {
+ 0x00000000, //Read Latency
+ 0x00000000, //Write Latency
+ 0x00000000, //Read Bandwidth
+ 0x00000000, //Write Bandwidth
+ 0x0000, //Access Width
+ 0x0000 //Alignment
+ },
+ 0x0000, //Reserved
+ 0x0000, //Domain Count
+ {0},
+ {0},
+
+ },
+ },
+ },
+
+
+ /*Socket 1*/
+ {
+ 0x00, //Subtable Type:Socket
+ 0x00, //Reserved
+ 0x000c, //Length
+ 0x0001, //Flags
+ 0x0000, //Reserved
+ 0x0000, //Socket ID
+ 0x0000 //Reserved
+ },
+ },
+
+
+};
+
+VOID*
+ReferenceAcpiTable (
+ VOID
+ )
+{
+ //
+ // Reference the table being generated to prevent the optimizer from removing the
+ // data structure from the exeutable
+ //
+ return (VOID*)&Pmtt;
+}
diff --git a/ArmPkg/Drivers/AcpiTables/rtsm_ve-aemv8a/Slit.aslc b/ArmPkg/Drivers/AcpiTables/rtsm_ve-aemv8a/Slit.aslc
new file mode 100644
index 0000000..05d96e0
--- /dev/null
+++ b/ArmPkg/Drivers/AcpiTables/rtsm_ve-aemv8a/Slit.aslc
@@ -0,0 +1,87 @@
+/*
+ * Copyright (c) 2013 Linaro Limited
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the BSD License which accompanies
+ * this distribution, and is available at
+ * http://opensource.org/licenses/bsd-license.php
+ *
+ * Contributors:
+ * Yi Li - yi.li@linaro.org
+*/
+
+#include <IndustryStandard/Acpi.h>
+#include <Platform.h>
+
+#define EFI_ACPI_SYSTEM_LOCALITIES_ENTRY_COUNT 0x0000000000000014
+
+#pragma pack(1)
+typedef struct {
+ UINT8 Entry[EFI_ACPI_SYSTEM_LOCALITIES_ENTRY_COUNT];
+} EFI_ACPI_5_0_NUMBER_OF_SYSTEM_LOCALITIES_STRUCTURE;
+
+typedef struct {
+ EFI_ACPI_5_0_SYSTEM_LOCALITY_DISTANCE_INFORMATION_TABLE_HEADER Header;
+ EFI_ACPI_5_0_NUMBER_OF_SYSTEM_LOCALITIES_STRUCTURE NumSlit[EFI_ACPI_SYSTEM_LOCALITIES_ENTRY_COUNT];
+
+} EFI_ACPI_5_0_SYSTEM_LOCALITY_INFORMATION_TABLE;
+#pragma pack()
+
+//
+// System Locality Information Table
+// Please modify all values in Slit.h only.
+//
+EFI_ACPI_5_0_SYSTEM_LOCALITY_INFORMATION_TABLE Slit = {
+ {
+ {
+ EFI_ACPI_5_0_SYSTEM_LOCALITY_INFORMATION_TABLE_SIGNATURE,
+ sizeof (EFI_ACPI_5_0_SYSTEM_LOCALITY_INFORMATION_TABLE),
+ EFI_ACPI_5_0_SYSTEM_LOCALITY_DISTANCE_INFORMATION_TABLE_REVISION,
+ 0x00, // Checksum will be updated at runtime
+ {EFI_ACPI_OEM_ID},
+ EFI_ACPI_OEM_TABLE_ID,
+ EFI_ACPI_OEM_REVISION,
+ EFI_ACPI_CREATOR_ID,
+ EFI_ACPI_CREATOR_REVISION,
+ },
+ //
+ // Beginning of SLIT specific fields
+ //
+ EFI_ACPI_SYSTEM_LOCALITIES_ENTRY_COUNT,
+ },
+ {
+ {0x0A, 0x10, 0x16, 0x17, 0x18, 0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F, 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27}, //Locality 0
+ {0x10, 0x0A, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F, 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26,}, //Locality 1
+ {0x16, 0x15, 0x0A, 0x10, 0x16, 0x17, 0x18, 0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F, 0x20, 0x21, 0x22, 0x23, 0x24, 0x25,}, //Locality 2
+ {0x17, 0x16, 0x10, 0x0A, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F, 0x20, 0x21, 0x22, 0x23, 0x24,}, //Locality 3
+ {0x18, 0x17, 0x16, 0x15, 0x0A, 0x10, 0x16, 0x17, 0x18, 0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F, 0x20, 0x21, 0x22, 0x23,}, //Locality 4
+ {0x19, 0x18, 0x17, 0x16, 0x10, 0x0A, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F, 0x20, 0x21, 0x22,}, //Locality 5
+ {0x1A, 0x19, 0x18, 0x17, 0x16, 0x15, 0x0A, 0x10, 0x16, 0x17, 0x18, 0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F, 0x20, 0x21,}, //Locality 6
+ {0x1B, 0x1A, 0x19, 0x18, 0x17, 0x16, 0x10, 0x0A, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F, 0x20,}, //Locality 7
+ {0x1C, 0x1B, 0x1A, 0x19, 0x18, 0x17, 0x16, 0x15, 0x0A, 0x10, 0x16, 0x17, 0x18, 0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F,}, //Locality 8
+ {0x1D, 0x1C, 0x1B, 0x1A, 0x19, 0x18, 0x17, 0x16, 0x10, 0x0A, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E,}, //Locality 9
+ {0x1E, 0x1D, 0x1C, 0x1B, 0x1A, 0x19, 0x18, 0x17, 0x16, 0x15, 0x0A, 0x10, 0x16, 0x17, 0x18, 0x19, 0x1A, 0x1B, 0x1C, 0x1D,}, //Locality 10
+ {0x1F, 0x1E, 0x1D, 0x1C, 0x1B, 0x1A, 0x19, 0x18, 0x17, 0x16, 0x10, 0x0A, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1A, 0x1B, 0x1C,}, //Locality 11
+ {0x20, 0x1F, 0x1E, 0x1D, 0x1C, 0x1B, 0x1A, 0x19, 0x18, 0x17, 0x16, 0x15, 0x0A, 0x10, 0x16, 0x17, 0x18, 0x19, 0x1A, 0x1B,}, //Locality 12
+ {0x21, 0x20, 0x1F, 0x1E, 0x1D, 0x1C, 0x1B, 0x1A, 0x19, 0x18, 0x17, 0x16, 0x10, 0x0A, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1A,}, //Locality 13
+ {0x22, 0x21, 0x20, 0x1F, 0x1E, 0x1D, 0x1C, 0x1B, 0x1A, 0x19, 0x18, 0x17, 0x16, 0x15, 0x0A, 0x10, 0x16, 0x17, 0x18, 0x19,}, //Locality 14
+ {0x23, 0x22, 0x21, 0x20, 0x1F, 0x1E, 0x1D, 0x1C, 0x1B, 0x1A, 0x19, 0x18, 0x17, 0x16, 0x10, 0x0A, 0x15, 0x16, 0x17, 0x18,}, //Locality 15
+ {0x24, 0x23, 0x22, 0x21, 0x20, 0x1F, 0x1E, 0x1D, 0x1C, 0x1B, 0x1A, 0x19, 0x18, 0x17, 0x16, 0x15, 0x0A, 0x10, 0x16, 0x17,}, //Locality 16
+ {0x25, 0x24, 0x23, 0x22, 0x21, 0x20, 0x1F, 0x1E, 0x1D, 0x1C, 0x1B, 0x1A, 0x19, 0x18, 0x17, 0x16, 0x10, 0x0A, 0x15, 0x16,}, //Locality 17
+ {0x26, 0x25, 0x24, 0x23, 0x22, 0x21, 0x20, 0x1F, 0x1E, 0x1D, 0x1C, 0x1B, 0x1A, 0x19, 0x18, 0x17, 0x16, 0x15, 0x0A, 0x10,}, //Locality 18
+ {0x27, 0x26, 0x25, 0x24, 0x23, 0x22, 0x21, 0x20, 0x1F, 0x1E, 0x1D, 0x1C, 0x1B, 0x1A, 0x19, 0x18, 0x17, 0x16, 0x10, 0x0A,}, //Locality 19
+ },
+};
+
+
+VOID*
+ReferenceAcpiTable (
+ VOID
+ )
+{
+ //
+ // Reference the table being generated to prevent the optimizer from removing the
+ // data structure from the exeutable
+ //
+ return (VOID*)&Slit;
+}
diff --git a/ArmPkg/Drivers/AcpiTables/rtsm_ve-aemv8a/Spmi.aslc b/ArmPkg/Drivers/AcpiTables/rtsm_ve-aemv8a/Spmi.aslc
new file mode 100644
index 0000000..77836a4
--- /dev/null
+++ b/ArmPkg/Drivers/AcpiTables/rtsm_ve-aemv8a/Spmi.aslc
@@ -0,0 +1,86 @@
+/*
+ * Copyright (c) 2013 Linaro Limited
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the BSD License which accompanies
+ * this distribution, and is available at
+ * http://opensource.org/licenses/bsd-license.php
+ *
+ * Contributors:
+ * Yi Li - yi.li@linaro.org
+*/
+
+#include <IndustryStandard/Acpi.h>
+#include <Platform.h>
+
+#define ACPI_5_0_SPMI_REVISION 0x4
+
+#pragma pack(1)
+typedef struct
+{
+
+ EFI_ACPI_DESCRIPTION_HEADER Header;
+ UINT8 ucInterfaceType;
+ UINT8 Reserved;
+ UINT16 usIPMISpecVersion;
+ UINT8 ucInterruptType;
+ UINT8 ucGPENumber;
+ UINT8 Reserved2;
+ UINT8 ucPCIDeviceFlag;
+ UINT32 uwInterrupt;
+ EFI_ACPI_5_0_GENERIC_ADDRESS_STRUCTURE IPMIRegister;
+ UINT8 ucPCISegment;
+ UINT8 ucPCIBus;
+ UINT8 ucPCIDevice;
+ UINT8 ucPCIFunction;
+ UINT8 Reserved3;
+}EFI_ACPI_5_0_SERVER_PLATFORM_MANAGEMENT_INTERFACE_TABLE;
+#pragma pack()
+
+EFI_ACPI_5_0_SERVER_PLATFORM_MANAGEMENT_INTERFACE_TABLE Spmi =
+{
+ {
+ EFI_ACPI_5_0_SERVER_PLATFORM_MANAGEMENT_INTERFACE_TABLE_SIGNATURE,
+ sizeof (EFI_ACPI_5_0_SERVER_PLATFORM_MANAGEMENT_INTERFACE_TABLE),
+ ACPI_5_0_SPMI_REVISION,
+ 0x00, // Checksum will be updated at runtime
+ {EFI_ACPI_OEM_ID},
+ EFI_ACPI_OEM_TABLE_ID,
+ 0x00,
+ EFI_ACPI_CREATOR_ID,
+ EFI_ACPI_CREATOR_REVISION
+ },
+ 0x00, //Interface Type
+ 0x00, //Reserved
+ 0x0000, //IPMI Spec Version
+ 0x00, //Interrupt Type
+ 0x00, //GPE Number
+ 0x00, //Reserved
+ 0x00, //PCI Device Flag
+ 0x00000000, //Interrupt
+ {
+ 0x00, //Space ID:SystemMemory
+ 0x08, //Bit Width
+ 0x00, //Bit Offset
+ 0x01, //Encoded Access Width
+ 0x0000000000000000, //Address
+ },
+ 0x00, //PCI Segment
+ 0x00, //PCI Bus
+ 0x00, //PCI Device
+ 0x00, //PCI Function
+ 0x00, //Reserved
+};
+
+VOID*
+ReferenceAcpiTable (
+ VOID
+ )
+{
+
+ //
+ // Reference the table being generated to prevent the optimizer from removing the
+ // data structure from the exeutable
+ //
+ return (VOID*)&Spmi;
+}
diff --git a/ArmPkg/Drivers/AcpiTables/rtsm_ve-aemv8a/Srat.aslc b/ArmPkg/Drivers/AcpiTables/rtsm_ve-aemv8a/Srat.aslc
new file mode 100644
index 0000000..d5c433f
--- /dev/null
+++ b/ArmPkg/Drivers/AcpiTables/rtsm_ve-aemv8a/Srat.aslc
@@ -0,0 +1,106 @@
+/*
+ * Copyright (c) 2013 Linaro Limited
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the BSD License which accompanies
+ * this distribution, and is available at
+ * http://opensource.org/licenses/bsd-license.php
+ *
+ * Contributors:
+ * Yi Li - yi.li@linaro.org
+*/
+
+#include <IndustryStandard/Acpi.h>
+#include <Platform.h>
+
+
+//
+// Define the number of each table type.
+// This is where the table layout is modified.
+//
+#define EFI_ACPI_PROCESSOR_LOCAL_APIC_SAPIC_AFFINITY_STRUCTURE_COUNT 4
+#define EFI_ACPI_MEMORY_AFFINITY_STRUCTURE_COUNT 4
+
+
+#pragma pack(1)
+typedef struct {
+ EFI_ACPI_5_0_SYSTEM_RESOURCE_AFFINITY_TABLE_HEADER Header;
+ EFI_ACPI_5_0_PROCESSOR_LOCAL_APIC_SAPIC_AFFINITY_STRUCTURE Apic;
+ EFI_ACPI_5_0_MEMORY_AFFINITY_STRUCTURE Memory;
+ EFI_ACPI_5_0_PROCESSOR_LOCAL_X2APIC_AFFINITY_STRUCTURE x2APIC;
+} EFI_ACPI_5_0_SYSTEM_RESOURCE_AFFINITY_TABLE;
+
+#pragma pack()
+
+
+//
+// Static Resource Affinity Table definition
+//
+EFI_ACPI_5_0_SYSTEM_RESOURCE_AFFINITY_TABLE Srat = {
+ {
+ EFI_ACPI_5_0_SYSTEM_RESOURCE_AFFINITY_TABLE_SIGNATURE,
+ sizeof (EFI_ACPI_5_0_SYSTEM_RESOURCE_AFFINITY_TABLE),
+ EFI_ACPI_5_0_SYSTEM_RESOURCE_AFFINITY_TABLE_REVISION,
+ 0x00, // Checksum will be updated at runtime
+ {EFI_ACPI_OEM_ID},
+ EFI_ACPI_OEM_TABLE_ID,
+ EFI_ACPI_OEM_REVISION,
+ EFI_ACPI_CREATOR_ID,
+ EFI_ACPI_CREATOR_REVISION,
+ /*Reserved*/
+ 0x00000001, // Reserved to be 1 for backward compatibility
+ EFI_ACPI_RESERVED_QWORD
+ },
+ /**/
+ {
+ 0x00, // Subtable Type:Processor Local APIC/SAPIC Affinity
+ sizeof(EFI_ACPI_5_0_PROCESSOR_LOCAL_APIC_SAPIC_AFFINITY_STRUCTURE), //Length
+ 0x00, //Proximity Domain Low(8)
+ 0x00, //Apic ID
+ 0x00000001, //Flags
+ 0x00, //Local Sapic EID
+ {0,0,0}, //Proximity Domain High(24)
+ 0x00000000, //ClockDomain
+ },
+ //
+ //
+ // Memory Affinity
+ //
+ {
+ 0x01, // Subtable Type:Memory Affinity
+ sizeof (EFI_ACPI_5_0_MEMORY_AFFINITY_STRUCTURE), // Length
+ 0x00000000, // Proximity Domain
+ EFI_ACPI_RESERVED_WORD, // Reserved
+ 0x00000000, // Address Base Low
+ 0x00000000, // Address Base High
+ 0x0009FC00, // Length Low
+ 0x00000000, // Length High
+ EFI_ACPI_RESERVED_DWORD, // Reserved
+ 0x00000001, // Flags disabled, until enabled by Platform driver
+ EFI_ACPI_RESERVED_QWORD , // Reserved
+ },
+
+ /*Processor Local x2APIC Affinity*/
+ {
+ 0x02, // Subtable Type:Processor Local x2APIC Affinity
+ sizeof(EFI_ACPI_5_0_PROCESSOR_LOCAL_X2APIC_AFFINITY_STRUCTURE),
+ {0,0}, //Reserved1
+ 0x00000000, //Proximity Domain
+ 0x00000000, //Apic ID
+ 0x00000001, //Flags
+ 0x00000000, //Clock Domain
+ {0,0,0,0}, //Reserved2
+ },
+};
+
+VOID*
+ReferenceAcpiTable (
+ VOID
+ )
+{
+ //
+ // Reference the table being generated to prevent the optimizer from removing the
+ // data structure from the exeutable
+ //
+ return (VOID*)&Srat;
+}
diff --git a/ArmPkg/Drivers/AcpiTables/rtsm_ve-aemv8a/Ssdt0.asl b/ArmPkg/Drivers/AcpiTables/rtsm_ve-aemv8a/Ssdt0.asl
new file mode 100644
index 0000000..c13ceef
--- /dev/null
+++ b/ArmPkg/Drivers/AcpiTables/rtsm_ve-aemv8a/Ssdt0.asl
@@ -0,0 +1,17 @@
+/*
+ * Copyright (c) 2013, Al Stone <al.stone@linaro.org>
+ *
+ * [SSDT] Description of the armv8 VE Model
+ *
+ * This source is released under the terms of the GPLv2.
+ */
+
+DefinitionBlock (
+ "ssdt0.aml", // output filename
+ "SSDT", // table signature
+ 2, // SSDT compliance revision
+ "LINARO", // OEM ID
+ "RTSMVEV8", // table ID
+ 0x00000001) // OEM revision
+{
+}
diff --git a/ArmPkg/Drivers/AcpiTables/rtsm_ve-aemv8a/Uefi.aslc b/ArmPkg/Drivers/AcpiTables/rtsm_ve-aemv8a/Uefi.aslc
new file mode 100644
index 0000000..c3bbce3
--- /dev/null
+++ b/ArmPkg/Drivers/AcpiTables/rtsm_ve-aemv8a/Uefi.aslc
@@ -0,0 +1,57 @@
+/*
+ * Copyright (c) 2013 Linaro Limited
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the BSD License which accompanies
+ * this distribution, and is available at
+ * http://opensource.org/licenses/bsd-license.php
+ *
+ * Contributors:
+ * Yi Li - yi.li@linaro.org
+*/
+
+#include <IndustryStandard/Acpi.h>
+#include <Platform.h>
+
+
+#define ACPI_5_0_UEFI_REVISION 0x1
+
+#pragma pack(1)
+
+typedef struct
+{
+ EFI_ACPI_DESCRIPTION_HEADER Header;
+ EFI_GUID guid;
+ UINT16 usDataOffset;
+}EFI_ACPI_5_0_UEFI_TABLE;
+#pragma pack()
+
+EFI_ACPI_5_0_UEFI_TABLE Uefi=
+{
+ {
+ EFI_ACPI_5_0_UEFI_ACPI_DATA_TABLE_SIGNATURE,
+ sizeof (EFI_ACPI_5_0_UEFI_TABLE),
+ ACPI_5_0_UEFI_REVISION,
+ 0x00, // Checksum will be updated at runtime
+ {EFI_ACPI_OEM_ID},
+ EFI_ACPI_OEM_TABLE_ID,
+ EFI_ACPI_OEM_REVISION,
+ EFI_ACPI_CREATOR_ID,
+ EFI_ACPI_CREATOR_REVISION
+ },
+ //03020100-0504-0706-0809-0A0B0C0D0E0F
+ { 0x03020100, 0x0504, 0x0706, { 0x08, 0x09, 0x0A, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f } },
+ 0x0036 //Data Offset
+};
+
+VOID*
+ReferenceAcpiTable (
+ VOID
+ )
+{
+ //
+ // Reference the table being generated to prevent the optimizer from removing the
+ // data structure from the exeutable
+ //
+ return (VOID*)&Uefi;
+}
diff --git a/ArmPkg/Drivers/AcpiTables/rtsm_ve-v7/AcpiTables.inf b/ArmPkg/Drivers/AcpiTables/rtsm_ve-v7/AcpiTables.inf
new file mode 100644
index 0000000..ae3a66b
--- /dev/null
+++ b/ArmPkg/Drivers/AcpiTables/rtsm_ve-v7/AcpiTables.inf
@@ -0,0 +1,70 @@
+## @file
+# Component description file for PlatformAcpiTables module.
+#
+# ACPI table data and ASL sources required to boot the platform.
+#
+# Copyright (c) 2008 - 2010, Intel Corporation. All rights reserved.<BR>
+# 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.
+#
+##
+
+/*
+ * Copyright (c) 2013 Linaro Limited
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the BSD License which accompanies
+ * this distribution, and is available at
+ * http://opensource.org/licenses/bsd-license.php
+ *
+ * Contributors:
+ * Yi Li - yi.li@linaro.org
+*/
+[Defines]
+ INF_VERSION = 0x00010005
+ BASE_NAME = PlatformAcpiTables
+ FILE_GUID = 7E374E25-8E01-4FEE-87F2-390C23C606CD
+ MODULE_TYPE = USER_DEFINED
+ VERSION_STRING = 1.0
+ FFS_EXT = SEC
+ COMPILE_SELECT = .c=acpi_c
+
+[Sources]
+ Platform.h
+ Apic.aslc
+ Bert.aslc
+ Dsdt.asl
+ Ecdt.aslc
+ Einj.aslc
+ Erst.aslc
+ Facp.aslc
+ Facs.aslc
+ Gtdt.aslc
+ Hest.aslc
+ Mcfg.aslc
+ Mpst.aslc
+ Msct.aslc
+ Oem0.aslc
+ Pmtt.aslc
+ Slit.aslc
+ Spmi.aslc
+ Srat.aslc
+ Ssdt0.asl
+ Uefi.aslc
+
+ ###rsdp/xsdt created by building the acpi table
+ ###tables need to change format
+ #asf!.asl
+ #bgrt.asl
+ #boot.asl
+ #cpep.asl
+ #fpdt.asl
+ #tpm2.asl
+
+[Packages]
+ MdePkg/MdePkg.dec
diff --git a/ArmPkg/Drivers/AcpiTables/rtsm_ve-v7/Apic.aslc b/ArmPkg/Drivers/AcpiTables/rtsm_ve-v7/Apic.aslc
new file mode 100644
index 0000000..e18c1a5
--- /dev/null
+++ b/ArmPkg/Drivers/AcpiTables/rtsm_ve-v7/Apic.aslc
@@ -0,0 +1,216 @@
+/** @file
+ MADT Table
+
+ This file contains a structure definition for the ACPI 1.0 Multiple APIC
+ Description Table (MADT).
+
+ Copyright (c) 2008 - 2012, Intel Corporation. All rights reserved.<BR>
+ 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.
+
+**/
+
+/*
+ * Copyright (c) 2013 Linaro Limited
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the BSD License which accompanies
+ * this distribution, and is available at
+ * http://opensource.org/licenses/bsd-license.php
+ *
+ * Contributors:
+ * Yi Li - yi.li@linaro.org
+*/
+#include <IndustryStandard/Acpi.h>
+#include <Platform.h>
+
+//
+// Local APIC address
+//
+#define EFI_ACPI_LOCAL_APIC_ADDRESS 0x2C002000 // TBD
+
+
+#define ACPI_PROCESSOR_LOCAL_GIC 0xb
+#define ACPI_GIC_DISTRIBUTOR 0xc
+
+//These addresses are defined by the MP shared region defined in the UEFI memory map.
+#define MP_REGISTER_ADDRESS_GIC0 0x80301000
+#define DISTRIBUTOR_PHYSICAL_ADDRESS 0x02000000
+
+#define ACPI_GICC_NUM 0x8
+
+//
+// Ensure proper structure formats
+//
+#pragma pack (1)
+//
+// ACPI 5.0 MADT structure
+//
+typedef struct {
+ EFI_ACPI_5_0_MULTIPLE_APIC_DESCRIPTION_TABLE_HEADER Header;
+ EFI_ACPI_5_0_GIC_STRUCTURE Gic[ACPI_GICC_NUM];
+ EFI_ACPI_5_0_GIC_DISTRIBUTOR_STRUCTURE Distributor;
+
+} EFI_ACPI_5_0_MULTIPLE_APIC_DESCRIPTION_TABLE;
+
+#pragma pack ()
+
+//
+// Multiple APIC Description Table
+//
+EFI_ACPI_5_0_MULTIPLE_APIC_DESCRIPTION_TABLE Madt = {
+ {
+ {
+ EFI_ACPI_5_0_MULTIPLE_APIC_DESCRIPTION_TABLE_SIGNATURE,
+ sizeof (EFI_ACPI_5_0_MULTIPLE_APIC_DESCRIPTION_TABLE),
+ EFI_ACPI_5_0_MULTIPLE_APIC_DESCRIPTION_TABLE_REVISION,
+ 0x00, // Checksum will be updated at runtime
+ {EFI_ACPI_OEM_ID},
+ EFI_ACPI_OEM_TABLE_ID,
+ EFI_ACPI_OEM_REVISION,
+ EFI_ACPI_CREATOR_ID,
+ EFI_ACPI_CREATOR_REVISION
+ },
+
+ //
+ // MADT specific fields
+ //
+ EFI_ACPI_LOCAL_APIC_ADDRESS,
+ 0x00000000
+ },
+ {
+ //LocalGic0
+ {
+ ACPI_PROCESSOR_LOCAL_GIC, //Type
+ sizeof (EFI_ACPI_5_0_GIC_STRUCTURE), //Length
+ 0x00, //Reserved
+ 0x00, //GicId
+ 0x00, //AcpiProcessorUid
+ 0x00000001, //Flags
+ 0x00000000, //ParkingProtocolVersion
+ 0x00000000, //PerformanceInterruptGsiv
+ 0x0000000000000000, //ParkedAddress
+ 0x000000002C002000, //PhysicalBaseAddress
+ },
+ //LocalGic1
+ {
+ ACPI_PROCESSOR_LOCAL_GIC, //Type
+ sizeof (EFI_ACPI_5_0_GIC_STRUCTURE), //Length
+ 0x00, //Reserved
+ 0x01, //GicId
+ 0x01, //AcpiProcessorUid
+ EFI_ACPI_5_0_GIC_ENABLED, //Flags
+ 0x00000000, //ParkingProtocolVersion
+ 0x00000000, //PerformanceInterruptGsiv
+ 0x0000000000000000, //ParkedAddress
+ 0x000000002C002000 //PhysicalBaseAddress
+ },
+ //LocalGic2
+ {
+ ACPI_PROCESSOR_LOCAL_GIC, //Type:
+ sizeof (EFI_ACPI_5_0_GIC_STRUCTURE), //Length
+ 0x00, //Reserved
+ 0x02, //GicId
+ 0x02, //AcpiProcessorUid
+ EFI_ACPI_5_0_GIC_ENABLED, //Flags
+ 0x00000000, //ParkingProtocolVersion
+ 0x00000000, //PerformanceInterruptGsiv
+ 0x0000000000000000, //ParkedAddress
+ 0x000000002C002000, //PhysicalBaseAddress
+ },
+ //LocalGic3
+ {
+ ACPI_PROCESSOR_LOCAL_GIC, //Type
+ sizeof (EFI_ACPI_5_0_GIC_STRUCTURE), //Length
+ 0x00, //Reserved
+ 0x03, //GicId
+ 0x03, //AcpiProcessorUid
+ EFI_ACPI_5_0_GIC_ENABLED, //Flags
+ 0x00000000, //ParkingProtocolVersion
+ 0x00000000, //PerformanceInterruptGsiv
+ 0x0000000000000000, //ParkedAddress
+ 0x000000002C002000, //PhysicalBaseAddress
+ },
+ //LocalGic4
+ {
+ ACPI_PROCESSOR_LOCAL_GIC, //Type
+ sizeof (EFI_ACPI_5_0_GIC_STRUCTURE), //Length
+ 0x00, //Reserved
+ 0x04, //GicId
+ 0x04, //AcpiProcessorUid
+ 0, //Flags
+ 0x00000000, //ParkingProtocolVersion
+ 0x00000000, //PerformanceInterruptGsiv
+ 0x0000000000000000, //ParkedAddress
+ 0x000000002C002000, //PhysicalBaseAddress
+ },
+ //LocalGic5
+ {
+ ACPI_PROCESSOR_LOCAL_GIC, //Type
+ sizeof (EFI_ACPI_5_0_GIC_STRUCTURE), //Length
+ 0x00, //Reserved
+ 0x05, //GicId
+ 0x05, //AcpiProcessorUid
+ 0x0, //Flags
+ 0x00000000, //ParkingProtocolVersion
+ 0x00000000, //PerformanceInterruptGsiv
+ 0x0000000000000000, //ParkedAddress
+ 0x000000002C002000, //PhysicalBaseAddress
+ },
+ //LocalGic6
+ {
+ ACPI_PROCESSOR_LOCAL_GIC, //Type
+ sizeof (EFI_ACPI_5_0_GIC_STRUCTURE), //Length
+ 0x00, //Reserved
+ 0x06, //GicId
+ 0x06, //AcpiProcessorUid
+ 0x0, //Flags
+ 0x00000000, //ParkingProtocolVersion
+ 0x00000000, //PerformanceInterruptGsiv
+ 0x0000000000000000, //ParkedAddress
+ 0x000000002C002000 , //PhysicalBaseAddress
+ },
+ //LocalGic7
+ {
+ ACPI_PROCESSOR_LOCAL_GIC, //Type
+ sizeof (EFI_ACPI_5_0_GIC_STRUCTURE), //Length
+ 0x00, //Reserved
+ 0x07, //GicId
+ 0x07, //AcpiProcessorUid
+ 0x0, //Flags
+ 0x00000000, //ParkingProtocolVersion
+ 0x00000000, //PerformanceInterruptGsiv
+ 0x0000000000000000, //ParkedAddress
+ 0x000000002C002000, //PhysicalBaseAddress
+ },
+ },
+ //Distributor
+ {
+ ACPI_GIC_DISTRIBUTOR, //Type
+ sizeof (EFI_ACPI_5_0_GIC_DISTRIBUTOR_STRUCTURE), //Length
+ 0, //Reserved1
+ 0, //GicId
+ 0x000000002C001000, //PhysicalBaseAddress
+ 0, //SystemVectorBase
+ 0 //Reserved2
+ }
+
+};
+
+
+VOID*
+ReferenceAcpiTable (
+ VOID
+ )
+{
+ //
+ // Reference the table being generated to prevent the optimizer from removing the
+ // data structure from the exeutable
+ //
+ return (VOID*)&Madt;
+}
diff --git a/ArmPkg/Drivers/AcpiTables/rtsm_ve-v7/Bert.aslc b/ArmPkg/Drivers/AcpiTables/rtsm_ve-v7/Bert.aslc
new file mode 100644
index 0000000..0fe2bc4
--- /dev/null
+++ b/ArmPkg/Drivers/AcpiTables/rtsm_ve-v7/Bert.aslc
@@ -0,0 +1,84 @@
+/*
+ * Copyright (c) 2013 Linaro Limited
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the BSD License which accompanies
+ * this distribution, and is available at
+ * http://opensource.org/licenses/bsd-license.php
+ *
+ * Contributors:
+ * Yi Li - yi.li@linaro.org
+*/
+
+#include <IndustryStandard/Acpi.h>
+#include <Platform.h>
+
+// Generic error severity in data entry
+#define BOOT_ERROR_SEVERITY_RECOVERABLE 0
+#define BOOT_ERROR_SEVERITY_FATAL 1
+#define BOOT_ERROR_SEVERITY_CORRECTED 2
+#define BOOT_ERROR_SEVERITY_NONE 3
+
+#pragma pack(1)
+
+// ErrorStatus block record definitions for various errors
+typedef struct {
+ UINT32 UeValid:1;
+ UINT32 CeValid:1;
+ UINT32 MultipleUeValid:1;
+ UINT32 MultipleCeValid:1;
+ UINT32 NumErrorDataEntry:10;
+ UINT32 Resv1:18;
+} BOOT_ERROR_BLOCK_STATUS;
+
+
+typedef struct {
+ // Error Status block
+ BOOT_ERROR_BLOCK_STATUS BlockStatus;
+ UINT32 RawDataOffset;
+ UINT32 RawDataSize;
+ UINT32 ErrDataSize;
+ UINT32 Severity;
+ // Error Status data...
+} EFI_ACPI_5_0_BOOT_ERROR_REGION;
+
+
+typedef struct {
+ EFI_ACPI_DESCRIPTION_HEADER Header;
+ UINT32 BootErrorRegionLen;
+ UINT64 BootErrorRegion;
+} EFI_ACPI_5_0_BOOT_ERROR_RECORD_TABLE;
+
+#pragma pack()
+
+
+
+EFI_ACPI_5_0_BOOT_ERROR_RECORD_TABLE Bert = {
+ {
+ EFI_ACPI_5_0_BOOT_ERROR_RECORD_TABLE_SIGNATURE,
+ sizeof (EFI_ACPI_5_0_BOOT_ERROR_RECORD_TABLE),
+ EFI_ACPI_5_0_BOOT_ERROR_RECORD_TABLE_REVISION,
+ 0x00, // Checksum will be updated at runtime
+ {EFI_ACPI_OEM_ID},
+ EFI_ACPI_OEM_TABLE_ID,
+ 0x02,
+ EFI_ACPI_CREATOR_ID,
+ EFI_ACPI_CREATOR_REVISION
+ },
+ 0x9D, //BootErrorRegionLen
+ 0xFFFF0008 //BootErrorRegion
+
+};
+
+
+VOID*
+ReferenceAcpiTable (
+ VOID
+ )
+{
+ //
+ // Reference the table being generated to prevent the optimizer from removing the
+ // data structure from the exeutable
+ //
+ return (VOID*)&Bert;
+}
diff --git a/ArmPkg/Drivers/AcpiTables/rtsm_ve-v7/Dsdt.asl b/ArmPkg/Drivers/AcpiTables/rtsm_ve-v7/Dsdt.asl
new file mode 100644
index 0000000..c4185fe
--- /dev/null
+++ b/ArmPkg/Drivers/AcpiTables/rtsm_ve-v7/Dsdt.asl
@@ -0,0 +1,255 @@
+/*
+ * Copyright (c) 2013, Al Stone <al.stone@linaro.org>
+ *
+ * [DSDT] Description of the armv8 VE Model
+ *
+ * This source is released under the terms of the GPLv2.
+ */
+
+DefinitionBlock (
+ "dsdt.aml", // output filename
+ "DSDT", // table signature
+ 2, // DSDT compliance revision
+ "LINARO", // OEM ID
+ "RTSMVEV8", // table ID
+ 0x00000003) // OEM revision
+{
+ Scope (\_SB)
+ {
+ Method (_OSC, 4, NotSerialized)
+ {
+ /* Platform-Wide OSPM Capabilities */
+ If(LEqual(Arg0,ToUUID("0811B06E-4A27-44F9-8D60-3CBBC22E7B48")))
+ {
+ /* APEI support unconditionally */
+ Return (Arg3)
+ } Else {
+ CreateDWordField (Arg3, Zero, CDW1)
+ /* Set invalid UUID error bit */
+ Or (CDW1, 0x04, CDW1)
+ Return (Arg3)
+ }
+ }
+
+ Device (HED)
+ {
+ Name (_HID, EisaId ("PNP0C33"))
+ Name (_UID, 0x00)
+ }
+
+ Device (SCK0)
+ {
+ Name (_HID, "ACPI0004")
+ Name (_UID, 0x00)
+ Method (_STA, 0, NotSerialized)
+ {
+ Return (0x0F)
+ }
+
+ Device (PRC0)
+ {
+ Name (_HID, "ACPI0007")
+ Name (_UID, 0x00)
+
+ /* CPU0 will be always present */
+ Method (_STA, 0, NotSerialized)
+ {
+ Return (0x0F)
+ }
+
+ Name (MAT0, Buffer (0x28)
+ {
+ /* 0000 */ 0x0B, 0x28, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* type, len, reserved, gic_id */
+ /* 0008 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, /* uid, flags */
+ /* 0010 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* parking_version, performance_interrupt */
+ /* 0018 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* parked_address */
+ /* 0020 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 /* base_address */
+ })
+
+ Name (MAT1, Buffer (0x28)
+ {
+ /* 0000 */ 0x0B, 0x28, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ /* 0008 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ /* 0010 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ /* 0018 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ /* 0020 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
+ })
+
+ Method (_MAT, 0, NotSerialized)
+ {
+ If (_STA())
+ {
+ Return (MAT0)
+ }
+ Else
+ {
+ Return (MAT1)
+ }
+ }
+ }
+
+ Device (PRC1)
+ {
+ Name (_HID, "ACPI0007")
+ Name (_UID, 0x01)
+
+ Name (STA1, 0x0F)
+ Method (_STA, 0, NotSerialized)
+ {
+ Return (STA1)
+ }
+
+ Method (_EJ0, 1, NotSerialized)
+ {
+ If (LEqual (STA1, 0x0F))
+ {
+ Store (0x00, STA1)
+ }
+ }
+
+ Name (MAT0, Buffer (0x28)
+ {
+ /* 0000 */ 0x0B, 0x28, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
+ /* 0008 */ 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01,
+ /* 0010 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ /* 0018 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ /* 0020 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
+ })
+
+ Name (MAT1, Buffer (0x28)
+ {
+ /* 0000 */ 0x0B, 0x28, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
+ /* 0008 */ 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00,
+ /* 0010 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ /* 0018 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ /* 0020 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
+ })
+
+ Method (_MAT, 0, NotSerialized)
+ {
+ If (_STA())
+ {
+ Return (MAT0)
+ }
+ Else
+ {
+ Return (MAT1)
+ }
+ }
+ }
+
+ Device (PRC2)
+ {
+ Name (_HID, "ACPI0007")
+ Name (_UID, 0x02)
+
+ Name (STA2, 0x0F)
+ Method (_STA, 0, NotSerialized)
+ {
+ Return (STA2)
+ }
+
+ Method (_EJ0, 1, NotSerialized)
+ {
+ If (LEqual (STA2, 0x0F))
+ {
+ Store (0x00, STA2)
+ }
+ }
+
+ Name (MAT0, Buffer (0x28)
+ {
+ /* 0000 */ 0x0B, 0x28, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02,
+ /* 0008 */ 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01,
+ /* 0010 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ /* 0018 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ /* 0020 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
+ })
+
+ Name (MAT1, Buffer (0x28)
+ {
+ /* 0000 */ 0x0B, 0x28, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02,
+ /* 0008 */ 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00,
+ /* 0010 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ /* 0018 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ /* 0020 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
+ })
+
+ Method (_MAT, 0, NotSerialized)
+ {
+ If (_STA())
+ {
+ Return (MAT0)
+ }
+ Else
+ {
+ Return (MAT1)
+ }
+ }
+ }
+
+ Device (PRC3)
+ {
+ Name (_HID, "ACPI0007")
+ Name (_UID, 0x03)
+
+ Name (STA3, 0x0F)
+ Method (_STA, 0, NotSerialized)
+ {
+ Return (STA3)
+ }
+
+ Method (_EJ0, 1, NotSerialized)
+ {
+ If (LEqual (STA3, 0x0F))
+ {
+ Store (0x00, STA3)
+ }
+ }
+
+ Name (MAT0, Buffer (0x28)
+ {
+ /* 0000 */ 0x0B, 0x28, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03,
+ /* 0008 */ 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01,
+ /* 0010 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ /* 0018 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ /* 0020 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
+ })
+
+ Name (MAT1, Buffer (0x28)
+ {
+ /* 0000 */ 0x0B, 0x28, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03,
+ /* 0008 */ 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00,
+ /* 0010 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ /* 0018 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ /* 0020 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
+ })
+
+ Method (_MAT, 0, NotSerialized)
+ {
+ If (_STA())
+ {
+ Return (MAT0)
+ }
+ Else
+ {
+ Return (MAT1)
+ }
+ }
+ }
+ }
+
+ Device (NET0) {
+ Name (_HID, "LINA0003")
+ Name (_UID, 0)
+
+ Method (_CRS, 0x0, Serialized) {
+ Name (RBUF, ResourceTemplate () {
+ Memory32Fixed (ReadWrite, 0x1a000000, 0x00010000)
+ Interrupt (ResourceConsumer, Edge, ActiveBoth, Exclusive, , , ) {0x2F}
+ })
+ Return (RBUF)
+ }
+ }
+ }
+}
diff --git a/ArmPkg/Drivers/AcpiTables/rtsm_ve-v7/Ecdt.aslc b/ArmPkg/Drivers/AcpiTables/rtsm_ve-v7/Ecdt.aslc
new file mode 100644
index 0000000..d817d59
--- /dev/null
+++ b/ArmPkg/Drivers/AcpiTables/rtsm_ve-v7/Ecdt.aslc
@@ -0,0 +1,70 @@
+/*
+ * Copyright (c) 2013 Linaro Limited
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the BSD License which accompanies
+ * this distribution, and is available at
+ * http://opensource.org/licenses/bsd-license.php
+ *
+ * Contributors:
+ * Yi Li - yi.li@linaro.org
+*/
+
+#include <IndustryStandard/Acpi.h>
+#include <Platform.h>
+
+typedef struct
+{
+ EFI_ACPI_5_0_EMBEDDED_CONTROLLER_BOOT_RESOURCES_TABLE table;
+ UINT8 ucNamepath;
+}EFI_ACPI_5_0_EMBEDDED_CONTROLLER_BOOT_RESOURCES_TABLE_EX;
+
+
+EFI_ACPI_5_0_EMBEDDED_CONTROLLER_BOOT_RESOURCES_TABLE_EX Ecdt= {
+ {
+ {
+ EFI_ACPI_5_0_EMBEDDED_CONTROLLER_BOOT_RESOURCES_TABLE_SIGNATURE,
+ sizeof (EFI_ACPI_5_0_EMBEDDED_CONTROLLER_BOOT_RESOURCES_TABLE_EX),
+ EFI_ACPI_5_0_EMBEDDED_CONTROLLER_BOOT_RESOURCES_TABLE_REVISION,
+ 0x00, // Checksum will be updated at runtime
+ {EFI_ACPI_OEM_ID},
+ EFI_ACPI_OEM_TABLE_ID,
+ EFI_ACPI_OEM_REVISION,
+ EFI_ACPI_CREATOR_ID,
+ EFI_ACPI_CREATOR_REVISION
+ },
+ /*Command/Status Register Generic Address Structure*/
+ {
+ 0x01, //Space ID:SystemIO
+ 0x08, //Bit Width
+ 0x00, //Bit Offset
+ 0x00, //Encoded Access Width
+ 0x0000000000000066, //Address
+ },
+ /*Data Register Generic Address Structure*/
+ {
+ 0x01, //Space ID:SystemIO
+ 0x08, //Bit Width
+ 0x00, //Bit Offset
+ 0x00, //Encoded Access Width
+ 0x0000000000000062, //Address
+ },
+ 0x00000000, //UID
+ 0x9, //GPE Number
+ },
+ 0x0 //Namepath
+};
+
+
+VOID*
+ReferenceAcpiTable (
+ VOID
+ )
+{
+ //
+ // Reference the table being generated to prevent the optimizer from removing the
+ // data structure from the exeutable
+ //
+ return (VOID*)&Ecdt;
+}
+
diff --git a/ArmPkg/Drivers/AcpiTables/rtsm_ve-v7/Einj.aslc b/ArmPkg/Drivers/AcpiTables/rtsm_ve-v7/Einj.aslc
new file mode 100644
index 0000000..7392cc2
--- /dev/null
+++ b/ArmPkg/Drivers/AcpiTables/rtsm_ve-v7/Einj.aslc
@@ -0,0 +1,202 @@
+/*
+ * Copyright (c) 2013 Linaro Limited
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the BSD License which accompanies
+ * this distribution, and is available at
+ * http://opensource.org/licenses/bsd-license.php
+ *
+ * Contributors:
+ * Yi Li - yi.li@linaro.org
+*/
+
+#include <IndustryStandard/Acpi.h>
+#include <Platform.h>
+
+#pragma pack (1)
+typedef struct {
+ UINT8 Operation;
+ UINT8 Instruction;
+ UINT8 Flags;
+ UINT8 Reserved8;
+ EFI_ACPI_5_0_GENERIC_ADDRESS_STRUCTURE Register;
+ UINT64 Value;
+ UINT64 Mask;
+} EFI_ACPI_WHEA_SERIALIZATION_ACTION;
+
+typedef struct {
+ EFI_ACPI_DESCRIPTION_HEADER Header;
+ UINT32 InjectionHeaderSize;
+ UINT32 Resv1;
+ UINT32 InstructionEntryCount;
+} EFI_ACPI_WHEA_ERROR_INJECTION_HEADER;
+
+typedef struct {
+ EFI_ACPI_WHEA_ERROR_INJECTION_HEADER header;
+ EFI_ACPI_WHEA_SERIALIZATION_ACTION InstructionEntry[8];
+} EFI_ACPI_5_0_ERROR_INJECTION_TABLE;
+
+#pragma pack ()
+
+
+EFI_ACPI_5_0_ERROR_INJECTION_TABLE Einj = {
+ {
+ {
+ EFI_ACPI_5_0_ERROR_INJECTION_TABLE_SIGNATURE,
+ sizeof (EFI_ACPI_5_0_ERROR_INJECTION_TABLE),
+ EFI_ACPI_5_0_ERROR_INJECTION_TABLE_REVISION,
+ 0x00, // Checksum will be updated at runtime
+ {EFI_ACPI_OEM_ID},
+ EFI_ACPI_OEM_TABLE_ID,
+ 0x00000002,
+ EFI_ACPI_CREATOR_ID,
+ EFI_ACPI_CREATOR_REVISION
+ },
+ sizeof(EFI_ACPI_WHEA_ERROR_INJECTION_HEADER),
+ EFI_ACPI_RESERVED_DWORD,
+ 0x08, /*Injection Entry Count*/
+ },
+
+ {
+ { //Action0
+ 0x00, // Action:Begin Operation
+ 0x0, // Instruction:Read Register
+ 0x0, // Flags
+ 0x00, // Reserved
+ /*Register Region*/
+ {
+ EFI_ACPI_3_0_SYSTEM_MEMORY, //Space ID
+ 0x40, //Bit Width
+ 0x0, //Bit Offset
+ 0x4, //Encoded Access Width
+ 0x0000000000000000, //Address
+ },
+ 0x0000000000000000, // Value for InjectError()
+ 0xFFFFFFFFFFFFFFFF // Mask is only valid for 32-bits
+ },
+ { //Action1
+ 0x01, // Action:Get Trigger Table
+ 0x0, // Instruction:Read Register
+ 0x0, // Flags
+ 0x00, // Reserved
+ /*Register Region*/
+ {
+ EFI_ACPI_3_0_SYSTEM_MEMORY, //Space ID
+ 0x40, //Bit Width
+ 0x0, //Bit Offset
+ 0x4, //Encoded Access Width
+ 0x0000000000000000, //Address
+ },
+ 0x0000000000000000, // Value for InjectError()
+ 0xFFFFFFFFFFFFFFFF // Mask is only valid for 32-bits
+ },
+ { //Action2
+ 0x02, // Action:Set Error Type
+ 0x2, // Instruction:Write Register
+ 0x1, // Flags
+ 0x00, // Reserved
+ /*Register Region*/
+ {
+ EFI_ACPI_3_0_SYSTEM_MEMORY, //Space ID
+ 0x40, //Bit Width
+ 0x0, //Bit Offset
+ 0x4, //Encoded Access Width
+ 0x0000000000000000, //Address
+ },
+ 0x0000000000000000, // Value for InjectError()
+ 0xFFFFFFFFFFFFFFFF // Mask is only valid for 32-bits
+ },
+ { //Action3
+ 0x03, // Action:Get Error Type
+ 0x0, // Instruction:Read Register
+ 0x0, // Flags
+ 0x00, // Reserved
+ /*Register Region*/
+ {
+ EFI_ACPI_3_0_SYSTEM_MEMORY, //Space ID
+ 0x40, //Bit Width
+ 0x0, //Bit Offset
+ 0x4, //Encoded Access Width
+ 0x0000000000000000, //Address
+ },
+ 0x0000000000000000, // Value for InjectError()
+ 0xFFFFFFFFFFFFFFFF // Mask is only valid for 32-bits
+ },
+ { //Action4
+ 0x04, // Action:End Operation
+ 0x3, // Instruction:Write Register
+ 0x1, // Flags
+ 0x00, // Reserved
+ /*Register Region*/
+ {
+ EFI_ACPI_3_0_SYSTEM_MEMORY, //Space ID
+ 0x40, //Bit Width
+ 0x0, //Bit Offset
+ 0x4, //Encoded Access Width
+ 0x0000000000000000, //Address
+ },
+ 0x0000000000000000, // Value for InjectError()
+ 0xFFFFFFFFFFFFFFFF // Mask is only valid for 32-bits
+ },
+ { //Action5
+ 0x05, // Action:Execute Operation
+ 0x3, // Instruction:Write Register
+ 0x1, // Flags
+ 0x00, // Reserved
+ /*Register Region*/
+ {
+ EFI_ACPI_3_0_SYSTEM_IO, //Space ID
+ 0x10, //Bit Width
+ 0x0, //Bit Offset
+ 0x2, //Encoded Access Width
+ 0x0000000000000000, //Address
+ },
+ 0x0000000000000000, // Value for InjectError()
+ 0xFFFFFFFFFFFFFFFF // Mask is only valid for 32-bits
+ },
+ { //Action6
+ 0x06, // Action:Check Busy Status
+ 0x1, // Instruction:Read Register
+ 0x0, // Flags
+ 0x00, // Reserved
+ /*Register Region*/
+ {
+ EFI_ACPI_3_0_SYSTEM_MEMORY, //Space ID
+ 0x40, //Bit Width
+ 0x0, //Bit Offset
+ 0x4, //Encoded Access Width
+ 0x0000000000000000, //Address
+ },
+ 0x0000000000000000, // Value for InjectError()
+ 0xFFFFFFFFFFFFFFFF // Mask is only valid for 32-bits
+ },
+ { //Action7
+ 0x07, // Action:Get Command Status
+ 0x0, // Instruction:Read Register
+ 0x1, // Flags
+ 0x00, // Reserved
+ /*Register Region*/
+ {
+ EFI_ACPI_3_0_SYSTEM_MEMORY, //Space ID
+ 0x40, //Bit Width
+ 0x0, //Bit Offset
+ 0x4, //Encoded Access Width
+ 0x0000000000000000, //Address
+ },
+ 0x0000000000000000, // Value for InjectError()
+ 0xFFFFFFFFFFFFFFFF // Mask is only valid for 32-bits
+ },
+ },
+};
+
+VOID*
+ReferenceAcpiTable (
+ VOID
+ )
+{
+ //
+ // Reference the table being generated to prevent the optimizer from removing the
+ // data structure from the exeutable
+ //
+ return (VOID*)&Einj;
+}
diff --git a/ArmPkg/Drivers/AcpiTables/rtsm_ve-v7/Erst.aslc b/ArmPkg/Drivers/AcpiTables/rtsm_ve-v7/Erst.aslc
new file mode 100644
index 0000000..0170b99
--- /dev/null
+++ b/ArmPkg/Drivers/AcpiTables/rtsm_ve-v7/Erst.aslc
@@ -0,0 +1,319 @@
+/*
+ * Copyright (c) 2013 Linaro Limited
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the BSD License which accompanies
+ * this distribution, and is available at
+ * http://opensource.org/licenses/bsd-license.php
+ *
+ * Contributors:
+ * Yi Li - yi.li@linaro.org
+*/
+
+#include <IndustryStandard/Acpi.h>
+#include <Platform.h>
+
+#define ACTION_BEGIN_WRITE_OPERATION 0x00
+#define ACTION_BEGIN_READ_OPERATION 0x01
+#define ACTION_BEGIN_CLEAR_OPERATION 0x02
+#define ACTION_END_OPERATION 0x03
+#define ACTION_SET_RECORD_OFFSET 0x04
+#define ACTION_EXECUTE_OPEARTION 0x05
+#define ACTION_CHECK_BUSY_STATUS 0x06
+#define ACTION_GET_COMMAND_STATUS 0x07
+#define ACTION_GET_RECORD_IDENTIFIER 0x08
+#define ACTION_SET_RECORD_IDENTIFIER 0x09
+#define ACTION_GET_RECORD_COUNT 0x0A
+#define ACTION_BEGIN_DUMMY_WRITE_OPERATION 0x0B
+#define ACTION_GET_NEXT_RECORD_IDENTIFIER 0x0C
+#define ACTION_GET_ERROR_LOG_ADDRESS_RANGE 0x0D
+#define ACTION_GET_ERROR_LOG_ADDRESS_RANGE_LENGTH 0x0E
+#define ACTION_GET_ERROR_LOG_ADDRESS_RANGE_ATTRIBUTES 0x0F
+
+
+#pragma pack (1)
+
+typedef struct {
+ UINT8 Operation;
+ UINT8 Instruction;
+ UINT8 Flags;
+ UINT8 Reserved8;
+ EFI_ACPI_5_0_GENERIC_ADDRESS_STRUCTURE Register;
+ UINT64 Value;
+ UINT64 Mask;
+} EFI_ACPI_5_0_SERIALIZATION_ACTION;
+
+
+typedef struct {
+ EFI_ACPI_DESCRIPTION_HEADER Header;
+ UINT32 SerializationHeaderSize;
+ UINT32 Resv1;
+ UINT32 InstructionEntryCount;
+ EFI_ACPI_5_0_SERIALIZATION_ACTION InstructionEntry[16];
+} EFI_ACPI_5_0_BOOT_ERROR_RECORD_SERIALIZATION_TABLE;
+
+typedef struct {
+ EFI_ACPI_DESCRIPTION_HEADER Header;
+ UINT32 SerializationHeaderSize;
+ UINT32 Resv1;
+ UINT32 InstructionEntryCount;
+} EFI_ACPI_5_0_SERIALIZATION_ACTION_HEADER;
+#pragma pack ()
+
+
+
+EFI_ACPI_5_0_BOOT_ERROR_RECORD_SERIALIZATION_TABLE Erst = {
+ {
+ EFI_ACPI_5_0_ERROR_RECORD_SERIALIZATION_TABLE_SIGNATURE,
+ sizeof (EFI_ACPI_5_0_BOOT_ERROR_RECORD_SERIALIZATION_TABLE),
+ EFI_ACPI_5_0_ERROR_RECORD_SERIALIZATION_TABLE_REVISION,
+ 0x00, // Checksum will be updated at runtime
+ {EFI_ACPI_OEM_ID},
+ EFI_ACPI_OEM_TABLE_ID,
+ 0x00000002,
+ EFI_ACPI_CREATOR_ID,
+ EFI_ACPI_CREATOR_REVISION
+ },
+ sizeof(EFI_ACPI_5_0_SERIALIZATION_ACTION_HEADER),
+ EFI_ACPI_RESERVED_DWORD,
+ 0x10,
+ {
+ { //Action0
+ 0x00, // Action:Begin Operation
+ 0x3, // Instruction:Write Register
+ 0x0, // Flags
+ 0x00, // Reserved
+ /*Register Region*/
+ EFI_ACPI_3_0_SYSTEM_MEMORY, //Space ID
+ 0x40, //Bit Width
+ 0x0, //Bit Offset
+ 0x4, //Encoded Access Width
+ 0xFFFF0100, //Address
+ 0x0000000000000000, // Value for InjectError()
+ 0xFFFFFFFFFFFFFFFF // Mask is only valid for 32-bits
+ },
+ { //Action1
+ 0x01, // Action:Begin Read Operation
+ 0x3, // Instruction:Write Register
+ 0x0, // Flags
+ 0x00, // Reserved
+ /*Register Region*/
+ EFI_ACPI_3_0_SYSTEM_MEMORY, //Space ID
+ 0x40, //Bit Width
+ 0x0, //Bit Offset
+ 0x4, //Encoded Access Width
+ 0xFFFF0108, //Address
+ 0x0000000000000000, // Value for InjectError()
+ 0xFFFFFFFFFFFFFFFF // Mask is only valid for 32-bits
+ },
+ { //Action2
+ 0x02, // Action:Begin Clear Operation
+ 0x3, // Instruction:Write Register
+ 0x0, // Flags
+ 0x00, // Reserved
+ /*Register Region*/
+ EFI_ACPI_3_0_SYSTEM_MEMORY, //Space ID
+ 0x40, //Bit Width
+ 0x0, //Bit Offset
+ 0x4, //Encoded Access Width
+ 0xFFFF0110, //Address
+ 0x0000000000000000, // Value for InjectError()
+ 0xFFFFFFFFFFFFFFFF // Mask is only valid for 32-bits
+ },
+ { //Action3
+ 0x03, // Action:Begin Clear Operation
+ 0x4, // Instruction:Noop
+ 0x1, // Flags
+ 0x00, // Reserved
+ /*Register Region*/
+ EFI_ACPI_3_0_SYSTEM_MEMORY, //Space ID
+ 0x40, //Bit Width
+ 0x0, //Bit Offset
+ 0x4, //Encoded Access Width
+ 0xFFFF0118, //Address
+ 0x0000000000000000, // Value for InjectError()
+ 0xFFFFFFFFFFFFFFFF // Mask is only valid for 32-bits
+ },
+ { //Action4
+ 0x04, // Action:Begin Clear Operation
+ 0x2, // Instruction:Write Register
+ 0x0, // Flags
+ 0x00, // Reserved
+ /*Register Region*/
+ EFI_ACPI_3_0_SYSTEM_MEMORY, //Space ID
+ 0x40, //Bit Width
+ 0x0, //Bit Offset
+ 0x4, //Encoded Access Width
+ 0xFFFF0120, //Address
+ 0x0000000000000000, // Value for InjectError()
+ 0xFFFFFFFFFFFFFFFF // Mask is only valid for 32-bits
+ },
+ { //Action5
+ 0x05, // Action:Execute Operation
+ 0x3, // Instruction:Write Register
+ 0x0, // Flags
+ 0x00, // Reserved
+ /*Register Region*/
+ EFI_ACPI_5_0_SYSTEM_MEMORY, //Space ID
+ 0x8, //Bit Width
+ 0x0, //Bit Offset
+ 0x1, //Encoded Access Width
+ 0xFFFF0128, //Address
+ 0x0000000000000000, // Value for InjectError()
+ 0xFFFFFFFFFFFFFFFF // Mask is only valid for 32-bits
+ },
+ { //Action6
+ 0x06, // Action:Check Busy Status
+ 0x1, // Instruction:Read Register
+ 0x0, // Flags
+ 0x00, // Reserved
+ /*Register Region*/
+ EFI_ACPI_3_0_SYSTEM_MEMORY, //Space ID
+ 0x40, //Bit Width
+ 0x0, //Bit Offset
+ 0x4, //Encoded Access Width
+ 0xFFFF0130, //Address
+ 0x0000000000000000, // Value for InjectError()
+ 0xFFFFFFFFFFFFFFFF // Mask is only valid for 32-bits
+ },
+ { //Action7
+ 0x07, // Action:Get Command Status
+ 0x0, // Instruction:Read Register
+ 0x0, // Flags
+ 0x00, // Reserved
+ /*Register Region*/
+ EFI_ACPI_3_0_SYSTEM_MEMORY, //Space ID
+ 0x40, //Bit Width
+ 0x0, //Bit Offset
+ 0x4, //Encoded Access Width
+ 0xFFFF0138, //Address
+ 0x0000000000000000, // Value for InjectError()
+ 0xFFFFFFFFFFFFFFFF // Mask is only valid for 32-bits
+ },
+ { //Action8
+ 0x08, // Action:Get Command Status
+ 0x0, // Instruction:Read Register
+ 0x0, // Flags
+ 0x00, // Reserved
+ /*Register Region*/
+ EFI_ACPI_3_0_SYSTEM_MEMORY, //Space ID
+ 0x40, //Bit Width
+ 0x0, //Bit Offset
+ 0x4, //Encoded Access Width
+ 0xFFFF0140, //Address
+ 0x0000000000000000, // Value for InjectError()
+ 0xFFFFFFFFFFFFFFFF // Mask is only valid for 32-bits
+ },
+ { //Action9
+ 0x09, // Action:Set Record Identifier
+ 0x2, // Instruction:Write Register
+ 0x0, // Flags
+ 0x00, // Reserved
+ /*Register Region*/
+ EFI_ACPI_3_0_SYSTEM_MEMORY, //Space ID
+ 0x40, //Bit Width
+ 0x0, //Bit Offset
+ 0x4, //Encoded Access Width
+ 0xFFFF0148, //Address
+ 0x0000000000000000, // Value for InjectError()
+ 0xFFFFFFFFFFFFFFFF // Mask is only valid for 32-bits
+ },
+ { //Action10
+ 0x0A, // Action:Get Record Count
+ 0x0, // Instruction:Read Register
+ 0x0, // Flags
+ 0x00, // Reserved
+ /*Register Region*/
+ EFI_ACPI_3_0_SYSTEM_MEMORY, //Space ID
+ 0x40, //Bit Width
+ 0x0, //Bit Offset
+ 0x4, //Encoded Access Width
+ 0xFFFF0150, //Address
+ 0x0000000000000000, // Value for InjectError()
+ 0xFFFFFFFFFFFFFFFF // Mask is only valid for 32-bits
+ },
+ { //Action11
+ 0x0B, // Action:Begin Dummy Write
+ 0x3, // Instruction:Write Register
+ 0x0, // Flags
+ 0x00, // Reserved
+ /*Register Region*/
+ EFI_ACPI_3_0_SYSTEM_MEMORY, //Space ID
+ 0x40, //Bit Width
+ 0x0, //Bit Offset
+ 0x4, //Encoded Access Width
+ 0xFFFF0158, //Address
+ 0x0000000000000000, // Value for InjectError()
+ 0xFFFFFFFFFFFFFFFF // Mask is only valid for 32-bits
+ },
+ { //Action12
+ 0x0C, // Action:Unused/Unknown Action
+ 0x0, // Instruction:Read Register
+ 0x0, // Flags
+ 0x00, // Reserved
+ /*Register Region*/
+ EFI_ACPI_3_0_SYSTEM_MEMORY, //Space ID
+ 0x40, //Bit Width
+ 0x0, //Bit Offset
+ 0x4, //Encoded Access Width
+ 0xFFFF0160, //Address
+ 0x0000000000000000, // Value for InjectError()
+ 0xFFFFFFFFFFFFFFFF // Mask is only valid for 32-bits
+ },
+ { //Action13
+ 0x0D, // Action:Get Error Address Range
+ 0x0, // Instruction:Read Register
+ 0x0, // Flags
+ 0x00, // Reserved
+ /*Register Region*/
+ EFI_ACPI_3_0_SYSTEM_MEMORY, //Space ID
+ 0x40, //Bit Width
+ 0x0, //Bit Offset
+ 0x4, //Encoded Access Width
+ 0xFFFF0168, //Address
+ 0x0000000000000000, // Value for InjectError()
+ 0xFFFFFFFFFFFFFFFF // Mask is only valid for 32-bits
+ },
+ { //Action14
+ 0x0E, // Action:Get Error Address Length
+ 0x0, // Instruction:Read Register
+ 0x0, // Flags
+ 0x00, // Reserved
+ /*Register Region*/
+ EFI_ACPI_3_0_SYSTEM_MEMORY, //Space ID
+ 0x40, //Bit Width
+ 0x0, //Bit Offset
+ 0x4, //Encoded Access Width
+ 0xFFFF0170, //Address
+ 0x0000000000000000, // Value for InjectError()
+ 0xFFFFFFFFFFFFFFFF // Mask is only valid for 32-bits
+ },
+ { //Action15
+ 0x0F, // Action:Get Error Attributes
+ 0x0, // Instruction:Read Register
+ 0x0, // Flags
+ 0x00, // Reserved
+ /*Register Region*/
+ EFI_ACPI_3_0_SYSTEM_MEMORY, //Space ID
+ 0x40, //Bit Width
+ 0x0, //Bit Offset
+ 0x4, //Encoded Access Width
+ 0xFFFF0178, //Address
+ 0x0000000000000000, // Value for InjectError()
+ 0xFFFFFFFFFFFFFFFF // Mask is only valid for 32-bits
+ },
+ }
+
+};
+
+VOID*
+ReferenceAcpiTable (
+ VOID
+ )
+{
+ //
+ // Reference the table being generated to prevent the optimizer from removing the
+ // data structure from the exeutable
+ //
+ return (VOID*)&Erst;
+}
diff --git a/ArmPkg/Drivers/AcpiTables/rtsm_ve-v7/Facp.aslc b/ArmPkg/Drivers/AcpiTables/rtsm_ve-v7/Facp.aslc
new file mode 100644
index 0000000..729c5bc
--- /dev/null
+++ b/ArmPkg/Drivers/AcpiTables/rtsm_ve-v7/Facp.aslc
@@ -0,0 +1,175 @@
+/** @file
+ FACP Table
+
+ Copyright (c) 2008 - 2012, Intel Corporation. All rights reserved.<BR>
+ 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.
+
+**/
+/*
+ * Copyright (c) 2013 Linaro Limited
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the BSD License which accompanies
+ * this distribution, and is available at
+ * http://opensource.org/licenses/bsd-license.php
+ *
+ * Contributors:
+ * Yi Li - yi.li@linaro.org
+*/
+
+#include "Platform.h"
+
+EFI_ACPI_5_0_FIXED_ACPI_DESCRIPTION_TABLE Facp = {
+ {
+ EFI_ACPI_5_0_FIXED_ACPI_DESCRIPTION_TABLE_SIGNATURE,
+ sizeof (EFI_ACPI_5_0_FIXED_ACPI_DESCRIPTION_TABLE),
+ EFI_ACPI_5_0_FIXED_ACPI_DESCRIPTION_TABLE_REVISION,
+ 0, // to make sum of entire table == 0
+ {EFI_ACPI_OEM_ID}, // OEMID is a 6 bytes long field
+ EFI_ACPI_OEM_TABLE_ID, // OEM table identification(8 bytes long)
+ 0x00, // OEM revision number
+ EFI_ACPI_CREATOR_ID, // ASL compiler vendor ID
+ EFI_ACPI_CREATOR_REVISION // ASL compiler revision number
+ },
+ 0, // Physical addesss of FACS
+ 0x00000010, // Physical address of DSDT
+ 0x0, // System Interrupt Model
+ 0x4, // PM Profile
+ SCI_INT_VECTOR, // System vector of SCI interrupt
+ SMI_CMD_IO_PORT, // Port address of SMI command port
+ ACPI_ENABLE, // value to write to port smi_cmd to enable ACPI
+ ACPI_DISABLE, // value to write to port smi_cmd to disable ACPI
+ S4BIOS_REQ, // Value to write to SMI CMD port to enter the S4BIOS state
+ 0, // PState control
+ PM1a_EVT_BLK, // Port address of Power Mgt 1a Event Reg Blk
+ PM1b_EVT_BLK, // Port address of Power Mgt 1b Event Reg Blk
+ PM1a_CNT_BLK, // Port address of Power Mgt 1a Ctrl Reg Blk
+ PM1b_CNT_BLK, // Port address of Power Mgt 1b Ctrl Reg Blk
+ PM2_CNT_BLK, // Port address of Power Mgt 2 Ctrl Reg Blk
+ PM_TMR_BLK, // Port address of Power Mgt Timer Ctrl Reg Blk
+ GPE0_BLK, // Port addr of General Purpose Event 0 Reg Blk
+ GPE1_BLK, // Port addr of General Purpose Event 1 Reg Blk
+ PM1_EVT_LEN, // Byte Length of ports at pm1X_evt_blk
+ PM1_CNT_LEN, // Byte Length of ports at pm1X_cnt_blk
+ PM2_CNT_LEN, // Byte Length of ports at pm2_cnt_blk
+ PM_TM_LEN, // Byte Length of ports at pm_tm_blk
+ GPE0_BLK_LEN, // Byte Length of ports at gpe0_blk
+ GPE1_BLK_LEN, // Byte Length of ports at gpe1_blk
+ GPE1_BASE, // offset in gpe model where gpe1 events start
+ 0, // _CST support
+ P_LVL2_LAT, // worst case HW latency to enter/exit C2 state
+ P_LVL3_LAT, // worst case HW latency to enter/exit C3 state
+ FLUSH_SIZE, // Size of area read to flush caches
+ FLUSH_STRIDE, // Stride used in flushing caches
+ DUTY_OFFSET, // bit location of duty cycle field in p_cnt reg
+ DUTY_WIDTH, // bit width of duty cycle field in p_cnt reg
+ DAY_ALRM, // index to day-of-month alarm in RTC CMOS RAM
+ MON_ALRM, // index to month-of-year alarm in RTC CMOS RAM
+ CENTURY, // index to century in RTC CMOS RAM
+ 0x0000, // Boot architecture flag
+ 0x00, // reserved
+ FLAG,
+
+ {
+ 0x01, //Space ID
+ 0x8, //Bit Width
+ 0x0, //Bit Offset
+ 0x1, //Encoded Access Width
+ 0x0000000000000001,//Address
+ },
+
+ 0x0, //Value to cause reset
+ {0,0,0}, //Reserved
+ 0x0000000000000000,//FACS Address
+ 0x0000000000000010,//DSDT Address
+
+
+ /*PM1A Event Block*/
+ 0x1, //Space ID:SystemIO
+ 0x20, //Bit Width
+ 0x0, //Bit Offset
+ 0x2, //Encoded Access Width
+ 0x0000000000000001, //Address
+
+ /*PM1B Event Block*/
+ 0x1, //Space ID:SystemIO
+ 0x0, //Bit Width
+ 0x0, //Bit Offset
+ 0x0, //Encoded Access Width
+ 0x0000000000000000, //Address
+
+ /*PM1A Control Block*/
+ 0x1, //Space ID:SystemIO
+ 0x10, //Bit Width
+ 0x0, //Bit Offset
+ 0x02, //Encoded Access Width
+ 0000000000000001, //Address
+
+ /*PM1B Control Block*/
+ 0x1, //Space ID:SystemIO
+ 0x00, //Bit Width
+ 0x0, //Bit Offset
+ 0x0, //Encoded Access Width
+ 0x0000000000000000, //Address
+
+ /*PM2 Control Block*/
+ 0x1, //Space ID:SystemIO
+ 0x08, //Bit Width
+ 0x0, //Bit Offset
+ 0x0, //Encoded Access Width
+ 0x0000000000000001, //Address
+
+ /*PM Timer Block*/
+ 0x1, //Space ID:SystemIO
+ 0x20, //Bit Width
+ 0x0, //Bit Offset
+ 0x3, //Encoded Access Width
+ 0x0000000000000001, //Address
+
+ /*GPE0 Block*/
+ 0x1, //Space ID:SystemIO
+ 0x80, //Bit Width
+ 0x0, //Bit Offset
+ 0x1, //Encoded Access Width
+ 0x0000000000000001, //Address
+
+ /*GPE1 Block*/
+ 0x1, //Space ID:SystemIO
+ 0x00, //Bit Width
+ 0x0, //Bit Offset
+ 0x0, //Encoded Access Width
+ 0x0000000000000000, //Address
+
+ /*Sleep Control Register*/
+ 0x1, //Space ID:SystemIO
+ 0x08, //Bit Width
+ 0x0, //Bit Offset
+ 0x1, //Encoded Access Width
+ 0x0000000000000000, //Address
+
+ /*Sleep Status Register*/
+ 0x1, //Space ID:SystemIO
+ 0x08, //Bit Width
+ 0x0, //Bit Offset
+ 0x1, //Encoded Access Width
+ 0x0000000000000000, //Address
+
+};
+
+VOID*
+ReferenceAcpiTable (
+ VOID
+ )
+{
+ //
+ // Reference the table being generated to prevent the optimizer from removing the
+ // data structure from the exeutable
+ //
+ return (VOID*)&Facp;
+}
diff --git a/ArmPkg/Drivers/AcpiTables/rtsm_ve-v7/Facs.aslc b/ArmPkg/Drivers/AcpiTables/rtsm_ve-v7/Facs.aslc
new file mode 100644
index 0000000..9bcddea
--- /dev/null
+++ b/ArmPkg/Drivers/AcpiTables/rtsm_ve-v7/Facs.aslc
@@ -0,0 +1,86 @@
+/** @file
+ FACS Table
+
+ Copyright (c) 2008 - 2012, Intel Corporation. All rights reserved.<BR>
+ 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.
+
+**/
+
+/*
+ * Copyright (c) 2013 Linaro Limited
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the BSD License which accompanies
+ * this distribution, and is available at
+ * http://opensource.org/licenses/bsd-license.php
+ *
+ * Contributors:
+ * Yi Li - yi.li@linaro.org
+*/
+
+#include <IndustryStandard/Acpi.h>
+
+EFI_ACPI_5_0_FIRMWARE_ACPI_CONTROL_STRUCTURE Facs = {
+ EFI_ACPI_5_0_FIRMWARE_ACPI_CONTROL_STRUCTURE_SIGNATURE,
+ sizeof (EFI_ACPI_5_0_FIRMWARE_ACPI_CONTROL_STRUCTURE),
+
+ //
+ // Hardware Signature will be updated at runtime
+ //
+ 0x00000000, //HardwareSignature
+ 0x00, //FirmwareWakingVector
+ 0x00, //GlobalLock
+ 0x00, //Flags
+ 0x0000000000000000, //XFirmwareWakingVector
+ 0x02, //Version
+ {
+ EFI_ACPI_RESERVED_BYTE,
+ EFI_ACPI_RESERVED_BYTE,
+ EFI_ACPI_RESERVED_BYTE
+ },
+ 0x00,
+ {
+ EFI_ACPI_RESERVED_BYTE,
+ EFI_ACPI_RESERVED_BYTE,
+ EFI_ACPI_RESERVED_BYTE,
+ EFI_ACPI_RESERVED_BYTE,
+ EFI_ACPI_RESERVED_BYTE,
+ EFI_ACPI_RESERVED_BYTE,
+ EFI_ACPI_RESERVED_BYTE,
+ EFI_ACPI_RESERVED_BYTE,
+ EFI_ACPI_RESERVED_BYTE,
+ EFI_ACPI_RESERVED_BYTE,
+ EFI_ACPI_RESERVED_BYTE,
+ EFI_ACPI_RESERVED_BYTE,
+ EFI_ACPI_RESERVED_BYTE,
+ EFI_ACPI_RESERVED_BYTE,
+ EFI_ACPI_RESERVED_BYTE,
+ EFI_ACPI_RESERVED_BYTE,
+ EFI_ACPI_RESERVED_BYTE,
+ EFI_ACPI_RESERVED_BYTE,
+ EFI_ACPI_RESERVED_BYTE,
+ EFI_ACPI_RESERVED_BYTE,
+ EFI_ACPI_RESERVED_BYTE,
+ EFI_ACPI_RESERVED_BYTE,
+ EFI_ACPI_RESERVED_BYTE,
+ EFI_ACPI_RESERVED_BYTE
+ }
+};
+
+VOID*
+ReferenceAcpiTable (
+ VOID
+ )
+{
+ //
+ // Reference the table being generated to prevent the optimizer from removing the
+ // data structure from the exeutable
+ //
+ return (VOID*)&Facs;
+}
diff --git a/ArmPkg/Drivers/AcpiTables/rtsm_ve-v7/Gtdt.aslc b/ArmPkg/Drivers/AcpiTables/rtsm_ve-v7/Gtdt.aslc
new file mode 100644
index 0000000..ab8a60a
--- /dev/null
+++ b/ArmPkg/Drivers/AcpiTables/rtsm_ve-v7/Gtdt.aslc
@@ -0,0 +1,51 @@
+/*
+ * Copyright (c) 2013 Linaro Limited
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the BSD License which accompanies
+ * this distribution, and is available at
+ * http://opensource.org/licenses/bsd-license.php
+ *
+ * Contributors:
+ * Yi Li - yi.li@linaro.org
+*/
+
+#include <IndustryStandard/Acpi.h>
+#include <Platform.h>
+
+EFI_ACPI_5_0_GENERIC_TIMER_DESCRIPTION_TABLE Gtdt =
+{
+ {
+ EFI_ACPI_5_0_GENERIC_TIMER_DESCRIPTION_TABLE_SIGNATURE,
+ sizeof (EFI_ACPI_5_0_GENERIC_TIMER_DESCRIPTION_TABLE),
+ EFI_ACPI_5_0_GENERIC_TIMER_DESCRIPTION_TABLE_REVISION,
+ 0x00, // Checksum will be updated at runtime
+ {EFI_ACPI_OEM_ID},
+ EFI_ACPI_OEM_TABLE_ID,
+ EFI_ACPI_OEM_REVISION,
+ EFI_ACPI_CREATOR_ID,
+ EFI_ACPI_CREATOR_REVISION
+ },
+ 0x0000000000000000, //Timer Address
+ 0x00000001, //Flags
+ 0x00000000, //Secure PL1 Interrupt
+ 0x00000000, //SPL1 Flags
+ 0x00000000, //Non-Secure PL1 Interrupt
+ 0x00000000, //NSPL1 Flags
+ 0x00000000, //Virtual Timer Interrupt
+ 0x00000000, //VT Flags
+ 0x00000000, //Non-Secure PL2 Interrupt
+ 0x00000000, //NSPL2 Flags
+};
+
+VOID*
+ReferenceAcpiTable (
+ VOID
+ )
+{
+ //
+ // Reference the table being generated to prevent the optimizer from removing the
+ // data structure from the exeutable
+ //
+ return (VOID*)&Gtdt;
+}
diff --git a/ArmPkg/Drivers/AcpiTables/rtsm_ve-v7/Hest.aslc b/ArmPkg/Drivers/AcpiTables/rtsm_ve-v7/Hest.aslc
new file mode 100644
index 0000000..08092ac
--- /dev/null
+++ b/ArmPkg/Drivers/AcpiTables/rtsm_ve-v7/Hest.aslc
@@ -0,0 +1,84 @@
+/*
+ * Copyright (c) 2013 Linaro Limited
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the BSD License which accompanies
+ * this distribution, and is available at
+ * http://opensource.org/licenses/bsd-license.php
+ *
+ * Contributors:
+ * Yi Li - yi.li@linaro.org
+*/
+
+#include <IndustryStandard/Acpi.h>
+#include <Platform.h>
+
+#pragma pack(1)
+
+typedef struct {
+ EFI_ACPI_DESCRIPTION_HEADER Header;
+ UINT32 ErrorEntryCount;
+ EFI_ACPI_5_0_GENERIC_HARDWARE_ERROR_SOURCE_STRUCTURE GenHardWareError;
+
+} EFI_ACPI_5_0_HARDWARE_ERROR_SOURCE_TABLE;
+
+#pragma pack()
+
+EFI_ACPI_5_0_HARDWARE_ERROR_SOURCE_TABLE Hest = {
+ {
+ EFI_ACPI_5_0_HARDWARE_ERROR_SOURCE_TABLE_SIGNATURE,
+ sizeof (EFI_ACPI_5_0_HARDWARE_ERROR_SOURCE_TABLE),
+ EFI_ACPI_5_0_HARDWARE_ERROR_SOURCE_TABLE_REVISION,
+ 0x00, // Checksum will be updated at runtime
+ {EFI_ACPI_OEM_ID},
+ EFI_ACPI_OEM_TABLE_ID,
+ 0x02,
+ EFI_ACPI_CREATOR_ID,
+ EFI_ACPI_CREATOR_REVISION
+ },
+ 0x00000001, //Error Source Count
+{
+ 0x0009, //Subtable Type:Generic Hardware Error Source
+ 0x0002, //Source Id
+ 0xFFFF, //Related Source Id
+ 0x00, //Reserved
+ 0x01, //Enabled
+ 0x00000001, //Records To Preallocate
+ 0x00000001, //Max Sections Per Record
+ 0x00001000, //Max Raw Data Length
+
+ /* Error Status Address : [Generic Address Structure]*/
+ {
+ 0x00, //Space ID:SystemMemory
+ 0x40, //Bit Width
+ 0x00, //Bit Offset
+ 0x04, //Encoded Access Width
+ 0xFFFF0000, //Address
+ },
+ /*Notify : [Hardware Error Notification Structure]*/
+ {
+ 0x03, //Notify Type:SCI
+ 0x1c, //Notify Length
+ 0x0000, //Configuration Write Enable
+ 0x00000000, //PollInterval
+ 0x00000000, //Vector
+ 0x00000000, //Polling Threshold Value
+ 0x00000000, //Polling Threshold Window
+ 0x00000000, //Error Threshold Value
+ 0x00000000, //Error Threshold Window
+ },
+ 0x00001000, //Error Status Block Length
+},
+};
+
+VOID*
+ReferenceAcpiTable (
+ VOID
+ )
+{
+ //
+ // Reference the table being generated to prevent the optimizer from removing the
+ // data structure from the exeutable
+ //
+ return (VOID*)&Hest;
+}
diff --git a/ArmPkg/Drivers/AcpiTables/rtsm_ve-v7/Mcfg.aslc b/ArmPkg/Drivers/AcpiTables/rtsm_ve-v7/Mcfg.aslc
new file mode 100644
index 0000000..9451e9c
--- /dev/null
+++ b/ArmPkg/Drivers/AcpiTables/rtsm_ve-v7/Mcfg.aslc
@@ -0,0 +1,62 @@
+/*
+ * Copyright (c) 2013 Linaro Limited
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the BSD License which accompanies
+ * this distribution, and is available at
+ * http://opensource.org/licenses/bsd-license.php
+ *
+ * Contributors:
+ * Yi Li - yi.li@linaro.org
+*/
+
+#include <IndustryStandard/Acpi.h>
+#include <Platform.h>
+
+#define ACPI_5_0_MCFG_VERSION 0x1
+
+#pragma pack(1)
+typedef struct
+{
+ EFI_ACPI_DESCRIPTION_HEADER Header;
+ UINT64 Reserved1;
+ UINT64 ullBaseAddress;
+ UINT16 usSegGroupNum;
+ UINT8 ucStartBusNum;
+ UINT8 ucEndBusNum;
+ UINT32 Reserved2;
+}EFI_ACPI_5_0_PCI_EXPRESS_MEMORY_MAPPED_CONFIGURATION_SPACE_TABLE;
+#pragma pack()
+
+EFI_ACPI_5_0_PCI_EXPRESS_MEMORY_MAPPED_CONFIGURATION_SPACE_TABLE Mcfg=
+{
+ {
+ EFI_ACPI_5_0_PCI_EXPRESS_MEMORY_MAPPED_CONFIGURATION_SPACE_BASE_ADDRESS_DESCRIPTION_TABLE_SIGNATURE,
+ sizeof (EFI_ACPI_5_0_PCI_EXPRESS_MEMORY_MAPPED_CONFIGURATION_SPACE_TABLE),
+ ACPI_5_0_MCFG_VERSION,
+ 0x00, // Checksum will be updated at runtime
+ {EFI_ACPI_OEM_ID},
+ EFI_ACPI_OEM_TABLE_ID,
+ EFI_ACPI_OEM_REVISION,
+ EFI_ACPI_CREATOR_ID,
+ EFI_ACPI_CREATOR_REVISION
+ },
+ 0x0000000000000000, //Reserved
+ 0x0000000000000000, //Base Address
+ 0x0000, //Segment Group Number
+ 0x00, //Start Bus Number
+ 0x00, //End Bus Number
+ 0x00000000, //Reserved
+};
+
+VOID*
+ReferenceAcpiTable (
+ VOID
+ )
+{
+ //
+ // Reference the table being generated to prevent the optimizer from removing the
+ // data structure from the exeutable
+ //
+ return (VOID*)&Mcfg;
+}
diff --git a/ArmPkg/Drivers/AcpiTables/rtsm_ve-v7/Mpst.aslc b/ArmPkg/Drivers/AcpiTables/rtsm_ve-v7/Mpst.aslc
new file mode 100644
index 0000000..dfdda34
--- /dev/null
+++ b/ArmPkg/Drivers/AcpiTables/rtsm_ve-v7/Mpst.aslc
@@ -0,0 +1,141 @@
+/*
+ * Copyright (c) 2013 Linaro Limited
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the BSD License which accompanies
+ * this distribution, and is available at
+ * http://opensource.org/licenses/bsd-license.php
+ *
+ * Contributors:
+ * Yi Li - yi.li@linaro.org
+*/
+
+#include <IndustryStandard/Acpi.h>
+#include <Platform.h>
+
+#define MAX_POWER_STATES_NUM 0x2
+#define MAX_PHYSICAL_COMPONENTS_NUM 0x3
+#define MAX_MEMORY_POWER_NODE_COUNT 0x2
+#define MAX_CHARACTERISTICS_COUNT 0x2
+
+#pragma pack (1)
+typedef struct
+{
+ EFI_ACPI_5_0_MPST_MEMORY_POWER_STRUCTURE structre;
+ EFI_ACPI_5_0_MPST_MEMORY_POWER_STATE state[MAX_POWER_STATES_NUM];
+ UINT16 components[MAX_PHYSICAL_COMPONENTS_NUM];
+}EFI_ACPI_5_0_MPST_MEMORY_POWER_STRUCTURE_EX;
+
+typedef struct
+{
+ EFI_ACPI_5_0_MPST_MEMORY_POWER_STATE_CHARACTERISTICS_STRUCTURE structre;
+ UINT64 ulResverd;
+}EFI_ACPI_5_0_MPST_MEMORY_POWER_STATE_CHARACTERISTICS_STRUCTURE_EX;
+
+typedef struct
+{
+ EFI_ACPI_5_0_MEMORY_POWER_STATUS_TABLE table;
+ EFI_ACPI_5_0_MPST_MEMORY_POWER_NODE_TABLE node;
+ EFI_ACPI_5_0_MPST_MEMORY_POWER_STRUCTURE_EX powerNode[MAX_MEMORY_POWER_NODE_COUNT];
+ EFI_ACPI_5_0_MPST_MEMORY_POWER_STATE_CHARACTERISTICS_TABLE Characteristics;
+ EFI_ACPI_5_0_MPST_MEMORY_POWER_STATE_CHARACTERISTICS_STRUCTURE_EX powerChar[MAX_CHARACTERISTICS_COUNT];
+}EFI_ACPI_5_0_MEMORY_POWER_STATUS_TABLE_EX;
+#pragma pack ()
+
+
+EFI_ACPI_5_0_MEMORY_POWER_STATUS_TABLE_EX Mpst ={
+ {
+ {
+ EFI_ACPI_5_0_MEMORY_POWER_STATE_TABLE_SIGNATURE,
+ 0x000000B6,
+ EFI_ACPI_5_0_MEMORY_POWER_STATE_TABLE_REVISION,
+ 0x00, // Checksum will be updated at runtime
+ {EFI_ACPI_OEM_ID},
+ EFI_ACPI_OEM_TABLE_ID,
+ EFI_ACPI_OEM_REVISION,
+ EFI_ACPI_CREATOR_ID,
+ EFI_ACPI_CREATOR_REVISION
+ },
+ 0x00, //Channel ID
+ {0,0,0}, //Reserved
+
+ },
+ 0x0002, //Power Node Count
+ {0,0}, //Reserved
+ {
+ {
+ 0x00, //Flags
+ 0x00, //Reserved
+ 0x0000, //Node ID
+ 0x0000000000, //Length
+ 0x00000000000000000000, //ange Address
+ 0x00000000000000000000, //Range Length
+ 0x00000002, // Num Power
+ 0x00000003, // Num Physical Components
+ {
+ {
+ 0x00, //Power State
+ 0x00, //InfoIndex
+ },
+ {
+ 0x00, //Power State
+ 0x00, //InfoIndex
+ },
+ },
+ 0x0000, //Component Id
+ 0x0001, //Component Id
+ 0x0002, //Component Id
+ },
+ {
+ 0x00, //Flags
+ 0x00, //Reserved
+ 0x0000, //Node ID
+ 0x0000000000, //Length
+ 0x00000000000000000000, //ange Address
+ 0x00000000000000000000, //Range Length
+ 0x00000001, // Num Power
+ 0x00000001, // Num Physical Components
+ {
+ 0x00, //Power State
+ 0x00, //InfoIndex
+ },
+ 0x0000, //Component Id
+
+ },
+ },
+
+ 0x0002, //Characteristics Count
+ {0,0}, //Reserved
+ {
+ {
+ 0x01, //Structure ID
+ 0x00, //Flags
+ 0x0000, //Reserved
+ 0x00000000, //Average Power
+ 0x00000000, //Power Saving
+ 0x0000000000000000, //Exit Latency
+ 0x0000000000000000, //Reserved
+ },
+ {
+ 0x01, //Structure ID
+ 0x00, //Flags
+ 0x0000, //Reserved
+ 0x00000000, //Average Power
+ 0x00000000, //Power Saving
+ 0x0000000000000000, //Exit Latency
+ 0x0000000000000000, //Reserved
+ },
+ },
+};
+
+VOID*
+ReferenceAcpiTable (
+ VOID
+ )
+{
+ //
+ // Reference the table being generated to prevent the optimizer from removing the
+ // data structure from the exeutable
+ //
+ return (VOID*)&Mpst;
+}
diff --git a/ArmPkg/Drivers/AcpiTables/rtsm_ve-v7/Msct.aslc b/ArmPkg/Drivers/AcpiTables/rtsm_ve-v7/Msct.aslc
new file mode 100644
index 0000000..80c9d59
--- /dev/null
+++ b/ArmPkg/Drivers/AcpiTables/rtsm_ve-v7/Msct.aslc
@@ -0,0 +1,106 @@
+/*
+ * Copyright (c) 2013 Linaro Limited
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the BSD License which accompanies
+ * this distribution, and is available at
+ * http://opensource.org/licenses/bsd-license.php
+ *
+ * Contributors:
+ * Yi Li - yi.li@linaro.org
+*/
+
+#include <IndustryStandard/Acpi.h>
+#include <Platform.h>
+
+#define EFI_ACPI_MAXIMUM_PROXIMITY_DOMAIN_INFORMATION_STRUCTURE_REVISION 0x1
+//
+// MSCT Table definition
+//
+#pragma pack (1)
+typedef struct {
+ UINT8 Revision;
+ UINT8 Length;
+ UINT32 ProxDomRangeLow;
+ UINT32 ProxDomRangeHigh;
+ UINT32 MaxProcessorCapacity;
+ UINT64 MaxMemoryCapacity;
+} EFI_ACPI_MAXIMUM_PROXIMITY_DOMAIN_INFORMATION_STRUCTURE;
+
+typedef struct {
+ EFI_ACPI_5_0_MAXIMUM_SYSTEM_CHARACTERISTICS_TABLE_HEADER Header;
+ EFI_ACPI_MAXIMUM_PROXIMITY_DOMAIN_INFORMATION_STRUCTURE ProxDomInfoStructure[4];
+} EFI_ACPI_MAXIMUM_SYSTEM_CHARACTERISTICS_TABLE;
+
+#pragma pack ()
+
+EFI_ACPI_MAXIMUM_SYSTEM_CHARACTERISTICS_TABLE Msct = {
+ {
+ {
+ EFI_ACPI_5_0_MAXIMUM_SYSTEM_CHARACTERISTICS_TABLE_SIGNATURE,
+ sizeof (EFI_ACPI_MAXIMUM_SYSTEM_CHARACTERISTICS_TABLE),
+ EFI_ACPI_5_0_MAXIMUM_SYSTEM_CHARACTERISTICS_TABLE_REVISION,
+ 0x00, // Checksum will be updated at runtime
+ {EFI_ACPI_OEM_ID},
+ EFI_ACPI_OEM_TABLE_ID,
+ EFI_ACPI_OEM_REVISION,
+ EFI_ACPI_CREATOR_ID,
+ EFI_ACPI_CREATOR_REVISION
+ },
+ //
+ // Beginning of MSCT specific fields
+ //
+ 0x00000038, // OffsetProxDomInfo
+ 4 - 1, // MaxNumProxDom
+ 0x00000000, // MaxNumClockDom
+ 0x00000FFFFFFFFFFF, // MaxPhysicalAddress
+ },
+ {
+ {
+ EFI_ACPI_MAXIMUM_PROXIMITY_DOMAIN_INFORMATION_STRUCTURE_REVISION, // Revision
+ sizeof (EFI_ACPI_MAXIMUM_PROXIMITY_DOMAIN_INFORMATION_STRUCTURE), // Length
+ 0x00000000, // ProxDomRangeLow
+ 0x00000003, // ProxDomRangeHigh
+ 0x00000010, // MaxProcessorCapacity
+ 0x0000004000000000 // MaxMemoryCapacity
+ },
+ {
+ EFI_ACPI_MAXIMUM_PROXIMITY_DOMAIN_INFORMATION_STRUCTURE_REVISION, // Revision
+ sizeof (EFI_ACPI_MAXIMUM_PROXIMITY_DOMAIN_INFORMATION_STRUCTURE), // Length
+ 0x00000000, // ProxDomRangeLow
+ 0x00000000, // ProxDomRangeHigh
+ 0x00000000, // MaxProcessorCapacity
+ 0x0000000000000000, // MaxMemoryCapacity
+ },
+
+ {
+ EFI_ACPI_MAXIMUM_PROXIMITY_DOMAIN_INFORMATION_STRUCTURE_REVISION, // Revision
+ sizeof (EFI_ACPI_MAXIMUM_PROXIMITY_DOMAIN_INFORMATION_STRUCTURE), // Length
+ 0x00000000, // ProxDomRangeLow
+ 0x00000000, // ProxDomRangeHigh
+ 0x00000000, // MaxProcessorCapacity
+ 0x0000000000000000, // MaxMemoryCapacity
+ },
+
+ {
+ EFI_ACPI_MAXIMUM_PROXIMITY_DOMAIN_INFORMATION_STRUCTURE_REVISION, // Revision
+ sizeof (EFI_ACPI_MAXIMUM_PROXIMITY_DOMAIN_INFORMATION_STRUCTURE), // Length
+ 0x00000000, // ProxDomRangeLow
+ 0x00000000, // ProxDomRangeHigh
+ 0x00000000, // MaxProcessorCapacity
+ 0x0000000000000000, // MaxMemoryCapacity
+ },
+ },
+};
+
+VOID*
+ReferenceAcpiTable (
+ VOID
+ )
+{
+ //
+ // Reference the table being generated to prevent the optimizer from removing the
+ // data structure from the exeutable
+ //
+ return (VOID*)&Msct;
+}
diff --git a/ArmPkg/Drivers/AcpiTables/rtsm_ve-v7/Oem0.aslc b/ArmPkg/Drivers/AcpiTables/rtsm_ve-v7/Oem0.aslc
new file mode 100644
index 0000000..2e84daf
--- /dev/null
+++ b/ArmPkg/Drivers/AcpiTables/rtsm_ve-v7/Oem0.aslc
@@ -0,0 +1,48 @@
+/*
+ * Copyright (c) 2013 Linaro Limited
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the BSD License which accompanies
+ * this distribution, and is available at
+ * http://opensource.org/licenses/bsd-license.php
+ *
+ * Contributors:
+ * Yi Li - yi.li@linaro.org
+*/
+
+#include <IndustryStandard/Acpi.h>
+#include <Platform.h>
+
+#define EFI_ACPI_5_0_OEM0_SIGNATURE SIGNATURE_32('O', 'E', 'M', '0')
+#define ACPI_5_0_OEM0_REVISION 0x1
+
+typedef struct{
+ EFI_ACPI_DESCRIPTION_HEADER Header;
+}EFI_ACPI_5_0_OEM0_TABLE;
+
+EFI_ACPI_5_0_OEM0_TABLE Oem0=
+{
+ {
+ EFI_ACPI_5_0_OEM0_SIGNATURE,
+ sizeof (EFI_ACPI_5_0_OEM0_TABLE),
+ ACPI_5_0_OEM0_REVISION,
+ 0x00, // Checksum will be updated at runtime
+ {EFI_ACPI_OEM_ID},
+ EFI_ACPI_OEM_TABLE_ID,
+ 0x0000000A,
+ EFI_ACPI_CREATOR_ID,
+ EFI_ACPI_CREATOR_REVISION
+ },
+};
+
+VOID*
+ReferenceAcpiTable (
+ VOID
+ )
+{
+ //
+ // Reference the table being generated to prevent the optimizer from removing the
+ // data structure from the exeutable
+ //
+ return (VOID*)&Oem0;
+}
diff --git a/ArmPkg/Drivers/AcpiTables/rtsm_ve-v7/Platform.h b/ArmPkg/Drivers/AcpiTables/rtsm_ve-v7/Platform.h
new file mode 100644
index 0000000..0e06a85
--- /dev/null
+++ b/ArmPkg/Drivers/AcpiTables/rtsm_ve-v7/Platform.h
@@ -0,0 +1,75 @@
+/** @file
+ Platform specific defines for constructing ACPI tables
+
+ Copyright (c) 2008, Intel Corporation. All rights reserved.<BR>
+ 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.
+
+**/
+
+/*
+ * Copyright (c) 2013 Linaro Limited
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the BSD License which accompanies
+ * this distribution, and is available at
+ * http://opensource.org/licenses/bsd-license.php
+ *
+ * Contributors:
+ * Yi Li - yi.li@linaro.org
+*/
+
+#ifndef _Platform_h_INCLUDED_
+#define _Platform_h_INCLUDED_
+
+#include <PiDxe.h>
+#include <IndustryStandard/Acpi.h>
+
+//
+// ACPI table information used to initialize tables.RTSMVEV8
+//
+#define EFI_ACPI_OEM_ID 'L','I','N','A','R','O' // OEMID 6 bytes long
+#define EFI_ACPI_OEM_TABLE_ID SIGNATURE_64('R','T','S','M','V','E','V','7' ) // OEM table id 8 bytes long
+#define EFI_ACPI_OEM_REVISION 0x00000001
+#define EFI_ACPI_CREATOR_ID SIGNATURE_32('I','N','T','L')
+#define EFI_ACPI_CREATOR_REVISION 0x20130517
+
+#define INT_MODEL 0x01
+#define SCI_INT_VECTOR 0x0
+#define SMI_CMD_IO_PORT 0x0
+#define ACPI_ENABLE 0x0
+#define ACPI_DISABLE 0x0
+#define S4BIOS_REQ 0x00
+#define PM1a_EVT_BLK 0x00000001
+#define PM1b_EVT_BLK 0x00000000
+#define PM1a_CNT_BLK 0x00000001
+#define PM1b_CNT_BLK 0x00000000
+#define PM2_CNT_BLK 0x00000001
+#define PM_TMR_BLK 0x00000001
+#define GPE0_BLK 0x00000001
+#define GPE1_BLK 0x00000000
+#define PM1_EVT_LEN 0x04
+#define PM1_CNT_LEN 0x02
+#define PM2_CNT_LEN 0x01
+#define PM_TM_LEN 0x04
+#define GPE0_BLK_LEN 0x08
+#define GPE1_BLK_LEN 0x00
+#define GPE1_BASE 0x00
+#define RESERVED 0x00
+#define P_LVL2_LAT 0x0000
+#define P_LVL3_LAT 0x0000
+#define FLUSH_SIZE 0x0000
+#define FLUSH_STRIDE 0x0000
+#define DUTY_OFFSET 0x00
+#define DUTY_WIDTH 0x00
+#define DAY_ALRM 0x00
+#define MON_ALRM 0x00
+#define CENTURY 0x00
+#define FLAG 0x00321033
+#endif
+
diff --git a/ArmPkg/Drivers/AcpiTables/rtsm_ve-v7/Pmtt.aslc b/ArmPkg/Drivers/AcpiTables/rtsm_ve-v7/Pmtt.aslc
new file mode 100644
index 0000000..f0b4f6c
--- /dev/null
+++ b/ArmPkg/Drivers/AcpiTables/rtsm_ve-v7/Pmtt.aslc
@@ -0,0 +1,216 @@
+/*
+ * Copyright (c) 2013 Linaro Limited
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the BSD License which accompanies
+ * this distribution, and is available at
+ * http://opensource.org/licenses/bsd-license.php
+ *
+ * Contributors:
+ * Yi Li - yi.li@linaro.org
+*/
+
+#include <IndustryStandard/Acpi.h>
+#include <Platform.h>
+
+#define EFI_ACPI_MEMORY_AGGREGATOR_TYPE_SOCKET 00 //socket
+#define EFI_ACPI_MEMORY_AGGREGATOR_TYPE_MEMCTRL 01 //Memory Controller
+#define EFI_ACPI_MEMORY_AGGREGATOR_TYPE_DIMM 02 //DIMM
+#define EFI_ACPI_MEMORY_AGGREGATOR_TYPE_RESVERVED 03 //RESVERVED
+
+#define EFI_ACPI_MEMORY_AGGREGATOR_FLAG_TLAD 01
+#define EFI_ACPI_MEMORY_AGGREGATOR_FLAG_PHYELEMENT 02 // BIT1 - set to 1 since socket is a physical element of the topology
+//Bit 2 and 3 - If 00, indicates that all components aggregated by this device implements volatile memory
+// If 01, indicates that components aggregated by this device implements both volatile and non-volatile memory
+// If 10, indicates that all components aggregated by this device implements non-volatile memory
+#define EFI_ACPI_MEMORY_AGGREGATOR_FLAG__VOLATILE 00
+#define EFI_ACPI_MEMORY_AGGREGATOR_FLAG__MIXED 4
+#define EFI_ACPI_MEMORY_AGGREGATOR_FLAG__NONVOLATILE 0x08
+#define EFI_ACPI_MEMORY_AGGREGATOR_FLAG__RSVD 0x0C
+
+#define MAXNUMBER_OF_PROXIMITY_DOMAINS 0x3
+
+#define MAX_SOCKET 0x2
+#define NUM_MEM_CONTROLLERS 0x2
+#define MAX_DIMM 0x02
+
+#pragma pack (1)
+// PMMT Table fields
+typedef struct {
+ UINT32 ReadLatency;
+ UINT32 WriteLatency;
+ UINT32 ReadBW;
+ UINT32 WriteBW;
+ UINT16 OptimalAccUnit;
+ UINT16 OptimalAccAlignment;
+} EFI_ACPI_MEMCTRL_CHAR_TABLE;
+
+typedef struct {
+ UINT8 Type;
+ UINT8 Rsvd;
+ UINT16 Length;
+ UINT16 Flag;
+ UINT16 Rsvd1;
+ UINT16 PhyCompIdentifier;
+ UINT16 Rsvd2;
+ UINT32 Size;
+ UINT32 SmBiosHandle;
+} EFI_ACPI_MEMORY_AGGREGATOR_DIMM_STRUC;
+
+typedef struct {
+ UINT8 Type;
+ UINT8 Rsvd;
+ UINT16 Length;
+ UINT16 Flag;
+ UINT16 Rsvd1;
+ EFI_ACPI_MEMCTRL_CHAR_TABLE MemCtrlCharTable;
+ UINT16 Rsvd2;
+ UINT16 NumProxDomains;
+ UINT32 ProxDomain[MAXNUMBER_OF_PROXIMITY_DOMAINS];
+ EFI_ACPI_MEMORY_AGGREGATOR_DIMM_STRUC PhyCompIdentStruc[MAX_DIMM];
+} EFI_ACPI_MEMORY_AGGREGATOR_MEMCTRL_STRUC;
+
+typedef struct {
+ UINT8 Type;
+ UINT8 Rsvd;
+ UINT16 Length;
+ UINT16 Flag;
+ UINT16 Rsvd1;
+ UINT16 SckIdent;
+ UINT16 Rsvd2;
+ EFI_ACPI_MEMORY_AGGREGATOR_MEMCTRL_STRUC MemCtrlStruc[NUM_MEM_CONTROLLERS];
+} EFI_ACPI_MEMORY_AGGREGATOR_SOCKET_STRUC;
+
+typedef struct {
+ EFI_ACPI_5_0_MEMORY_TOPOLOGY_TABLE Header;
+ EFI_ACPI_MEMORY_AGGREGATOR_SOCKET_STRUC TopLevelmemAggrDevStruc[MAX_SOCKET];
+} EFI_ACPI_5_0_PLATFORM_MEMORY_TOPOLOGY_TABLE;
+#pragma pack ()
+
+
+EFI_ACPI_5_0_PLATFORM_MEMORY_TOPOLOGY_TABLE Pmtt = {
+ {
+ {
+ EFI_ACPI_5_0_PLATFORM_MEMORY_TOPOLOGY_TABLE_SIGNATURE,
+ sizeof (EFI_ACPI_5_0_PLATFORM_MEMORY_TOPOLOGY_TABLE), // Length
+ EFI_ACPI_5_0_MEMORY_TOPOLOGY_TABLE_REVISION, // Revision
+ 0x00, // Checksum will be updated at runtime
+ {EFI_ACPI_OEM_ID},
+ EFI_ACPI_OEM_TABLE_ID,
+ EFI_ACPI_OEM_REVISION,
+ EFI_ACPI_CREATOR_ID,
+ EFI_ACPI_CREATOR_REVISION
+ },
+ EFI_ACPI_RESERVED_DWORD, // Reserved[0]
+ },
+ {
+ /*Socket 0*/
+ {
+ 0x00, //Subtable Type:Socket
+ 0x00, //Reserved
+ 0x0080, //Length
+ 0x0001, //Flags
+ 0x0000, //Reserved
+ 0x0000, //Socket ID
+ 0x0000, //Reserved
+ {
+ /*Memory Controller 1*/
+
+ {
+ 0x01, //Subtable Type:Memory Controller
+ 0x00, //Reserved
+ 0x0054, //Length
+ 0x0005, //Flags
+ 0x0000, //Reserved
+ {
+ 0x00000000, //Read Latency
+ 0x00000000, //Write Latency
+ 0x00000000, //Read Bandwidth
+ 0x00000000, //Write Bandwidth
+ 0x0000, //Access Width
+ 0x0000, //Alignment
+ },
+ 0x0000, //Reserved
+ MAXNUMBER_OF_PROXIMITY_DOMAINS, //Domain Count
+ 0x00000000, //Proximity Domain
+ 0x00000000, //Proximity Domain
+ 0x00000000, //Proximity Domain
+ {
+ /*DIMM 0*/
+ {
+ 0x02, //Subtable Type:Physical Component (DIMM)
+ 0x00, //Reserved
+ 0x0014, //Length
+ 0x0002, //Flags
+ 0x0000, //Reserved
+ 0x0000, //Component ID
+ 0x0000, //Reserved
+ 0x00000000, //Memory Size
+ 0x00000000, //Bios Handle
+ },
+ /*DIMM 1*/
+ {
+ 0x02, //Subtable Type:Physical Component (DIMM)
+ 0x00, //Reserved
+ 0x0014, //Length
+ 0x0002, //Flags
+ 0x0000, //Reserved
+ 0x0000, //Component ID
+ 0x0000, //Reserved
+ 0x00000000, //Memory Size
+ 0x00000000, //Bios Handle
+ },
+ },
+ },
+
+ /*Memory Controller 2*/
+ {
+ 0x01, //Subtable Type:Memory Controller
+ 0x00, //Reserved
+ 0x0020, //Length
+ 0x0001, //Flags
+ 0x0000, //Reserved
+ {
+ 0x00000000, //Read Latency
+ 0x00000000, //Write Latency
+ 0x00000000, //Read Bandwidth
+ 0x00000000, //Write Bandwidth
+ 0x0000, //Access Width
+ 0x0000 //Alignment
+ },
+ 0x0000, //Reserved
+ 0x0000, //Domain Count
+ {0},
+ {0},
+
+ },
+ },
+ },
+
+
+ /*Socket 1*/
+ {
+ 0x00, //Subtable Type:Socket
+ 0x00, //Reserved
+ 0x000c, //Length
+ 0x0001, //Flags
+ 0x0000, //Reserved
+ 0x0000, //Socket ID
+ 0x0000 //Reserved
+ },
+ },
+
+
+};
+
+VOID*
+ReferenceAcpiTable (
+ VOID
+ )
+{
+ //
+ // Reference the table being generated to prevent the optimizer from removing the
+ // data structure from the exeutable
+ //
+ return (VOID*)&Pmtt;
+}
diff --git a/ArmPkg/Drivers/AcpiTables/rtsm_ve-v7/Slit.aslc b/ArmPkg/Drivers/AcpiTables/rtsm_ve-v7/Slit.aslc
new file mode 100644
index 0000000..05d96e0
--- /dev/null
+++ b/ArmPkg/Drivers/AcpiTables/rtsm_ve-v7/Slit.aslc
@@ -0,0 +1,87 @@
+/*
+ * Copyright (c) 2013 Linaro Limited
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the BSD License which accompanies
+ * this distribution, and is available at
+ * http://opensource.org/licenses/bsd-license.php
+ *
+ * Contributors:
+ * Yi Li - yi.li@linaro.org
+*/
+
+#include <IndustryStandard/Acpi.h>
+#include <Platform.h>
+
+#define EFI_ACPI_SYSTEM_LOCALITIES_ENTRY_COUNT 0x0000000000000014
+
+#pragma pack(1)
+typedef struct {
+ UINT8 Entry[EFI_ACPI_SYSTEM_LOCALITIES_ENTRY_COUNT];
+} EFI_ACPI_5_0_NUMBER_OF_SYSTEM_LOCALITIES_STRUCTURE;
+
+typedef struct {
+ EFI_ACPI_5_0_SYSTEM_LOCALITY_DISTANCE_INFORMATION_TABLE_HEADER Header;
+ EFI_ACPI_5_0_NUMBER_OF_SYSTEM_LOCALITIES_STRUCTURE NumSlit[EFI_ACPI_SYSTEM_LOCALITIES_ENTRY_COUNT];
+
+} EFI_ACPI_5_0_SYSTEM_LOCALITY_INFORMATION_TABLE;
+#pragma pack()
+
+//
+// System Locality Information Table
+// Please modify all values in Slit.h only.
+//
+EFI_ACPI_5_0_SYSTEM_LOCALITY_INFORMATION_TABLE Slit = {
+ {
+ {
+ EFI_ACPI_5_0_SYSTEM_LOCALITY_INFORMATION_TABLE_SIGNATURE,
+ sizeof (EFI_ACPI_5_0_SYSTEM_LOCALITY_INFORMATION_TABLE),
+ EFI_ACPI_5_0_SYSTEM_LOCALITY_DISTANCE_INFORMATION_TABLE_REVISION,
+ 0x00, // Checksum will be updated at runtime
+ {EFI_ACPI_OEM_ID},
+ EFI_ACPI_OEM_TABLE_ID,
+ EFI_ACPI_OEM_REVISION,
+ EFI_ACPI_CREATOR_ID,
+ EFI_ACPI_CREATOR_REVISION,
+ },
+ //
+ // Beginning of SLIT specific fields
+ //
+ EFI_ACPI_SYSTEM_LOCALITIES_ENTRY_COUNT,
+ },
+ {
+ {0x0A, 0x10, 0x16, 0x17, 0x18, 0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F, 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27}, //Locality 0
+ {0x10, 0x0A, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F, 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26,}, //Locality 1
+ {0x16, 0x15, 0x0A, 0x10, 0x16, 0x17, 0x18, 0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F, 0x20, 0x21, 0x22, 0x23, 0x24, 0x25,}, //Locality 2
+ {0x17, 0x16, 0x10, 0x0A, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F, 0x20, 0x21, 0x22, 0x23, 0x24,}, //Locality 3
+ {0x18, 0x17, 0x16, 0x15, 0x0A, 0x10, 0x16, 0x17, 0x18, 0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F, 0x20, 0x21, 0x22, 0x23,}, //Locality 4
+ {0x19, 0x18, 0x17, 0x16, 0x10, 0x0A, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F, 0x20, 0x21, 0x22,}, //Locality 5
+ {0x1A, 0x19, 0x18, 0x17, 0x16, 0x15, 0x0A, 0x10, 0x16, 0x17, 0x18, 0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F, 0x20, 0x21,}, //Locality 6
+ {0x1B, 0x1A, 0x19, 0x18, 0x17, 0x16, 0x10, 0x0A, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F, 0x20,}, //Locality 7
+ {0x1C, 0x1B, 0x1A, 0x19, 0x18, 0x17, 0x16, 0x15, 0x0A, 0x10, 0x16, 0x17, 0x18, 0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F,}, //Locality 8
+ {0x1D, 0x1C, 0x1B, 0x1A, 0x19, 0x18, 0x17, 0x16, 0x10, 0x0A, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E,}, //Locality 9
+ {0x1E, 0x1D, 0x1C, 0x1B, 0x1A, 0x19, 0x18, 0x17, 0x16, 0x15, 0x0A, 0x10, 0x16, 0x17, 0x18, 0x19, 0x1A, 0x1B, 0x1C, 0x1D,}, //Locality 10
+ {0x1F, 0x1E, 0x1D, 0x1C, 0x1B, 0x1A, 0x19, 0x18, 0x17, 0x16, 0x10, 0x0A, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1A, 0x1B, 0x1C,}, //Locality 11
+ {0x20, 0x1F, 0x1E, 0x1D, 0x1C, 0x1B, 0x1A, 0x19, 0x18, 0x17, 0x16, 0x15, 0x0A, 0x10, 0x16, 0x17, 0x18, 0x19, 0x1A, 0x1B,}, //Locality 12
+ {0x21, 0x20, 0x1F, 0x1E, 0x1D, 0x1C, 0x1B, 0x1A, 0x19, 0x18, 0x17, 0x16, 0x10, 0x0A, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1A,}, //Locality 13
+ {0x22, 0x21, 0x20, 0x1F, 0x1E, 0x1D, 0x1C, 0x1B, 0x1A, 0x19, 0x18, 0x17, 0x16, 0x15, 0x0A, 0x10, 0x16, 0x17, 0x18, 0x19,}, //Locality 14
+ {0x23, 0x22, 0x21, 0x20, 0x1F, 0x1E, 0x1D, 0x1C, 0x1B, 0x1A, 0x19, 0x18, 0x17, 0x16, 0x10, 0x0A, 0x15, 0x16, 0x17, 0x18,}, //Locality 15
+ {0x24, 0x23, 0x22, 0x21, 0x20, 0x1F, 0x1E, 0x1D, 0x1C, 0x1B, 0x1A, 0x19, 0x18, 0x17, 0x16, 0x15, 0x0A, 0x10, 0x16, 0x17,}, //Locality 16
+ {0x25, 0x24, 0x23, 0x22, 0x21, 0x20, 0x1F, 0x1E, 0x1D, 0x1C, 0x1B, 0x1A, 0x19, 0x18, 0x17, 0x16, 0x10, 0x0A, 0x15, 0x16,}, //Locality 17
+ {0x26, 0x25, 0x24, 0x23, 0x22, 0x21, 0x20, 0x1F, 0x1E, 0x1D, 0x1C, 0x1B, 0x1A, 0x19, 0x18, 0x17, 0x16, 0x15, 0x0A, 0x10,}, //Locality 18
+ {0x27, 0x26, 0x25, 0x24, 0x23, 0x22, 0x21, 0x20, 0x1F, 0x1E, 0x1D, 0x1C, 0x1B, 0x1A, 0x19, 0x18, 0x17, 0x16, 0x10, 0x0A,}, //Locality 19
+ },
+};
+
+
+VOID*
+ReferenceAcpiTable (
+ VOID
+ )
+{
+ //
+ // Reference the table being generated to prevent the optimizer from removing the
+ // data structure from the exeutable
+ //
+ return (VOID*)&Slit;
+}
diff --git a/ArmPkg/Drivers/AcpiTables/rtsm_ve-v7/Spmi.aslc b/ArmPkg/Drivers/AcpiTables/rtsm_ve-v7/Spmi.aslc
new file mode 100644
index 0000000..77836a4
--- /dev/null
+++ b/ArmPkg/Drivers/AcpiTables/rtsm_ve-v7/Spmi.aslc
@@ -0,0 +1,86 @@
+/*
+ * Copyright (c) 2013 Linaro Limited
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the BSD License which accompanies
+ * this distribution, and is available at
+ * http://opensource.org/licenses/bsd-license.php
+ *
+ * Contributors:
+ * Yi Li - yi.li@linaro.org
+*/
+
+#include <IndustryStandard/Acpi.h>
+#include <Platform.h>
+
+#define ACPI_5_0_SPMI_REVISION 0x4
+
+#pragma pack(1)
+typedef struct
+{
+
+ EFI_ACPI_DESCRIPTION_HEADER Header;
+ UINT8 ucInterfaceType;
+ UINT8 Reserved;
+ UINT16 usIPMISpecVersion;
+ UINT8 ucInterruptType;
+ UINT8 ucGPENumber;
+ UINT8 Reserved2;
+ UINT8 ucPCIDeviceFlag;
+ UINT32 uwInterrupt;
+ EFI_ACPI_5_0_GENERIC_ADDRESS_STRUCTURE IPMIRegister;
+ UINT8 ucPCISegment;
+ UINT8 ucPCIBus;
+ UINT8 ucPCIDevice;
+ UINT8 ucPCIFunction;
+ UINT8 Reserved3;
+}EFI_ACPI_5_0_SERVER_PLATFORM_MANAGEMENT_INTERFACE_TABLE;
+#pragma pack()
+
+EFI_ACPI_5_0_SERVER_PLATFORM_MANAGEMENT_INTERFACE_TABLE Spmi =
+{
+ {
+ EFI_ACPI_5_0_SERVER_PLATFORM_MANAGEMENT_INTERFACE_TABLE_SIGNATURE,
+ sizeof (EFI_ACPI_5_0_SERVER_PLATFORM_MANAGEMENT_INTERFACE_TABLE),
+ ACPI_5_0_SPMI_REVISION,
+ 0x00, // Checksum will be updated at runtime
+ {EFI_ACPI_OEM_ID},
+ EFI_ACPI_OEM_TABLE_ID,
+ 0x00,
+ EFI_ACPI_CREATOR_ID,
+ EFI_ACPI_CREATOR_REVISION
+ },
+ 0x00, //Interface Type
+ 0x00, //Reserved
+ 0x0000, //IPMI Spec Version
+ 0x00, //Interrupt Type
+ 0x00, //GPE Number
+ 0x00, //Reserved
+ 0x00, //PCI Device Flag
+ 0x00000000, //Interrupt
+ {
+ 0x00, //Space ID:SystemMemory
+ 0x08, //Bit Width
+ 0x00, //Bit Offset
+ 0x01, //Encoded Access Width
+ 0x0000000000000000, //Address
+ },
+ 0x00, //PCI Segment
+ 0x00, //PCI Bus
+ 0x00, //PCI Device
+ 0x00, //PCI Function
+ 0x00, //Reserved
+};
+
+VOID*
+ReferenceAcpiTable (
+ VOID
+ )
+{
+
+ //
+ // Reference the table being generated to prevent the optimizer from removing the
+ // data structure from the exeutable
+ //
+ return (VOID*)&Spmi;
+}
diff --git a/ArmPkg/Drivers/AcpiTables/rtsm_ve-v7/Srat.aslc b/ArmPkg/Drivers/AcpiTables/rtsm_ve-v7/Srat.aslc
new file mode 100644
index 0000000..d5c433f
--- /dev/null
+++ b/ArmPkg/Drivers/AcpiTables/rtsm_ve-v7/Srat.aslc
@@ -0,0 +1,106 @@
+/*
+ * Copyright (c) 2013 Linaro Limited
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the BSD License which accompanies
+ * this distribution, and is available at
+ * http://opensource.org/licenses/bsd-license.php
+ *
+ * Contributors:
+ * Yi Li - yi.li@linaro.org
+*/
+
+#include <IndustryStandard/Acpi.h>
+#include <Platform.h>
+
+
+//
+// Define the number of each table type.
+// This is where the table layout is modified.
+//
+#define EFI_ACPI_PROCESSOR_LOCAL_APIC_SAPIC_AFFINITY_STRUCTURE_COUNT 4
+#define EFI_ACPI_MEMORY_AFFINITY_STRUCTURE_COUNT 4
+
+
+#pragma pack(1)
+typedef struct {
+ EFI_ACPI_5_0_SYSTEM_RESOURCE_AFFINITY_TABLE_HEADER Header;
+ EFI_ACPI_5_0_PROCESSOR_LOCAL_APIC_SAPIC_AFFINITY_STRUCTURE Apic;
+ EFI_ACPI_5_0_MEMORY_AFFINITY_STRUCTURE Memory;
+ EFI_ACPI_5_0_PROCESSOR_LOCAL_X2APIC_AFFINITY_STRUCTURE x2APIC;
+} EFI_ACPI_5_0_SYSTEM_RESOURCE_AFFINITY_TABLE;
+
+#pragma pack()
+
+
+//
+// Static Resource Affinity Table definition
+//
+EFI_ACPI_5_0_SYSTEM_RESOURCE_AFFINITY_TABLE Srat = {
+ {
+ EFI_ACPI_5_0_SYSTEM_RESOURCE_AFFINITY_TABLE_SIGNATURE,
+ sizeof (EFI_ACPI_5_0_SYSTEM_RESOURCE_AFFINITY_TABLE),
+ EFI_ACPI_5_0_SYSTEM_RESOURCE_AFFINITY_TABLE_REVISION,
+ 0x00, // Checksum will be updated at runtime
+ {EFI_ACPI_OEM_ID},
+ EFI_ACPI_OEM_TABLE_ID,
+ EFI_ACPI_OEM_REVISION,
+ EFI_ACPI_CREATOR_ID,
+ EFI_ACPI_CREATOR_REVISION,
+ /*Reserved*/
+ 0x00000001, // Reserved to be 1 for backward compatibility
+ EFI_ACPI_RESERVED_QWORD
+ },
+ /**/
+ {
+ 0x00, // Subtable Type:Processor Local APIC/SAPIC Affinity
+ sizeof(EFI_ACPI_5_0_PROCESSOR_LOCAL_APIC_SAPIC_AFFINITY_STRUCTURE), //Length
+ 0x00, //Proximity Domain Low(8)
+ 0x00, //Apic ID
+ 0x00000001, //Flags
+ 0x00, //Local Sapic EID
+ {0,0,0}, //Proximity Domain High(24)
+ 0x00000000, //ClockDomain
+ },
+ //
+ //
+ // Memory Affinity
+ //
+ {
+ 0x01, // Subtable Type:Memory Affinity
+ sizeof (EFI_ACPI_5_0_MEMORY_AFFINITY_STRUCTURE), // Length
+ 0x00000000, // Proximity Domain
+ EFI_ACPI_RESERVED_WORD, // Reserved
+ 0x00000000, // Address Base Low
+ 0x00000000, // Address Base High
+ 0x0009FC00, // Length Low
+ 0x00000000, // Length High
+ EFI_ACPI_RESERVED_DWORD, // Reserved
+ 0x00000001, // Flags disabled, until enabled by Platform driver
+ EFI_ACPI_RESERVED_QWORD , // Reserved
+ },
+
+ /*Processor Local x2APIC Affinity*/
+ {
+ 0x02, // Subtable Type:Processor Local x2APIC Affinity
+ sizeof(EFI_ACPI_5_0_PROCESSOR_LOCAL_X2APIC_AFFINITY_STRUCTURE),
+ {0,0}, //Reserved1
+ 0x00000000, //Proximity Domain
+ 0x00000000, //Apic ID
+ 0x00000001, //Flags
+ 0x00000000, //Clock Domain
+ {0,0,0,0}, //Reserved2
+ },
+};
+
+VOID*
+ReferenceAcpiTable (
+ VOID
+ )
+{
+ //
+ // Reference the table being generated to prevent the optimizer from removing the
+ // data structure from the exeutable
+ //
+ return (VOID*)&Srat;
+}
diff --git a/ArmPkg/Drivers/AcpiTables/rtsm_ve-v7/Ssdt0.asl b/ArmPkg/Drivers/AcpiTables/rtsm_ve-v7/Ssdt0.asl
new file mode 100644
index 0000000..c13ceef
--- /dev/null
+++ b/ArmPkg/Drivers/AcpiTables/rtsm_ve-v7/Ssdt0.asl
@@ -0,0 +1,17 @@
+/*
+ * Copyright (c) 2013, Al Stone <al.stone@linaro.org>
+ *
+ * [SSDT] Description of the armv8 VE Model
+ *
+ * This source is released under the terms of the GPLv2.
+ */
+
+DefinitionBlock (
+ "ssdt0.aml", // output filename
+ "SSDT", // table signature
+ 2, // SSDT compliance revision
+ "LINARO", // OEM ID
+ "RTSMVEV8", // table ID
+ 0x00000001) // OEM revision
+{
+}
diff --git a/ArmPkg/Drivers/AcpiTables/rtsm_ve-v7/Uefi.aslc b/ArmPkg/Drivers/AcpiTables/rtsm_ve-v7/Uefi.aslc
new file mode 100644
index 0000000..c3bbce3
--- /dev/null
+++ b/ArmPkg/Drivers/AcpiTables/rtsm_ve-v7/Uefi.aslc
@@ -0,0 +1,57 @@
+/*
+ * Copyright (c) 2013 Linaro Limited
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the BSD License which accompanies
+ * this distribution, and is available at
+ * http://opensource.org/licenses/bsd-license.php
+ *
+ * Contributors:
+ * Yi Li - yi.li@linaro.org
+*/
+
+#include <IndustryStandard/Acpi.h>
+#include <Platform.h>
+
+
+#define ACPI_5_0_UEFI_REVISION 0x1
+
+#pragma pack(1)
+
+typedef struct
+{
+ EFI_ACPI_DESCRIPTION_HEADER Header;
+ EFI_GUID guid;
+ UINT16 usDataOffset;
+}EFI_ACPI_5_0_UEFI_TABLE;
+#pragma pack()
+
+EFI_ACPI_5_0_UEFI_TABLE Uefi=
+{
+ {
+ EFI_ACPI_5_0_UEFI_ACPI_DATA_TABLE_SIGNATURE,
+ sizeof (EFI_ACPI_5_0_UEFI_TABLE),
+ ACPI_5_0_UEFI_REVISION,
+ 0x00, // Checksum will be updated at runtime
+ {EFI_ACPI_OEM_ID},
+ EFI_ACPI_OEM_TABLE_ID,
+ EFI_ACPI_OEM_REVISION,
+ EFI_ACPI_CREATOR_ID,
+ EFI_ACPI_CREATOR_REVISION
+ },
+ //03020100-0504-0706-0809-0A0B0C0D0E0F
+ { 0x03020100, 0x0504, 0x0706, { 0x08, 0x09, 0x0A, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f } },
+ 0x0036 //Data Offset
+};
+
+VOID*
+ReferenceAcpiTable (
+ VOID
+ )
+{
+ //
+ // Reference the table being generated to prevent the optimizer from removing the
+ // data structure from the exeutable
+ //
+ return (VOID*)&Uefi;
+}