diff options
author | Dana Myers <Dana.Myers@Sun.COM> | 2008-10-15 19:26:19 -0400 |
---|---|---|
committer | Dana Myers <Dana.Myers@Sun.COM> | 2008-10-15 19:26:19 -0400 |
commit | db2bae3047e71d795bde12e3baa621f4b6cc8930 (patch) | |
tree | 6f7ced35318bced4805171292ec76a5229f3e78a /usr/src/uts/intel/io/acpica/hardware/hwgpe.c | |
parent | 25351652d920ae27c5a56c199da581033ce763f6 (diff) | |
download | illumos-joyent-db2bae3047e71d795bde12e3baa621f4b6cc8930.tar.gz |
6464695 acpica: update to Intel ACPI CA 20080829
6747548 acpica: must check size of buffers returned from AcpiEvaluateObject()
--HG--
rename : usr/src/uts/intel/io/acpica/interpreter/dispatcher/dsfield.c => usr/src/uts/intel/io/acpica/dispatcher/dsfield.c
rename : usr/src/uts/intel/io/acpica/interpreter/dispatcher/dsinit.c => usr/src/uts/intel/io/acpica/dispatcher/dsinit.c
rename : usr/src/uts/intel/io/acpica/interpreter/dispatcher/dsmethod.c => usr/src/uts/intel/io/acpica/dispatcher/dsmethod.c
rename : usr/src/uts/intel/io/acpica/interpreter/dispatcher/dsmthdat.c => usr/src/uts/intel/io/acpica/dispatcher/dsmthdat.c
rename : usr/src/uts/intel/io/acpica/interpreter/dispatcher/dsobject.c => usr/src/uts/intel/io/acpica/dispatcher/dsobject.c
rename : usr/src/uts/intel/io/acpica/interpreter/dispatcher/dsopcode.c => usr/src/uts/intel/io/acpica/dispatcher/dsopcode.c
rename : usr/src/uts/intel/io/acpica/interpreter/dispatcher/dsutils.c => usr/src/uts/intel/io/acpica/dispatcher/dsutils.c
rename : usr/src/uts/intel/io/acpica/interpreter/dispatcher/dswexec.c => usr/src/uts/intel/io/acpica/dispatcher/dswexec.c
rename : usr/src/uts/intel/io/acpica/interpreter/dispatcher/dswload.c => usr/src/uts/intel/io/acpica/dispatcher/dswload.c
rename : usr/src/uts/intel/io/acpica/interpreter/dispatcher/dswscope.c => usr/src/uts/intel/io/acpica/dispatcher/dswscope.c
rename : usr/src/uts/intel/io/acpica/interpreter/dispatcher/dswstate.c => usr/src/uts/intel/io/acpica/dispatcher/dswstate.c
rename : usr/src/uts/intel/io/acpica/interpreter/executer/exconfig.c => usr/src/uts/intel/io/acpica/executer/exconfig.c
rename : usr/src/uts/intel/io/acpica/interpreter/executer/exconvrt.c => usr/src/uts/intel/io/acpica/executer/exconvrt.c
rename : usr/src/uts/intel/io/acpica/interpreter/executer/excreate.c => usr/src/uts/intel/io/acpica/executer/excreate.c
rename : usr/src/uts/intel/io/acpica/interpreter/executer/exdump.c => usr/src/uts/intel/io/acpica/executer/exdump.c
rename : usr/src/uts/intel/io/acpica/interpreter/executer/exfield.c => usr/src/uts/intel/io/acpica/executer/exfield.c
rename : usr/src/uts/intel/io/acpica/interpreter/executer/exfldio.c => usr/src/uts/intel/io/acpica/executer/exfldio.c
rename : usr/src/uts/intel/io/acpica/interpreter/executer/exmisc.c => usr/src/uts/intel/io/acpica/executer/exmisc.c
rename : usr/src/uts/intel/io/acpica/interpreter/executer/exmutex.c => usr/src/uts/intel/io/acpica/executer/exmutex.c
rename : usr/src/uts/intel/io/acpica/interpreter/executer/exnames.c => usr/src/uts/intel/io/acpica/executer/exnames.c
rename : usr/src/uts/intel/io/acpica/interpreter/executer/exoparg1.c => usr/src/uts/intel/io/acpica/executer/exoparg1.c
rename : usr/src/uts/intel/io/acpica/interpreter/executer/exoparg2.c => usr/src/uts/intel/io/acpica/executer/exoparg2.c
rename : usr/src/uts/intel/io/acpica/interpreter/executer/exoparg3.c => usr/src/uts/intel/io/acpica/executer/exoparg3.c
rename : usr/src/uts/intel/io/acpica/interpreter/executer/exoparg6.c => usr/src/uts/intel/io/acpica/executer/exoparg6.c
rename : usr/src/uts/intel/io/acpica/interpreter/executer/exprep.c => usr/src/uts/intel/io/acpica/executer/exprep.c
rename : usr/src/uts/intel/io/acpica/interpreter/executer/exregion.c => usr/src/uts/intel/io/acpica/executer/exregion.c
rename : usr/src/uts/intel/io/acpica/interpreter/executer/exresnte.c => usr/src/uts/intel/io/acpica/executer/exresnte.c
rename : usr/src/uts/intel/io/acpica/interpreter/executer/exresolv.c => usr/src/uts/intel/io/acpica/executer/exresolv.c
rename : usr/src/uts/intel/io/acpica/interpreter/executer/exresop.c => usr/src/uts/intel/io/acpica/executer/exresop.c
rename : usr/src/uts/intel/io/acpica/interpreter/executer/exstore.c => usr/src/uts/intel/io/acpica/executer/exstore.c
rename : usr/src/uts/intel/io/acpica/interpreter/executer/exstoren.c => usr/src/uts/intel/io/acpica/executer/exstoren.c
rename : usr/src/uts/intel/io/acpica/interpreter/executer/exstorob.c => usr/src/uts/intel/io/acpica/executer/exstorob.c
rename : usr/src/uts/intel/io/acpica/interpreter/executer/exsystem.c => usr/src/uts/intel/io/acpica/executer/exsystem.c
rename : usr/src/uts/intel/io/acpica/interpreter/executer/exutils.c => usr/src/uts/intel/io/acpica/executer/exutils.c
rename : usr/src/uts/intel/io/acpica/interpreter/parser/psargs.c => usr/src/uts/intel/io/acpica/parser/psargs.c
rename : usr/src/uts/intel/io/acpica/interpreter/parser/psloop.c => usr/src/uts/intel/io/acpica/parser/psloop.c
rename : usr/src/uts/intel/io/acpica/interpreter/parser/psopcode.c => usr/src/uts/intel/io/acpica/parser/psopcode.c
rename : usr/src/uts/intel/io/acpica/interpreter/parser/psparse.c => usr/src/uts/intel/io/acpica/parser/psparse.c
rename : usr/src/uts/intel/io/acpica/interpreter/parser/psscope.c => usr/src/uts/intel/io/acpica/parser/psscope.c
rename : usr/src/uts/intel/io/acpica/interpreter/parser/pstree.c => usr/src/uts/intel/io/acpica/parser/pstree.c
rename : usr/src/uts/intel/io/acpica/interpreter/parser/psutils.c => usr/src/uts/intel/io/acpica/parser/psutils.c
rename : usr/src/uts/intel/io/acpica/interpreter/parser/pswalk.c => usr/src/uts/intel/io/acpica/parser/pswalk.c
rename : usr/src/uts/intel/io/acpica/interpreter/parser/psxface.c => usr/src/uts/intel/io/acpica/parser/psxface.c
Diffstat (limited to 'usr/src/uts/intel/io/acpica/hardware/hwgpe.c')
-rw-r--r-- | usr/src/uts/intel/io/acpica/hardware/hwgpe.c | 67 |
1 files changed, 63 insertions, 4 deletions
diff --git a/usr/src/uts/intel/io/acpica/hardware/hwgpe.c b/usr/src/uts/intel/io/acpica/hardware/hwgpe.c index a9da5e29ac..473c1d62da 100644 --- a/usr/src/uts/intel/io/acpica/hardware/hwgpe.c +++ b/usr/src/uts/intel/io/acpica/hardware/hwgpe.c @@ -2,7 +2,7 @@ /****************************************************************************** * * Module Name: hwgpe - Low level GPE enable/disable/clear functions - * $Revision: 1.73 $ + * $Revision: 1.76 $ * *****************************************************************************/ @@ -10,7 +10,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp. * All rights reserved. * * 2. License @@ -129,6 +129,60 @@ AcpiHwEnableWakeupGpeBlock ( ACPI_GPE_BLOCK_INFO *GpeBlock); + +/****************************************************************************** + * + * FUNCTION: AcpiHwLowDisableGpe + * + * PARAMETERS: GpeEventInfo - Info block for the GPE to be disabled + * + * RETURN: Status + * + * DESCRIPTION: Disable a single GPE in the enable register. + * + ******************************************************************************/ + +ACPI_STATUS +AcpiHwLowDisableGpe ( + ACPI_GPE_EVENT_INFO *GpeEventInfo) +{ + ACPI_GPE_REGISTER_INFO *GpeRegisterInfo; + ACPI_STATUS Status; + UINT32 EnableMask; + + + /* Get the info block for the entire GPE register */ + + GpeRegisterInfo = GpeEventInfo->RegisterInfo; + if (!GpeRegisterInfo) + { + return (AE_NOT_EXIST); + } + + /* Get current value of the enable register that contains this GPE */ + + Status = AcpiHwLowLevelRead (ACPI_GPE_REGISTER_WIDTH, &EnableMask, + &GpeRegisterInfo->EnableAddress); + if (ACPI_FAILURE (Status)) + { + return (Status); + } + + /* Clear just the bit that corresponds to this GPE */ + + ACPI_CLEAR_BIT (EnableMask, + ((UINT32) 1 << (GpeEventInfo->GpeNumber - GpeRegisterInfo->BaseGpeNumber))); + + + /* Write the updated enable mask */ + + Status = AcpiHwLowLevelWrite (ACPI_GPE_REGISTER_WIDTH, EnableMask, + &GpeRegisterInfo->EnableAddress); + + return (Status); +} + + /****************************************************************************** * * FUNCTION: AcpiHwWriteGpeEnableReg @@ -188,16 +242,20 @@ AcpiHwClearGpe ( ACPI_GPE_EVENT_INFO *GpeEventInfo) { ACPI_STATUS Status; + UINT8 RegisterBit; ACPI_FUNCTION_ENTRY (); + RegisterBit = (UINT8) + (1 << (GpeEventInfo->GpeNumber - GpeEventInfo->RegisterInfo->BaseGpeNumber)); + /* * Write a one to the appropriate bit in the status register to * clear this GPE. */ - Status = AcpiHwLowLevelWrite (8, GpeEventInfo->RegisterBit, + Status = AcpiHwLowLevelWrite (8, RegisterBit, &GpeEventInfo->RegisterInfo->StatusAddress); return (Status); @@ -243,7 +301,8 @@ AcpiHwGetGpeStatus ( /* Get the register bitmask for this GPE */ - RegisterBit = GpeEventInfo->RegisterBit; + RegisterBit = (UINT8) + (1 << (GpeEventInfo->GpeNumber - GpeEventInfo->RegisterInfo->BaseGpeNumber)); /* GPE currently enabled? (enabled for runtime?) */ |