ReactOS  0.4.14-dev-358-gbef841c
achware.h
Go to the documentation of this file.
1 /******************************************************************************
2  *
3  * Name: achware.h -- hardware specific interfaces
4  *
5  *****************************************************************************/
6 
7 /*
8  * Copyright (C) 2000 - 2019, Intel Corp.
9  * All rights reserved.
10  *
11  * Redistribution and use in source and binary forms, with or without
12  * modification, are permitted provided that the following conditions
13  * are met:
14  * 1. Redistributions of source code must retain the above copyright
15  * notice, this list of conditions, and the following disclaimer,
16  * without modification.
17  * 2. Redistributions in binary form must reproduce at minimum a disclaimer
18  * substantially similar to the "NO WARRANTY" disclaimer below
19  * ("Disclaimer") and any redistribution must be conditioned upon
20  * including a substantially similar Disclaimer requirement for further
21  * binary redistribution.
22  * 3. Neither the names of the above-listed copyright holders nor the names
23  * of any contributors may be used to endorse or promote products derived
24  * from this software without specific prior written permission.
25  *
26  * Alternatively, this software may be distributed under the terms of the
27  * GNU General Public License ("GPL") version 2 as published by the Free
28  * Software Foundation.
29  *
30  * NO WARRANTY
31  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
32  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
33  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
34  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
35  * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
36  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
37  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
38  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
39  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
40  * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
41  * POSSIBILITY OF SUCH DAMAGES.
42  */
43 
44 #ifndef __ACHWARE_H__
45 #define __ACHWARE_H__
46 
47 
48 /* Values for the _SST predefined method */
49 
50 #define ACPI_SST_INDICATOR_OFF 0
51 #define ACPI_SST_WORKING 1
52 #define ACPI_SST_WAKING 2
53 #define ACPI_SST_SLEEPING 3
54 #define ACPI_SST_SLEEP_CONTEXT 4
55 
56 
57 /*
58  * hwacpi - high level functions
59  */
62  UINT32 Mode);
63 
64 UINT32
66  void);
67 
68 
69 /*
70  * hwregs - ACPI Register I/O
71  */
75  UINT8 MaxBitWidth,
76  UINT64 *Address);
77 
79 AcpiHwRead (
80  UINT64 *Value,
82 
85  UINT64 Value,
87 
90  UINT32 RegisterId);
91 
94  UINT32 Pm1aControl,
95  UINT32 Pm1bControl);
96 
99  UINT32 RegisterId,
101 
104  UINT32 RegisterId,
105  UINT32 Value);
106 
109  void);
110 
111 
112 /*
113  * hwsleep - sleep/wake support (Legacy sleep registers)
114  */
117  UINT8 SleepState);
118 
121  UINT8 SleepState);
122 
125  UINT8 SleepState);
126 
127 
128 /*
129  * hwesleep - sleep/wake support (Extended FADT-V5 sleep registers)
130  */
131 void
133  char *MethodName,
134  UINT32 IntegerArgument);
135 
138  UINT8 SleepState);
139 
142  UINT8 SleepState);
143 
146  UINT8 SleepState);
147 
148 
149 /*
150  * hwvalid - Port I/O with validation
151  */
154  ACPI_IO_ADDRESS Address,
155  UINT32 *Value,
156  UINT32 Width);
157 
160  ACPI_IO_ADDRESS Address,
161  UINT32 Value,
162  UINT32 Width);
163 
164 
165 /*
166  * hwgpe - GPE support
167  */
168 UINT32
171 
175  UINT32 Action);
176 
179  ACPI_GPE_XRUPT_INFO *GpeXruptInfo,
180  ACPI_GPE_BLOCK_INFO *GpeBlock,
181  void *Context);
182 
186 
189  ACPI_GPE_XRUPT_INFO *GpeXruptInfo,
190  ACPI_GPE_BLOCK_INFO *GpeBlock,
191  void *Context);
192 
196  ACPI_EVENT_STATUS *EventStatus);
197 
200  void);
201 
204  void);
205 
208  void);
209 
212  ACPI_GPE_XRUPT_INFO *GpeXruptInfo,
213  ACPI_GPE_BLOCK_INFO *GpeBlock,
214  void *Context);
215 
216 
217 /*
218  * hwpci - PCI configuration support
219  */
222  ACPI_PCI_ID *PciId,
223  ACPI_HANDLE RootPciDevice,
224  ACPI_HANDLE PciRegion);
225 
226 
227 #endif /* __ACHWARE_H__ */
_In_opt_ ULONG _Out_ PULONG Value
Definition: rtlfuncs.h:2343
ACPI_BIT_REGISTER_INFO * AcpiHwGetBitRegisterInfo(UINT32 RegisterId)
Definition: hwregs.c:502
ACPI_STATUS AcpiHwWrite(UINT64 Value, ACPI_GENERIC_ADDRESS *Reg)
Definition: hwregs.c:357
_In_ ULONG Mode
Definition: hubbusif.h:303
UINT32 AcpiHwGetGpeRegisterBit(ACPI_GPE_EVENT_INFO *GpeEventInfo)
Definition: hwgpe.c:81
ACPI_STATUS AcpiHwGetGpeStatus(ACPI_GPE_EVENT_INFO *GpeEventInfo, ACPI_EVENT_STATUS *EventStatus)
Definition: hwgpe.c:233
ACPI_STATUS AcpiHwDisableAllGpes(void)
Definition: hwgpe.c:543
ACPI_STATUS AcpiHwLegacyWake(UINT8 SleepState)
Definition: hwsleep.c:300
ACPI_GPE_EVENT_INFO * GpeEventInfo
Definition: acevents.h:195
void AcpiHwExecuteSleepMethod(char *MethodName, UINT32 IntegerArgument)
Definition: hwesleep.c:67
UINT32 ACPI_STATUS
Definition: actypes.h:460
ACPI_STATUS AcpiHwEnableAllRuntimeGpes(void)
Definition: hwgpe.c:570
ACPI_STATUS AcpiHwReadPort(ACPI_IO_ADDRESS Address, UINT32 *Value, UINT32 Width)
Definition: hwvalid.c:237
ACPI_STATUS AcpiHwEnableRuntimeGpeBlock(ACPI_GPE_XRUPT_INFO *GpeXruptInfo, ACPI_GPE_BLOCK_INFO *GpeBlock, void *Context)
Definition: hwgpe.c:445
ACPI_STATUS AcpiHwSetMode(UINT32 Mode)
Definition: hwacpi.c:66
UINT32 void void ** ReturnValue
Definition: acevents.h:214
unsigned int UINT32
static WCHAR Address[46]
Definition: ping.c:68
ACPI_STATUS AcpiHwRegisterWrite(UINT32 RegisterId, UINT32 Value)
Definition: hwregs.c:684
ACPI_STATUS AcpiHwLegacyWakePrep(UINT8 SleepState)
Definition: hwsleep.c:231
ACPI_STATUS AcpiHwLowSetGpe(ACPI_GPE_EVENT_INFO *GpeEventInfo, UINT32 Action)
Definition: hwgpe.c:106
ACPI_STATUS AcpiHwDerivePciId(ACPI_PCI_ID *PciId, ACPI_HANDLE RootPciDevice, ACPI_HANDLE PciRegion)
Definition: hwpci.c:137
ACPI_STATUS AcpiHwDisableGpeBlock(ACPI_GPE_XRUPT_INFO *GpeXruptInfo, ACPI_GPE_BLOCK_INFO *GpeBlock, void *Context)
Definition: hwgpe.c:364
_In_ PLIST_ENTRY _In_ PSTRING _In_ USHORT _In_opt_ PSTRING _In_opt_ PSTRING _In_ ULONG _In_ ULONG Action
Definition: fsrtlfuncs.h:738
UINT32 ACPI_EVENT_STATUS
Definition: actypes.h:780
ACPI_STATUS AcpiHwClearGpe(ACPI_GPE_EVENT_INFO *GpeEventInfo)
Definition: hwgpe.c:190
ACPI_STATUS AcpiHwWritePm1Control(UINT32 Pm1aControl, UINT32 Pm1bControl)
Definition: hwregs.c:536
ACPI_STATUS AcpiHwClearGpeBlock(ACPI_GPE_XRUPT_INFO *GpeXruptInfo, ACPI_GPE_BLOCK_INFO *GpeBlock, void *Context)
Definition: hwgpe.c:404
ACPI_STATUS AcpiHwClearAcpiStatus(void)
Definition: hwregs.c:452
ACPI_STATUS AcpiHwRegisterRead(UINT32 RegisterId, UINT32 *ReturnValue)
Definition: hwregs.c:574
ACPI_STATUS AcpiHwWritePort(ACPI_IO_ADDRESS Address, UINT32 Value, UINT32 Width)
Definition: hwvalid.c:312
ACPI_STATUS AcpiHwValidateRegister(ACPI_GENERIC_ADDRESS *Reg, UINT8 MaxBitWidth, UINT64 *Address)
Definition: hwregs.c:179
ACPI_STATUS AcpiHwExtendedWakePrep(UINT8 SleepState)
Definition: hwesleep.c:204
ACPI_STATUS AcpiHwExtendedSleep(UINT8 SleepState)
Definition: hwesleep.c:112
ACPI_STATUS AcpiHwExtendedWake(UINT8 SleepState)
Definition: hwesleep.c:243
ACPI_STATUS AcpiHwRead(UINT64 *Value, ACPI_GENERIC_ADDRESS *Reg)
Definition: hwregs.c:259
UINT32 AcpiHwGetMode(void)
Definition: hwacpi.c:179
ACPI_STATUS AcpiHwLegacySleep(UINT8 SleepState)
Definition: hwsleep.c:67
unsigned long long UINT64
ACPI_STATUS AcpiHwEnableAllWakeupGpes(void)
Definition: hwgpe.c:597
unsigned char UINT8