ReactOS  0.4.14-dev-98-gb0d4763
achware.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define ACPI_SST_INDICATOR_OFF   0
 
#define ACPI_SST_WORKING   1
 
#define ACPI_SST_WAKING   2
 
#define ACPI_SST_SLEEPING   3
 
#define ACPI_SST_SLEEP_CONTEXT   4
 

Functions

ACPI_STATUS AcpiHwSetMode (UINT32 Mode)
 
UINT32 AcpiHwGetMode (void)
 
ACPI_STATUS AcpiHwValidateRegister (ACPI_GENERIC_ADDRESS *Reg, UINT8 MaxBitWidth, UINT64 *Address)
 
ACPI_STATUS AcpiHwRead (UINT64 *Value, ACPI_GENERIC_ADDRESS *Reg)
 
ACPI_STATUS AcpiHwWrite (UINT64 Value, ACPI_GENERIC_ADDRESS *Reg)
 
ACPI_BIT_REGISTER_INFOAcpiHwGetBitRegisterInfo (UINT32 RegisterId)
 
ACPI_STATUS AcpiHwWritePm1Control (UINT32 Pm1aControl, UINT32 Pm1bControl)
 
ACPI_STATUS AcpiHwRegisterRead (UINT32 RegisterId, UINT32 *ReturnValue)
 
ACPI_STATUS AcpiHwRegisterWrite (UINT32 RegisterId, UINT32 Value)
 
ACPI_STATUS AcpiHwClearAcpiStatus (void)
 
ACPI_STATUS AcpiHwLegacySleep (UINT8 SleepState)
 
ACPI_STATUS AcpiHwLegacyWakePrep (UINT8 SleepState)
 
ACPI_STATUS AcpiHwLegacyWake (UINT8 SleepState)
 
void AcpiHwExecuteSleepMethod (char *MethodName, UINT32 IntegerArgument)
 
ACPI_STATUS AcpiHwExtendedSleep (UINT8 SleepState)
 
ACPI_STATUS AcpiHwExtendedWakePrep (UINT8 SleepState)
 
ACPI_STATUS AcpiHwExtendedWake (UINT8 SleepState)
 
ACPI_STATUS AcpiHwReadPort (ACPI_IO_ADDRESS Address, UINT32 *Value, UINT32 Width)
 
ACPI_STATUS AcpiHwWritePort (ACPI_IO_ADDRESS Address, UINT32 Value, UINT32 Width)
 
UINT32 AcpiHwGetGpeRegisterBit (ACPI_GPE_EVENT_INFO *GpeEventInfo)
 
ACPI_STATUS AcpiHwLowSetGpe (ACPI_GPE_EVENT_INFO *GpeEventInfo, UINT32 Action)
 
ACPI_STATUS AcpiHwDisableGpeBlock (ACPI_GPE_XRUPT_INFO *GpeXruptInfo, ACPI_GPE_BLOCK_INFO *GpeBlock, void *Context)
 
ACPI_STATUS AcpiHwClearGpe (ACPI_GPE_EVENT_INFO *GpeEventInfo)
 
ACPI_STATUS AcpiHwClearGpeBlock (ACPI_GPE_XRUPT_INFO *GpeXruptInfo, ACPI_GPE_BLOCK_INFO *GpeBlock, void *Context)
 
ACPI_STATUS AcpiHwGetGpeStatus (ACPI_GPE_EVENT_INFO *GpeEventInfo, ACPI_EVENT_STATUS *EventStatus)
 
ACPI_STATUS AcpiHwDisableAllGpes (void)
 
ACPI_STATUS AcpiHwEnableAllRuntimeGpes (void)
 
ACPI_STATUS AcpiHwEnableAllWakeupGpes (void)
 
ACPI_STATUS AcpiHwEnableRuntimeGpeBlock (ACPI_GPE_XRUPT_INFO *GpeXruptInfo, ACPI_GPE_BLOCK_INFO *GpeBlock, void *Context)
 
ACPI_STATUS AcpiHwDerivePciId (ACPI_PCI_ID *PciId, ACPI_HANDLE RootPciDevice, ACPI_HANDLE PciRegion)
 

Macro Definition Documentation

◆ ACPI_SST_INDICATOR_OFF

#define ACPI_SST_INDICATOR_OFF   0

Definition at line 50 of file achware.h.

◆ ACPI_SST_SLEEP_CONTEXT

#define ACPI_SST_SLEEP_CONTEXT   4

Definition at line 54 of file achware.h.

◆ ACPI_SST_SLEEPING

#define ACPI_SST_SLEEPING   3

Definition at line 53 of file achware.h.

◆ ACPI_SST_WAKING

#define ACPI_SST_WAKING   2

Definition at line 52 of file achware.h.

◆ ACPI_SST_WORKING

#define ACPI_SST_WORKING   1

Definition at line 51 of file achware.h.

Function Documentation

◆ AcpiHwClearAcpiStatus()

ACPI_STATUS AcpiHwClearAcpiStatus ( void  )

Definition at line 452 of file hwregs.c.

454 {
456  ACPI_CPU_FLAGS LockFlags = 0;
457 
458 
459  ACPI_FUNCTION_TRACE (HwClearAcpiStatus);
460 
461 
462  ACPI_DEBUG_PRINT ((ACPI_DB_IO, "About to write %04X to %8.8X%8.8X\n",
464  ACPI_FORMAT_UINT64 (AcpiGbl_XPm1aStatus.Address)));
465 
466  LockFlags = AcpiOsAcquireLock (AcpiGbl_HardwareLock);
467 
468  /* Clear the fixed events in PM1 A/B */
469 
472 
473  AcpiOsReleaseLock (AcpiGbl_HardwareLock, LockFlags);
474 
475  if (ACPI_FAILURE (Status))
476  {
477  goto Exit;
478  }
479 
480  /* Clear the GPE Bits in all GPE registers in all GPE blocks */
481 
483 
484 Exit:
486 }
ACPI_CPU_FLAGS AcpiOsAcquireLock(ACPI_SPINLOCK Handle)
Definition: osl.c:498
ACPI_STATUS AcpiHwClearGpeBlock(ACPI_GPE_XRUPT_INFO *GpeXruptInfo, ACPI_GPE_BLOCK_INFO *GpeBlock, void *Context)
Definition: hwgpe.c:404
#define ACPI_DB_IO
Definition: acoutput.h:177
#define ACPI_CPU_FLAGS
Definition: actypes.h:252
UINT32 ACPI_STATUS
Definition: actypes.h:460
#define ACPI_FAILURE(a)
Definition: acexcep.h:95
#define ACPI_BITMASK_ALL_FIXED_STATUS
Definition: aclocal.h:1204
smooth NULL
Definition: ftsmooth.c:416
#define ACPI_REGISTER_PM1_STATUS
Definition: aclocal.h:1184
static void Exit(void)
Definition: sock.c:1331
#define ACPI_DEBUG_PRINT(pl)
Definition: acoutput.h:475
Status
Definition: gdiplustypes.h:24
#define return_ACPI_STATUS(s)
Definition: acoutput.h:496
#define ACPI_FUNCTION_TRACE(a)
Definition: acoutput.h:480
#define ACPI_FORMAT_UINT64(i)
Definition: acmacros.h:71
ACPI_STATUS AcpiHwRegisterWrite(UINT32 RegisterId, UINT32 Value)
Definition: hwregs.c:684
ACPI_STATUS AcpiEvWalkGpeList(ACPI_GPE_CALLBACK GpeWalkCallback, void *Context)
Definition: evgpeutil.c:67
void AcpiOsReleaseLock(ACPI_SPINLOCK Handle, ACPI_CPU_FLAGS Flags)
Definition: osl.c:516

Referenced by AcpiEnterSleepStateS4bios(), and AcpiHwLegacySleep().

◆ AcpiHwClearGpe()

ACPI_STATUS AcpiHwClearGpe ( ACPI_GPE_EVENT_INFO GpeEventInfo)

Definition at line 190 of file hwgpe.c.

192 {
193  ACPI_GPE_REGISTER_INFO *GpeRegisterInfo;
195  UINT32 RegisterBit;
196 
197 
199 
200  /* Get the info block for the entire GPE register */
201 
202  GpeRegisterInfo = GpeEventInfo->RegisterInfo;
203  if (!GpeRegisterInfo)
204  {
205  return (AE_NOT_EXIST);
206  }
207 
208  /*
209  * Write a one to the appropriate bit in the status register to
210  * clear this GPE.
211  */
212  RegisterBit = AcpiHwGetGpeRegisterBit (GpeEventInfo);
213 
214  Status = AcpiHwWrite (RegisterBit, &GpeRegisterInfo->StatusAddress);
215  return (Status);
216 }
ACPI_GPE_EVENT_INFO * GpeEventInfo
Definition: acevents.h:195
UINT32 ACPI_STATUS
Definition: actypes.h:460
unsigned int UINT32
#define ACPI_FUNCTION_ENTRY()
Definition: acoutput.h:484
UINT32 AcpiHwGetGpeRegisterBit(ACPI_GPE_EVENT_INFO *GpeEventInfo)
Definition: hwgpe.c:81
struct acpi_gpe_register_info * RegisterInfo
Definition: aclocal.h:555
ACPI_GENERIC_ADDRESS StatusAddress
Definition: aclocal.h:567
#define AE_NOT_EXIST
Definition: acexcep.h:114
Status
Definition: gdiplustypes.h:24
ACPI_STATUS AcpiHwWrite(UINT64 Value, ACPI_GENERIC_ADDRESS *Reg)
Definition: hwregs.c:357

Referenced by AcpiClearGpe(), AcpiEvAddGpeReference(), AcpiEvFinishGpe(), and AcpiEvGpeDispatch().

◆ AcpiHwClearGpeBlock()

ACPI_STATUS AcpiHwClearGpeBlock ( ACPI_GPE_XRUPT_INFO GpeXruptInfo,
ACPI_GPE_BLOCK_INFO GpeBlock,
void Context 
)

Definition at line 404 of file hwgpe.c.

408 {
409  UINT32 i;
411 
412 
413  /* Examine each GPE Register within the block */
414 
415  for (i = 0; i < GpeBlock->RegisterCount; i++)
416  {
417  /* Clear status on all GPEs in this register */
418 
419  Status = AcpiHwWrite (0xFF, &GpeBlock->RegisterInfo[i].StatusAddress);
420  if (ACPI_FAILURE (Status))
421  {
422  return (Status);
423  }
424  }
425 
426  return (AE_OK);
427 }
UINT32 ACPI_STATUS
Definition: actypes.h:460
#define ACPI_FAILURE(a)
Definition: acexcep.h:95
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
unsigned int UINT32
ACPI_GENERIC_ADDRESS StatusAddress
Definition: aclocal.h:567
ACPI_GPE_REGISTER_INFO * RegisterInfo
Definition: aclocal.h:587
UINT32 RegisterCount
Definition: aclocal.h:590
Status
Definition: gdiplustypes.h:24
ACPI_STATUS AcpiHwWrite(UINT64 Value, ACPI_GENERIC_ADDRESS *Reg)
Definition: hwregs.c:357
#define AE_OK
Definition: acexcep.h:97

Referenced by AcpiHwClearAcpiStatus().

◆ AcpiHwDerivePciId()

ACPI_STATUS AcpiHwDerivePciId ( ACPI_PCI_ID PciId,
ACPI_HANDLE  RootPciDevice,
ACPI_HANDLE  PciRegion 
)

