]> git.proxmox.com Git - mirror_edk2.git/blobdiff - OvmfPkg/AcpiTables/Madt.aslc
BaseTools: Library hashing fix and optimization for --hash feature
[mirror_edk2.git] / OvmfPkg / AcpiTables / Madt.aslc
old mode 100755 (executable)
new mode 100644 (file)
index c2c4a69..44ffd37
@@ -1,26 +1,16 @@
 /** @file\r
   MADT Table\r
 \r
-  This file contains a structure definition for the ACPI 1.0 Multiple APIC \r
-  Description Table (MADT).  \r
-  \r
-  Copyright (c) 2008 - 2009, Intel Corporation<BR> All rights\r
-  reserved. This program and the accompanying materials are\r
-  licensed and made available under the terms and conditions of the BSD License\r
-  which accompanies this distribution.  The full text of the license may be found at\r
-  http://opensource.org/licenses/bsd-license.php\r
-  \r
-  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-\r
-**/ \r
+  This file contains a structure definition for the ACPI 1.0 Multiple APIC\r
+  Description Table (MADT).\r
 \r
-#include <IndustryStandard/Acpi.h>\r
+  Copyright (c) 2008 - 2012, Intel Corporation. All rights reserved.<BR>\r
+  SPDX-License-Identifier: BSD-2-Clause-Patent\r
 \r
-//\r
-// MADT Definitions\r
-//\r
-#define EFI_ACPI_OEM_MADT_REVISION 0x00000000 // TBD\r
+**/\r
+\r
+#include <IndustryStandard/Acpi.h>\r
+#include <Platform.h>\r
 \r
 //\r
 // Local APIC address\r
