ReactOS 0.4.15-dev-7934-g1dc8d80
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 - 2022, 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 MERCHANTABILITY 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
66 void);
67
68
69/*
70 * hwregs - ACPI Register I/O
71 */
75 UINT8 MaxBitWidth,
77
82
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 */
131void
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,
162 UINT32 Width);
163
164
165/*
166 * hwgpe - GPE support
167 */
168UINT32
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
210UINT8
212 void);
213
216 ACPI_GPE_XRUPT_INFO *GpeXruptInfo,
217 ACPI_GPE_BLOCK_INFO *GpeBlock,
218 void *Context);
219
220
221/*
222 * hwpci - PCI configuration support
223 */
226 ACPI_PCI_ID *PciId,
227 ACPI_HANDLE RootPciDevice,
228 ACPI_HANDLE PciRegion);
229
230
231#endif /* __ACHWARE_H__ */
unsigned long long UINT64
unsigned char UINT8
unsigned int UINT32
UINT32 void void ** ReturnValue
Definition: acevents.h:216
ACPI_GPE_EVENT_INFO * GpeEventInfo
Definition: acevents.h:195
ACPI_STATUS AcpiHwDisableGpeBlock(ACPI_GPE_XRUPT_INFO *GpeXruptInfo, ACPI_GPE_BLOCK_INFO *GpeBlock, void *Context)
Definition: hwgpe.c:364
ACPI_STATUS AcpiHwLegacySleep(UINT8 SleepState)
Definition: hwsleep.c:67
ACPI_STATUS AcpiHwWritePm1Control(UINT32 Pm1aControl, UINT32 Pm1bControl)
Definition: hwregs.c:536
void AcpiHwExecuteSleepMethod(char *MethodName, UINT32 IntegerArgument)
Definition: hwesleep.c:67
UINT32 AcpiHwGetGpeRegisterBit(ACPI_GPE_EVENT_INFO *GpeEventInfo)
Definition: hwgpe.c:81
ACPI_STATUS AcpiHwValidateRegister(ACPI_GENERIC_ADDRESS *Reg, UINT8 MaxBitWidth, UINT64 *Address)
Definition: hwregs.c:179
ACPI_STATUS AcpiHwExtendedWakePrep(UINT8 SleepState)
Definition: hwesleep.c:207
ACPI_STATUS AcpiHwClearGpe(ACPI_GPE_EVENT_INFO *GpeEventInfo)
Definition: hwgpe.c:190
ACPI_STATUS AcpiHwWrite(UINT64 Value, ACPI_GENERIC_ADDRESS *Reg)
Definition: hwregs.c:357
ACPI_STATUS AcpiHwSetMode(UINT32 Mode)
Definition: hwacpi.c:66
ACPI_STATUS AcpiHwClearAcpiStatus(void)
Definition: hwregs.c:452
ACPI_STATUS AcpiHwEnableAllWakeupGpes(void)
Definition: hwgpe.c:649
ACPI_STATUS AcpiHwDerivePciId(ACPI_PCI_ID *PciId, ACPI_HANDLE RootPciDevice, ACPI_HANDLE PciRegion)
Definition: hwpci.c:137
UINT32 AcpiHwGetMode(void)
Definition: hwacpi.c:179
ACPI_STATUS AcpiHwLowSetGpe(ACPI_GPE_EVENT_INFO *GpeEventInfo, UINT32 Action)
Definition: hwgpe.c:106
ACPI_STATUS AcpiHwDisableAllGpes(void)
Definition: hwgpe.c:595
ACPI_STATUS AcpiHwWritePort(ACPI_IO_ADDRESS Address, UINT32 Value, UINT32 Width)
Definition: hwvalid.c:312
ACPI_STATUS AcpiHwExtendedSleep(UINT8 SleepState)
Definition: hwesleep.c:112
ACPI_STATUS AcpiHwRead(UINT64 *Value, ACPI_GENERIC_ADDRESS *Reg)
Definition: hwregs.c:259
UINT8 AcpiHwCheckAllGpes(void)
Definition: hwgpe.c:677
ACPI_STATUS AcpiHwRegisterRead(UINT32 RegisterId, UINT32 *ReturnValue)
Definition: hwregs.c:574
ACPI_STATUS AcpiHwEnableRuntimeGpeBlock(ACPI_GPE_XRUPT_INFO *GpeXruptInfo, ACPI_GPE_BLOCK_INFO *GpeBlock, void *Context)
Definition: hwgpe.c:445
ACPI_STATUS AcpiHwLegacyWake(UINT8 SleepState)
Definition: hwsleep.c:301
ACPI_STATUS AcpiHwClearGpeBlock(ACPI_GPE_XRUPT_INFO *GpeXruptInfo, ACPI_GPE_BLOCK_INFO *GpeBlock, void *Context)
Definition: hwgpe.c:404
ACPI_STATUS AcpiHwReadPort(ACPI_IO_ADDRESS Address, UINT32 *Value, UINT32 Width)
Definition: hwvalid.c:237
ACPI_STATUS AcpiHwExtendedWake(UINT8 SleepState)
Definition: hwesleep.c:243
ACPI_STATUS AcpiHwEnableAllRuntimeGpes(void)
Definition: hwgpe.c:622
ACPI_STATUS AcpiHwRegisterWrite(UINT32 RegisterId, UINT32 Value)
Definition: hwregs.c:684
ACPI_BIT_REGISTER_INFO * AcpiHwGetBitRegisterInfo(UINT32 RegisterId)
Definition: hwregs.c:502
ACPI_STATUS AcpiHwLegacyWakePrep(UINT8 SleepState)
Definition: hwsleep.c:234
ACPI_STATUS AcpiHwGetGpeStatus(ACPI_GPE_EVENT_INFO *GpeEventInfo, ACPI_EVENT_STATUS *EventStatus)
Definition: hwgpe.c:233
UINT32 ACPI_STATUS
Definition: actypes.h:460
UINT32 ACPI_EVENT_STATUS
Definition: actypes.h:790
_In_ ULONG Mode
Definition: hubbusif.h:303
static WCHAR Address[46]
Definition: ping.c:68
_In_ HFONT _Out_ PUINT _Out_ PUINT Width
Definition: font.h:89
_In_ WDFIOTARGET _In_ _Strict_type_match_ WDF_IO_TARGET_SENT_IO_ACTION Action
Definition: wdfiotarget.h:510
_Must_inspect_result_ _In_ WDFKEY _In_ PCUNICODE_STRING _Out_opt_ PUSHORT _Inout_opt_ PUNICODE_STRING Value
Definition: wdfregistry.h:413