Definition at line 137 of file hwpci.c.

141 {
143  ACPI_PCI_DEVICE *ListHead;
144 
145 
146  ACPI_FUNCTION_TRACE (HwDerivePciId);
147 
148 
149  if (!PciId)
150  {
152  }
153 
154  /* Build a list of PCI devices, from PciRegion up to RootPciDevice */
155 
156  Status = AcpiHwBuildPciList (RootPciDevice, PciRegion, &ListHead);
157  if (ACPI_SUCCESS (Status))
158  {
159  /* Walk the list, updating the PCI device/function/bus numbers */
160 
161  Status = AcpiHwProcessPciList (PciId, ListHead);
162 
163  /* Delete the list */
164 
165  AcpiHwDeletePciList (ListHead);
166  }
167 
169 }
#define ACPI_SUCCESS(a)
Definition: acexcep.h:94
#define AE_BAD_PARAMETER
Definition: acexcep.h:151
static void AcpiHwDeletePciList(ACPI_PCI_DEVICE *ListHead)
Definition: hwpci.c:329
UINT32 ACPI_STATUS
Definition: actypes.h:460
static ACPI_STATUS AcpiHwProcessPciList(ACPI_PCI_ID *PciId, ACPI_PCI_DEVICE *ListHead)
Definition: hwpci.c:266
static ACPI_STATUS AcpiHwBuildPciList(ACPI_HANDLE RootPciDevice, ACPI_HANDLE PciRegion, ACPI_PCI_DEVICE **ReturnListHead)
Definition: hwpci.c:192
Status
Definition: gdiplustypes.h:24
#define return_ACPI_STATUS(s)
Definition: acoutput.h:496
#define ACPI_FUNCTION_TRACE(a)
Definition: acoutput.h:480

Referenced by AcpiEvPciConfigRegionSetup().

◆ AcpiHwDisableAllGpes()

ACPI_STATUS AcpiHwDisableAllGpes ( void  )

Definition at line 543 of file hwgpe.c.

545 {
547 
548 
549  ACPI_FUNCTION_TRACE (HwDisableAllGpes);
550 
551 
554 }
UINT32 ACPI_STATUS
Definition: actypes.h:460
smooth NULL
Definition: ftsmooth.c:416
Status
Definition: gdiplustypes.h:24
ACPI_STATUS AcpiHwDisableGpeBlock(ACPI_GPE_XRUPT_INFO *GpeXruptInfo, ACPI_GPE_BLOCK_INFO *GpeBlock, void *Context)
Definition: hwgpe.c:364
#define return_ACPI_STATUS(s)
Definition: acoutput.h:496
#define ACPI_FUNCTION_TRACE(a)
Definition: acoutput.h:480
ACPI_STATUS AcpiEvWalkGpeList(ACPI_GPE_CALLBACK GpeWalkCallback, void *Context)
Definition: evgpeutil.c:67

Referenced by AcpiDisableAllGpes(), AcpiEnterSleepStateS4bios(), AcpiHwLegacySleep(), and AcpiHwLegacyWake().

◆ AcpiHwDisableGpeBlock()

ACPI_STATUS AcpiHwDisableGpeBlock ( ACPI_GPE_XRUPT_INFO GpeXruptInfo,
ACPI_GPE_BLOCK_INFO GpeBlock,
void Context 
)

Definition at line 364 of file hwgpe.c.

368 {
369  UINT32 i;
371 
372 
373  /* Examine each GPE Register within the block */
374 
375  for (i = 0; i < GpeBlock->RegisterCount; i++)
376  {
377  /* Disable all GPEs in this register */
378 
379  Status = AcpiHwGpeEnableWrite (0x00, &GpeBlock->RegisterInfo[i]);
380  if (ACPI_FAILURE (Status))
381  {
382  return (Status);
383  }
384  }
385 
386  return (AE_OK);
387 }
static ACPI_STATUS AcpiHwGpeEnableWrite(UINT8 EnableMask, ACPI_GPE_REGISTER_INFO *GpeRegisterInfo)
Definition: hwgpe.c:336
UINT32 ACPI_STATUS
Definition: actypes.h:460
#define ACPI_FAILURE(a)
Definition: acexcep.h:95
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
unsigned int UINT32
ACPI_GPE_REGISTER_INFO * RegisterInfo
Definition: aclocal.h:587
UINT32 RegisterCount
Definition: aclocal.h:590
Status
Definition: gdiplustypes.h:24
#define AE_OK
Definition: acexcep.h:97

Referenced by AcpiEvDeleteGpeBlock(), AcpiEvTerminate(), and AcpiHwDisableAllGpes().

◆ AcpiHwEnableAllRuntimeGpes()

ACPI_STATUS AcpiHwEnableAllRuntimeGpes ( void  )

Definition at line 570 of file hwgpe.c.

572 {
574 
575 
576  ACPI_FUNCTION_TRACE (HwEnableAllRuntimeGpes);
577 
578 
581 }
ACPI_STATUS AcpiHwEnableRuntimeGpeBlock(ACPI_GPE_XRUPT_INFO *GpeXruptInfo, ACPI_GPE_BLOCK_INFO *GpeBlock, void *Context)
Definition: hwgpe.c:445
UINT32 ACPI_STATUS
Definition: actypes.h:460
smooth NULL
Definition: ftsmooth.c:416
Status
Definition: gdiplustypes.h:24
#define return_ACPI_STATUS(s)
Definition: acoutput.h:496
#define ACPI_FUNCTION_TRACE(a)
Definition: acoutput.h:480
ACPI_STATUS AcpiEvWalkGpeList(ACPI_GPE_CALLBACK GpeWalkCallback, void *Context)
Definition: evgpeutil.c:67

Referenced by AcpiEnableAllRuntimeGpes(), and AcpiHwLegacyWake().

◆ AcpiHwEnableAllWakeupGpes()

ACPI_STATUS AcpiHwEnableAllWakeupGpes ( void  )

Definition at line 597 of file hwgpe.c.

599 {
601 
602 
603  ACPI_FUNCTION_TRACE (HwEnableAllWakeupGpes);
604 
605 
608 }
UINT32 ACPI_STATUS
Definition: actypes.h:460
smooth NULL
Definition: ftsmooth.c:416
static ACPI_STATUS AcpiHwEnableWakeupGpeBlock(ACPI_GPE_XRUPT_INFO *GpeXruptInfo, ACPI_GPE_BLOCK_INFO *GpeBlock, void *Context)
Definition: hwgpe.c:498
Status
Definition: gdiplustypes.h:24
#define return_ACPI_STATUS(s)
Definition: acoutput.h:496
#define ACPI_FUNCTION_TRACE(a)
Definition: acoutput.h:480
ACPI_STATUS AcpiEvWalkGpeList(ACPI_GPE_CALLBACK GpeWalkCallback, void *Context)
Definition: evgpeutil.c:67

Referenced by AcpiEnableAllWakeupGpes(), AcpiEnterSleepStateS4bios(), and AcpiHwLegacySleep().

◆ AcpiHwEnableRuntimeGpeBlock()

ACPI_STATUS AcpiHwEnableRuntimeGpeBlock ( ACPI_GPE_XRUPT_INFO GpeXruptInfo,
ACPI_GPE_BLOCK_INFO GpeBlock,
void Context 
)

Definition at line 445 of file hwgpe.c.

449 {
450  UINT32 i;
452  ACPI_GPE_REGISTER_INFO *GpeRegisterInfo;
453  UINT8 EnableMask;
454 
455 
456  /* NOTE: assumes that all GPEs are currently disabled */
457 
458  /* Examine each GPE Register within the block */
459 
460  for (i = 0; i < GpeBlock->RegisterCount; i++)
461  {
462  GpeRegisterInfo = &GpeBlock->RegisterInfo[i];
463  if (!GpeRegisterInfo->EnableForRun)
464  {
465  continue;
466  }
467 
468  /* Enable all "runtime" GPEs in this register */
469 
470  EnableMask = GpeRegisterInfo->EnableForRun &
471  ~GpeRegisterInfo->MaskForRun;
472  Status = AcpiHwGpeEnableWrite (EnableMask, GpeRegisterInfo);
473  if (ACPI_FAILURE (Status))
474  {
475  return (Status);
476  }
477  }
478 
479  return (AE_OK);
480 }
static ACPI_STATUS AcpiHwGpeEnableWrite(UINT8 EnableMask, ACPI_GPE_REGISTER_INFO *GpeRegisterInfo)
Definition: hwgpe.c:336
UINT32 ACPI_STATUS
Definition: actypes.h:460
#define ACPI_FAILURE(a)
Definition: acexcep.h:95
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
unsigned int UINT32
ACPI_GPE_REGISTER_INFO * RegisterInfo
Definition: aclocal.h:587
UINT32 RegisterCount
Definition: aclocal.h:590
Status
Definition: gdiplustypes.h:24
unsigned char UINT8
#define AE_OK
Definition: acexcep.h:97

Referenced by AcpiHwEnableAllRuntimeGpes().

◆ AcpiHwExecuteSleepMethod()

void AcpiHwExecuteSleepMethod ( char MethodName,
UINT32  IntegerArgument 
)

Definition at line 67 of file hwesleep.c.

70 {
71  ACPI_OBJECT_LIST ArgList;
72  ACPI_OBJECT Arg;
74 
75 
76  ACPI_FUNCTION_TRACE (HwExecuteSleepMethod);
77 
78 
79  /* One argument, IntegerArgument; No return value expected */
80 
81  ArgList.Count = 1;
82  ArgList.Pointer = &Arg;
83  Arg.Type = ACPI_TYPE_INTEGER;
84  Arg.Integer.Value = (UINT64) IntegerArgument;
85 
86  Status = AcpiEvaluateObject (NULL, MethodPathname, &ArgList, NULL);
88  {
89  ACPI_EXCEPTION ((AE_INFO, Status, "While executing method %s",
90  MethodPathname));
91  }
92 
94 }
#define ACPI_EXCEPTION(plist)
Definition: acoutput.h:239
#define ACPI_TYPE_INTEGER
Definition: actypes.h:679
UINT32 ACPI_STATUS
Definition: actypes.h:460
#define ACPI_FAILURE(a)
Definition: acexcep.h:95
#define AE_INFO
Definition: acoutput.h:230
smooth NULL
Definition: ftsmooth.c:416
#define AE_NOT_FOUND
Definition: acexcep.h:113
#define return_VOID
Definition: acoutput.h:495
Status
Definition: gdiplustypes.h:24
ACPI_STATUS AcpiEvaluateObject(ACPI_HANDLE Handle, ACPI_STRING Pathname, ACPI_OBJECT_LIST *ExternalParams, ACPI_BUFFER *ReturnBuffer)
Definition: nsxfeval.c:217
#define ACPI_FUNCTION_TRACE(a)
Definition: acoutput.h:480
ACPI_OBJECT * Pointer
Definition: actypes.h:1018
unsigned long long UINT64
ACPI_OBJECT_TYPE Type
Definition: actypes.h:959
struct acpi_object::@589 Integer

Referenced by AcpiEnterSleepStatePrep(), AcpiHwExtendedWake(), and AcpiHwLegacyWake().

◆ AcpiHwExtendedSleep()

ACPI_STATUS AcpiHwExtendedSleep ( UINT8  SleepState)

Definition at line 112 of file hwesleep.c.

