]>
Commit | Line | Data |
---|---|---|
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 |
31 | typedef struct {\r |
32 | EFI_PCI_IO_PROTOCOL *PciIo;\r | |
33 | UINT64 PciAttributes;\r | |
34 | } ORIGINAL_ATTRIBUTES;\r | |
35 | \r | |
522203de | 36 | EFI_STATUS\r |
37 | EFIAPI\r | |
38 | InstallAcpiTable (\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 | |
45 | BOOLEAN\r | |
46 | QemuDetected (\r | |
47 | VOID\r | |
48 | );\r | |
49 | \r | |
50 | EFI_STATUS\r | |
51 | EFIAPI\r | |
52 | QemuInstallAcpiTable (\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 | |
59 | BOOLEAN\r | |
60 | XenDetected (\r | |
61 | VOID\r | |
62 | );\r | |
63 | \r | |
64 | EFI_STATUS\r | |
65 | EFIAPI\r | |
377e758c | 66 | InstallXenTables (\r |
67 | IN EFI_ACPI_TABLE_PROTOCOL *AcpiProtocol\r | |
522203de | 68 | );\r |
69 | \r | |
96bbdbc8 LE |
70 | EFI_STATUS\r |
71 | EFIAPI\r | |
f186536b | 72 | InstallQemuFwCfgTables (\r |
96bbdbc8 LE |
73 | IN EFI_ACPI_TABLE_PROTOCOL *AcpiProtocol\r |
74 | );\r | |
f186536b | 75 | \r |
04951644 LE |
76 | EFI_STATUS\r |
77 | EFIAPI\r | |
78 | InstallAcpiTables (\r | |
79 | IN EFI_ACPI_TABLE_PROTOCOL *AcpiTable\r | |
80 | );\r | |
81 | \r | |
8f35eb92 LE |
82 | VOID\r |
83 | EnablePciDecoding (\r | |
84 | OUT ORIGINAL_ATTRIBUTES **OriginalAttributes,\r | |
85 | OUT UINTN *Count\r | |
86 | );\r | |
87 | \r | |
88 | VOID\r | |
89 | RestorePciDecoding (\r | |
90 | IN ORIGINAL_ATTRIBUTES *OriginalAttributes,\r | |
91 | IN UINTN Count\r | |
92 | );\r | |
93 | \r | |
522203de | 94 | #endif\r |
95 | \r |