Subversion Repositories Kolibri OS

Compare Revisions

Regard whitespace Rev 2215 → Rev 2216

/drivers/devman/acpica/events/evxfregn.c
9,7 → 9,7
*
* 1. Copyright Notice
*
* Some or all of this work - Copyright (c) 1999 - 2010, Intel Corp.
* Some or all of this work - Copyright (c) 1999 - 2011, Intel Corp.
* All rights reserved.
*
* 2. License
139,6 → 139,12
*
* DESCRIPTION: Install a handler for all OpRegions of a given SpaceId.
*
* NOTE: This function should only be called after AcpiEnableSubsystem has
* been called. This is because any _REG methods associated with the Space ID
* are executed here, and these methods can only be safely executed after
* the default handlers have been installed and the hardware has been
* initialized (via AcpiEnableSubsystem.)
*
******************************************************************************/
 
ACPI_STATUS
186,10 → 192,43
goto UnlockAndExit;
}
 
/*
* For the default SpaceIDs, (the IDs for which there are default region handlers
* installed) Only execute the _REG methods if the global initialization _REG
* methods have already been run (via AcpiInitializeObjects). In other words,
* we will defer the execution of the _REG methods for these SpaceIDs until
* execution of AcpiInitializeObjects. This is done because we need the handlers
* for the default spaces (mem/io/pci/table) to be installed before we can run
* any control methods (or _REG methods). There is known BIOS code that depends
* on this.
*
* For all other SpaceIDs, we can safely execute the _REG methods immediately.
* This means that for IDs like EmbeddedController, this function should be called
* only after AcpiEnableSubsystem has been called.
*/
switch (SpaceId)
{
case ACPI_ADR_SPACE_SYSTEM_MEMORY:
case ACPI_ADR_SPACE_SYSTEM_IO:
case ACPI_ADR_SPACE_PCI_CONFIG:
case ACPI_ADR_SPACE_DATA_TABLE:
 
if (!AcpiGbl_RegMethodsExecuted)
{
/* We will defer execution of the _REG methods for this space */
goto UnlockAndExit;
}
break;
 
default:
break;
}
 
/* Run all _REG methods for this address space */
 
Status = AcpiEvExecuteRegMethods (Node, SpaceId);
 
 
UnlockAndExit:
(void) AcpiUtReleaseMutex (ACPI_MTX_NAMESPACE);
return_ACPI_STATUS (Status);