114 {
116  UINT8 SleepControl;
117  UINT64 SleepStatus;
118 
119 
120  ACPI_FUNCTION_TRACE (HwExtendedSleep);
121 
122 
123  /* Extended sleep registers must be valid */
124 
125  if (!AcpiGbl_FADT.SleepControl.Address ||
126  !AcpiGbl_FADT.SleepStatus.Address)
127  {
129  }
130 
131  /* Clear wake status (WAK_STS) */
132 
134  &AcpiGbl_FADT.SleepStatus);
135  if (ACPI_FAILURE (Status))
136  {
138  }
139 
140  AcpiGbl_SystemAwakeAndRunning = FALSE;
141 
142  /*
143  * Set the SLP_TYP and SLP_EN bits.
144  *
145  * Note: We only use the first value returned by the \_Sx method
146  * (AcpiGbl_SleepTypeA) - As per ACPI specification.
147  */
149  "Entering sleep state [S%u]\n", SleepState));
150 
151  SleepControl = ((AcpiGbl_SleepTypeA << ACPI_X_SLEEP_TYPE_POSITION) &
153 
154  /* Flush caches, as per ACPI specification */
155 
157 
158  Status = AcpiOsEnterSleep (SleepState, SleepControl, 0);
159  if (Status == AE_CTRL_TERMINATE)
160  {
162  }
163  if (ACPI_FAILURE (Status))
164  {
166  }
167 
168  Status = AcpiWrite ((UINT64) SleepControl, &AcpiGbl_FADT.SleepControl);
169  if (ACPI_FAILURE (Status))
170  {
172  }
173 
174  /* Wait for transition back to Working State */
175 
176  do
177  {
178  Status = AcpiRead (&SleepStatus, &AcpiGbl_FADT.SleepStatus);
179  if (ACPI_FAILURE (Status))
180  {
182  }
183 
184  } while (!(((UINT8) SleepStatus) & ACPI_X_WAKE_STATUS));
185 
187 }
#define ACPI_X_WAKE_STATUS
Definition: actbl.h:377
ACPI_STATUS AcpiOsEnterSleep(UINT8 SleepState, UINT32 RegaValue, UINT32 RegbValue)
Definition: osl.c:932
UINT32 ACPI_STATUS
Definition: actypes.h:460
#define ACPI_FAILURE(a)
Definition: acexcep.h:95
#define AE_CTRL_TERMINATE
Definition: acexcep.h:226
#define ACPI_X_SLEEP_ENABLE
Definition: actbl.h:380
#define ACPI_X_SLEEP_TYPE_POSITION
Definition: actbl.h:379
#define ACPI_FLUSH_CPU_CACHE()
Definition: accygwin.h:53
#define ACPI_X_SLEEP_TYPE_MASK
Definition: actbl.h:378
ACPI_STATUS AcpiWrite(UINT64 Value, ACPI_GENERIC_ADDRESS *Reg)
Definition: hwxface.c:169
#define ACPI_DEBUG_PRINT(pl)
Definition: acoutput.h:475
#define AE_NOT_EXIST
Definition: acexcep.h:114
Status
Definition: gdiplustypes.h:24
#define ACPI_DB_INIT
Definition: acoutput.h:151
ACPI_STATUS AcpiRead(UINT64 *ReturnValue, ACPI_GENERIC_ADDRESS *Reg)
Definition: hwxface.c:138
#define return_ACPI_STATUS(s)
Definition: acoutput.h:496
#define ACPI_FUNCTION_TRACE(a)
Definition: acoutput.h:480
unsigned long long UINT64
unsigned char UINT8
#define AE_OK
Definition: acexcep.h:97

◆ AcpiHwExtendedWake()

ACPI_STATUS AcpiHwExtendedWake ( UINT8  SleepState)

Definition at line 243 of file hwesleep.c.

