]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTable.h
MdeModulePkg:
[mirror_edk2.git] / MdeModulePkg / Universal / Acpi / AcpiTableDxe / AcpiTable.h
index cb5119e4f5197f9160151b449da8658708b7561b..d9e6428cba6b358eac9a6ff32ed59c44cd5f0562 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   ACPI Table Protocol Driver\r
 \r
-  Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>\r
   This program and the accompanying materials\r
   are 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
@@ -20,6 +20,8 @@
 \r
 #include <Protocol/AcpiTable.h>\r
 #include <Guid/Acpi.h>\r
+#include <Protocol/AcpiSystemDescriptionTable.h>\r
+#include <Protocol/DxeSmmReadyToLock.h>\r
 \r
 #include <Library/BaseLib.h>\r
 #include <Library/DebugLib.h>\r
@@ -35,6 +37,8 @@
 //\r
 #include <IndustryStandard/Acpi.h>\r
 \r
+#include "AcpiSdt.h"\r
+\r
 //\r
 // From Protocol/AcpiSupport.h\r
 //\r
@@ -93,7 +97,7 @@ typedef struct {
 } EFI_ACPI_TABLE_LIST;\r
 \r
 //\r
-// Containment record for linked list.\r
+// Containment record for ACPI Table linked list.\r
 //\r
 #define EFI_ACPI_TABLE_LIST_FROM_LINK(_link)  CR (_link, EFI_ACPI_TABLE_LIST, Link, EFI_ACPI_TABLE_LIST_SIGNATURE)\r
 \r
@@ -135,13 +139,15 @@ typedef struct {
   EFI_ACPI_3_0_FIRMWARE_ACPI_CONTROL_STRUCTURE  *Facs3;                 // Pointer to FACS table header\r
   EFI_ACPI_DESCRIPTION_HEADER                   *Dsdt1;                 // Pointer to DSDT table header\r
   EFI_ACPI_DESCRIPTION_HEADER                   *Dsdt3;                 // Pointer to DSDT table header\r
-  LIST_ENTRY                                TableList;\r
+  LIST_ENTRY                                    TableList;\r
   UINTN                                         NumberOfTableEntries1;  // Number of ACPI 1.0 tables\r
   UINTN                                         NumberOfTableEntries3;  // Number of ACPI 3.0 tables\r
   UINTN                                         CurrentHandle;\r
   BOOLEAN                                       TablesInstalled1;       // ACPI 1.0 tables published\r
   BOOLEAN                                       TablesInstalled3;       // ACPI 3.0 tables published\r
   EFI_ACPI_TABLE_PROTOCOL                       AcpiTableProtocol;\r
+  EFI_ACPI_SDT_PROTOCOL                         AcpiSdtProtocol;\r
+  LIST_ENTRY                                    NotifyList;\r
 } EFI_ACPI_TABLE_INSTANCE;\r
 \r
 //\r
@@ -194,4 +200,73 @@ InitializeAcpiTableDxe (
   IN EFI_SYSTEM_TABLE     *SystemTable\r
   );\r
 \r
+/**\r
+\r
+  This function finds the table specified by the handle and returns a pointer to it.\r
+  If the handle is not found, EFI_NOT_FOUND is returned and the contents of Table are\r
+  undefined.\r
+\r
+  @param[in]  Handle      Table to find.\r
+  @param[in]  TableList   Table list to search\r
+  @param[out] Table       Pointer to table found. \r
+\r
+  @retval EFI_SUCCESS              The function completed successfully.\r
+  @retval EFI_NOT_FOUND            No table found matching the handle specified.\r
+\r
+**/\r
+EFI_STATUS\r
+FindTableByHandle (\r
+  IN UINTN                                Handle,\r
+  IN LIST_ENTRY                           *TableList,\r
+  OUT EFI_ACPI_TABLE_LIST                 **Table\r
+  );\r
+\r
+/**\r
+\r
+  This function calculates and updates an UINT8 checksum.\r
+\r
+  @param[in]  Buffer          Pointer to buffer to checksum\r
+  @param[in]  Size            Number of bytes to checksum\r
+  @param[in]  ChecksumOffset  Offset to place the checksum result in\r
+\r
+  @retval EFI_SUCCESS             The function completed successfully.\r
+\r
+**/\r
+EFI_STATUS\r
+AcpiPlatformChecksum (\r
+  IN VOID       *Buffer,\r
+  IN UINTN      Size,\r
+  IN UINTN      ChecksumOffset\r
+  );\r
+\r
+/**\r
+  This function invokes ACPI notification.\r
+\r
+  @param[in]  AcpiTableInstance          Instance to AcpiTable\r
+  @param[in]  Version                    Version(s) to set.\r
+  @param[in]  Handle                     Handle of the table.\r
+**/\r
+VOID\r
+SdtNotifyAcpiList (\r
+  IN EFI_ACPI_TABLE_INSTANCE   *AcpiTableInstance,\r
+  IN EFI_ACPI_TABLE_VERSION    Version,\r
+  IN UINTN                     Handle\r
+  );\r
+\r
+/**\r
+  This function initializes AcpiSdt protocol in ACPI table instance.\r
+\r
+  @param[in]  AcpiTableInstance       Instance to construct\r
+**/\r
+VOID\r
+SdtAcpiTableAcpiSdtConstructor (\r
+  IN EFI_ACPI_TABLE_INSTANCE   *AcpiTableInstance\r
+  );\r
+\r
+//\r
+// export PrivateData symbol, because we need that in AcpiSdtProtol implementation\r
+//\r
+extern EFI_HANDLE                mHandle;\r
+extern EFI_ACPI_TABLE_INSTANCE   *mPrivateData;\r
+\r
 #endif\r