diff options
author | jkim <jkim@FreeBSD.org> | 2009-06-25 23:20:50 +0000 |
---|---|---|
committer | jkim <jkim@FreeBSD.org> | 2009-06-25 23:20:50 +0000 |
commit | b0288ab5352e77c07fffaf51a4193f8de02a7aec (patch) | |
tree | 90ff140546ac1c8f9223f343715887361e86492a /tools/acpiexec/aeexec.c | |
parent | 02935ea0ac5fb3dfc5e452b2a18288d7e523dc1b (diff) | |
download | FreeBSD-src-b0288ab5352e77c07fffaf51a4193f8de02a7aec.zip FreeBSD-src-b0288ab5352e77c07fffaf51a4193f8de02a7aec.tar.gz |
Import ACPICA 20090625
Diffstat (limited to 'tools/acpiexec/aeexec.c')
-rw-r--r-- | tools/acpiexec/aeexec.c | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/tools/acpiexec/aeexec.c b/tools/acpiexec/aeexec.c index 798e841..d945cc3 100644 --- a/tools/acpiexec/aeexec.c +++ b/tools/acpiexec/aeexec.c @@ -152,6 +152,10 @@ void AeHardwareInterfaces ( void); +void +AeGenericRegisters ( + void); + extern unsigned char Ssdt3Code[]; @@ -437,6 +441,41 @@ ExecuteOSI ( /****************************************************************************** * + * FUNCTION: AeGenericRegisters + * + * DESCRIPTION: Call the AcpiRead/Write interfaces. + * + *****************************************************************************/ + +ACPI_GENERIC_ADDRESS GenericRegister; + +void +AeGenericRegisters ( + void) +{ + ACPI_STATUS Status; + UINT64 Value; + + + GenericRegister.Address = 0x1234; + GenericRegister.BitWidth = 64; + GenericRegister.BitOffset = 0; + GenericRegister.SpaceId = ACPI_ADR_SPACE_SYSTEM_IO; + + Status = AcpiRead (&Value, &GenericRegister); + Status = AcpiWrite (Value, &GenericRegister); + + GenericRegister.Address = 0x12345678; + GenericRegister.BitOffset = 0; + GenericRegister.SpaceId = ACPI_ADR_SPACE_SYSTEM_MEMORY; + + Status = AcpiRead (&Value, &GenericRegister); + Status = AcpiWrite (Value, &GenericRegister); +} + + +/****************************************************************************** + * * FUNCTION: AeHardwareInterfaces * * DESCRIPTION: Call various hardware support interfaces @@ -487,6 +526,7 @@ AeMiscellaneousTests ( AeHardwareInterfaces (); + AeGenericRegisters (); AeSetupConfiguration (Ssdt3Code); AeTestBufferArgument(); |