245 {
246  ACPI_FUNCTION_TRACE (HwExtendedWake);
247 
248 
249  /* Ensure EnterSleepStatePrep -> EnterSleepState ordering */
250 
251  AcpiGbl_SleepTypeA = ACPI_SLEEP_TYPE_INVALID;
252 
253  /* Execute the wake methods */
254 
257 
258  /*
259  * Some BIOS code assumes that WAK_STS will be cleared on resume
260  * and use it to determine whether the system is rebooting or
261  * resuming. Clear WAK_STS for compatibility.
262  */
263  (void) AcpiWrite ((UINT64) ACPI_X_WAKE_STATUS, &AcpiGbl_FADT.SleepStatus);
264  AcpiGbl_SystemAwakeAndRunning = TRUE;
265 
268 }
#define ACPI_X_WAKE_STATUS
Definition: actbl.h:377
#define TRUE
Definition: types.h:120
struct png_info_def **typedef void(__cdecl typeof(png_destroy_read_struct))(struct png_struct_def **
Definition: typeof.h:49
void AcpiHwExecuteSleepMethod(char *MethodPathname, UINT32 IntegerArgument)
Definition: hwesleep.c:67
#define METHOD_PATHNAME__WAK
Definition: acnames.h:81
#define ACPI_SST_WORKING
Definition: achware.h:51
ACPI_STATUS AcpiWrite(UINT64 Value, ACPI_GENERIC_ADDRESS *Reg)
Definition: hwxface.c:169
#define ACPI_SST_WAKING
Definition: achware.h:52
#define METHOD_PATHNAME__SST
Definition: acnames.h:80
#define ACPI_SLEEP_TYPE_INVALID
Definition: actypes.h:642
#define return_ACPI_STATUS(s)
Definition: acoutput.h:496
#define ACPI_FUNCTION_TRACE(a)
Definition: acoutput.h:480
unsigned long long UINT64
#define AE_OK
Definition: acexcep.h:97

◆ AcpiHwExtendedWakePrep()

ACPI_STATUS AcpiHwExtendedWakePrep ( UINT8  SleepState)

Definition at line 204 of file hwesleep.c.

206 {
208  UINT8 SleepTypeValue;
209 
210 
211  ACPI_FUNCTION_TRACE (HwExtendedWakePrep);
212 
213 
215  &AcpiGbl_SleepTypeA, &AcpiGbl_SleepTypeB);
216  if (ACPI_SUCCESS (Status))
217  {
218  SleepTypeValue = ((AcpiGbl_SleepTypeA << ACPI_X_SLEEP_TYPE_POSITION) &
220 
221  (void) AcpiWrite ((UINT64) (SleepTypeValue | ACPI_X_SLEEP_ENABLE),
222  &AcpiGbl_FADT.SleepControl);
223  }
224 
226 }
#define ACPI_SUCCESS(a)
Definition: acexcep.h:94
struct png_info_def **typedef void(__cdecl typeof(png_destroy_read_struct))(struct png_struct_def **
Definition: typeof.h:49
UINT32 ACPI_STATUS
Definition: actypes.h:460
ACPI_STATUS AcpiGetSleepTypeData(UINT8 SleepState, UINT8 *SleepTypeA, UINT8 *SleepTypeB)
Definition: hwxface.c:411
#define ACPI_X_SLEEP_ENABLE
Definition: actbl.h:380
#define ACPI_X_SLEEP_TYPE_POSITION
Definition: actbl.h:379
#define ACPI_X_SLEEP_TYPE_MASK
Definition: actbl.h:378
ACPI_STATUS AcpiWrite(UINT64 Value, ACPI_GENERIC_ADDRESS *Reg)
Definition: hwxface.c:169
#define ACPI_STATE_S0
Definition: actypes.h:615
Status
Definition: gdiplustypes.h:24
#define return_ACPI_STATUS(s)
Definition: acoutput.h:496
#define ACPI_FUNCTION_TRACE(a)
Definition: acoutput.h:480
unsigned long long UINT64
unsigned char UINT8
#define AE_OK
Definition: acexcep.h:97

◆ AcpiHwGetBitRegisterInfo()

ACPI_BIT_REGISTER_INFO* AcpiHwGetBitRegisterInfo ( UINT32  RegisterId)

Definition at line 502 of file hwregs.c.

504 {
506 
507 
508  if (RegisterId > ACPI_BITREG_MAX)
509  {
510  ACPI_ERROR ((AE_INFO, "Invalid BitRegister ID: 0x%X", RegisterId));
511  return (NULL);
512  }
513 
514  return (&AcpiGbl_BitRegisterInfo[RegisterId]);
515 }
smooth NULL
Definition: ftsmooth.c:416
#define AE_INFO
Definition: acoutput.h:230
ACPI_BIT_REGISTER_INFO AcpiGbl_BitRegisterInfo[ACPI_NUM_BITREG]
Definition: utglobal.c:145
#define ACPI_FUNCTION_ENTRY()
Definition: acoutput.h:484
#define ACPI_BITREG_MAX
Definition: actypes.h:922
#define ACPI_ERROR(plist)
Definition: acoutput.h:240

Referenced by AcpiHwLegacySleep(), AcpiHwLegacyWakePrep(), AcpiReadBitRegister(), and AcpiWriteBitRegister().

◆ AcpiHwGetGpeRegisterBit()

UINT32 AcpiHwGetGpeRegisterBit ( ACPI_GPE_EVENT_INFO GpeEventInfo)

Definition at line 81 of file hwgpe.c.

83 {
84 
85  return ((UINT32) 1 <<
86  (GpeEventInfo->GpeNumber - GpeEventInfo->RegisterInfo->BaseGpeNumber));
87 }
ACPI_GPE_EVENT_INFO * GpeEventInfo
Definition: acevents.h:195
unsigned int UINT32
struct acpi_gpe_register_info * RegisterInfo
Definition: aclocal.h:555

Referenced by AcpiEvDetectGpe(), AcpiEvMaskGpe(), AcpiEvUpdateGpeEnableMask(), AcpiHwClearGpe(), AcpiHwGetGpeStatus(), AcpiHwLowSetGpe(), and AcpiSetGpeWakeMask().

◆ AcpiHwGetGpeStatus()

ACPI_STATUS AcpiHwGetGpeStatus ( ACPI_GPE_EVENT_INFO GpeEventInfo,
ACPI_EVENT_STATUS EventStatus 
)

Definition at line 233 of file hwgpe.c.

236 {
237  UINT64 InByte;
238  UINT32 RegisterBit;
239  ACPI_GPE_REGISTER_INFO *GpeRegisterInfo;
240  ACPI_EVENT_STATUS LocalEventStatus = 0;
242 
243 
245 
246 
247  if (!EventStatus)
248  {
249  return (AE_BAD_PARAMETER);
250  }
251 
252  /* GPE currently handled? */
253 
256  {
257  LocalEventStatus |= ACPI_EVENT_FLAG_HAS_HANDLER;
258  }
259 
260  /* Get the info block for the entire GPE register */
261 
262  GpeRegisterInfo = GpeEventInfo->RegisterInfo;
263 
264  /* Get the register bitmask for this GPE */
265 
266  RegisterBit = AcpiHwGetGpeRegisterBit (GpeEventInfo);
267 
268  /* GPE currently enabled? (enabled for runtime?) */
269 
270  if (RegisterBit & GpeRegisterInfo->EnableForRun)
271  {
272  LocalEventStatus |= ACPI_EVENT_FLAG_ENABLED;
273  }
274 
275  /* GPE currently masked? (masked for runtime?) */
276 
277  if (RegisterBit & GpeRegisterInfo->MaskForRun)
278  {
279  LocalEventStatus |= ACPI_EVENT_FLAG_MASKED;
280  }
281 
282  /* GPE enabled for wake? */
283 
284  if (RegisterBit & GpeRegisterInfo->EnableForWake)
285  {
286  LocalEventStatus |= ACPI_EVENT_FLAG_WAKE_ENABLED;
287  }
288 
289  /* GPE currently enabled (enable bit == 1)? */
290 
291  Status = AcpiHwRead (&InByte, &GpeRegisterInfo->EnableAddress);
292  if (ACPI_FAILURE (Status))
293  {
294  return (Status);
295  }
296 
297  if (RegisterBit & InByte)
298  {
299  LocalEventStatus |= ACPI_EVENT_FLAG_ENABLE_SET;
300  }
301 
302  /* GPE currently active (status bit == 1)? */
303 
304  Status = AcpiHwRead (&InByte, &GpeRegisterInfo->StatusAddress);
305  if (ACPI_FAILURE (Status))
306  {
307  return (Status);
308  }
309 
310  if (RegisterBit & InByte)
311  {
312  LocalEventStatus |= ACPI_EVENT_FLAG_STATUS_SET;
313  }
314 
315  /* Set return value */
316 
317  (*EventStatus) = LocalEventStatus;
318  return (AE_OK);
319 }
#define ACPI_EVENT_FLAG_MASKED
Definition: actypes.h:788
#define AE_BAD_PARAMETER
Definition: acexcep.h:151
#define ACPI_GPE_DISPATCH_NONE
Definition: actypes.h:809
#define ACPI_GPE_DISPATCH_TYPE(flags)
Definition: actypes.h:815
ACPI_GPE_EVENT_INFO * GpeEventInfo
Definition: acevents.h:195
UINT32 ACPI_STATUS
Definition: actypes.h:460
#define ACPI_FAILURE(a)
Definition: acexcep.h:95
#define ACPI_EVENT_FLAG_STATUS_SET
Definition: actypes.h:785
ACPI_GENERIC_ADDRESS EnableAddress
Definition: aclocal.h:568
unsigned int UINT32
#define ACPI_EVENT_FLAG_ENABLED
Definition: actypes.h:783
#define ACPI_FUNCTION_ENTRY()
Definition: acoutput.h:484
UINT32 AcpiHwGetGpeRegisterBit(ACPI_GPE_EVENT_INFO *GpeEventInfo)
Definition: hwgpe.c:81
#define ACPI_EVENT_FLAG_HAS_HANDLER
Definition: actypes.h:787
struct acpi_gpe_register_info * RegisterInfo
Definition: aclocal.h:555
UINT32 ACPI_EVENT_STATUS
Definition: actypes.h:780
ACPI_GENERIC_ADDRESS StatusAddress
Definition: aclocal.h:567
ACPI_STATUS AcpiHwRead(UINT64 *Value, ACPI_GENERIC_ADDRESS *Reg)
Definition: hwregs.c:259
#define ACPI_EVENT_FLAG_WAKE_ENABLED
Definition: actypes.h:784
Status
Definition: gdiplustypes.h:24
unsigned long long UINT64
#define AE_OK
Definition: acexcep.h:97
#define ACPI_EVENT_FLAG_ENABLE_SET
Definition: actypes.h:786

Referenced by AcpiGetGpeStatus().

◆ AcpiHwGetMode()

UINT32 AcpiHwGetMode ( void  )

Definition at line 179 of file hwacpi.c.

181 {
183  UINT32 Value;
184 
185 
186  ACPI_FUNCTION_TRACE (HwGetMode);
187 
188 
189  /* If the Hardware Reduced flag is set, machine is always in acpi mode */
190 
191  if (AcpiGbl_ReducedHardware)
192  {
194  }
195 
196  /*
197  * ACPI 2.0 clarified that if SMI_CMD in FADT is zero,
198  * system does not support mode transition.
199  */
200  if (!AcpiGbl_FADT.SmiCommand)
201  {
203  }
204 
206  if (ACPI_FAILURE (Status))
207  {
209  }
210 
211  if (Value)
212  {
214  }
215  else
216  {
218  }
219 }
_In_opt_ ULONG _Out_ PULONG Value
Definition: rtlfuncs.h:2343
#define return_UINT32(s)
Definition: acoutput.h:501
UINT32 ACPI_STATUS
Definition: actypes.h:460
#define ACPI_FAILURE(a)
Definition: acexcep.h:95
unsigned int UINT32
ACPI_STATUS AcpiReadBitRegister(UINT32 RegisterId, UINT32 *ReturnValue)
Definition: hwxface.c:213
Status
Definition: gdiplustypes.h:24
#define ACPI_SYS_MODE_LEGACY
Definition: actypes.h:1074
#define ACPI_SYS_MODE_ACPI
Definition: actypes.h:1073
#define ACPI_FUNCTION_TRACE(a)
Definition: acoutput.h:480
#define ACPI_BITREG_SCI_ENABLE
Definition: actypes.h:912

Referenced by AcpiDisable(), AcpiEnable(), AcpiEnableSubsystem(), and AcpiHwSetMode().

◆ AcpiHwLegacySleep()

ACPI_STATUS AcpiHwLegacySleep ( UINT8  SleepState)

Definition at line 67 of file hwsleep.c.

69 {
70  ACPI_BIT_REGISTER_INFO *SleepTypeRegInfo;
71  ACPI_BIT_REGISTER_INFO *SleepEnableRegInfo;
72  UINT32 Pm1aControl;
73  UINT32 Pm1bControl;
74  UINT32 InValue;
76 
77 
78  ACPI_FUNCTION_TRACE (HwLegacySleep);
79 
80 
83 
84  /* Clear wake status */
85 
88  if (ACPI_FAILURE (Status))
89  {
91  }
92 
93  /* Disable all GPEs */
94 
96  if (ACPI_FAILURE (Status))
97  {
99  }
101  if (ACPI_FAILURE(Status))
102  {
104  }
105  AcpiGbl_SystemAwakeAndRunning = FALSE;
106 
107  /* Enable all wakeup GPEs */
108 
110  if (ACPI_FAILURE (Status))
111  {
113  }
114 
115  /* Get current value of PM1A control */
116 
118  &Pm1aControl);
119  if (ACPI_FAILURE (Status))
120  {
122  }
124  "Entering sleep state [S%u]\n", SleepState));
125 
126  /* Clear the SLP_EN and SLP_TYP fields */
127 
128  Pm1aControl &= ~(SleepTypeRegInfo->AccessBitMask |
129  SleepEnableRegInfo->AccessBitMask);
130  Pm1bControl = Pm1aControl;
131 
132  /* Insert the SLP_TYP bits */
133 
134  Pm1aControl |= (AcpiGbl_SleepTypeA << SleepTypeRegInfo->BitPosition);
135  Pm1bControl |= (AcpiGbl_SleepTypeB << SleepTypeRegInfo->BitPosition);
136 
137  /*
138  * We split the writes of SLP_TYP and SLP_EN to workaround
139  * poorly implemented hardware.
140  */
141 
142  /* Write #1: write the SLP_TYP data to the PM1 Control registers */
143 
144  Status = AcpiHwWritePm1Control (Pm1aControl, Pm1bControl);
145  if (ACPI_FAILURE (Status))
146  {
148  }
149 
150  /* Insert the sleep enable (SLP_EN) bit */
151 
152  Pm1aControl |= SleepEnableRegInfo->AccessBitMask;
153  Pm1bControl |= SleepEnableRegInfo->AccessBitMask;
154 
155  /* Flush caches, as per ACPI specification */
156 
158 
159  Status = AcpiOsEnterSleep (SleepState, Pm1aControl, Pm1bControl);
160  if (Status == AE_CTRL_TERMINATE)
161  {
163  }
164  if (ACPI_FAILURE (Status))
165  {
167  }
168 
169  /* Write #2: Write both SLP_TYP + SLP_EN */
170 
171  Status = AcpiHwWritePm1Control (Pm1aControl, Pm1bControl);
172  if (ACPI_FAILURE (Status))
173  {
175  }
176 
177  if (SleepState > ACPI_STATE_S3)
178  {
179  /*
180  * We wanted to sleep > S3, but it didn't happen (by virtue of the
181  * fact that we are still executing!)
182  *
183  * Wait ten seconds, then try again. This is to get S4/S5 to work on
184  * all machines.
185  *
186  * We wait so long to allow chipsets that poll this reg very slowly
187  * to still read the right value. Ideally, this block would go
188  * away entirely.
189  */
191 
193  SleepEnableRegInfo->AccessBitMask);
194  if (ACPI_FAILURE (Status))
195  {
197  }
198  }
199 
200  /* Wait for transition back to Working State */
201 
202  do
203  {
205  if (ACPI_FAILURE (Status))
206  {
208  }
209 
210  } while (!InValue);
211 
213 }
ACPI_STATUS AcpiHwDisableAllGpes(void)
Definition: hwgpe.c:543
ACPI_STATUS AcpiHwClearAcpiStatus(void)
Definition: hwregs.c:452
#define ACPI_BITREG_SLEEP_TYPE
Definition: actypes.h:915
ACPI_STATUS AcpiWriteBitRegister(UINT32 RegisterId, UINT32 Value)
Definition: hwxface.c:282
#define ACPI_CLEAR_STATUS
Definition: actypes.h:928
void AcpiOsStall(UINT32 Microseconds)
Definition: osl.c:264
ACPI_STATUS AcpiOsEnterSleep(UINT8 SleepState, UINT32 RegaValue, UINT32 RegbValue)
Definition: osl.c:932
#define ACPI_USEC_PER_SEC
Definition: actypes.h:471
#define ACPI_REGISTER_PM1_CONTROL
Definition: aclocal.h:1186
UINT32 ACPI_STATUS
Definition: actypes.h:460
ACPI_STATUS AcpiHwRegisterRead(UINT32 RegisterId, UINT32 *ReturnValue)
Definition: hwregs.c:574
ACPI_BIT_REGISTER_INFO * AcpiHwGetBitRegisterInfo(UINT32 RegisterId)
Definition: hwregs.c:502
#define ACPI_FAILURE(a)
Definition: acexcep.h:95
#define AE_CTRL_TERMINATE
Definition: acexcep.h:226
unsigned int UINT32
#define ACPI_FLUSH_CPU_CACHE()
Definition: accygwin.h:53
#define ACPI_DEBUG_PRINT(pl)
Definition: acoutput.h:475
#define ACPI_BITREG_SLEEP_ENABLE
Definition: actypes.h:916
ACPI_STATUS AcpiHwEnableAllWakeupGpes(void)
Definition: hwgpe.c:597
ACPI_STATUS AcpiReadBitRegister(UINT32 RegisterId, UINT32 *ReturnValue)
Definition: hwxface.c:213
Status
Definition: gdiplustypes.h:24
#define ACPI_DB_INIT
Definition: acoutput.h:151
#define ACPI_BITREG_WAKE_STATUS
Definition: actypes.h:898
#define return_ACPI_STATUS(s)
Definition: acoutput.h:496
#define ACPI_FUNCTION_TRACE(a)
Definition: acoutput.h:480
ACPI_STATUS AcpiHwRegisterWrite(UINT32 RegisterId, UINT32 Value)
Definition: hwregs.c:684
ACPI_STATUS AcpiHwWritePm1Control(UINT32 Pm1aControl, UINT32 Pm1bControl)
Definition: hwregs.c:536
#define ACPI_STATE_S3
Definition: actypes.h:618
#define AE_OK
Definition: acexcep.h:97

◆ AcpiHwLegacyWake()

