17b1019a6SJerry Jelinek /******************************************************************************
27b1019a6SJerry Jelinek  *
37b1019a6SJerry Jelinek  * Name: acefiex.h - Extra OS specific defines, etc. for EFI
47b1019a6SJerry Jelinek  *
57b1019a6SJerry Jelinek  *****************************************************************************/
67b1019a6SJerry Jelinek 
7*35786f68SRobert Mustacchi /******************************************************************************
8*35786f68SRobert Mustacchi  *
9*35786f68SRobert Mustacchi  * 1. Copyright Notice
10*35786f68SRobert Mustacchi  *
11*35786f68SRobert Mustacchi  * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp.
127b1019a6SJerry Jelinek  * All rights reserved.
137b1019a6SJerry Jelinek  *
14*35786f68SRobert Mustacchi  * 2. License
15*35786f68SRobert Mustacchi  *
16*35786f68SRobert Mustacchi  * 2.1. This is your license from Intel Corp. under its intellectual property
17*35786f68SRobert Mustacchi  * rights. You may have additional license terms from the party that provided
18*35786f68SRobert Mustacchi  * you this software, covering your right to use that party's intellectual
19*35786f68SRobert Mustacchi  * property rights.
20*35786f68SRobert Mustacchi  *
21*35786f68SRobert Mustacchi  * 2.2. Intel grants, free of charge, to any person ("Licensee") obtaining a
22*35786f68SRobert Mustacchi  * copy of the source code appearing in this file ("Covered Code") an
23*35786f68SRobert Mustacchi  * irrevocable, perpetual, worldwide license under Intel's copyrights in the
24*35786f68SRobert Mustacchi  * base code distributed originally by Intel ("Original Intel Code") to copy,
25*35786f68SRobert Mustacchi  * make derivatives, distribute, use and display any portion of the Covered
26*35786f68SRobert Mustacchi  * Code in any form, with the right to sublicense such rights; and
27*35786f68SRobert Mustacchi  *
28*35786f68SRobert Mustacchi  * 2.3. Intel grants Licensee a non-exclusive and non-transferable patent
29*35786f68SRobert Mustacchi  * license (with the right to sublicense), under only those claims of Intel
30*35786f68SRobert Mustacchi  * patents that are infringed by the Original Intel Code, to make, use, sell,
31*35786f68SRobert Mustacchi  * offer to sell, and import the Covered Code and derivative works thereof
32*35786f68SRobert Mustacchi  * solely to the minimum extent necessary to exercise the above copyright
33*35786f68SRobert Mustacchi  * license, and in no event shall the patent license extend to any additions
34*35786f68SRobert Mustacchi  * to or modifications of the Original Intel Code. No other license or right
35*35786f68SRobert Mustacchi  * is granted directly or by implication, estoppel or otherwise;
36*35786f68SRobert Mustacchi  *
37*35786f68SRobert Mustacchi  * The above copyright and patent license is granted only if the following
38*35786f68SRobert Mustacchi  * conditions are met:
39*35786f68SRobert Mustacchi  *
40*35786f68SRobert Mustacchi  * 3. Conditions
41*35786f68SRobert Mustacchi  *
42*35786f68SRobert Mustacchi  * 3.1. Redistribution of Source with Rights to Further Distribute Source.
43*35786f68SRobert Mustacchi  * Redistribution of source code of any substantial portion of the Covered
44*35786f68SRobert Mustacchi  * Code or modification with rights to further distribute source must include
45*35786f68SRobert Mustacchi  * the above Copyright Notice, the above License, this list of Conditions,
46*35786f68SRobert Mustacchi  * and the following Disclaimer and Export Compliance provision. In addition,
47*35786f68SRobert Mustacchi  * Licensee must cause all Covered Code to which Licensee contributes to
48*35786f68SRobert Mustacchi  * contain a file documenting the changes Licensee made to create that Covered
49*35786f68SRobert Mustacchi  * Code and the date of any change. Licensee must include in that file the
50*35786f68SRobert Mustacchi  * documentation of any changes made by any predecessor Licensee. Licensee
51*35786f68SRobert Mustacchi  * must include a prominent statement that the modification is derived,
52*35786f68SRobert Mustacchi  * directly or indirectly, from Original Intel Code.
53*35786f68SRobert Mustacchi  *
54*35786f68SRobert Mustacchi  * 3.2. Redistribution of Source with no Rights to Further Distribute Source.
55*35786f68SRobert Mustacchi  * Redistribution of source code of any substantial portion of the Covered
56*35786f68SRobert Mustacchi  * Code or modification without rights to further distribute source must
57*35786f68SRobert Mustacchi  * include the following Disclaimer and Export Compliance provision in the
58*35786f68SRobert Mustacchi  * documentation and/or other materials provided with distribution. In
59*35786f68SRobert Mustacchi  * addition, Licensee may not authorize further sublicense of source of any
60*35786f68SRobert Mustacchi  * portion of the Covered Code, and must include terms to the effect that the
61*35786f68SRobert Mustacchi  * license from Licensee to its licensee is limited to the intellectual
62*35786f68SRobert Mustacchi  * property embodied in the software Licensee provides to its licensee, and
63*35786f68SRobert Mustacchi  * not to intellectual property embodied in modifications its licensee may
64*35786f68SRobert Mustacchi  * make.
65*35786f68SRobert Mustacchi  *
66*35786f68SRobert Mustacchi  * 3.3. Redistribution of Executable. Redistribution in executable form of any
67*35786f68SRobert Mustacchi  * substantial portion of the Covered Code or modification must reproduce the
68*35786f68SRobert Mustacchi  * above Copyright Notice, and the following Disclaimer and Export Compliance
69*35786f68SRobert Mustacchi  * provision in the documentation and/or other materials provided with the
70*35786f68SRobert Mustacchi  * distribution.
71*35786f68SRobert Mustacchi  *
72*35786f68SRobert Mustacchi  * 3.4. Intel retains all right, title, and interest in and to the Original
73*35786f68SRobert Mustacchi  * Intel Code.
74*35786f68SRobert Mustacchi  *
75*35786f68SRobert Mustacchi  * 3.5. Neither the name Intel nor any other trademark owned or controlled by
76*35786f68SRobert Mustacchi  * Intel shall be used in advertising or otherwise to promote the sale, use or
77*35786f68SRobert Mustacchi  * other dealings in products derived from or relating to the Covered Code
78*35786f68SRobert Mustacchi  * without prior written authorization from Intel.
79*35786f68SRobert Mustacchi  *
80*35786f68SRobert Mustacchi  * 4. Disclaimer and Export Compliance
81*35786f68SRobert Mustacchi  *
82*35786f68SRobert Mustacchi  * 4.1. INTEL MAKES NO WARRANTY OF ANY KIND REGARDING ANY SOFTWARE PROVIDED
83*35786f68SRobert Mustacchi  * HERE. ANY SOFTWARE ORIGINATING FROM INTEL OR DERIVED FROM INTEL SOFTWARE
84*35786f68SRobert Mustacchi  * IS PROVIDED "AS IS," AND INTEL WILL NOT PROVIDE ANY SUPPORT, ASSISTANCE,
85*35786f68SRobert Mustacchi  * INSTALLATION, TRAINING OR OTHER SERVICES. INTEL WILL NOT PROVIDE ANY
86*35786f68SRobert Mustacchi  * UPDATES, ENHANCEMENTS OR EXTENSIONS. INTEL SPECIFICALLY DISCLAIMS ANY
87*35786f68SRobert Mustacchi  * IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT AND FITNESS FOR A
88*35786f68SRobert Mustacchi  * PARTICULAR PURPOSE.
89*35786f68SRobert Mustacchi  *
90*35786f68SRobert Mustacchi  * 4.2. IN NO EVENT SHALL INTEL HAVE ANY LIABILITY TO LICENSEE, ITS LICENSEES
91*35786f68SRobert Mustacchi  * OR ANY OTHER THIRD PARTY, FOR ANY LOST PROFITS, LOST DATA, LOSS OF USE OR
92*35786f68SRobert Mustacchi  * COSTS OF PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, OR FOR ANY INDIRECT,
93*35786f68SRobert Mustacchi  * SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THIS AGREEMENT, UNDER ANY
94*35786f68SRobert Mustacchi  * CAUSE OF ACTION OR THEORY OF LIABILITY, AND IRRESPECTIVE OF WHETHER INTEL
95*35786f68SRobert Mustacchi  * HAS ADVANCE NOTICE OF THE POSSIBILITY OF SUCH DAMAGES. THESE LIMITATIONS
96*35786f68SRobert Mustacchi  * SHALL APPLY NOTWITHSTANDING THE FAILURE OF THE ESSENTIAL PURPOSE OF ANY
97*35786f68SRobert Mustacchi  * LIMITED REMEDY.
98*35786f68SRobert Mustacchi  *
99*35786f68SRobert Mustacchi  * 4.3. Licensee shall not export, either directly or indirectly, any of this
100*35786f68SRobert Mustacchi  * software or system incorporating such software without first obtaining any
101*35786f68SRobert Mustacchi  * required license or other approval from the U. S. Department of Commerce or
102*35786f68SRobert Mustacchi  * any other agency or department of the United States Government. In the
103*35786f68SRobert Mustacchi  * event Licensee exports any such software from the United States or
104*35786f68SRobert Mustacchi  * re-exports any such software from a foreign destination, Licensee shall
105*35786f68SRobert Mustacchi  * ensure that the distribution and export/re-export of the software is in
106*35786f68SRobert Mustacchi  * compliance with all laws, regulations, orders, or other restrictions of the
107*35786f68SRobert Mustacchi  * U.S. Export Administration Regulations. Licensee agrees that neither it nor
108*35786f68SRobert Mustacchi  * any of its subsidiaries will export/re-export any technical data, process,
109*35786f68SRobert Mustacchi  * software, or service, directly or indirectly, to any country for which the
110*35786f68SRobert Mustacchi  * United States government or any agency thereof requires an export license,
111*35786f68SRobert Mustacchi  * other governmental approval, or letter of assurance, without first obtaining
112*35786f68SRobert Mustacchi  * such license, approval or letter.
113*35786f68SRobert Mustacchi  *
114*35786f68SRobert Mustacchi  *****************************************************************************
115*35786f68SRobert Mustacchi  *
116*35786f68SRobert Mustacchi  * Alternatively, you may choose to be licensed under the terms of the
117*35786f68SRobert Mustacchi  * following license:
118*35786f68SRobert Mustacchi  *
1197b1019a6SJerry Jelinek  * Redistribution and use in source and binary forms, with or without
1207b1019a6SJerry Jelinek  * modification, are permitted provided that the following conditions
1217b1019a6SJerry Jelinek  * are met:
1227b1019a6SJerry Jelinek  * 1. Redistributions of source code must retain the above copyright
1237b1019a6SJerry Jelinek  *    notice, this list of conditions, and the following disclaimer,
1247b1019a6SJerry Jelinek  *    without modification.
1257b1019a6SJerry Jelinek  * 2. Redistributions in binary form must reproduce at minimum a disclaimer
1267b1019a6SJerry Jelinek  *    substantially similar to the "NO WARRANTY" disclaimer below
1277b1019a6SJerry Jelinek  *    ("Disclaimer") and any redistribution must be conditioned upon
1287b1019a6SJerry Jelinek  *    including a substantially similar Disclaimer requirement for further
1297b1019a6SJerry Jelinek  *    binary redistribution.
1307b1019a6SJerry Jelinek  * 3. Neither the names of the above-listed copyright holders nor the names
1317b1019a6SJerry Jelinek  *    of any contributors may be used to endorse or promote products derived
1327b1019a6SJerry Jelinek  *    from this software without specific prior written permission.
1337b1019a6SJerry Jelinek  *
1347b1019a6SJerry Jelinek  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
1357b1019a6SJerry Jelinek  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
136*35786f68SRobert Mustacchi  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
1377b1019a6SJerry Jelinek  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
138*35786f68SRobert Mustacchi  * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
139*35786f68SRobert Mustacchi  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
140*35786f68SRobert Mustacchi  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
141*35786f68SRobert Mustacchi  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
142*35786f68SRobert Mustacchi  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
143*35786f68SRobert Mustacchi  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
144*35786f68SRobert Mustacchi  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
145*35786f68SRobert Mustacchi  *
146*35786f68SRobert Mustacchi  * Alternatively, you may choose to be licensed under the terms of the
147*35786f68SRobert Mustacchi  * GNU General Public License ("GPL") version 2 as published by the Free
148*35786f68SRobert Mustacchi  * Software Foundation.
149*35786f68SRobert Mustacchi  *
150*35786f68SRobert Mustacchi  *****************************************************************************/
1517b1019a6SJerry Jelinek 
1527b1019a6SJerry Jelinek #ifndef __ACEFIEX_H__
1537b1019a6SJerry Jelinek #define __ACEFIEX_H__
1547b1019a6SJerry Jelinek 
1557b1019a6SJerry Jelinek 
156*35786f68SRobert Mustacchi #ifndef ACPI_USE_SYSTEM_CLIBRARY
157*35786f68SRobert Mustacchi 
158*35786f68SRobert Mustacchi typedef signed char                     int8_t;
159*35786f68SRobert Mustacchi typedef short int                       int16_t;
160*35786f68SRobert Mustacchi typedef int                             int32_t;
161*35786f68SRobert Mustacchi typedef unsigned char                   uint8_t;
162*35786f68SRobert Mustacchi typedef unsigned short int              uint16_t;
163*35786f68SRobert Mustacchi typedef unsigned int                    uint32_t;
164*35786f68SRobert Mustacchi typedef COMPILER_DEPENDENT_INT64        int64_t;
165*35786f68SRobert Mustacchi typedef COMPILER_DEPENDENT_UINT64       uint64_t;
166*35786f68SRobert Mustacchi 
167*35786f68SRobert Mustacchi #endif /* ACPI_USE_SYSTEM_CLIBRARY */
168*35786f68SRobert Mustacchi 
169*35786f68SRobert Mustacchi #define ACPI_EFI_ERROR(a)               (((INTN) a) < 0)
170*35786f68SRobert Mustacchi #define ACPI_EFI_SUCCESS                0
171*35786f68SRobert Mustacchi #define ACPI_EFI_LOAD_ERROR             ACPI_EFI_ERR(1)
172*35786f68SRobert Mustacchi #define ACPI_EFI_INVALID_PARAMETER      ACPI_EFI_ERR(2)
173*35786f68SRobert Mustacchi #define ACPI_EFI_UNSUPPORTED            ACPI_EFI_ERR(3)
174*35786f68SRobert Mustacchi #define ACPI_EFI_BAD_BUFFER_SIZE        ACPI_EFI_ERR(4)
175*35786f68SRobert Mustacchi #define ACPI_EFI_BUFFER_TOO_SMALL       ACPI_EFI_ERR(5)
176*35786f68SRobert Mustacchi #define ACPI_EFI_NOT_READY              ACPI_EFI_ERR(6)
177*35786f68SRobert Mustacchi #define ACPI_EFI_DEVICE_ERROR           ACPI_EFI_ERR(7)
178*35786f68SRobert Mustacchi #define ACPI_EFI_WRITE_PROTECTED        ACPI_EFI_ERR(8)
179*35786f68SRobert Mustacchi #define ACPI_EFI_OUT_OF_RESOURCES       ACPI_EFI_ERR(9)
180*35786f68SRobert Mustacchi #define ACPI_EFI_VOLUME_CORRUPTED       ACPI_EFI_ERR(10)
181*35786f68SRobert Mustacchi #define ACPI_EFI_VOLUME_FULL            ACPI_EFI_ERR(11)
182*35786f68SRobert Mustacchi #define ACPI_EFI_NO_MEDIA               ACPI_EFI_ERR(12)
183*35786f68SRobert Mustacchi #define ACPI_EFI_MEDIA_CHANGED          ACPI_EFI_ERR(13)
184*35786f68SRobert Mustacchi #define ACPI_EFI_NOT_FOUND              ACPI_EFI_ERR(14)
185*35786f68SRobert Mustacchi #define ACPI_EFI_ACCESS_DENIED          ACPI_EFI_ERR(15)
186*35786f68SRobert Mustacchi #define ACPI_EFI_NO_RESPONSE            ACPI_EFI_ERR(16)
187*35786f68SRobert Mustacchi #define ACPI_EFI_NO_MAPPING             ACPI_EFI_ERR(17)
188*35786f68SRobert Mustacchi #define ACPI_EFI_TIMEOUT                ACPI_EFI_ERR(18)
189*35786f68SRobert Mustacchi #define ACPI_EFI_NOT_STARTED            ACPI_EFI_ERR(19)
190*35786f68SRobert Mustacchi #define ACPI_EFI_ALREADY_STARTED        ACPI_EFI_ERR(20)
191*35786f68SRobert Mustacchi #define ACPI_EFI_ABORTED                ACPI_EFI_ERR(21)
192*35786f68SRobert Mustacchi #define ACPI_EFI_PROTOCOL_ERROR         ACPI_EFI_ERR(24)
193*35786f68SRobert Mustacchi 
194*35786f68SRobert Mustacchi 
195*35786f68SRobert Mustacchi typedef UINTN ACPI_EFI_STATUS;
196*35786f68SRobert Mustacchi typedef VOID *ACPI_EFI_HANDLE;
197*35786f68SRobert Mustacchi typedef VOID *ACPI_EFI_EVENT;
1987b1019a6SJerry Jelinek 
1997b1019a6SJerry Jelinek typedef struct {
2007b1019a6SJerry Jelinek     UINT32  Data1;
2017b1019a6SJerry Jelinek     UINT16  Data2;
2027b1019a6SJerry Jelinek     UINT16  Data3;
2037b1019a6SJerry Jelinek     UINT8   Data4[8];
204*35786f68SRobert Mustacchi } ACPI_EFI_GUID;
2057b1019a6SJerry Jelinek 
206*35786f68SRobert Mustacchi typedef struct {
207*35786f68SRobert Mustacchi     UINT16 Year;       /* 1998 - 20XX */
208*35786f68SRobert Mustacchi     UINT8  Month;      /* 1 - 12 */
209*35786f68SRobert Mustacchi     UINT8  Day;        /* 1 - 31 */
210*35786f68SRobert Mustacchi     UINT8  Hour;       /* 0 - 23 */
211*35786f68SRobert Mustacchi     UINT8  Minute;     /* 0 - 59 */
212*35786f68SRobert Mustacchi     UINT8  Second;     /* 0 - 59 */
213*35786f68SRobert Mustacchi     UINT8  Pad1;
214*35786f68SRobert Mustacchi     UINT32 Nanosecond; /* 0 - 999,999,999 */
215*35786f68SRobert Mustacchi     INT16  TimeZone;   /* -1440 to 1440 or 2047 */
216*35786f68SRobert Mustacchi     UINT8  Daylight;
217*35786f68SRobert Mustacchi     UINT8  Pad2;
218*35786f68SRobert Mustacchi } ACPI_EFI_TIME;
219*35786f68SRobert Mustacchi 
220*35786f68SRobert Mustacchi typedef struct _ACPI_EFI_DEVICE_PATH {
2217b1019a6SJerry Jelinek         UINT8                           Type;
2227b1019a6SJerry Jelinek         UINT8                           SubType;
2237b1019a6SJerry Jelinek         UINT8                           Length[2];
224*35786f68SRobert Mustacchi } ACPI_EFI_DEVICE_PATH;
2257b1019a6SJerry Jelinek 
226*35786f68SRobert Mustacchi typedef UINT64          ACPI_EFI_PHYSICAL_ADDRESS;
227*35786f68SRobert Mustacchi typedef UINT64          ACPI_EFI_VIRTUAL_ADDRESS;
2287b1019a6SJerry Jelinek 
2297b1019a6SJerry Jelinek typedef enum {
230*35786f68SRobert Mustacchi     AcpiEfiAllocateAnyPages,
231*35786f68SRobert Mustacchi     AcpiEfiAllocateMaxAddress,
232*35786f68SRobert Mustacchi     AcpiEfiAllocateAddress,
233*35786f68SRobert Mustacchi     AcpiEfiMaxAllocateType
234*35786f68SRobert Mustacchi } ACPI_EFI_ALLOCATE_TYPE;
2357b1019a6SJerry Jelinek 
2367b1019a6SJerry Jelinek typedef enum {
237*35786f68SRobert Mustacchi     AcpiEfiReservedMemoryType,
238*35786f68SRobert Mustacchi     AcpiEfiLoaderCode,
239*35786f68SRobert Mustacchi     AcpiEfiLoaderData,
240*35786f68SRobert Mustacchi     AcpiEfiBootServicesCode,
241*35786f68SRobert Mustacchi     AcpiEfiBootServicesData,
242*35786f68SRobert Mustacchi     AcpiEfiRuntimeServicesCode,
243*35786f68SRobert Mustacchi     AcpiEfiRuntimeServicesData,
244*35786f68SRobert Mustacchi     AcpiEfiConventionalMemory,
245*35786f68SRobert Mustacchi     AcpiEfiUnusableMemory,
246*35786f68SRobert Mustacchi     AcpiEfiACPIReclaimMemory,
247*35786f68SRobert Mustacchi     AcpiEfiACPIMemoryNVS,
248*35786f68SRobert Mustacchi     AcpiEfiMemoryMappedIO,
249*35786f68SRobert Mustacchi     AcpiEfiMemoryMappedIOPortSpace,
250*35786f68SRobert Mustacchi     AcpiEfiPalCode,
251*35786f68SRobert Mustacchi     AcpiEfiMaxMemoryType
252*35786f68SRobert Mustacchi } ACPI_EFI_MEMORY_TYPE;
2537b1019a6SJerry Jelinek 
2547b1019a6SJerry Jelinek /* possible caching types for the memory range */
255*35786f68SRobert Mustacchi #define ACPI_EFI_MEMORY_UC      0x0000000000000001
256*35786f68SRobert Mustacchi #define ACPI_EFI_MEMORY_WC      0x0000000000000002
257*35786f68SRobert Mustacchi #define ACPI_EFI_MEMORY_WT      0x0000000000000004
258*35786f68SRobert Mustacchi #define ACPI_EFI_MEMORY_WB      0x0000000000000008
259*35786f68SRobert Mustacchi #define ACPI_EFI_MEMORY_UCE     0x0000000000000010
2607b1019a6SJerry Jelinek 
2617b1019a6SJerry Jelinek /* physical memory protection on range */
262*35786f68SRobert Mustacchi #define ACPI_EFI_MEMORY_WP      0x0000000000001000
263*35786f68SRobert Mustacchi #define ACPI_EFI_MEMORY_RP      0x0000000000002000
264*35786f68SRobert Mustacchi #define ACPI_EFI_MEMORY_XP      0x0000000000004000
2657b1019a6SJerry Jelinek 
2667b1019a6SJerry Jelinek /* range requires a runtime mapping */
267*35786f68SRobert Mustacchi #define ACPI_EFI_MEMORY_RUNTIME 0x8000000000000000
2687b1019a6SJerry Jelinek 
269*35786f68SRobert Mustacchi #define ACPI_EFI_MEMORY_DESCRIPTOR_VERSION  1
2707b1019a6SJerry Jelinek typedef struct {
2717b1019a6SJerry Jelinek     UINT32                          Type;
2727b1019a6SJerry Jelinek     UINT32                          Pad;
273*35786f68SRobert Mustacchi     ACPI_EFI_PHYSICAL_ADDRESS       PhysicalStart;
274*35786f68SRobert Mustacchi     ACPI_EFI_VIRTUAL_ADDRESS        VirtualStart;
2757b1019a6SJerry Jelinek     UINT64                          NumberOfPages;
2767b1019a6SJerry Jelinek     UINT64                          Attribute;
277*35786f68SRobert Mustacchi } ACPI_EFI_MEMORY_DESCRIPTOR;
2787b1019a6SJerry Jelinek 
279*35786f68SRobert Mustacchi typedef struct _ACPI_EFI_TABLE_HEARDER {
2807b1019a6SJerry Jelinek     UINT64                      Signature;
2817b1019a6SJerry Jelinek     UINT32                      Revision;
2827b1019a6SJerry Jelinek     UINT32                      HeaderSize;
2837b1019a6SJerry Jelinek     UINT32                      CRC32;
2847b1019a6SJerry Jelinek     UINT32                      Reserved;
285*35786f68SRobert Mustacchi } ACPI_EFI_TABLE_HEADER;
2867b1019a6SJerry Jelinek 
2877b1019a6SJerry Jelinek typedef
288*35786f68SRobert Mustacchi ACPI_EFI_STATUS
289*35786f68SRobert Mustacchi (ACPI_EFI_API *ACPI_EFI_UNKNOWN_INTERFACE) (
2907b1019a6SJerry Jelinek     void);
2917b1019a6SJerry Jelinek 
2927b1019a6SJerry Jelinek 
2937b1019a6SJerry Jelinek /*
2947b1019a6SJerry Jelinek  * Text output protocol
2957b1019a6SJerry Jelinek  */
296*35786f68SRobert Mustacchi #define ACPI_SIMPLE_TEXT_OUTPUT_PROTOCOL \
2977b1019a6SJerry Jelinek     { 0x387477c2, 0x69c7, 0x11d2, {0x8e, 0x39, 0x0, 0xa0, 0xc9, 0x69, 0x72, 0x3b} }
2987b1019a6SJerry Jelinek 
2997b1019a6SJerry Jelinek typedef
300*35786f68SRobert Mustacchi ACPI_EFI_STATUS
301*35786f68SRobert Mustacchi (ACPI_EFI_API *ACPI_EFI_TEXT_RESET) (
302*35786f68SRobert Mustacchi     struct _ACPI_SIMPLE_TEXT_OUTPUT_INTERFACE   *This,
303*35786f68SRobert Mustacchi     BOOLEAN                                     ExtendedVerification);
3047b1019a6SJerry Jelinek 
3057b1019a6SJerry Jelinek typedef
306*35786f68SRobert Mustacchi ACPI_EFI_STATUS
307*35786f68SRobert Mustacchi (ACPI_EFI_API *ACPI_EFI_TEXT_OUTPUT_STRING) (
308*35786f68SRobert Mustacchi     struct _ACPI_SIMPLE_TEXT_OUTPUT_INTERFACE   *This,
309*35786f68SRobert Mustacchi     CHAR16                                      *String);
3107b1019a6SJerry Jelinek 
3117b1019a6SJerry Jelinek typedef
312*35786f68SRobert Mustacchi ACPI_EFI_STATUS
313*35786f68SRobert Mustacchi (ACPI_EFI_API *ACPI_EFI_TEXT_TEST_STRING) (
314*35786f68SRobert Mustacchi     struct _ACPI_SIMPLE_TEXT_OUTPUT_INTERFACE   *This,
315*35786f68SRobert Mustacchi     CHAR16                                      *String);
3167b1019a6SJerry Jelinek 
3177b1019a6SJerry Jelinek typedef
318*35786f68SRobert Mustacchi ACPI_EFI_STATUS
319*35786f68SRobert Mustacchi (ACPI_EFI_API *ACPI_EFI_TEXT_QUERY_MODE) (
320*35786f68SRobert Mustacchi     struct _ACPI_SIMPLE_TEXT_OUTPUT_INTERFACE   *This,
321*35786f68SRobert Mustacchi     UINTN                                       ModeNumber,
322*35786f68SRobert Mustacchi     UINTN                                       *Columns,
323*35786f68SRobert Mustacchi     UINTN                                       *Rows);
3247b1019a6SJerry Jelinek 
3257b1019a6SJerry Jelinek typedef
326*35786f68SRobert Mustacchi ACPI_EFI_STATUS
327*35786f68SRobert Mustacchi (ACPI_EFI_API *ACPI_EFI_TEXT_SET_MODE) (
328*35786f68SRobert Mustacchi     struct _ACPI_SIMPLE_TEXT_OUTPUT_INTERFACE   *This,
329*35786f68SRobert Mustacchi     UINTN                                       ModeNumber);
3307b1019a6SJerry Jelinek 
3317b1019a6SJerry Jelinek typedef
332*35786f68SRobert Mustacchi ACPI_EFI_STATUS
333*35786f68SRobert Mustacchi (ACPI_EFI_API *ACPI_EFI_TEXT_SET_ATTRIBUTE) (
334*35786f68SRobert Mustacchi     struct _ACPI_SIMPLE_TEXT_OUTPUT_INTERFACE   *This,
335*35786f68SRobert Mustacchi     UINTN                                       Attribute);
3367b1019a6SJerry Jelinek 
3377b1019a6SJerry Jelinek typedef
338*35786f68SRobert Mustacchi ACPI_EFI_STATUS
339*35786f68SRobert Mustacchi (ACPI_EFI_API *ACPI_EFI_TEXT_CLEAR_SCREEN) (
340*35786f68SRobert Mustacchi     struct _ACPI_SIMPLE_TEXT_OUTPUT_INTERFACE   *This);
3417b1019a6SJerry Jelinek 
3427b1019a6SJerry Jelinek typedef
343*35786f68SRobert Mustacchi ACPI_EFI_STATUS
344*35786f68SRobert Mustacchi (ACPI_EFI_API *ACPI_EFI_TEXT_SET_CURSOR_POSITION) (
345*35786f68SRobert Mustacchi     struct _ACPI_SIMPLE_TEXT_OUTPUT_INTERFACE   *This,
346*35786f68SRobert Mustacchi     UINTN                                       Column,
347*35786f68SRobert Mustacchi     UINTN                                       Row);
3487b1019a6SJerry Jelinek 
3497b1019a6SJerry Jelinek typedef
350*35786f68SRobert Mustacchi ACPI_EFI_STATUS
351*35786f68SRobert Mustacchi (ACPI_EFI_API *ACPI_EFI_TEXT_ENABLE_CURSOR) (
352*35786f68SRobert Mustacchi     struct _ACPI_SIMPLE_TEXT_OUTPUT_INTERFACE   *This,
353*35786f68SRobert Mustacchi     BOOLEAN                                     Enable);
3547b1019a6SJerry Jelinek 
3557b1019a6SJerry Jelinek typedef struct {
3567b1019a6SJerry Jelinek     INT32                           MaxMode;
3577b1019a6SJerry Jelinek     INT32                           Mode;
3587b1019a6SJerry Jelinek     INT32                           Attribute;
3597b1019a6SJerry Jelinek     INT32                           CursorColumn;
3607b1019a6SJerry Jelinek     INT32                           CursorRow;
3617b1019a6SJerry Jelinek     BOOLEAN                         CursorVisible;
362*35786f68SRobert Mustacchi } ACPI_SIMPLE_TEXT_OUTPUT_MODE;
3637b1019a6SJerry Jelinek 
364*35786f68SRobert Mustacchi typedef struct _ACPI_SIMPLE_TEXT_OUTPUT_INTERFACE {
365*35786f68SRobert Mustacchi     ACPI_EFI_TEXT_RESET                 Reset;
3667b1019a6SJerry Jelinek 
367*35786f68SRobert Mustacchi     ACPI_EFI_TEXT_OUTPUT_STRING         OutputString;
368*35786f68SRobert Mustacchi     ACPI_EFI_TEXT_TEST_STRING           TestString;
3697b1019a6SJerry Jelinek 
370*35786f68SRobert Mustacchi     ACPI_EFI_TEXT_QUERY_MODE            QueryMode;
371*35786f68SRobert Mustacchi     ACPI_EFI_TEXT_SET_MODE              SetMode;
372*35786f68SRobert Mustacchi     ACPI_EFI_TEXT_SET_ATTRIBUTE         SetAttribute;
3737b1019a6SJerry Jelinek 
374*35786f68SRobert Mustacchi     ACPI_EFI_TEXT_CLEAR_SCREEN          ClearScreen;
375*35786f68SRobert Mustacchi     ACPI_EFI_TEXT_SET_CURSOR_POSITION   SetCursorPosition;
376*35786f68SRobert Mustacchi     ACPI_EFI_TEXT_ENABLE_CURSOR         EnableCursor;
3777b1019a6SJerry Jelinek 
378*35786f68SRobert Mustacchi     ACPI_SIMPLE_TEXT_OUTPUT_MODE        *Mode;
379*35786f68SRobert Mustacchi } ACPI_SIMPLE_TEXT_OUTPUT_INTERFACE;
3807b1019a6SJerry Jelinek 
3817b1019a6SJerry Jelinek /*
3827b1019a6SJerry Jelinek  * Text input protocol
3837b1019a6SJerry Jelinek  */
384*35786f68SRobert Mustacchi #define ACPI_SIMPLE_TEXT_INPUT_PROTOCOL  \
3857b1019a6SJerry Jelinek     { 0x387477c1, 0x69c7, 0x11d2, {0x8e, 0x39, 0x0, 0xa0, 0xc9, 0x69, 0x72, 0x3b} }
3867b1019a6SJerry Jelinek 
3877b1019a6SJerry Jelinek typedef struct {
3887b1019a6SJerry Jelinek     UINT16                              ScanCode;
3897b1019a6SJerry Jelinek     CHAR16                              UnicodeChar;
390*35786f68SRobert Mustacchi } ACPI_EFI_INPUT_KEY;
3917b1019a6SJerry Jelinek 
3927b1019a6SJerry Jelinek /*
3937b1019a6SJerry Jelinek  * Baseline unicode control chars
3947b1019a6SJerry Jelinek  */
3957b1019a6SJerry Jelinek #define CHAR_NULL                       0x0000
3967b1019a6SJerry Jelinek #define CHAR_BACKSPACE                  0x0008
3977b1019a6SJerry Jelinek #define CHAR_TAB                        0x0009
3987b1019a6SJerry Jelinek #define CHAR_LINEFEED                   0x000A
3997b1019a6SJerry Jelinek #define CHAR_CARRIAGE_RETURN            0x000D
4007b1019a6SJerry Jelinek 
4017b1019a6SJerry Jelinek typedef
402*35786f68SRobert Mustacchi ACPI_EFI_STATUS
403*35786f68SRobert Mustacchi (ACPI_EFI_API *ACPI_EFI_INPUT_RESET) (
404*35786f68SRobert Mustacchi     struct _ACPI_SIMPLE_INPUT_INTERFACE         *This,
4057b1019a6SJerry Jelinek     BOOLEAN                                     ExtendedVerification);
4067b1019a6SJerry Jelinek 
4077b1019a6SJerry Jelinek typedef
408*35786f68SRobert Mustacchi ACPI_EFI_STATUS
409*35786f68SRobert Mustacchi (ACPI_EFI_API *ACPI_EFI_INPUT_READ_KEY) (
410*35786f68SRobert Mustacchi     struct _ACPI_SIMPLE_INPUT_INTERFACE         *This,
411*35786f68SRobert Mustacchi     ACPI_EFI_INPUT_KEY                          *Key);
4127b1019a6SJerry Jelinek 
413*35786f68SRobert Mustacchi typedef struct _ACPI_SIMPLE_INPUT_INTERFACE {
414*35786f68SRobert Mustacchi     ACPI_EFI_INPUT_RESET                    Reset;
415*35786f68SRobert Mustacchi     ACPI_EFI_INPUT_READ_KEY                 ReadKeyStroke;
416*35786f68SRobert Mustacchi     ACPI_EFI_EVENT                          WaitForKey;
417*35786f68SRobert Mustacchi } ACPI_SIMPLE_INPUT_INTERFACE;
4187b1019a6SJerry Jelinek 
4197b1019a6SJerry Jelinek 
4207b1019a6SJerry Jelinek /*
4217b1019a6SJerry Jelinek  * Simple file system protocol
4227b1019a6SJerry Jelinek  */
423*35786f68SRobert Mustacchi #define ACPI_SIMPLE_FILE_SYSTEM_PROTOCOL \
4247b1019a6SJerry Jelinek     { 0x964e5b22, 0x6459, 0x11d2, {0x8e, 0x39, 0x0, 0xa0, 0xc9, 0x69, 0x72, 0x3b} }
4257b1019a6SJerry Jelinek 
4267b1019a6SJerry Jelinek typedef
427*35786f68SRobert Mustacchi ACPI_EFI_STATUS
428*35786f68SRobert Mustacchi (ACPI_EFI_API *ACPI_EFI_VOLUME_OPEN) (
429*35786f68SRobert Mustacchi     struct _ACPI_EFI_FILE_IO_INTERFACE          *This,
430*35786f68SRobert Mustacchi     struct _ACPI_EFI_FILE_HANDLE                **Root);
4317b1019a6SJerry Jelinek 
432*35786f68SRobert Mustacchi #define ACPI_EFI_FILE_IO_INTERFACE_REVISION     0x00010000
4337b1019a6SJerry Jelinek 
434*35786f68SRobert Mustacchi typedef struct _ACPI_EFI_FILE_IO_INTERFACE {
4357b1019a6SJerry Jelinek     UINT64                  Revision;
436*35786f68SRobert Mustacchi     ACPI_EFI_VOLUME_OPEN    OpenVolume;
437*35786f68SRobert Mustacchi } ACPI_EFI_FILE_IO_INTERFACE;
4387b1019a6SJerry Jelinek 
4397b1019a6SJerry Jelinek typedef
440*35786f68SRobert Mustacchi ACPI_EFI_STATUS
441*35786f68SRobert Mustacchi (ACPI_EFI_API *ACPI_EFI_FILE_OPEN) (
442*35786f68SRobert Mustacchi     struct _ACPI_EFI_FILE_HANDLE                *File,
443*35786f68SRobert Mustacchi     struct _ACPI_EFI_FILE_HANDLE                **NewHandle,
4447b1019a6SJerry Jelinek     CHAR16                                      *FileName,
4457b1019a6SJerry Jelinek     UINT64                                      OpenMode,
4467b1019a6SJerry Jelinek     UINT64                                      Attributes);
4477b1019a6SJerry Jelinek 
4487b1019a6SJerry Jelinek /* Values for OpenMode used above */
4497b1019a6SJerry Jelinek 
450*35786f68SRobert Mustacchi #define ACPI_EFI_FILE_MODE_READ     0x0000000000000001
451*35786f68SRobert Mustacchi #define ACPI_EFI_FILE_MODE_WRITE    0x0000000000000002
452*35786f68SRobert Mustacchi #define ACPI_EFI_FILE_MODE_CREATE   0x8000000000000000
4537b1019a6SJerry Jelinek 
4547b1019a6SJerry Jelinek /* Values for Attribute used above */
4557b1019a6SJerry Jelinek 
456*35786f68SRobert Mustacchi #define ACPI_EFI_FILE_READ_ONLY     0x0000000000000001
457*35786f68SRobert Mustacchi #define ACPI_EFI_FILE_HIDDEN        0x0000000000000002
458*35786f68SRobert Mustacchi #define ACPI_EFI_FILE_SYSTEM        0x0000000000000004
459*35786f68SRobert Mustacchi #define ACPI_EFI_FILE_RESERVIED     0x0000000000000008
460*35786f68SRobert Mustacchi #define ACPI_EFI_FILE_DIRECTORY     0x0000000000000010
461*35786f68SRobert Mustacchi #define ACPI_EFI_FILE_ARCHIVE       0x0000000000000020
462*35786f68SRobert Mustacchi #define ACPI_EFI_FILE_VALID_ATTR    0x0000000000000037
4637b1019a6SJerry Jelinek 
4647b1019a6SJerry Jelinek typedef
465*35786f68SRobert Mustacchi ACPI_EFI_STATUS
466*35786f68SRobert Mustacchi (ACPI_EFI_API *ACPI_EFI_FILE_CLOSE) (
467*35786f68SRobert Mustacchi     struct _ACPI_EFI_FILE_HANDLE                *File);
4687b1019a6SJerry Jelinek 
4697b1019a6SJerry Jelinek typedef
470*35786f68SRobert Mustacchi ACPI_EFI_STATUS
471*35786f68SRobert Mustacchi (ACPI_EFI_API *ACPI_EFI_FILE_DELETE) (
472*35786f68SRobert Mustacchi     struct _ACPI_EFI_FILE_HANDLE                *File);
4737b1019a6SJerry Jelinek 
4747b1019a6SJerry Jelinek typedef
475*35786f68SRobert Mustacchi ACPI_EFI_STATUS
476*35786f68SRobert Mustacchi (ACPI_EFI_API *ACPI_EFI_FILE_READ) (
477*35786f68SRobert Mustacchi     struct _ACPI_EFI_FILE_HANDLE                *File,
4787b1019a6SJerry Jelinek     UINTN                                       *BufferSize,
4797b1019a6SJerry Jelinek     VOID                                        *Buffer);
4807b1019a6SJerry Jelinek 
4817b1019a6SJerry Jelinek typedef
482*35786f68SRobert Mustacchi ACPI_EFI_STATUS
483*35786f68SRobert Mustacchi (ACPI_EFI_API *ACPI_EFI_FILE_WRITE) (
484*35786f68SRobert Mustacchi     struct _ACPI_EFI_FILE_HANDLE                *File,
4857b1019a6SJerry Jelinek     UINTN                                       *BufferSize,
4867b1019a6SJerry Jelinek     VOID                                        *Buffer);
4877b1019a6SJerry Jelinek 
4887b1019a6SJerry Jelinek typedef
489*35786f68SRobert Mustacchi ACPI_EFI_STATUS
490*35786f68SRobert Mustacchi (ACPI_EFI_API *ACPI_EFI_FILE_SET_POSITION) (
491*35786f68SRobert Mustacchi     struct _ACPI_EFI_FILE_HANDLE                *File,
4927b1019a6SJerry Jelinek     UINT64                                      Position);
4937b1019a6SJerry Jelinek 
4947b1019a6SJerry Jelinek typedef
495*35786f68SRobert Mustacchi ACPI_EFI_STATUS
496*35786f68SRobert Mustacchi (ACPI_EFI_API *ACPI_EFI_FILE_GET_POSITION) (
497*35786f68SRobert Mustacchi     struct _ACPI_EFI_FILE_HANDLE                *File,
4987b1019a6SJerry Jelinek     UINT64                                      *Position);
4997b1019a6SJerry Jelinek 
500*35786f68SRobert Mustacchi #define ACPI_EFI_FILE_INFO_ID \
501*35786f68SRobert Mustacchi     { 0x9576e92, 0x6d3f, 0x11d2, {0x8e, 0x39, 0x0, 0xa0, 0xc9, 0x69, 0x72, 0x3b} }
502*35786f68SRobert Mustacchi 
503*35786f68SRobert Mustacchi typedef struct {
504*35786f68SRobert Mustacchi     UINT64 Size;
505*35786f68SRobert Mustacchi     UINT64 FileSize;
506*35786f68SRobert Mustacchi     UINT64 PhysicalSize;
507*35786f68SRobert Mustacchi     ACPI_EFI_TIME CreateTime;
508*35786f68SRobert Mustacchi     ACPI_EFI_TIME LastAccessTime;
509*35786f68SRobert Mustacchi     ACPI_EFI_TIME ModificationTime;
510*35786f68SRobert Mustacchi     UINT64 Attribute;
511*35786f68SRobert Mustacchi     CHAR16 FileName[1];
512*35786f68SRobert Mustacchi } ACPI_EFI_FILE_INFO;
513*35786f68SRobert Mustacchi 
514*35786f68SRobert Mustacchi #define SIZE_OF_ACPI_EFI_FILE_INFO  ACPI_OFFSET(ACPI_EFI_FILE_INFO, FileName)
515*35786f68SRobert Mustacchi 
5167b1019a6SJerry Jelinek typedef
517*35786f68SRobert Mustacchi ACPI_EFI_STATUS
518*35786f68SRobert Mustacchi (ACPI_EFI_API *ACPI_EFI_FILE_GET_INFO) (
519*35786f68SRobert Mustacchi     struct _ACPI_EFI_FILE_HANDLE                *File,
520*35786f68SRobert Mustacchi     ACPI_EFI_GUID                               *InformationType,
5217b1019a6SJerry Jelinek     UINTN                                       *BufferSize,
5227b1019a6SJerry Jelinek     VOID                                        *Buffer);
5237b1019a6SJerry Jelinek 
5247b1019a6SJerry Jelinek typedef
525*35786f68SRobert Mustacchi ACPI_EFI_STATUS
526*35786f68SRobert Mustacchi (ACPI_EFI_API *ACPI_EFI_FILE_SET_INFO) (
527*35786f68SRobert Mustacchi     struct _ACPI_EFI_FILE_HANDLE                *File,
528*35786f68SRobert Mustacchi     ACPI_EFI_GUID                               *InformationType,
5297b1019a6SJerry Jelinek     UINTN                                       BufferSize,
5307b1019a6SJerry Jelinek     VOID                                        *Buffer);
5317b1019a6SJerry Jelinek 
5327b1019a6SJerry Jelinek typedef
533*35786f68SRobert Mustacchi ACPI_EFI_STATUS
534*35786f68SRobert Mustacchi (ACPI_EFI_API *ACPI_EFI_FILE_FLUSH) (
535*35786f68SRobert Mustacchi     struct _ACPI_EFI_FILE_HANDLE                *File);
5367b1019a6SJerry Jelinek 
5377b1019a6SJerry Jelinek 
538*35786f68SRobert Mustacchi #define ACPI_EFI_FILE_HANDLE_REVISION           0x00010000
5397b1019a6SJerry Jelinek 
540*35786f68SRobert Mustacchi typedef struct _ACPI_EFI_FILE_HANDLE {
541*35786f68SRobert Mustacchi     UINT64                      Revision;
542*35786f68SRobert Mustacchi     ACPI_EFI_FILE_OPEN          Open;
543*35786f68SRobert Mustacchi     ACPI_EFI_FILE_CLOSE         Close;
544*35786f68SRobert Mustacchi     ACPI_EFI_FILE_DELETE        Delete;
545*35786f68SRobert Mustacchi     ACPI_EFI_FILE_READ          Read;
546*35786f68SRobert Mustacchi     ACPI_EFI_FILE_WRITE         Write;
547*35786f68SRobert Mustacchi     ACPI_EFI_FILE_GET_POSITION  GetPosition;
548*35786f68SRobert Mustacchi     ACPI_EFI_FILE_SET_POSITION  SetPosition;
549*35786f68SRobert Mustacchi     ACPI_EFI_FILE_GET_INFO      GetInfo;
550*35786f68SRobert Mustacchi     ACPI_EFI_FILE_SET_INFO      SetInfo;
551*35786f68SRobert Mustacchi     ACPI_EFI_FILE_FLUSH         Flush;
552*35786f68SRobert Mustacchi } ACPI_EFI_FILE_STRUCT, *ACPI_EFI_FILE_HANDLE;
5537b1019a6SJerry Jelinek 
5547b1019a6SJerry Jelinek 
5557b1019a6SJerry Jelinek /*
5567b1019a6SJerry Jelinek  * Loaded image protocol
5577b1019a6SJerry Jelinek  */
558*35786f68SRobert Mustacchi #define ACPI_EFI_LOADED_IMAGE_PROTOCOL \
5597b1019a6SJerry Jelinek     { 0x5B1B31A1, 0x9562, 0x11d2, {0x8E, 0x3F, 0x00, 0xA0, 0xC9, 0x69, 0x72, 0x3B} }
5607b1019a6SJerry Jelinek 
5617b1019a6SJerry Jelinek typedef
562*35786f68SRobert Mustacchi ACPI_EFI_STATUS
563*35786f68SRobert Mustacchi (ACPI_EFI_API *ACPI_EFI_IMAGE_ENTRY_POINT) (
564*35786f68SRobert Mustacchi     ACPI_EFI_HANDLE                         ImageHandle,
565*35786f68SRobert Mustacchi     struct _ACPI_EFI_SYSTEM_TABLE           *SystemTable);
5667b1019a6SJerry Jelinek 
5677b1019a6SJerry Jelinek typedef
568*35786f68SRobert Mustacchi ACPI_EFI_STATUS
569*35786f68SRobert Mustacchi (ACPI_EFI_API *ACPI_EFI_IMAGE_LOAD) (
5707b1019a6SJerry Jelinek     BOOLEAN                         BootPolicy,
571*35786f68SRobert Mustacchi     ACPI_EFI_HANDLE                 ParentImageHandle,
572*35786f68SRobert Mustacchi     ACPI_EFI_DEVICE_PATH            *FilePath,
5737b1019a6SJerry Jelinek     VOID                            *SourceBuffer,
5747b1019a6SJerry Jelinek     UINTN                           SourceSize,
575*35786f68SRobert Mustacchi     ACPI_EFI_HANDLE                 *ImageHandle);
5767b1019a6SJerry Jelinek 
5777b1019a6SJerry Jelinek typedef
578*35786f68SRobert Mustacchi ACPI_EFI_STATUS
579*35786f68SRobert Mustacchi (ACPI_EFI_API *ACPI_EFI_IMAGE_START) (
580*35786f68SRobert Mustacchi     ACPI_EFI_HANDLE                 ImageHandle,
5817b1019a6SJerry Jelinek     UINTN                           *ExitDataSize,
5827b1019a6SJerry Jelinek     CHAR16                          **ExitData);
5837b1019a6SJerry Jelinek 
5847b1019a6SJerry Jelinek typedef
585*35786f68SRobert Mustacchi ACPI_EFI_STATUS
586*35786f68SRobert Mustacchi (ACPI_EFI_API *ACPI_EFI_EXIT) (
587*35786f68SRobert Mustacchi     ACPI_EFI_HANDLE                 ImageHandle,
588*35786f68SRobert Mustacchi     ACPI_EFI_STATUS                 ExitStatus,
5897b1019a6SJerry Jelinek     UINTN                           ExitDataSize,
5907b1019a6SJerry Jelinek     CHAR16                          *ExitData);
5917b1019a6SJerry Jelinek 
5927b1019a6SJerry Jelinek typedef
593*35786f68SRobert Mustacchi ACPI_EFI_STATUS
594*35786f68SRobert Mustacchi (ACPI_EFI_API *ACPI_EFI_IMAGE_UNLOAD) (
595*35786f68SRobert Mustacchi     ACPI_EFI_HANDLE                 ImageHandle);
596*35786f68SRobert Mustacchi 
597*35786f68SRobert Mustacchi 
598*35786f68SRobert Mustacchi typedef
599*35786f68SRobert Mustacchi ACPI_EFI_STATUS
600*35786f68SRobert Mustacchi (ACPI_EFI_API *ACPI_EFI_STALL) (
601*35786f68SRobert Mustacchi     UINTN                           Microseconds);
602*35786f68SRobert Mustacchi 
603*35786f68SRobert Mustacchi typedef
604*35786f68SRobert Mustacchi ACPI_EFI_STATUS
605*35786f68SRobert Mustacchi (ACPI_EFI_API *ACPI_EFI_SET_WATCHDOG_TIMER) (
606*35786f68SRobert Mustacchi     UINTN                           Timeout,
607*35786f68SRobert Mustacchi     UINT64                          WatchdogCode,
608*35786f68SRobert Mustacchi     UINTN                           DataSize,
609*35786f68SRobert Mustacchi     CHAR16                          *WatchdogData);
6107b1019a6SJerry Jelinek 
6117b1019a6SJerry Jelinek 
6127b1019a6SJerry Jelinek #define EFI_IMAGE_INFORMATION_REVISION      0x1000
6137b1019a6SJerry Jelinek typedef struct {
6147b1019a6SJerry Jelinek     UINT32                          Revision;
615*35786f68SRobert Mustacchi     ACPI_EFI_HANDLE                 ParentHandle;
616*35786f68SRobert Mustacchi     struct _ACPI_EFI_SYSTEM_TABLE   *SystemTable;
617*35786f68SRobert Mustacchi     ACPI_EFI_HANDLE                 DeviceHandle;
618*35786f68SRobert Mustacchi     ACPI_EFI_DEVICE_PATH            *FilePath;
6197b1019a6SJerry Jelinek     VOID                            *Reserved;
6207b1019a6SJerry Jelinek     UINT32                          LoadOptionsSize;
6217b1019a6SJerry Jelinek     VOID                            *LoadOptions;
6227b1019a6SJerry Jelinek     VOID                            *ImageBase;
6237b1019a6SJerry Jelinek     UINT64                          ImageSize;
624*35786f68SRobert Mustacchi     ACPI_EFI_MEMORY_TYPE            ImageCodeType;
625*35786f68SRobert Mustacchi     ACPI_EFI_MEMORY_TYPE            ImageDataType;
626*35786f68SRobert Mustacchi     ACPI_EFI_IMAGE_UNLOAD           Unload;
6277b1019a6SJerry Jelinek 
628*35786f68SRobert Mustacchi } ACPI_EFI_LOADED_IMAGE;
6297b1019a6SJerry Jelinek 
6307b1019a6SJerry Jelinek 
6317b1019a6SJerry Jelinek /*
6327b1019a6SJerry Jelinek  * EFI Memory
6337b1019a6SJerry Jelinek  */
6347b1019a6SJerry Jelinek typedef
635*35786f68SRobert Mustacchi ACPI_EFI_STATUS
636*35786f68SRobert Mustacchi (ACPI_EFI_API *ACPI_EFI_ALLOCATE_PAGES) (
637*35786f68SRobert Mustacchi     ACPI_EFI_ALLOCATE_TYPE          Type,
638*35786f68SRobert Mustacchi     ACPI_EFI_MEMORY_TYPE            MemoryType,
6397b1019a6SJerry Jelinek     UINTN                           NoPages,
640*35786f68SRobert Mustacchi     ACPI_EFI_PHYSICAL_ADDRESS       *Memory);
6417b1019a6SJerry Jelinek 
6427b1019a6SJerry Jelinek typedef
643*35786f68SRobert Mustacchi ACPI_EFI_STATUS
644*35786f68SRobert Mustacchi (ACPI_EFI_API *ACPI_EFI_FREE_PAGES) (
645*35786f68SRobert Mustacchi     ACPI_EFI_PHYSICAL_ADDRESS       Memory,
6467b1019a6SJerry Jelinek     UINTN                           NoPages);
6477b1019a6SJerry Jelinek 
6487b1019a6SJerry Jelinek typedef
649*35786f68SRobert Mustacchi ACPI_EFI_STATUS
650*35786f68SRobert Mustacchi (ACPI_EFI_API *ACPI_EFI_GET_MEMORY_MAP) (
651