]> git.proxmox.com Git - mirror_edk2.git/blob - OvmfPkg/AcpiPlatformDxe/AcpiPlatform.h
OvmfPkg/AcpiPlatformDxe: sort #includes and [LibraryClasses]
[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 <IndustryStandard/Acpi.h>
13 #include <Library/BaseLib.h>
14 #include <Library/DebugLib.h>
15 #include <Library/PcdLib.h>
16 #include <Library/UefiBootServicesTableLib.h>
17 #include <Library/XenPlatformLib.h>
18 #include <PiDxe.h>
19 #include <Protocol/AcpiTable.h>
20 #include <Protocol/FirmwareVolume2.h>
21 #include <Protocol/PciIo.h>
22
23 typedef struct {
24 EFI_PCI_IO_PROTOCOL *PciIo;
25 UINT64 PciAttributes;
26 } ORIGINAL_ATTRIBUTES;
27
28 typedef struct S3_CONTEXT S3_CONTEXT;
29
30 EFI_STATUS
31 EFIAPI
32 InstallAcpiTable (
33 IN EFI_ACPI_TABLE_PROTOCOL *AcpiProtocol,
34 IN VOID *AcpiTableBuffer,
35 IN UINTN AcpiTableBufferSize,
36 OUT UINTN *TableKey
37 );
38
39 BOOLEAN
40 QemuDetected (
41 VOID
42 );
43
44 EFI_STATUS
45 EFIAPI
46 QemuInstallAcpiTable (
47 IN EFI_ACPI_TABLE_PROTOCOL *AcpiProtocol,
48 IN VOID *AcpiTableBuffer,
49 IN UINTN AcpiTableBufferSize,
50 OUT UINTN *TableKey
51 );
52
53 EFI_STATUS
54 EFIAPI
55 InstallXenTables (
56 IN EFI_ACPI_TABLE_PROTOCOL *AcpiProtocol
57 );
58
59 EFI_STATUS
60 EFIAPI
61 InstallQemuFwCfgTables (
62 IN EFI_ACPI_TABLE_PROTOCOL *AcpiProtocol
63 );
64
65 EFI_STATUS
66 EFIAPI
67 InstallAcpiTables (
68 IN EFI_ACPI_TABLE_PROTOCOL *AcpiTable
69 );
70
71 VOID
72 EnablePciDecoding (
73 OUT ORIGINAL_ATTRIBUTES **OriginalAttributes,
74 OUT UINTN *Count
75 );
76
77 VOID
78 RestorePciDecoding (
79 IN ORIGINAL_ATTRIBUTES *OriginalAttributes,
80 IN UINTN Count
81 );
82
83 EFI_STATUS
84 AllocateS3Context (
85 OUT S3_CONTEXT **S3Context,
86 IN UINTN WritePointerCount
87 );
88
89 VOID
90 ReleaseS3Context (
91 IN S3_CONTEXT *S3Context
92 );
93
94 EFI_STATUS
95 SaveCondensedWritePointerToS3Context (
96 IN OUT S3_CONTEXT *S3Context,
97 IN UINT16 PointerItem,
98 IN UINT8 PointerSize,
99 IN UINT32 PointerOffset,
100 IN UINT64 PointerValue
101 );
102
103 EFI_STATUS
104 TransferS3ContextToBootScript (
105 IN S3_CONTEXT *S3Context
106 );
107
108 #endif
109