ACPI_STATUS AcpiHwLegacyWake ( UINT8  SleepState)

Definition at line 300 of file hwsleep.c.

302 {
304 
305 
306  ACPI_FUNCTION_TRACE (HwLegacyWake);
307 
308 
309  /* Ensure EnterSleepStatePrep -> EnterSleepState ordering */
310 
311  AcpiGbl_SleepTypeA = ACPI_SLEEP_TYPE_INVALID;
313 
314  /*
315  * GPEs must be enabled before _WAK is called as GPEs
316  * might get fired there
317  *
318  * Restore the GPEs:
319  * 1) Disable all GPEs
320  * 2) Enable all runtime GPEs
321  */
323  if (ACPI_FAILURE (Status))
324  {
326  }
327 
329  if (ACPI_FAILURE (Status))
330  {
332  }
333 
334  /*
335  * Now we can execute _WAK, etc. Some machines require that the GPEs
336  * are enabled before the wake methods are executed.
337  */
339 
340  /*
341  * Some BIOS code assumes that WAK_STS will be cleared on resume
342  * and use it to determine whether the system is rebooting or
343  * resuming. Clear WAK_STS for compatibility.
344  */
347  AcpiGbl_SystemAwakeAndRunning = TRUE;
348 
349  /* Enable power button */
350 
354 
358 
361 }
ACPI_STATUS AcpiHwDisableAllGpes(void)
Definition: hwgpe.c:543
#define TRUE
Definition: types.h:120
struct png_info_def **typedef void(__cdecl typeof(png_destroy_read_struct))(struct png_struct_def **
Definition: typeof.h:49
ACPI_STATUS AcpiWriteBitRegister(UINT32 RegisterId, UINT32 Value)
Definition: hwxface.c:282
#define ACPI_CLEAR_STATUS
Definition: actypes.h:928
void AcpiHwExecuteSleepMethod(char *MethodPathname, UINT32 IntegerArgument)
Definition: hwesleep.c:67
UINT32 ACPI_STATUS
Definition: actypes.h:460
#define ACPI_ENABLE_EVENT
Definition: actypes.h:932
#define ACPI_FAILURE(a)
Definition: acexcep.h:95
#define METHOD_PATHNAME__WAK
Definition: acnames.h:81
#define ACPI_SST_WORKING
Definition: achware.h:51
ACPI_STATUS AcpiHwEnableAllRuntimeGpes(void)
Definition: hwgpe.c:570
ACPI_FIXED_EVENT_INFO AcpiGbl_FixedEventInfo[ACPI_NUM_FIXED_EVENTS]
Definition: utglobal.c:175
#define ACPI_SST_WAKING
Definition: achware.h:52
#define METHOD_PATHNAME__SST
Definition: acnames.h:80
Status
Definition: gdiplustypes.h:24
#define ACPI_BITREG_WAKE_STATUS
Definition: actypes.h:898
#define ACPI_SLEEP_TYPE_INVALID
Definition: actypes.h:642
#define ACPI_EVENT_POWER_BUTTON
Definition: actypes.h:756
#define return_ACPI_STATUS(s)
Definition: acoutput.h:496
#define ACPI_FUNCTION_TRACE(a)
Definition: acoutput.h:480

◆ AcpiHwLegacyWakePrep()

ACPI_STATUS AcpiHwLegacyWakePrep ( UINT8  SleepState)

Definition at line 231 of file hwsleep.c.

233 {
235  ACPI_BIT_REGISTER_INFO *SleepTypeRegInfo;
236  ACPI_BIT_REGISTER_INFO *SleepEnableRegInfo;
237  UINT32 Pm1aControl;
238  UINT32 Pm1bControl;
239 
240 
241  ACPI_FUNCTION_TRACE (HwLegacyWakePrep);
242 
243  /*
244  * Set SLP_TYPE and SLP_EN to state S0.
245  * This is unclear from the ACPI Spec, but it is required
246  * by some machines.
247  */
249  &AcpiGbl_SleepTypeA, &AcpiGbl_SleepTypeB);
250  if (ACPI_SUCCESS (Status))
251  {
252  SleepTypeRegInfo =
254  SleepEnableRegInfo =
256 
257  /* Get current value of PM1A control */
258 
260  &Pm1aControl);
261  if (ACPI_SUCCESS (Status))
262  {
263  /* Clear the SLP_EN and SLP_TYP fields */
264 
265  Pm1aControl &= ~(SleepTypeRegInfo->AccessBitMask |
266  SleepEnableRegInfo->AccessBitMask);
267  Pm1bControl = Pm1aControl;
268 
269  /* Insert the SLP_TYP bits */
270 
271  Pm1aControl |= (AcpiGbl_SleepTypeA <<
272  SleepTypeRegInfo->BitPosition);
273  Pm1bControl |= (AcpiGbl_SleepTypeB <<
274  SleepTypeRegInfo->BitPosition);
275 
276  /* Write the control registers and ignore any errors */
277 
278  (void) AcpiHwWritePm1Control (Pm1aControl, Pm1bControl);
279  }
280  }
281 
283 }
#define ACPI_BITREG_SLEEP_TYPE
Definition: actypes.h:915
#define ACPI_SUCCESS(a)
Definition: acexcep.h:94
struct png_info_def **typedef void(__cdecl typeof(png_destroy_read_struct))(struct png_struct_def **
Definition: typeof.h:49
#define ACPI_REGISTER_PM1_CONTROL
Definition: aclocal.h:1186
UINT32 ACPI_STATUS
Definition: actypes.h:460
ACPI_STATUS AcpiHwRegisterRead(UINT32 RegisterId, UINT32 *ReturnValue)
Definition: hwregs.c:574
ACPI_STATUS AcpiGetSleepTypeData(UINT8 SleepState, UINT8 *SleepTypeA, UINT8 *SleepTypeB)
Definition: hwxface.c:411
ACPI_BIT_REGISTER_INFO * AcpiHwGetBitRegisterInfo(UINT32 RegisterId)
Definition: hwregs.c:502
unsigned int UINT32
#define ACPI_BITREG_SLEEP_ENABLE
Definition: actypes.h:916
#define ACPI_STATE_S0
Definition: actypes.h:615
Status
Definition: gdiplustypes.h:24
#define return_ACPI_STATUS(s)
Definition: acoutput.h:496
#define ACPI_FUNCTION_TRACE(a)
Definition: acoutput.h:480
ACPI_STATUS AcpiHwWritePm1Control(UINT32 Pm1aControl, UINT32 Pm1bControl)
Definition: hwregs.c:536

◆ AcpiHwLowSetGpe()

ACPI_STATUS AcpiHwLowSetGpe ( ACPI_GPE_EVENT_INFO GpeEventInfo,
UINT32  Action 
)

Definition at line 106 of file hwgpe.c.

109 {
110  ACPI_GPE_REGISTER_INFO *GpeRegisterInfo;
112  UINT64 EnableMask;
113  UINT32 RegisterBit;
114 
115 
117 
118 
119  /* Get the info block for the entire GPE register */
120 
121  GpeRegisterInfo = GpeEventInfo->RegisterInfo;
122  if (!GpeRegisterInfo)
123  {
124  return (AE_NOT_EXIST);
125  }
126 
127  /* Get current value of the enable register that contains this GPE */
128 
129  Status = AcpiHwRead (&EnableMask, &GpeRegisterInfo->EnableAddress);
130  if (ACPI_FAILURE (Status))
131  {
132  return (Status);
133  }
134 
135  /* Set or clear just the bit that corresponds to this GPE */
136 
137  RegisterBit = AcpiHwGetGpeRegisterBit (GpeEventInfo);
138  switch (Action)
139  {
141 
142  /* Only enable if the corresponding EnableMask bit is set */
143 
144  if (!(RegisterBit & GpeRegisterInfo->EnableMask))
145  {
146  return (AE_BAD_PARAMETER);
147  }
148 
149  /*lint -fallthrough */
150 
151  case ACPI_GPE_ENABLE:
152 
153  ACPI_SET_BIT (EnableMask, RegisterBit);
154  break;
155 
156  case ACPI_GPE_DISABLE:
157 
158  ACPI_CLEAR_BIT (EnableMask, RegisterBit);
159  break;
160 
161  default:
162 
163  ACPI_ERROR ((AE_INFO, "Invalid GPE Action, %u", Action));
164  return (AE_BAD_PARAMETER);
165  }
166 
167  if (!(RegisterBit & GpeRegisterInfo->MaskForRun))
168  {
169  /* Write the updated enable mask */
170 
171  Status = AcpiHwWrite (EnableMask, &GpeRegisterInfo->EnableAddress);
172  }
173  return (Status);
174 }
#define ACPI_GPE_CONDITIONAL_ENABLE
Definition: actypes.h:795
#define AE_BAD_PARAMETER
Definition: acexcep.h:151
#define ACPI_SET_BIT(target, bit)
Definition: actypes.h:533
ACPI_GPE_EVENT_INFO * GpeEventInfo
Definition: acevents.h:195
UINT32 ACPI_STATUS
Definition: actypes.h:460
#define ACPI_FAILURE(a)
Definition: acexcep.h:95
ACPI_GENERIC_ADDRESS EnableAddress
Definition: aclocal.h:568
unsigned int UINT32
#define AE_INFO
Definition: acoutput.h:230
#define ACPI_FUNCTION_ENTRY()
Definition: acoutput.h:484
UINT32 AcpiHwGetGpeRegisterBit(ACPI_GPE_EVENT_INFO *GpeEventInfo)
Definition: hwgpe.c:81
struct acpi_gpe_register_info * RegisterInfo
Definition: aclocal.h:555
_In_ PLIST_ENTRY _In_ PSTRING _In_ USHORT _In_opt_ PSTRING _In_opt_ PSTRING _In_ ULONG _In_ ULONG Action
Definition: fsrtlfuncs.h:738
#define ACPI_CLEAR_BIT(target, bit)
Definition: actypes.h:534
ACPI_STATUS AcpiHwRead(UINT64 *Value, ACPI_GENERIC_ADDRESS *Reg)
Definition: hwregs.c:259
#define AE_NOT_EXIST
Definition: acexcep.h:114
#define ACPI_GPE_ENABLE
Definition: actypes.h:793
Status
Definition: gdiplustypes.h:24
#define ACPI_ERROR(plist)
Definition: acoutput.h:240
#define ACPI_GPE_DISABLE
Definition: actypes.h:794
unsigned long long UINT64
ACPI_STATUS AcpiHwWrite(UINT64 Value, ACPI_GENERIC_ADDRESS *Reg)
Definition: hwregs.c:357
#define AE_OK
Definition: acexcep.h:97

Referenced by AcpiEvEnableGpe(), AcpiEvFinishGpe(), AcpiEvGpeDispatch(), AcpiEvMaskGpe(), AcpiEvMatchGpeMethod(), AcpiEvRemoveGpeReference(), and AcpiSetGpe().

◆ AcpiHwRead()

ACPI_STATUS AcpiHwRead ( UINT64 Value,
ACPI_GENERIC_ADDRESS Reg 
)

Definition at line 259 of file hwregs.c.

262 {
263  UINT64 Address;
264  UINT8 AccessWidth;
265  UINT32 BitWidth;
266  UINT8 BitOffset;
267  UINT64 Value64;
268  UINT32 Value32;
269  UINT8 Index;
271 
272 
273  ACPI_FUNCTION_NAME (HwRead);
274 
275 
276  /* Validate contents of the GAS register */
277 
278  Status = AcpiHwValidateRegister (Reg, 64, &Address);
279  if (ACPI_FAILURE (Status))
280  {
281  return (Status);
282  }
283 
284  /*
285  * Initialize entire 64-bit return value to zero, convert AccessWidth
286  * into number of bits based
287  */
288  *Value = 0;
289  AccessWidth = AcpiHwGetAccessBitWidth (Address, Reg, 64);
290  BitWidth = Reg->BitOffset + Reg->BitWidth;
291  BitOffset = Reg->BitOffset;
292 
293  /*
294  * Two address spaces supported: Memory or IO. PCI_Config is
295  * not supported here because the GAS structure is insufficient
296  */
297  Index = 0;
298  while (BitWidth)
299  {
300  if (BitOffset >= AccessWidth)
301  {
302  Value64 = 0;
303  BitOffset -= AccessWidth;
304  }
305  else
306  {
308  {
309  Status = AcpiOsReadMemory ((ACPI_PHYSICAL_ADDRESS)
310  Address + Index * ACPI_DIV_8 (AccessWidth),
311  &Value64, AccessWidth);
312  }
313  else /* ACPI_ADR_SPACE_SYSTEM_IO, validated earlier */
314  {
315  Status = AcpiHwReadPort ((ACPI_IO_ADDRESS)
316  Address + Index * ACPI_DIV_8 (AccessWidth),
317  &Value32, AccessWidth);
318  Value64 = (UINT64) Value32;
319  }
320  }
321 
322  /*
323  * Use offset style bit writes because "Index * AccessWidth" is
324  * ensured to be less than 64-bits by AcpiHwValidateRegister().
325  */
326  ACPI_SET_BITS (Value, Index * AccessWidth,
327  ACPI_MASK_BITS_ABOVE_64 (AccessWidth), Value64);
328 
329  BitWidth -= BitWidth > AccessWidth ? AccessWidth : BitWidth;
330  Index++;
331  }
332 
334  "Read: %8.8X%8.8X width %2d from %8.8X%8.8X (%s)\n",
335  ACPI_FORMAT_UINT64 (*Value), AccessWidth,
337 
338  return (Status);
339 }
_In_opt_ ULONG _Out_ PULONG Value
Definition: rtlfuncs.h:2343
ACPI_STATUS AcpiHwValidateRegister(ACPI_GENERIC_ADDRESS *Reg, UINT8 MaxBitWidth, UINT64 *Address)
Definition: hwregs.c:179
#define ACPI_DB_IO
Definition: acoutput.h:177
UINT32 ACPI_STATUS
Definition: actypes.h:460
#define ACPI_MASK_BITS_ABOVE_64(width)
Definition: acmacros.h:348
ACPI_STATUS AcpiHwReadPort(ACPI_IO_ADDRESS Address, UINT32 *Value, UINT32 Width)
Definition: hwvalid.c:237
#define ACPI_FAILURE(a)
Definition: acexcep.h:95
const char * AcpiUtGetRegionName(UINT8 SpaceId)
Definition: utdecode.c:124
unsigned int UINT32
#define ACPI_SET_BITS(TargetPtr, Position, Mask, Value)
Definition: acmacros.h:371
static WCHAR Address[46]
Definition: ping.c:68
#define ACPI_DEBUG_PRINT(pl)
Definition: acoutput.h:475
static const UCHAR Index[8]
Definition: usbohci.c:18
static UINT8 AcpiHwGetAccessBitWidth(UINT64 Address, ACPI_GENERIC_ADDRESS *Reg, UINT8 MaxBitWidth)
Definition: hwregs.c:93
#define ACPI_DIV_8(a)
Definition: acmacros.h:214
Status
Definition: gdiplustypes.h:24
#define ACPI_FORMAT_UINT64(i)
Definition: acmacros.h:71
ACPI_STATUS AcpiOsReadMemory(ACPI_PHYSICAL_ADDRESS Address, UINT64 *Value, UINT32 Width)
Definition: osl.c:634
#define ACPI_FUNCTION_NAME(a)
Definition: acoutput.h:479
#define ACPI_ADR_SPACE_SYSTEM_MEMORY
Definition: actypes.h:851
unsigned long long UINT64
unsigned char UINT8

Referenced by AcpiEvDetectGpe(), AcpiGetTimer(), AcpiHwGetGpeStatus(), AcpiHwLowSetGpe(), AcpiHwReadMultiple(), AcpiHwRegisterRead(), AcpiHwRegisterWrite(), and AcpiRead().

◆ AcpiHwReadPort()

ACPI_STATUS AcpiHwReadPort ( ACPI_IO_ADDRESS  Address,
UINT32 Value,
UINT32  Width 
)

Definition at line 237 of file hwvalid.c.

241 {
243  UINT32 OneByte;
244  UINT32 i;
245 
246 
247  /* Truncate address to 16 bits if requested */
248 
249  if (AcpiGbl_TruncateIoAddresses)
250  {
252  }
253 
254  /* Validate the entire request and perform the I/O */
255 
257  if (ACPI_SUCCESS (Status))
258  {
259  Status = AcpiOsReadPort (Address, Value, Width);
260  return (Status);
261  }
262 
264  {
265  return (Status);
266  }
267 
268  /*
269  * There has been a protection violation within the request. Fall
270  * back to byte granularity port I/O and ignore the failing bytes.
271  * This provides compatibility with other ACPI implementations.
272  */
273  for (i = 0, *Value = 0; i < Width; i += 8)
274  {
275  /* Validate and read one byte */
276 
278  {
279  Status = AcpiOsReadPort (Address, &OneByte, 8);
280  if (ACPI_FAILURE (Status))
281  {
282  return (Status);
283  }
284 
285  *Value |= (OneByte << i);
286  }
287 
288  Address++;
289  }
290 
291  return (AE_OK);
292 }
_In_opt_ ULONG _Out_ PULONG Value
Definition: rtlfuncs.h:2343
#define ACPI_SUCCESS(a)
Definition: acexcep.h:94
UINT32 ACPI_STATUS
Definition: actypes.h:460
#define ACPI_FAILURE(a)
Definition: acexcep.h:95
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
#define ACPI_UINT16_MAX
Definition: actypes.h:65
unsigned int UINT32
static WCHAR Address[46]
Definition: ping.c:68
ACPI_STATUS AcpiOsReadPort(ACPI_IO_ADDRESS Address, UINT32 *Value, UINT32 Width)
Definition: osl.c:701
static ACPI_STATUS AcpiHwValidateIoRequest(ACPI_IO_ADDRESS Address, UINT32 BitWidth)
Definition: hwvalid.c:130
Status
Definition: gdiplustypes.h:24
#define AE_OK
Definition: acexcep.h:97
#define AE_AML_ILLEGAL_ADDRESS
Definition: acexcep.h:211

Referenced by AcpiExSystemIoSpaceHandler(), AcpiHwRead(), and AcpiHwRegisterRead().

◆ AcpiHwRegisterRead()

ACPI_STATUS AcpiHwRegisterRead ( UINT32  RegisterId,
UINT32 ReturnValue 
)

Definition at line 574 of file hwregs.c.

577 {
578  UINT32 Value = 0;
579  UINT64 Value64;
581 
582 
583  ACPI_FUNCTION_TRACE (HwRegisterRead);
584 
585 
586  switch (RegisterId)
587  {
588  case ACPI_REGISTER_PM1_STATUS: /* PM1 A/B: 16-bit access each */
589 
591  &AcpiGbl_XPm1aStatus,
592  &AcpiGbl_XPm1bStatus);
593  break;
594 
595  case ACPI_REGISTER_PM1_ENABLE: /* PM1 A/B: 16-bit access each */
596 
598  &AcpiGbl_XPm1aEnable,
599  &AcpiGbl_XPm1bEnable);
600  break;
601 
602  case ACPI_REGISTER_PM1_CONTROL: /* PM1 A/B: 16-bit access each */
603 
605  &AcpiGbl_FADT.XPm1aControlBlock,
606  &AcpiGbl_FADT.XPm1bControlBlock);
607 
608  /*
609  * Zero the write-only bits. From the ACPI specification, "Hardware
610  * Write-Only Bits": "Upon reads to registers with write-only bits,
611  * software masks out all write-only bits."
612  */
614  break;
615 
616  case ACPI_REGISTER_PM2_CONTROL: /* 8-bit access */
617 
618  Status = AcpiHwRead (&Value64, &AcpiGbl_FADT.XPm2ControlBlock);
619  if (ACPI_SUCCESS (Status))
620  {
621  Value = (UINT32) Value64;
622  }
623  break;
624 
625  case ACPI_REGISTER_PM_TIMER: /* 32-bit access */
626 
627  Status = AcpiHwRead (&Value64, &AcpiGbl_FADT.XPmTimerBlock);
628  if (ACPI_SUCCESS (Status))
629  {
630  Value = (UINT32) Value64;
631  }
632 
633  break;
634 
635  case ACPI_REGISTER_SMI_COMMAND_BLOCK: /* 8-bit access */
636 
637  Status = AcpiHwReadPort (AcpiGbl_FADT.SmiCommand, &Value, 8);
638  break;
639 
640  default:
641 
642  ACPI_ERROR ((AE_INFO, "Unknown Register ID: 0x%X",
643  RegisterId));
645  break;
646  }
647 
648  if (ACPI_SUCCESS (Status))
649  {
650  *ReturnValue = (UINT32) Value;
651  }
652 
654 }
_In_opt_ ULONG _Out_ PULONG Value
Definition: rtlfuncs.h:2343
#define ACPI_SUCCESS(a)
Definition: acexcep.h:94
#define ACPI_REGISTER_PM2_CONTROL
Definition: aclocal.h:1187
#define AE_BAD_PARAMETER
Definition: acexcep.h:151
#define ACPI_REGISTER_PM1_CONTROL
Definition: aclocal.h:1186
UINT32 ACPI_STATUS
Definition: actypes.h:460
ACPI_STATUS AcpiHwReadPort(ACPI_IO_ADDRESS Address, UINT32 *Value, UINT32 Width)
Definition: hwvalid.c:237
UINT32 void void ** ReturnValue
Definition: acevents.h:214
unsigned int UINT32
#define AE_INFO
Definition: acoutput.h:230
#define ACPI_REGISTER_PM_TIMER
Definition: aclocal.h:1188
#define ACPI_REGISTER_PM1_STATUS
Definition: aclocal.h:1184
#define ACPI_PM1_CONTROL_WRITEONLY_BITS
Definition: aclocal.h:1161
ACPI_STATUS AcpiHwRead(UINT64 *Value, ACPI_GENERIC_ADDRESS *Reg)
Definition: hwregs.c:259
static ACPI_STATUS AcpiHwReadMultiple(UINT32 *Value, ACPI_GENERIC_ADDRESS *RegisterA, ACPI_GENERIC_ADDRESS *RegisterB)
Definition: hwregs.c:806
Status
Definition: gdiplustypes.h:24
#define return_ACPI_STATUS(s)
Definition: acoutput.h:496
#define ACPI_FUNCTION_TRACE(a)
Definition: acoutput.h:480
#define ACPI_REGISTER_SMI_COMMAND_BLOCK
Definition: aclocal.h:1190
#define ACPI_ERROR(plist)
Definition: acoutput.h:240
unsigned long long UINT64
#define ACPI_REGISTER_PM1_ENABLE
Definition: aclocal.h:1185

