diff options
author | Yi Li <yi.li@linaro.org> | 2013-09-26 11:00:33 -0500 |
---|---|---|
committer | Leif Lindholm <leif.lindholm@linaro.org> | 2014-01-24 15:45:19 +0000 |
commit | ab49dde065574297dd5a3ea0ce71fa16df53561f (patch) | |
tree | cf2eb3f9de6c8dec27438005757aee7e2552aa96 /ArmPkg/Drivers/AcpiTables/rtsm_ve-v7/Srat.aslc | |
parent | 8ba9e9e7987c29aed43afc736f90602be047ab17 (diff) | |
download | juice-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>
Diffstat (limited to 'ArmPkg/Drivers/AcpiTables/rtsm_ve-v7/Srat.aslc')
-rw-r--r-- | ArmPkg/Drivers/AcpiTables/rtsm_ve-v7/Srat.aslc | 106 |
1 files changed, 106 insertions, 0 deletions
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 000000000..d5c433ffc --- /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; +} |