]> git.proxmox.com Git - mirror_edk2.git/blobdiff - OvmfPkg/AcpiTables/Madt.aslc
OvmfPkg/AmdSevDxe: decrypt the pages of the initial SMRAM save state map
[mirror_edk2.git] / OvmfPkg / AcpiTables / Madt.aslc
index e0e07a9390158abd0ed04dd18135b07fb82fffc7..8a3b836bcdf08ec2bfcf8234dcf6d288ecb187ca 100644 (file)
@@ -1,26 +1,22 @@
 /** @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. All rights reserved.<BR>\r
+  This file contains a structure definition for the ACPI 1.0 Multiple APIC\r
+  Description Table (MADT).\r
+\r
+  Copyright (c) 2008 - 2012, Intel Corporation. All rights reserved.<BR>\r
   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
+\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
+**/\r
 \r
 #include <IndustryStandard/Acpi.h>\r
-\r
-//\r
-// MADT Definitions\r
-//\r
-#define EFI_ACPI_OEM_MADT_REVISION 0x00000000 // TBD\r
+#include <Platform.h>\r
 \r
 //\r
 // Local APIC address\r
@@ -71,74 +67,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 +152,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