Referenced by AcpiEvFixedEventDetect(), AcpiHwLegacySleep(), AcpiHwLegacyWakePrep(), AcpiReadBitRegister(), and AcpiWriteBitRegister().

◆ AcpiHwRegisterWrite()

ACPI_STATUS AcpiHwRegisterWrite ( UINT32  RegisterId,
UINT32  Value 
)

Definition at line 684 of file hwregs.c.

687 {
689  UINT32 ReadValue;
690  UINT64 ReadValue64;
691 
692 
693  ACPI_FUNCTION_TRACE (HwRegisterWrite);
694 
695 
696  switch (RegisterId)
697  {
698  case ACPI_REGISTER_PM1_STATUS: /* PM1 A/B: 16-bit access each */
699  /*
700  * Handle the "ignored" bit in PM1 Status. According to the ACPI
701  * specification, ignored bits are to be preserved when writing.
702  * Normally, this would mean a read/modify/write sequence. However,
703  * preserving a bit in the status register is different. Writing a
704  * one clears the status, and writing a zero preserves the status.
705  * Therefore, we must always write zero to the ignored bit.
706  *
707  * This behavior is clarified in the ACPI 4.0 specification.
708  */
710 
712  &AcpiGbl_XPm1aStatus,
713  &AcpiGbl_XPm1bStatus);
714  break;
715 
716  case ACPI_REGISTER_PM1_ENABLE: /* PM1 A/B: 16-bit access each */
717 
719  &AcpiGbl_XPm1aEnable,
720  &AcpiGbl_XPm1bEnable);
721  break;
722 
723  case ACPI_REGISTER_PM1_CONTROL: /* PM1 A/B: 16-bit access each */
724  /*
725  * Perform a read first to preserve certain bits (per ACPI spec)
726  * Note: This includes SCI_EN, we never want to change this bit
727  */
728  Status = AcpiHwReadMultiple (&ReadValue,
729  &AcpiGbl_FADT.XPm1aControlBlock,
730  &AcpiGbl_FADT.XPm1bControlBlock);
731  if (ACPI_FAILURE (Status))
732  {
733  goto Exit;
734  }
735 
736  /* Insert the bits to be preserved */
737 
739 
740  /* Now we can write the data */
741 
743  &AcpiGbl_FADT.XPm1aControlBlock,
744  &AcpiGbl_FADT.XPm1bControlBlock);
745  break;
746 
747  case ACPI_REGISTER_PM2_CONTROL: /* 8-bit access */
748  /*
749  * For control registers, all reserved bits must be preserved,
750  * as per the ACPI spec.
751  */
752  Status = AcpiHwRead (&ReadValue64, &AcpiGbl_FADT.XPm2ControlBlock);
753  if (ACPI_FAILURE (Status))
754  {
755  goto Exit;
756  }
757  ReadValue = (UINT32) ReadValue64;
758 
759  /* Insert the bits to be preserved */
760 
762 
763  Status = AcpiHwWrite (Value, &AcpiGbl_FADT.XPm2ControlBlock);
764  break;
765 
766  case ACPI_REGISTER_PM_TIMER: /* 32-bit access */
767 
768  Status = AcpiHwWrite (Value, &AcpiGbl_FADT.XPmTimerBlock);
769  break;
770 
771  case ACPI_REGISTER_SMI_COMMAND_BLOCK: /* 8-bit access */
772 
773  /* SMI_CMD is currently always in IO space */
774 
775  Status = AcpiHwWritePort (AcpiGbl_FADT.SmiCommand, Value, 8);
776  break;
777 
778  default:
779 
780  ACPI_ERROR ((AE_INFO, "Unknown Register ID: 0x%X",
781  RegisterId));
783  break;
784  }
785 
786 Exit:
788 }
_In_opt_ ULONG _Out_ PULONG Value
Definition: rtlfuncs.h:2343
#define ACPI_REGISTER_PM2_CONTROL
Definition: aclocal.h:1187
#define AE_BAD_PARAMETER
Definition: acexcep.h:151
#define ACPI_REGISTER_PM1_CONTROL
Definition: aclocal.h:1186
UINT32 ACPI_STATUS
Definition: actypes.h:460
#define ACPI_FAILURE(a)
Definition: acexcep.h:95
#define ACPI_PM1_STATUS_PRESERVED_BITS
Definition: aclocal.h:1157
unsigned int UINT32
#define ACPI_INSERT_BITS(Target, Mask, Source)
Definition: acmacros.h:363
ACPI_STATUS AcpiHwWritePort(ACPI_IO_ADDRESS Address, UINT32 Value, UINT32 Width)
Definition: hwvalid.c:312
static ACPI_STATUS AcpiHwWriteMultiple(UINT32 Value, ACPI_GENERIC_ADDRESS *RegisterA, ACPI_GENERIC_ADDRESS *RegisterB)
Definition: hwregs.c:868
#define AE_INFO
Definition: acoutput.h:230
#define ACPI_REGISTER_PM_TIMER
Definition: aclocal.h:1188
#define ACPI_REGISTER_PM1_STATUS
Definition: aclocal.h:1184
static void Exit(void)
Definition: sock.c:1331
ACPI_STATUS AcpiHwRead(UINT64 *Value, ACPI_GENERIC_ADDRESS *Reg)
Definition: hwregs.c:259
static ACPI_STATUS AcpiHwReadMultiple(UINT32 *Value, ACPI_GENERIC_ADDRESS *RegisterA, ACPI_GENERIC_ADDRESS *RegisterB)
Definition: hwregs.c:806
Status
Definition: gdiplustypes.h:24
#define return_ACPI_STATUS(s)
Definition: acoutput.h:496
#define ACPI_FUNCTION_TRACE(a)
Definition: acoutput.h:480
#define ACPI_REGISTER_SMI_COMMAND_BLOCK
Definition: aclocal.h:1190
#define ACPI_ERROR(plist)
Definition: acoutput.h:240
unsigned long long UINT64
#define ACPI_PM1_CONTROL_PRESERVED_BITS
Definition: aclocal.h:1175
#define ACPI_PM2_CONTROL_PRESERVED_BITS
Definition: aclocal.h:1178
#define ACPI_REGISTER_PM1_ENABLE
Definition: aclocal.h:1185
ACPI_STATUS AcpiHwWrite(UINT64 Value, ACPI_GENERIC_ADDRESS *Reg)
Definition: hwregs.c:357

