]> git.proxmox.com Git - mirror_edk2.git/blobdiff - OvmfPkg/AcpiPlatformDxe/AcpiPlatform.h
UefiCpuPkg: Move AsmRelocateApLoopStart from Mpfuncs.nasm to AmdSev.nasm
[mirror_edk2.git] / OvmfPkg / AcpiPlatformDxe / AcpiPlatform.h
index c643fa13d41c48137e183ee217a6c667efc2f475..3ec50986586335264b041a7306158038d23b43bc 100644 (file)
@@ -1,70 +1,83 @@
 /** @file\r
-  Sample ACPI Platform Driver\r
+  OVMF ACPI Platform Driver\r
 \r
   Copyright (c) 2008 - 2012, 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
-  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
+  SPDX-License-Identifier: BSD-2-Clause-Patent\r
 \r
 **/\r
 \r
-#ifndef _ACPI_PLATFORM_H_INCLUDED_\r
-#define _ACPI_PLATFORM_H_INCLUDED_\r
+#ifndef ACPI_PLATFORM_H_\r
+#define ACPI_PLATFORM_H_\r
 \r
-#include <PiDxe.h>\r
+#include <Protocol/AcpiTable.h> // EFI_ACPI_TABLE_PROTOCOL\r
+#include <Protocol/PciIo.h>     // EFI_PCI_IO_PROTOCOL\r
 \r
-#include <Protocol/AcpiTable.h>\r
-#include <Protocol/FirmwareVolume2.h>\r
+typedef struct {\r
+  EFI_PCI_IO_PROTOCOL    *PciIo;\r
+  UINT64                 PciAttributes;\r
+} ORIGINAL_ATTRIBUTES;\r
 \r
-#include <Library/BaseLib.h>\r
-#include <Library/UefiBootServicesTableLib.h>\r
-#include <Library/DebugLib.h>\r
-#include <Library/PcdLib.h>\r
+typedef struct S3_CONTEXT S3_CONTEXT;\r
 \r
-#include <IndustryStandard/Acpi.h>\r
+EFI_STATUS\r
+EFIAPI\r
+InstallCloudHvTablesTdx (\r
+  IN   EFI_ACPI_TABLE_PROTOCOL  *AcpiProtocol\r
+  );\r
 \r
 EFI_STATUS\r
 EFIAPI\r
-InstallAcpiTable (\r
-  IN   EFI_ACPI_TABLE_PROTOCOL       *AcpiProtocol,\r
-  IN   VOID                          *AcpiTableBuffer,\r
-  IN   UINTN                         AcpiTableBufferSize,\r
-  OUT  UINTN                         *TableKey\r
+InstallCloudHvTables (\r
+  IN   EFI_ACPI_TABLE_PROTOCOL  *AcpiProtocol\r
   );\r
 \r
-BOOLEAN\r
-QemuDetected (\r
-  VOID\r
+EFI_STATUS\r
+EFIAPI\r
+InstallQemuFwCfgTables (\r
+  IN   EFI_ACPI_TABLE_PROTOCOL  *AcpiProtocol\r
   );\r
 \r
 EFI_STATUS\r
 EFIAPI\r
-QemuInstallAcpiTable (\r
-  IN   EFI_ACPI_TABLE_PROTOCOL       *AcpiProtocol,\r
-  IN   VOID                          *AcpiTableBuffer,\r
-  IN   UINTN                         AcpiTableBufferSize,\r
-  OUT  UINTN                         *TableKey\r
+InstallAcpiTables (\r
+  IN   EFI_ACPI_TABLE_PROTOCOL  *AcpiTable\r
+  );\r
+\r
+VOID\r
+EnablePciDecoding (\r
+  OUT ORIGINAL_ATTRIBUTES  **OriginalAttributes,\r
+  OUT UINTN                *Count\r
   );\r
 \r
-BOOLEAN\r
-XenDetected (\r
-  VOID\r
+VOID\r
+RestorePciDecoding (\r
+  IN ORIGINAL_ATTRIBUTES  *OriginalAttributes,\r
+  IN UINTN                Count\r
   );\r
 \r
 EFI_STATUS\r
-EFIAPI\r
-InstallXenTables (\r
-  IN   EFI_ACPI_TABLE_PROTOCOL       *AcpiProtocol\r
+AllocateS3Context (\r
+  OUT S3_CONTEXT  **S3Context,\r
+  IN  UINTN       WritePointerCount\r
+  );\r
+\r
+VOID\r
+ReleaseS3Context (\r
+  IN S3_CONTEXT  *S3Context\r
   );\r
 \r
 EFI_STATUS\r
-EFIAPI\r
-InstallQemuLinkedTables (\r
-  IN   EFI_ACPI_TABLE_PROTOCOL       *AcpiProtocol\r
+SaveCondensedWritePointerToS3Context (\r
+  IN OUT S3_CONTEXT  *S3Context,\r
+  IN     UINT16      PointerItem,\r
+  IN     UINT8       PointerSize,\r
+  IN     UINT32      PointerOffset,\r
+  IN     UINT64      PointerValue\r
   );\r
-#endif\r
 \r
+EFI_STATUS\r
+TransferS3ContextToBootScript (\r
+  IN S3_CONTEXT  *S3Context\r
+  );\r
+\r
+#endif\r