diff options
Diffstat (limited to 'ArmPkg/Drivers/AcpiTables/exynos5250-arndale/Srat.aslc')
-rw-r--r-- | ArmPkg/Drivers/AcpiTables/exynos5250-arndale/Srat.aslc | 106 |
1 files changed, 106 insertions, 0 deletions
diff --git a/ArmPkg/Drivers/AcpiTables/exynos5250-arndale/Srat.aslc b/ArmPkg/Drivers/AcpiTables/exynos5250-arndale/Srat.aslc new file mode 100644 index 000000000..d5c433ffc --- /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; +} |