Referenced by AcpiHwClearAcpiStatus(), AcpiHwLegacySleep(), and AcpiWriteBitRegister().

◆ AcpiHwSetMode()

ACPI_STATUS AcpiHwSetMode ( UINT32  Mode)

Definition at line 66 of file hwacpi.c.

68 {
69 
71  UINT32 Retry;
72 
73 
74  ACPI_FUNCTION_TRACE (HwSetMode);
75 
76 
77  /* If the Hardware Reduced flag is set, machine is always in acpi mode */
78 
79  if (AcpiGbl_ReducedHardware)
80  {
82  }
83 
84  /*
85  * ACPI 2.0 clarified that if SMI_CMD in FADT is zero,
86  * system does not support mode transition.
87  */
88  if (!AcpiGbl_FADT.SmiCommand)
89  {
90  ACPI_ERROR ((AE_INFO, "No SMI_CMD in FADT, mode transition failed"));
92  }
93 
94  /*
95  * ACPI 2.0 clarified the meaning of ACPI_ENABLE and ACPI_DISABLE
96  * in FADT: If it is zero, enabling or disabling is not supported.
97  * As old systems may have used zero for mode transition,
98  * we make sure both the numbers are zero to determine these
99  * transitions are not supported.
100  */
101  if (!AcpiGbl_FADT.AcpiEnable && !AcpiGbl_FADT.AcpiDisable)
102  {
104  "No ACPI mode transition supported in this system "
105  "(enable/disable both zero)"));
107  }
108 
109  switch (Mode)
110  {
111  case ACPI_SYS_MODE_ACPI:
112 
113  /* BIOS should have disabled ALL fixed and GP events */
114 
115  Status = AcpiHwWritePort (AcpiGbl_FADT.SmiCommand,
116  (UINT32) AcpiGbl_FADT.AcpiEnable, 8);
117  ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "Attempting to enable ACPI mode\n"));
118  break;
119 
121  /*
122  * BIOS should clear all fixed status bits and restore fixed event
123  * enable bits to default
124  */
125  Status = AcpiHwWritePort (AcpiGbl_FADT.SmiCommand,
126  (UINT32) AcpiGbl_FADT.AcpiDisable, 8);
128  "Attempting to enable Legacy (non-ACPI) mode\n"));
129  break;
130 
131  default:
132 
134  }
135 
136  if (ACPI_FAILURE (Status))
137  {
139  "Could not write ACPI mode change"));
141  }
142 
143  /*
144  * Some hardware takes a LONG time to switch modes. Give them 3 sec to
145  * do so, but allow faster systems to proceed more quickly.
146  */
147  Retry = 3000;
148  while (Retry)
149  {
150  if (AcpiHwGetMode () == Mode)
151  {
153  "Mode %X successfully enabled\n", Mode));
155  }
157  Retry--;
158  }
159 
160  ACPI_ERROR ((AE_INFO, "Hardware did not change modes"));
162 }
#define ACPI_EXCEPTION(plist)
Definition: acoutput.h:239
_In_ ULONG Mode
Definition: hubbusif.h:303
#define AE_BAD_PARAMETER
Definition: acexcep.h:151
void AcpiOsStall(UINT32 Microseconds)
Definition: osl.c:264
UINT32 ACPI_STATUS
Definition: actypes.h:460
#define ACPI_FAILURE(a)
Definition: acexcep.h:95
unsigned int UINT32
ACPI_STATUS AcpiHwWritePort(ACPI_IO_ADDRESS Address, UINT32 Value, UINT32 Width)
Definition: hwvalid.c:312
#define AE_INFO
Definition: acoutput.h:230
IN PSCSI_REQUEST_BLOCK IN OUT NTSTATUS IN OUT BOOLEAN * Retry
Definition: class2.h:49
#define ACPI_USEC_PER_MSEC
Definition: actypes.h:470
#define AE_NO_HARDWARE_RESPONSE
Definition: acexcep.h:130
#define ACPI_DEBUG_PRINT(pl)
Definition: acoutput.h:475
Status
Definition: gdiplustypes.h:24
#define ACPI_SYS_MODE_LEGACY
Definition: actypes.h:1074
#define ACPI_DB_INFO
Definition: acoutput.h:153
#define ACPI_SYS_MODE_ACPI
Definition: actypes.h:1073
#define return_ACPI_STATUS(s)
Definition: acoutput.h:496
#define ACPI_FUNCTION_TRACE(a)
Definition: acoutput.h:480
#define ACPI_ERROR(plist)
Definition: acoutput.h:240
UINT32 AcpiHwGetMode(void)
Definition: hwacpi.c:179
#define AE_OK
Definition: acexcep.h:97

Referenced by AcpiDisable(), and AcpiEnable().

◆ AcpiHwValidateRegister()

ACPI_STATUS AcpiHwValidateRegister ( ACPI_GENERIC_ADDRESS Reg,
UINT8  MaxBitWidth,
UINT64 Address 
)

Definition at line 179 of file hwregs.c.

