]>
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 | |
df73df13 LE |
36 | typedef struct S3_CONTEXT S3_CONTEXT;\r |
37 | \r | |
522203de | 38 | EFI_STATUS\r |
39 | EFIAPI\r | |
40 | InstallAcpiTable (\r | |
41 | IN EFI_ACPI_TABLE_PROTOCOL *AcpiProtocol,\r | |
42 | IN VOID *AcpiTableBuffer,\r | |
43 | IN UINTN AcpiTableBufferSize,\r | |
44 | OUT UINTN *TableKey\r | |
45 | );\r | |
46 | \r | |
47 | BOOLEAN\r | |
48 | QemuDetected (\r | |
49 | VOID\r | |
50 | );\r | |
51 | \r | |
52 | EFI_STATUS\r | |
53 | EFIAPI\r | |
54 | QemuInstallAcpiTable (\r | |
55 | IN EFI_ACPI_TABLE_PROTOCOL *AcpiProtocol,\r | |
56 | IN VOID *AcpiTableBuffer,\r | |
57 | IN UINTN AcpiTableBufferSize,\r | |
58 | OUT UINTN *TableKey\r | |
59 | );\r | |
60 | \r | |
61 | BOOLEAN\r | |
62 | XenDetected (\r | |
63 | VOID\r | |
64 | );\r | |
65 | \r | |
66 | EFI_STATUS\r | |
67 | EFIAPI\r | |
377e758c | 68 | InstallXenTables (\r |
69 | IN EFI_ACPI_TABLE_PROTOCOL *AcpiProtocol\r | |
522203de | 70 | );\r |
71 | \r | |
96bbdbc8 LE |
72 | EFI_STATUS\r |
73 | EFIAPI\r | |
f186536b | 74 | InstallQemuFwCfgTables (\r |
96bbdbc8 LE |
75 | IN EFI_ACPI_TABLE_PROTOCOL *AcpiProtocol\r |
76 | );\r | |
f186536b | 77 | \r |
04951644 LE |
78 | EFI_STATUS\r |
79 | EFIAPI\r | |
80 | InstallAcpiTables (\r | |
81 | IN EFI_ACPI_TABLE_PROTOCOL *AcpiTable\r | |
82 | );\r | |
83 | \r | |
8f35eb92 LE |
84 | VOID\r |
85 | EnablePciDecoding (\r | |
86 | OUT ORIGINAL_ATTRIBUTES **OriginalAttributes,\r | |
87 | OUT UINTN *Count\r | |
88 | );\r | |
89 | \r | |
90 | VOID\r | |
91 | RestorePciDecoding (\r | |
92 | IN ORIGINAL_ATTRIBUTES *OriginalAttributes,\r | |
93 | IN UINTN Count\r | |
94 | );\r | |
95 | \r | |
df73df13 LE |
96 | EFI_STATUS\r |
97 | AllocateS3Context (\r | |
98 | OUT S3_CONTEXT **S3Context,\r | |
99 | IN UINTN WritePointerCount\r | |
100 | );\r | |
101 | \r | |
102 | VOID\r | |
103 | ReleaseS3Context (\r | |
104 | IN S3_CONTEXT *S3Context\r | |
105 | );\r | |
106 | \r | |
107 | EFI_STATUS\r | |
108 | SaveCondensedWritePointerToS3Context (\r | |
109 | IN OUT S3_CONTEXT *S3Context,\r | |
110 | IN UINT16 PointerItem,\r | |
111 | IN UINT8 PointerSize,\r | |
112 | IN UINT32 PointerOffset,\r | |
113 | IN UINT64 PointerValue\r | |
114 | );\r | |
115 | \r | |
116 | EFI_STATUS\r | |
117 | TransferS3ContextToBootScript (\r | |
80576225 | 118 | IN S3_CONTEXT *S3Context\r |
df73df13 LE |
119 | );\r |
120 | \r | |
522203de | 121 | #endif\r |
122 | \r |