@@ -71,74 +61,82 @@ typedef struct {
 // Multiple APIC Description Table\r
 //\r
 EFI_ACPI_1_0_MULTIPLE_APIC_DESCRIPTION_TABLE Madt = {\r
-  EFI_ACPI_1_0_APIC_SIGNATURE,\r
-  sizeof (EFI_ACPI_1_0_MULTIPLE_APIC_DESCRIPTION_TABLE),\r
-  EFI_ACPI_1_0_MULTIPLE_APIC_DESCRIPTION_TABLE_REVISION,\r
-\r
-  //\r
-  // Checksum will be updated at runtime\r
-  //\r
-  0x00,\r
-  \r
-  //\r
-  // It is expected that these values will be programmed at runtime\r
-  //\r
-  ' ', ' ', ' ', ' ', ' ', ' ',\r
-  \r
-  0,\r
-  EFI_ACPI_OEM_MADT_REVISION,\r
-  0,\r
-  0,\r
+  {\r
+    {\r
+      EFI_ACPI_1_0_APIC_SIGNATURE,\r
+      sizeof (EFI_ACPI_1_0_MULTIPLE_APIC_DESCRIPTION_TABLE),\r
+      EFI_ACPI_1_0_MULTIPLE_APIC_DESCRIPTION_TABLE_REVISION,\r
+      0x00,                                                     // Checksum will be updated at runtime\r
+      {EFI_ACPI_OEM_ID},\r
+      EFI_ACPI_OEM_TABLE_ID,\r
+      EFI_ACPI_OEM_REVISION,\r
+      EFI_ACPI_CREATOR_ID,\r
+      EFI_ACPI_CREATOR_REVISION\r
+    },\r
+\r
+    //\r
+    // MADT specific fields\r
+    //\r
+    EFI_ACPI_LOCAL_APIC_ADDRESS,\r
+    EFI_ACPI_1_0_MULTIPLE_APIC_FLAGS,\r
+  },\r
 \r
-  //\r
-  // MADT specific fields\r
-  //\r
-  EFI_ACPI_LOCAL_APIC_ADDRESS,\r
-  EFI_ACPI_1_0_MULTIPLE_APIC_FLAGS,\r
-  \r
   //\r
   // Processor Local APIC Structure\r
   //\r
-\r
-  EFI_ACPI_1_0_PROCESSOR_LOCAL_APIC,                        // Type\r
-  sizeof (EFI_ACPI_1_0_PROCESSOR_LOCAL_APIC_STRUCTURE),     // Length\r
-  0x01,                                                     // Processor ID\r
-  0x00,                                                     // Local APIC ID\r
-  0x00000001,                                               // Flags - Enabled by default\r
+  {\r
+    {\r
+      EFI_ACPI_1_0_PROCESSOR_LOCAL_APIC,                        // Type\r
+      sizeof (EFI_ACPI_1_0_PROCESSOR_LOCAL_APIC_STRUCTURE),     // Length\r
+      0x00,                                                     // Processor ID\r
+      0x00,                                                     // Local APIC ID\r
+      0x00000001                                                // Flags - Enabled by default\r
+    }\r
+  },\r
 \r
   //\r
   // Interrupt Source Override Structure\r
   //\r
 \r
-  //\r
-  // IRQ0=>IRQ2 Interrupt Source Override Structure\r
-  //\r
-  EFI_ACPI_1_0_INTERRUPT_SOURCE_OVERRIDE,                   // Type\r
-  sizeof (EFI_ACPI_1_0_INTERRUPT_SOURCE_OVERRIDE_STRUCTURE),// Length\r
-  0x00,                                                     // Bus - ISA\r
-  0x00,                                                     // Source - IRQ0\r
-  0x00000002,                                               // Global System Interrupt - IRQ2\r
-  0x0000,                                                   // Flags - Conforms to specifications of the bus\r
-\r
-  //\r
-  // ISO (SCI Active High) Interrupt Source Override Structure\r
-  //\r
-  EFI_ACPI_1_0_INTERRUPT_SOURCE_OVERRIDE,                   // Type\r
-  sizeof (EFI_ACPI_1_0_INTERRUPT_SOURCE_OVERRIDE_STRUCTURE),// Length\r
-  0x00,                                                     // Bus - ISA\r
-  0x09,                                                     // Source - IRQ0\r
-  0x00000009,                                               // Global System Interrupt - IRQ2\r
-  0x000D,                                                   // Flags - Level-tiggered, Active High\r
+  {\r
+    {\r
+      //\r
+      // IRQ0=>IRQ2 Interrupt Source Override Structure\r
+      //\r
+      EFI_ACPI_1_0_INTERRUPT_SOURCE_OVERRIDE,                   // Type\r
+      sizeof (EFI_ACPI_1_0_INTERRUPT_SOURCE_OVERRIDE_STRUCTURE),// Length\r
+      0x00,                                                     // Bus - ISA\r
+      0x00,                                                     // Source - IRQ0\r
+      0x00000002,                                               // Global System Interrupt - IRQ2\r
+      0x0000                                                    // Flags - Conforms to specifications of the bus\r
+    },\r
+\r
+    {\r
+      //\r
+      // ISO (SCI Active High) Interrupt Source Override Structure\r
+      //\r
+      EFI_ACPI_1_0_INTERRUPT_SOURCE_OVERRIDE,                   // Type\r
+      sizeof (EFI_ACPI_1_0_INTERRUPT_SOURCE_OVERRIDE_STRUCTURE),// Length\r
+      0x00,                                                     // Bus - ISA\r
+      0x09,                                                     // Source - IRQ0\r
+      0x00000009,                                               // Global System Interrupt - IRQ2\r
+      0x000D                                                    // Flags - Level-tiggered, Active High\r
+    }\r
+  },\r
 \r
   //\r
   // IO APIC Structure\r
   //\r
-  EFI_ACPI_1_0_IO_APIC,                                     // Type\r
-  sizeof (EFI_ACPI_1_0_IO_APIC_STRUCTURE),                  // Length\r
-  0x02,                                                     // IO APIC ID\r
-  EFI_ACPI_RESERVED_BYTE,                                   // Reserved\r
-  0xFEC00000,                                               // IO APIC Address (physical)\r
-  0x00000000                                                // Global System Interrupt Base\r
+  {\r
+    {\r
+      EFI_ACPI_1_0_IO_APIC,                                     // Type\r
+      sizeof (EFI_ACPI_1_0_IO_APIC_STRUCTURE),                  // Length\r
+      0x02,                                                     // IO APIC ID\r
+      EFI_ACPI_RESERVED_BYTE,                                   // Reserved\r
+      0xFEC00000,                                               // IO APIC Address (physical)\r
+      0x00000000                                                // Global System Interrupt Base\r
+    }\r
+  },\r
 };\r
 \r
 \r
@@ -148,7 +146,7 @@ ReferenceAcpiTable (
   )\r
 {\r
   //\r
-  // Reference the table being generated to prevent the optimizer from removing the \r
+  // Reference the table being generated to prevent the optimizer from removing the\r
   // data structure from the exeutable\r
   //\r
   return (VOID*)&Madt;\r