183 {
184  UINT8 BitWidth;
185  UINT8 AccessWidth;
186 
187 
188  /* Must have a valid pointer to a GAS structure */
189 
190  if (!Reg)
191  {
192  return (AE_BAD_PARAMETER);
193  }
194 
195  /*
196  * Copy the target address. This handles possible alignment issues.
197  * Address must not be null. A null address also indicates an optional
198  * ACPI register that is not supported, so no error message.
199  */
201  if (!(*Address))
202  {
203  return (AE_BAD_ADDRESS);
204  }
205 
206  /* Validate the SpaceID */
207 
208  if ((Reg->SpaceId != ACPI_ADR_SPACE_SYSTEM_MEMORY) &&
210  {
212  "Unsupported address space: 0x%X", Reg->SpaceId));
213  return (AE_SUPPORT);
214  }
215 
216  /* Validate the AccessWidth */
217 
218  if (Reg->AccessWidth > 4)
219  {
221  "Unsupported register access width: 0x%X", Reg->AccessWidth));
222  return (AE_SUPPORT);
223  }
224 
225  /* Validate the BitWidth, convert AccessWidth into number of bits */
226 
227  AccessWidth = AcpiHwGetAccessBitWidth (*Address, Reg, MaxBitWidth);
228  BitWidth = ACPI_ROUND_UP (Reg->BitOffset + Reg->BitWidth, AccessWidth);
229  if (MaxBitWidth < BitWidth)
230  {
232  "Requested bit width 0x%X is smaller than register bit width 0x%X",
233  MaxBitWidth, BitWidth));
234  return (AE_SUPPORT);
235  }
236 
237  return (AE_OK);
238 }
#define AE_BAD_PARAMETER
Definition: acexcep.h:151
#define ACPI_WARNING(plist)
Definition: acoutput.h:238
#define ACPI_ADR_SPACE_SYSTEM_IO
Definition: actypes.h:852
#define AE_INFO
Definition: acoutput.h:230
static WCHAR Address[46]
Definition: ping.c:68
#define AE_BAD_ADDRESS
Definition: acexcep.h:159
#define ACPI_ROUND_UP(value, boundary)
Definition: acmacros.h:242
#define AE_SUPPORT
Definition: acexcep.h:123
static UINT8 AcpiHwGetAccessBitWidth(UINT64 Address, ACPI_GENERIC_ADDRESS *Reg, UINT8 MaxBitWidth)
Definition: hwregs.c:93
#define ACPI_ERROR(plist)
Definition: acoutput.h:240
#define ACPI_MOVE_64_TO_64(d, s)
Definition: acmacros.h:155
#define ACPI_ADR_SPACE_SYSTEM_MEMORY
Definition: actypes.h:851
unsigned char UINT8
#define AE_OK
Definition: acexcep.h:97

Referenced by AcpiHwRead(), and AcpiHwWrite().

◆ AcpiHwWrite()

ACPI_STATUS AcpiHwWrite ( UINT64  Value,
ACPI_GENERIC_ADDRESS Reg 
)

Definition at line 357 of file hwregs.c.

360 {
361  UINT64 Address;
362  UINT8 AccessWidth;
363  UINT32 BitWidth;
364  UINT8 BitOffset;
365  UINT64 Value64;
366  UINT8 Index;
368 
369 
370  ACPI_FUNCTION_NAME (HwWrite);
371 
372 
373  /* Validate contents of the GAS register */
374 
375  Status = AcpiHwValidateRegister (Reg, 64, &Address);
376  if (ACPI_FAILURE (Status))
377  {
378  return (Status);
379  }
380 
381  /* Convert AccessWidth into number of bits based */
382 
383  AccessWidth = AcpiHwGetAccessBitWidth (Address, Reg, 64);
384  BitWidth = Reg->BitOffset + Reg->BitWidth;
385  BitOffset = Reg->BitOffset;
386 
387  /*
388  * Two address spaces supported: Memory or IO. PCI_Config is
389  * not supported here because the GAS structure is insufficient
390  */
391  Index = 0;
392  while (BitWidth)
393  {
394  /*
395  * Use offset style bit reads because "Index * AccessWidth" is
396  * ensured to be less than 64-bits by AcpiHwValidateRegister().
397  */
398  Value64 = ACPI_GET_BITS (&Value, Index * AccessWidth,
399  ACPI_MASK_BITS_ABOVE_64 (AccessWidth));
400 
401  if (BitOffset >= AccessWidth)
402  {
403  BitOffset -= AccessWidth;
404  }
405  else
406  {
408  {
409  Status = AcpiOsWriteMemory ((ACPI_PHYSICAL_ADDRESS)
410  Address + Index * ACPI_DIV_8 (AccessWidth),
411  Value64, AccessWidth);
412  }
413  else /* ACPI_ADR_SPACE_SYSTEM_IO, validated earlier */
414  {
415  Status = AcpiHwWritePort ((ACPI_IO_ADDRESS)
416  Address + Index * ACPI_DIV_8 (AccessWidth),
417  (UINT32) Value64, AccessWidth);
418  }
419  }
420 
421  /*
422  * Index * AccessWidth is ensured to be less than 32-bits by
423  * AcpiHwValidateRegister().
424  */
425  BitWidth -= BitWidth > AccessWidth ? AccessWidth : BitWidth;
426  Index++;
427  }
428 
430  "Wrote: %8.8X%8.8X width %2d to %8.8X%8.8X (%s)\n",
431  ACPI_FORMAT_UINT64 (Value), AccessWidth,
433 
434  return (Status);
435 }
_In_opt_ ULONG _Out_ PULONG Value
Definition: rtlfuncs.h:2343
ACPI_STATUS AcpiHwValidateRegister(ACPI_GENERIC_ADDRESS *Reg, UINT8 MaxBitWidth, UINT64 *Address)
Definition: hwregs.c:179
#define ACPI_DB_IO
Definition: acoutput.h:177
UINT32 ACPI_STATUS
Definition: actypes.h:460
#define ACPI_MASK_BITS_ABOVE_64(width)
Definition: acmacros.h:348
#define ACPI_FAILURE(a)
Definition: acexcep.h:95
const char * AcpiUtGetRegionName(UINT8 SpaceId)
Definition: utdecode.c:124
unsigned int UINT32
ACPI_STATUS AcpiHwWritePort(ACPI_IO_ADDRESS Address, UINT32 Value, UINT32 Width)
Definition: hwvalid.c:312
static WCHAR Address[46]
Definition: ping.c:68
ACPI_STATUS AcpiOsWriteMemory(ACPI_PHYSICAL_ADDRESS Address, UINT64 Value, UINT32 Width)
Definition: osl.c:667
#define ACPI_DEBUG_PRINT(pl)
Definition: acoutput.h:475
static const UCHAR Index[8]
Definition: usbohci.c:18
static UINT8 AcpiHwGetAccessBitWidth(UINT64 Address, ACPI_GENERIC_ADDRESS *Reg, UINT8 MaxBitWidth)
Definition: hwregs.c:93
#define ACPI_DIV_8(a)
Definition: acmacros.h:214
Status
Definition: gdiplustypes.h:24
#define ACPI_FORMAT_UINT64(i)
Definition: acmacros.h:71
#define ACPI_FUNCTION_NAME(a)
Definition: acoutput.h:479
#define ACPI_ADR_SPACE_SYSTEM_MEMORY
Definition: actypes.h:851
unsigned long long UINT64
#define ACPI_GET_BITS(SourcePtr, Position, Mask)
Definition: acmacros.h:368
unsigned char UINT8

Referenced by AcpiEvCreateGpeInfoBlocks(), AcpiHwClearGpe(), AcpiHwClearGpeBlock(), AcpiHwGpeEnableWrite(), AcpiHwLowSetGpe(), AcpiHwRegisterWrite(), AcpiHwWriteMultiple(), AcpiHwWritePm1Control(), AcpiReset(), and AcpiWrite().

◆ AcpiHwWritePm1Control()

ACPI_STATUS AcpiHwWritePm1Control ( UINT32  Pm1aControl,
UINT32  Pm1bControl 
)

Definition at line 536 of file hwregs.c.

539 {
541 
542 
543  ACPI_FUNCTION_TRACE (HwWritePm1Control);
544 
545 
546  Status = AcpiHwWrite (Pm1aControl, &AcpiGbl_FADT.XPm1aControlBlock);
547  if (ACPI_FAILURE (Status))
548  {
550  }
551 
552  if (AcpiGbl_FADT.XPm1bControlBlock.Address)
553  {
554  Status = AcpiHwWrite (Pm1bControl, &AcpiGbl_FADT.XPm1bControlBlock);
555  }
557 }
UINT32 ACPI_STATUS
Definition: actypes.h:460
#define ACPI_FAILURE(a)
Definition: acexcep.h:95
Status
Definition: gdiplustypes.h:24
#define return_ACPI_STATUS(s)
Definition: acoutput.h:496
#define ACPI_FUNCTION_TRACE(a)
Definition: acoutput.h:480
ACPI_STATUS AcpiHwWrite(UINT64 Value, ACPI_GENERIC_ADDRESS *Reg)
Definition: hwregs.c:357

Referenced by AcpiHwLegacySleep(), and AcpiHwLegacyWakePrep().

◆ AcpiHwWritePort()

ACPI_STATUS AcpiHwWritePort ( ACPI_IO_ADDRESS  Address,
UINT32  Value,
UINT32  Width 
)

Definition at line 312 of file hwvalid.c.

316 {
318  UINT32 i;
319 
320 
321  /* Truncate address to 16 bits if requested */
322 
323  if (AcpiGbl_TruncateIoAddresses)
324  {
326  }
327 
328  /* Validate the entire request and perform the I/O */
329 
331  if (ACPI_SUCCESS (Status))
332  {
333  Status = AcpiOsWritePort (Address, Value, Width);
334  return (Status);
335  }
336 
338  {
339  return (Status);
340  }
341 
342  /*
343  * There has been a protection violation within the request. Fall
344  * back to byte granularity port I/O and ignore the failing bytes.
345  * This provides compatibility with other ACPI implementations.
346  */
347  for (i = 0; i < Width; i += 8)
348  {
349  /* Validate and write one byte */
350 
352  {
353  Status = AcpiOsWritePort (Address, (Value >> i) & 0xFF, 8);
354  if (ACPI_FAILURE (Status))
355  {
356  return (Status);
357  }
358  }
359 
360  Address++;
361  }
362 
363  return (AE_OK);
364 }
_In_opt_ ULONG _Out_ PULONG Value
Definition: rtlfuncs.h:2343
#define ACPI_SUCCESS(a)
Definition: acexcep.h:94
UINT32 ACPI_STATUS
Definition: actypes.h:460
#define ACPI_FAILURE(a)
Definition: acexcep.h:95
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
#define ACPI_UINT16_MAX
Definition: actypes.h:65
unsigned int UINT32
static WCHAR Address[46]
Definition: ping.c:68
static ACPI_STATUS AcpiHwValidateIoRequest(ACPI_IO_ADDRESS Address, UINT32 BitWidth)
Definition: hwvalid.c:130
Status
Definition: gdiplustypes.h:24
ACPI_STATUS AcpiOsWritePort(ACPI_IO_ADDRESS Address, UINT32 Value, UINT32 Width)
Definition: osl.c:731
#define AE_OK
Definition: acexcep.h:97
#define AE_AML_ILLEGAL_ADDRESS
Definition: acexcep.h:211

Referenced by AcpiEnterSleepStateS4bios(), AcpiExSystemIoSpaceHandler(), AcpiHwRegisterWrite(), AcpiHwSetMode(), and AcpiHwWrite().