diff options
Diffstat (limited to 'sys/contrib/dev/acpica/Subsystem/Events')
8 files changed, 55 insertions, 43 deletions
diff --git a/sys/contrib/dev/acpica/Subsystem/Events/evevent.c b/sys/contrib/dev/acpica/Subsystem/Events/evevent.c index 2e836c0..ecd2c4c 100644 --- a/sys/contrib/dev/acpica/Subsystem/Events/evevent.c +++ b/sys/contrib/dev/acpica/Subsystem/Events/evevent.c @@ -2,7 +2,7 @@ * * Module Name: evevent - Fixed and General Purpose AcpiEvent * handling and dispatch - * $Revision: 30 $ + * $Revision: 32 $ * *****************************************************************************/ @@ -10,8 +10,8 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999, Intel Corp. All rights - * reserved. + * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp. + * All rights reserved. * * 2. License * @@ -504,10 +504,10 @@ AcpiEvGpeInitialize (void) for (i = 0; i < Gpe0RegisterCount; i++) { AcpiGbl_GpeRegisters[RegisterIndex].StatusAddr = - (UINT16) (AcpiGbl_FADT->XGpe0Blk.Address + i); + (UINT16) (ACPI_GET_ADDRESS (AcpiGbl_FADT->XGpe0Blk.Address) + i); AcpiGbl_GpeRegisters[RegisterIndex].EnableAddr = - (UINT16) (AcpiGbl_FADT->XGpe0Blk.Address + i + Gpe0RegisterCount); + (UINT16) (ACPI_GET_ADDRESS (AcpiGbl_FADT->XGpe0Blk.Address) + i + Gpe0RegisterCount); AcpiGbl_GpeRegisters[RegisterIndex].GpeBase = (UINT8) MUL_8 (i); @@ -533,10 +533,10 @@ AcpiEvGpeInitialize (void) for (i = 0; i < Gpe1RegisterCount; i++) { AcpiGbl_GpeRegisters[RegisterIndex].StatusAddr = - (UINT16) (AcpiGbl_FADT->XGpe1Blk.Address + i); + (UINT16) (ACPI_GET_ADDRESS (AcpiGbl_FADT->XGpe1Blk.Address) + i); AcpiGbl_GpeRegisters[RegisterIndex].EnableAddr = - (UINT16) (AcpiGbl_FADT->XGpe1Blk.Address + i + Gpe1RegisterCount); + (UINT16) (ACPI_GET_ADDRESS (AcpiGbl_FADT->XGpe1Blk.Address) + i + Gpe1RegisterCount); AcpiGbl_GpeRegisters[RegisterIndex].GpeBase = (UINT8) (AcpiGbl_FADT->Gpe1Base + MUL_8 (i)); @@ -812,8 +812,8 @@ AcpiEvAsynchExecuteGpeMethod ( FUNCTION_TRACE ("EvAsynchExecuteGpeMethod"); - /* - * Take a snapshot of the GPE info for this level + /* + * Take a snapshot of the GPE info for this level */ AcpiCmAcquireMutex (ACPI_MTX_EVENTS); GpeInfo = AcpiGbl_GpeInfo [GpeNumber]; @@ -877,9 +877,9 @@ AcpiEvGpeDispatch ( /*DEBUG_INCREMENT_EVENT_COUNT (EVENT_GENERAL);*/ - /* + /* * Valid GPE number? - */ + */ if (AcpiGbl_GpeValid[GpeNumber] == ACPI_GPE_INVALID) { DEBUG_PRINT (ACPI_ERROR, ("Invalid GPE bit [%X].\n", GpeNumber)); @@ -899,7 +899,7 @@ AcpiEvGpeDispatch ( * If edge-triggered, clear the GPE status bit now. Note that * level-triggered events are cleared after the GPE is serviced. */ - if (GpeInfo.Type & ACPI_EVENT_EDGE_TRIGGERED) + if (GpeInfo.Type & ACPI_EVENT_EDGE_TRIGGERED) { AcpiHwClearGpe (GpeNumber); } @@ -907,13 +907,13 @@ AcpiEvGpeDispatch ( /* * Function Handler (e.g. EC)? */ - if (GpeInfo.Handler) + if (GpeInfo.Handler) { /* Invoke function handler (at interrupt level). */ GpeInfo.Handler (GpeInfo.Context); /* Level-Triggered? */ - if (GpeInfo.Type & ACPI_EVENT_LEVEL_TRIGGERED) + if (GpeInfo.Type & ACPI_EVENT_LEVEL_TRIGGERED) { AcpiHwClearGpe (GpeNumber); } @@ -926,7 +926,7 @@ AcpiEvGpeDispatch ( */ else if (GpeInfo.MethodHandle) { - if (ACPI_FAILURE(AcpiOsQueueForExecution (OSD_PRIORITY_GPE, + if (ACPI_FAILURE(AcpiOsQueueForExecution (OSD_PRIORITY_GPE, AcpiEvAsynchExecuteGpeMethod, (void*)(NATIVE_UINT)GpeNumber))) { /* @@ -940,12 +940,12 @@ AcpiEvGpeDispatch ( /* * No Handler? Report an error and leave the GPE disabled. */ - else + else { REPORT_ERROR (("AcpiEvGpeDispatch: No installed handler for GPE [%X]\n", GpeNumber)); /* Level-Triggered? */ - if (GpeInfo.Type & ACPI_EVENT_LEVEL_TRIGGERED) + if (GpeInfo.Type & ACPI_EVENT_LEVEL_TRIGGERED) { AcpiHwClearGpe (GpeNumber); } diff --git a/sys/contrib/dev/acpica/Subsystem/Events/evmisc.c b/sys/contrib/dev/acpica/Subsystem/Events/evmisc.c index 0ecb991..4c7c0ab 100644 --- a/sys/contrib/dev/acpica/Subsystem/Events/evmisc.c +++ b/sys/contrib/dev/acpica/Subsystem/Events/evmisc.c @@ -2,7 +2,7 @@ * * Module Name: evmisc - ACPI device notification handler dispatch * and ACPI Global Lock support - * $Revision: 20 $ + * $Revision: 21 $ * *****************************************************************************/ @@ -10,8 +10,8 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999, Intel Corp. All rights - * reserved. + * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp. + * All rights reserved. * * 2. License * diff --git a/sys/contrib/dev/acpica/Subsystem/Events/evregion.c b/sys/contrib/dev/acpica/Subsystem/Events/evregion.c index 0039c070..42732ef 100644 --- a/sys/contrib/dev/acpica/Subsystem/Events/evregion.c +++ b/sys/contrib/dev/acpica/Subsystem/Events/evregion.c @@ -1,7 +1,7 @@ /****************************************************************************** * * Module Name: evregion - ACPI AddressSpace (OpRegion) handler dispatch - * $Revision: 90 $ + * $Revision: 93 $ * *****************************************************************************/ @@ -9,8 +9,8 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999, Intel Corp. All rights - * reserved. + * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp. + * All rights reserved. * * 2. License * @@ -418,8 +418,8 @@ AcpiEvAddressSpaceDispatch ( * * FUNCTION: AcpiEvDisassociateRegionFromHandler * - * PARAMETERS: HandlerObj - Handler Object - * RegionObj - Region Object + * PARAMETERS: RegionObj - Region Object + * AcpiNsIsLocked - Namespace Region Already Locked? * * RETURN: None * @@ -430,7 +430,8 @@ AcpiEvAddressSpaceDispatch ( void AcpiEvDisassociateRegionFromHandler( - ACPI_OPERAND_OBJECT *RegionObj) + ACPI_OPERAND_OBJECT *RegionObj, + BOOLEAN AcpiNsIsLocked) { ACPI_OPERAND_OBJECT *HandlerObj; ACPI_OPERAND_OBJECT *ObjDesc; @@ -481,11 +482,21 @@ AcpiEvDisassociateRegionFromHandler( *LastObjPtr = ObjDesc->Region.Next; ObjDesc->Region.Next = NULL; /* Must clear field */ + if (AcpiNsIsLocked) + { + AcpiCmReleaseMutex (ACPI_MTX_NAMESPACE); + } + /* * Now stop region accesses by executing the _REG method */ AcpiEvExecuteRegMethod (RegionObj, 0); + if (AcpiNsIsLocked) + { + AcpiCmAcquireMutex (ACPI_MTX_NAMESPACE); + } + /* * Call the setup handler with the deactivate notification */ @@ -548,6 +559,7 @@ AcpiEvDisassociateRegionFromHandler( * * PARAMETERS: HandlerObj - Handler Object * RegionObj - Region Object + * AcpiNsIsLocked - Namespace Region Already Locked? * * RETURN: None * @@ -752,7 +764,7 @@ AcpiEvAddrHandlerHelper ( * * First disconnect region for any previous handler (if any) */ - AcpiEvDisassociateRegionFromHandler (ObjDesc); + AcpiEvDisassociateRegionFromHandler (ObjDesc, FALSE); /* * Then connect the region to the new handler diff --git a/sys/contrib/dev/acpica/Subsystem/Events/evrgnini.c b/sys/contrib/dev/acpica/Subsystem/Events/evrgnini.c index c344b9f..390cddb 100644 --- a/sys/contrib/dev/acpica/Subsystem/Events/evrgnini.c +++ b/sys/contrib/dev/acpica/Subsystem/Events/evrgnini.c @@ -1,7 +1,7 @@ /****************************************************************************** * * Module Name: evrgnini- ACPI AddressSpace (OpRegion) init - * $Revision: 31 $ + * $Revision: 32 $ * *****************************************************************************/ @@ -9,8 +9,8 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999, Intel Corp. All rights - * reserved. + * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp. + * All rights reserved. * * 2. License * diff --git a/sys/contrib/dev/acpica/Subsystem/Events/evsci.c b/sys/contrib/dev/acpica/Subsystem/Events/evsci.c index f2e1549..2c877a3 100644 --- a/sys/contrib/dev/acpica/Subsystem/Events/evsci.c +++ b/sys/contrib/dev/acpica/Subsystem/Events/evsci.c @@ -2,7 +2,7 @@ * * Module Name: evsci - System Control Interrupt configuration and * legacy to ACPI mode state transition functions - * $Revision: 67 $ + * $Revision: 68 $ * ******************************************************************************/ @@ -10,8 +10,8 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999, Intel Corp. All rights - * reserved. + * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp. + * All rights reserved. * * 2. License * diff --git a/sys/contrib/dev/acpica/Subsystem/Events/evxface.c b/sys/contrib/dev/acpica/Subsystem/Events/evxface.c index df51333..f795f18 100644 --- a/sys/contrib/dev/acpica/Subsystem/Events/evxface.c +++ b/sys/contrib/dev/acpica/Subsystem/Events/evxface.c @@ -1,7 +1,7 @@ /****************************************************************************** * * Module Name: evxface - External interfaces for ACPI events - * $Revision: 97 $ + * $Revision: 98 $ * *****************************************************************************/ @@ -9,8 +9,8 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999, Intel Corp. All rights - * reserved. + * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp. + * All rights reserved. * * 2. License * diff --git a/sys/contrib/dev/acpica/Subsystem/Events/evxfevnt.c b/sys/contrib/dev/acpica/Subsystem/Events/evxfevnt.c index 2c38dcb..b5d60ba 100644 --- a/sys/contrib/dev/acpica/Subsystem/Events/evxfevnt.c +++ b/sys/contrib/dev/acpica/Subsystem/Events/evxfevnt.c @@ -1,7 +1,7 @@ /****************************************************************************** * * Module Name: evxfevnt - External Interfaces, ACPI event disable/enable - * $Revision: 26 $ + * $Revision: 27 $ * *****************************************************************************/ @@ -9,8 +9,8 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999, Intel Corp. All rights - * reserved. + * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp. + * All rights reserved. * * 2. License * diff --git a/sys/contrib/dev/acpica/Subsystem/Events/evxfregn.c b/sys/contrib/dev/acpica/Subsystem/Events/evxfregn.c index 4f4b089..0d7b1f3 100644 --- a/sys/contrib/dev/acpica/Subsystem/Events/evxfregn.c +++ b/sys/contrib/dev/acpica/Subsystem/Events/evxfregn.c @@ -2,7 +2,7 @@ * * Module Name: evxfregn - External Interfaces, ACPI Operation Regions and * Address Spaces. - * $Revision: 24 $ + * $Revision: 26 $ * *****************************************************************************/ @@ -10,8 +10,8 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999, Intel Corp. All rights - * reserved. + * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp. + * All rights reserved. * * 2. License * @@ -464,7 +464,7 @@ AcpiRemoveAddressSpaceHandler ( * The region is just inaccessible as indicated to * the _REG method */ - AcpiEvDisassociateRegionFromHandler(RegionObj); + AcpiEvDisassociateRegionFromHandler(RegionObj, FALSE); /* * Walk the list, since we took the first region and it |