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