49#define _COMPONENT ACPI_HARDWARE
53#if (!ACPI_REDUCED_HARDWARE)
129 if (AccessBitWidth <= 8)
137 AccessBitWidth >>= 1;
154 if (AccessBitWidth < MaxBitWidth)
156 return (AccessBitWidth);
158 return (MaxBitWidth);
212 "Unsupported address space: 0x%X", Reg->
SpaceId));
221 "Unsupported register access width: 0x%X", Reg->
AccessWidth));
229 if (MaxBitWidth < BitWidth)
232 "Requested bit width 0x%X is smaller than register bit width 0x%X",
233 MaxBitWidth, BitWidth));
300 if (BitOffset >= AccessWidth)
303 BitOffset -= AccessWidth;
311 &Value64, AccessWidth);
317 &Value32, AccessWidth);
318 Value64 = (
UINT64) Value32;
329 BitWidth -= BitWidth > AccessWidth ? AccessWidth : BitWidth;
334 "Read: %8.8X%8.8X width %2d from %8.8X%8.8X (%s)\n",
401 if (BitOffset >= AccessWidth)
403 BitOffset -= AccessWidth;
411 Value64, AccessWidth);
417 (
UINT32) Value64, AccessWidth);
425 BitWidth -= BitWidth > AccessWidth ? AccessWidth : BitWidth;
430 "Wrote: %8.8X%8.8X width %2d to %8.8X%8.8X (%s)\n",
438#if (!ACPI_REDUCED_HARDWARE)
552 if (AcpiGbl_FADT.XPm1bControlBlock.Address)
591 &AcpiGbl_XPm1aStatus,
592 &AcpiGbl_XPm1bStatus);
598 &AcpiGbl_XPm1aEnable,
599 &AcpiGbl_XPm1bEnable);
605 &AcpiGbl_FADT.XPm1aControlBlock,
606 &AcpiGbl_FADT.XPm1bControlBlock);
613 Value &= ~ACPI_PM1_CONTROL_WRITEONLY_BITS;
709 Value &= ~ACPI_PM1_STATUS_PRESERVED_BITS;
712 &AcpiGbl_XPm1aStatus,
713 &AcpiGbl_XPm1bStatus);
719 &AcpiGbl_XPm1aEnable,
720 &AcpiGbl_XPm1bEnable);
729 &AcpiGbl_FADT.XPm1aControlBlock,
730 &AcpiGbl_FADT.XPm1bControlBlock);
743 &AcpiGbl_FADT.XPm1aControlBlock,
744 &AcpiGbl_FADT.XPm1bControlBlock);
757 ReadValue = (
UINT32) ReadValue64;
824 ValueA = (
UINT32) Value64;
835 ValueB = (
UINT32) Value64;
848 *
Value = (ValueA | ValueB);
unsigned long long UINT64
UINT32 void void ** ReturnValue
ACPI_BIT_REGISTER_INFO AcpiGbl_BitRegisterInfo[ACPI_NUM_BITREG]
#define ACPI_PM1_CONTROL_PRESERVED_BITS
#define ACPI_REGISTER_PM2_CONTROL
#define ACPI_REGISTER_PM1_ENABLE
#define ACPI_PM2_CONTROL_PRESERVED_BITS
#define ACPI_REGISTER_PM_TIMER
#define ACPI_REGISTER_SMI_COMMAND_BLOCK
#define ACPI_BITMASK_ALL_FIXED_STATUS
#define ACPI_REGISTER_PM1_CONTROL
#define ACPI_REGISTER_PM1_STATUS
#define ACPI_SET_BITS(TargetPtr, Position, Mask, Value)
#define ACPI_IS_ALIGNED(a, s)
#define ACPI_GET_BITS(SourcePtr, Position, Mask)
#define ACPI_FORMAT_UINT64(i)
#define ACPI_MASK_BITS_ABOVE_64(width)
#define ACPI_MOVE_64_TO_64(d, s)
#define ACPI_ROUND_UP(value, boundary)
#define ACPI_INSERT_BITS(Target, Mask, Source)
#define ACPI_ROUND_UP_POWER_OF_TWO_8(a)
#define ACPI_IS_POWER_OF_TWO(a)
#define ACPI_DEBUG_PRINT(pl)
#define ACPI_MODULE_NAME(Name)
#define ACPI_WARNING(plist)
#define ACPI_FUNCTION_ENTRY()
#define return_ACPI_STATUS(s)
#define ACPI_FUNCTION_TRACE(a)
#define ACPI_ERROR(plist)
#define ACPI_FUNCTION_NAME(a)
ACPI_STATUS AcpiOsReadMemory(ACPI_PHYSICAL_ADDRESS Address, UINT64 *Value, UINT32 Width)
ACPI_STATUS AcpiOsWriteMemory(ACPI_PHYSICAL_ADDRESS Address, UINT64 Value, UINT32 Width)
void AcpiOsReleaseLock(ACPI_SPINLOCK Handle, ACPI_CPU_FLAGS Flags)
ACPI_CPU_FLAGS AcpiOsAcquireLock(ACPI_SPINLOCK Handle)
#define ACPI_ADR_SPACE_SYSTEM_IO
#define ACPI_ADR_SPACE_SYSTEM_MEMORY
#define ACPI_ACCESS_BIT_WIDTH(size)
const char * AcpiUtGetRegionName(UINT8 SpaceId)
ACPI_STATUS AcpiEvWalkGpeList(ACPI_GPE_CALLBACK GpeWalkCallback, void *Context)
ACPI_STATUS AcpiHwClearGpeBlock(ACPI_GPE_XRUPT_INFO *GpeXruptInfo, ACPI_GPE_BLOCK_INFO *GpeBlock, void *Context)
ACPI_STATUS AcpiHwWritePm1Control(UINT32 Pm1aControl, UINT32 Pm1bControl)
ACPI_STATUS AcpiHwValidateRegister(ACPI_GENERIC_ADDRESS *Reg, UINT8 MaxBitWidth, UINT64 *Address)
static ACPI_STATUS AcpiHwReadMultiple(UINT32 *Value, ACPI_GENERIC_ADDRESS *RegisterA, ACPI_GENERIC_ADDRESS *RegisterB)
ACPI_STATUS AcpiHwWrite(UINT64 Value, ACPI_GENERIC_ADDRESS *Reg)
ACPI_STATUS AcpiHwClearAcpiStatus(void)
ACPI_STATUS AcpiHwRead(UINT64 *Value, ACPI_GENERIC_ADDRESS *Reg)
ACPI_STATUS AcpiHwRegisterRead(UINT32 RegisterId, UINT32 *ReturnValue)
static UINT8 AcpiHwGetAccessBitWidth(UINT64 Address, ACPI_GENERIC_ADDRESS *Reg, UINT8 MaxBitWidth)
static ACPI_STATUS AcpiHwWriteMultiple(UINT32 Value, ACPI_GENERIC_ADDRESS *RegisterA, ACPI_GENERIC_ADDRESS *RegisterB)
ACPI_STATUS AcpiHwRegisterWrite(UINT32 RegisterId, UINT32 Value)
ACPI_BIT_REGISTER_INFO * AcpiHwGetBitRegisterInfo(UINT32 RegisterId)
ACPI_STATUS AcpiHwWritePort(ACPI_IO_ADDRESS Address, UINT32 Value, UINT32 Width)
ACPI_STATUS AcpiHwReadPort(ACPI_IO_ADDRESS Address, UINT32 *Value, UINT32 Width)
_In_ WDFCOLLECTION _In_ ULONG Index
_Must_inspect_result_ _In_ WDFKEY _In_ PCUNICODE_STRING _Out_opt_ PUSHORT _Inout_opt_ PUNICODE_STRING Value