]> git.proxmox.com Git - mirror_edk2.git/blob - OvmfPkg/AcpiPlatformDxe/AcpiPlatform.h
3ec50986586335264b041a7306158038d23b43bc
[mirror_edk2.git] / OvmfPkg / AcpiPlatformDxe / AcpiPlatform.h
1 /** @file
2 OVMF ACPI Platform Driver
3
4 Copyright (c) 2008 - 2012, Intel Corporation. All rights reserved.<BR>
5 SPDX-License-Identifier: BSD-2-Clause-Patent
6
7 **/
8
9 #ifndef ACPI_PLATFORM_H_
10 #define ACPI_PLATFORM_H_
11
12 #include <Protocol/AcpiTable.h> // EFI_ACPI_TABLE_PROTOCOL
13 #include <Protocol/PciIo.h> // EFI_PCI_IO_PROTOCOL
14
15 typedef struct {
16 EFI_PCI_IO_PROTOCOL *PciIo;
17 UINT64 PciAttributes;
18 } ORIGINAL_ATTRIBUTES;
19
20 typedef struct S3_CONTEXT S3_CONTEXT;
21
22 EFI_STATUS
23 EFIAPI
24 InstallCloudHvTablesTdx (
25 IN EFI_ACPI_TABLE_PROTOCOL *AcpiProtocol
26 );
27
28 EFI_STATUS
29 EFIAPI
30 InstallCloudHvTables (
31 IN EFI_ACPI_TABLE_PROTOCOL *AcpiProtocol
32 );
33
34 EFI_STATUS
35 EFIAPI
36 InstallQemuFwCfgTables (
37 IN EFI_ACPI_TABLE_PROTOCOL *AcpiProtocol
38 );
39
40 EFI_STATUS
41 EFIAPI
42 InstallAcpiTables (
43 IN EFI_ACPI_TABLE_PROTOCOL *AcpiTable
44 );
45
46 VOID
47 EnablePciDecoding (
48 OUT ORIGINAL_ATTRIBUTES **OriginalAttributes,
49 OUT UINTN *Count
50 );
51
52 VOID
53 RestorePciDecoding (
54 IN ORIGINAL_ATTRIBUTES *OriginalAttributes,
55 IN UINTN Count
56 );
57
58 EFI_STATUS
59 AllocateS3Context (
60 OUT S3_CONTEXT **S3Context,
61 IN UINTN WritePointerCount
62 );
63
64 VOID
65 ReleaseS3Context (
66 IN S3_CONTEXT *S3Context
67 );
68
69 EFI_STATUS
70 SaveCondensedWritePointerToS3Context (
71 IN OUT S3_CONTEXT *S3Context,
72 IN UINT16 PointerItem,
73 IN UINT8 PointerSize,
74 IN UINT32 PointerOffset,
75 IN UINT64 PointerValue
76 );
77
78 EFI_STATUS
79 TransferS3ContextToBootScript (
80 IN S3_CONTEXT *S3Context
81 );
82
83 #endif