]> git.proxmox.com Git - mirror_edk2.git/blame - OvmfPkg/AcpiPlatformDxe/AcpiPlatform.h
OvmfPkg: AcpiPlatformDxe: enable PCI IO and MMIO while fetching QEMU tables
[mirror_edk2.git] / OvmfPkg / AcpiPlatformDxe / AcpiPlatform.h
CommitLineData
522203de 1/** @file\r
2 Sample ACPI Platform Driver\r
3\r
4 Copyright (c) 2008 - 2012, Intel Corporation. All rights reserved.<BR>\r
5 This program and the accompanying materials\r
6 are licensed and made available under the terms and conditions of the BSD License\r
7 which accompanies this distribution. The full text of the license may be found at\r
8 http://opensource.org/licenses/bsd-license.php\r
9\r
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
12\r
96bbdbc8 13**/\r
522203de 14\r
15#ifndef _ACPI_PLATFORM_H_INCLUDED_\r
16#define _ACPI_PLATFORM_H_INCLUDED_\r
17\r
18#include <PiDxe.h>\r
19\r
20#include <Protocol/AcpiTable.h>\r
21#include <Protocol/FirmwareVolume2.h>\r
8f35eb92 22#include <Protocol/PciIo.h>\r
522203de 23\r
24#include <Library/BaseLib.h>\r
25#include <Library/UefiBootServicesTableLib.h>\r
26#include <Library/DebugLib.h>\r
27#include <Library/PcdLib.h>\r
28\r
29#include <IndustryStandard/Acpi.h>\r
30\r
8f35eb92
LE
31typedef struct {\r
32 EFI_PCI_IO_PROTOCOL *PciIo;\r
33 UINT64 PciAttributes;\r
34} ORIGINAL_ATTRIBUTES;\r
35\r
522203de 36EFI_STATUS\r
37EFIAPI\r
38InstallAcpiTable (\r
39 IN EFI_ACPI_TABLE_PROTOCOL *AcpiProtocol,\r
40 IN VOID *AcpiTableBuffer,\r
41 IN UINTN AcpiTableBufferSize,\r
42 OUT UINTN *TableKey\r
43 );\r
44\r
45BOOLEAN\r
46QemuDetected (\r
47 VOID\r
48 );\r
49\r
50EFI_STATUS\r
51EFIAPI\r
52QemuInstallAcpiTable (\r
53 IN EFI_ACPI_TABLE_PROTOCOL *AcpiProtocol,\r
54 IN VOID *AcpiTableBuffer,\r
55 IN UINTN AcpiTableBufferSize,\r
56 OUT UINTN *TableKey\r
57 );\r
58\r
59BOOLEAN\r
60XenDetected (\r
61 VOID\r
62 );\r
63\r
64EFI_STATUS\r
65EFIAPI\r
377e758c 66InstallXenTables (\r
67 IN EFI_ACPI_TABLE_PROTOCOL *AcpiProtocol\r
522203de 68 );\r
69\r
96bbdbc8
LE
70EFI_STATUS\r
71EFIAPI\r
f186536b 72InstallQemuFwCfgTables (\r
96bbdbc8
LE
73 IN EFI_ACPI_TABLE_PROTOCOL *AcpiProtocol\r
74 );\r
f186536b 75\r
04951644
LE
76EFI_STATUS\r
77EFIAPI\r
78InstallAcpiTables (\r
79 IN EFI_ACPI_TABLE_PROTOCOL *AcpiTable\r
80 );\r
81\r
8f35eb92
LE
82VOID\r
83EnablePciDecoding (\r
84 OUT ORIGINAL_ATTRIBUTES **OriginalAttributes,\r
85 OUT UINTN *Count\r
86 );\r
87\r
88VOID\r
89RestorePciDecoding (\r
90 IN ORIGINAL_ATTRIBUTES *OriginalAttributes,\r
91 IN UINTN Count\r
92 );\r
93\r
522203de 94#endif\r
95\r