X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=MdeModulePkg%2FUniversal%2FAcpi%2FAcpiTableDxe%2FAcpiTable.h;h=d9e6428cba6b358eac9a6ff32ed59c44cd5f0562;hb=3dc8585e0a9fd4b2cb383f3ceb4961c7a88a8e71;hp=cb5119e4f5197f9160151b449da8658708b7561b;hpb=f0f78f905955934e59cf14d20786b22fb7fcd5d4;p=mirror_edk2.git diff --git a/MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTable.h b/MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTable.h index cb5119e4f5..d9e6428cba 100644 --- a/MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTable.h +++ b/MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTable.h @@ -1,7 +1,7 @@ /** @file ACPI Table Protocol Driver - Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.
+ Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -20,6 +20,8 @@ #include #include +#include +#include #include #include @@ -35,6 +37,8 @@ // #include +#include "AcpiSdt.h" + // // From Protocol/AcpiSupport.h // @@ -93,7 +97,7 @@ typedef struct { } EFI_ACPI_TABLE_LIST; // -// Containment record for linked list. +// Containment record for ACPI Table linked list. // #define EFI_ACPI_TABLE_LIST_FROM_LINK(_link) CR (_link, EFI_ACPI_TABLE_LIST, Link, EFI_ACPI_TABLE_LIST_SIGNATURE) @@ -135,13 +139,15 @@ typedef struct { EFI_ACPI_3_0_FIRMWARE_ACPI_CONTROL_STRUCTURE *Facs3; // Pointer to FACS table header EFI_ACPI_DESCRIPTION_HEADER *Dsdt1; // Pointer to DSDT table header EFI_ACPI_DESCRIPTION_HEADER *Dsdt3; // Pointer to DSDT table header - LIST_ENTRY TableList; + LIST_ENTRY TableList; UINTN NumberOfTableEntries1; // Number of ACPI 1.0 tables UINTN NumberOfTableEntries3; // Number of ACPI 3.0 tables UINTN CurrentHandle; BOOLEAN TablesInstalled1; // ACPI 1.0 tables published BOOLEAN TablesInstalled3; // ACPI 3.0 tables published EFI_ACPI_TABLE_PROTOCOL AcpiTableProtocol; + EFI_ACPI_SDT_PROTOCOL AcpiSdtProtocol; + LIST_ENTRY NotifyList; } EFI_ACPI_TABLE_INSTANCE; // @@ -194,4 +200,73 @@ InitializeAcpiTableDxe ( IN EFI_SYSTEM_TABLE *SystemTable ); +/** + + This function finds the table specified by the handle and returns a pointer to it. + If the handle is not found, EFI_NOT_FOUND is returned and the contents of Table are + undefined. + + @param[in] Handle Table to find. + @param[in] TableList Table list to search + @param[out] Table Pointer to table found. + + @retval EFI_SUCCESS The function completed successfully. + @retval EFI_NOT_FOUND No table found matching the handle specified. + +**/ +EFI_STATUS +FindTableByHandle ( + IN UINTN Handle, + IN LIST_ENTRY *TableList, + OUT EFI_ACPI_TABLE_LIST **Table + ); + +/** + + This function calculates and updates an UINT8 checksum. + + @param[in] Buffer Pointer to buffer to checksum + @param[in] Size Number of bytes to checksum + @param[in] ChecksumOffset Offset to place the checksum result in + + @retval EFI_SUCCESS The function completed successfully. + +**/ +EFI_STATUS +AcpiPlatformChecksum ( + IN VOID *Buffer, + IN UINTN Size, + IN UINTN ChecksumOffset + ); + +/** + This function invokes ACPI notification. + + @param[in] AcpiTableInstance Instance to AcpiTable + @param[in] Version Version(s) to set. + @param[in] Handle Handle of the table. +**/ +VOID +SdtNotifyAcpiList ( + IN EFI_ACPI_TABLE_INSTANCE *AcpiTableInstance, + IN EFI_ACPI_TABLE_VERSION Version, + IN UINTN Handle + ); + +/** + This function initializes AcpiSdt protocol in ACPI table instance. + + @param[in] AcpiTableInstance Instance to construct +**/ +VOID +SdtAcpiTableAcpiSdtConstructor ( + IN EFI_ACPI_TABLE_INSTANCE *AcpiTableInstance + ); + +// +// export PrivateData symbol, because we need that in AcpiSdtProtol implementation +// +extern EFI_HANDLE mHandle; +extern EFI_ACPI_TABLE_INSTANCE *mPrivateData; + #endif