Rev 1498 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1498 | Rev 2216 | ||
---|---|---|---|
Line 7... | Line 7... | ||
7 | 7 | ||
8 | /****************************************************************************** |
8 | /****************************************************************************** |
9 | * |
9 | * |
10 | * 1. Copyright Notice |
10 | * 1. Copyright Notice |
11 | * |
11 | * |
12 | * Some or all of this work - Copyright (c) 1999 - 2010, Intel Corp. |
12 | * Some or all of this work - Copyright (c) 1999 - 2011, Intel Corp. |
13 | * All rights reserved. |
13 | * All rights reserved. |
14 | * |
14 | * |
15 | * 2. License |
15 | * 2. License |
16 | * |
16 | * |
Line 137... | Line 137... | ||
137 | * |
137 | * |
138 | * RETURN: Status |
138 | * RETURN: Status |
139 | * |
139 | * |
140 | * DESCRIPTION: Install a handler for all OpRegions of a given SpaceId. |
140 | * DESCRIPTION: Install a handler for all OpRegions of a given SpaceId. |
141 | * |
141 | * |
- | 142 | * NOTE: This function should only be called after AcpiEnableSubsystem has |
|
- | 143 | * been called. This is because any _REG methods associated with the Space ID |
|
- | 144 | * are executed here, and these methods can only be safely executed after |
|
- | 145 | * the default handlers have been installed and the hardware has been |
|
- | 146 | * initialized (via AcpiEnableSubsystem.) |
|
- | 147 | * |
|
142 | ******************************************************************************/ |
148 | ******************************************************************************/ |
Line 143... | Line 149... | ||
143 | 149 | ||
144 | ACPI_STATUS |
150 | ACPI_STATUS |
145 | AcpiInstallAddressSpaceHandler ( |
151 | AcpiInstallAddressSpaceHandler ( |
Line 184... | Line 190... | ||
184 | if (ACPI_FAILURE (Status)) |
190 | if (ACPI_FAILURE (Status)) |
185 | { |
191 | { |
186 | goto UnlockAndExit; |
192 | goto UnlockAndExit; |
187 | } |
193 | } |
Line -... | Line 194... | ||
- | 194 | ||
- | 195 | /* |
|
- | 196 | * For the default SpaceIDs, (the IDs for which there are default region handlers |
|
- | 197 | * installed) Only execute the _REG methods if the global initialization _REG |
|
- | 198 | * methods have already been run (via AcpiInitializeObjects). In other words, |
|
- | 199 | * we will defer the execution of the _REG methods for these SpaceIDs until |
|
- | 200 | * execution of AcpiInitializeObjects. This is done because we need the handlers |
|
- | 201 | * for the default spaces (mem/io/pci/table) to be installed before we can run |
|
- | 202 | * any control methods (or _REG methods). There is known BIOS code that depends |
|
- | 203 | * on this. |
|
- | 204 | * |
|
- | 205 | * For all other SpaceIDs, we can safely execute the _REG methods immediately. |
|
- | 206 | * This means that for IDs like EmbeddedController, this function should be called |
|
- | 207 | * only after AcpiEnableSubsystem has been called. |
|
- | 208 | */ |
|
- | 209 | switch (SpaceId) |
|
- | 210 | { |
|
- | 211 | case ACPI_ADR_SPACE_SYSTEM_MEMORY: |
|
- | 212 | case ACPI_ADR_SPACE_SYSTEM_IO: |
|
- | 213 | case ACPI_ADR_SPACE_PCI_CONFIG: |
|
- | 214 | case ACPI_ADR_SPACE_DATA_TABLE: |
|
- | 215 | ||
- | 216 | if (!AcpiGbl_RegMethodsExecuted) |
|
- | 217 | { |
|
- | 218 | /* We will defer execution of the _REG methods for this space */ |
|
- | 219 | goto UnlockAndExit; |
|
- | 220 | } |
|
- | 221 | break; |
|
- | 222 | ||
- | 223 | default: |
|
- | 224 | break; |
|
- | 225 | } |
|
188 | 226 | ||
Line 189... | Line 227... | ||
189 | /* Run all _REG methods for this address space */ |
227 | /* Run all _REG methods for this address space */ |
Line -... | Line 228... | ||
- | 228 | ||
190 | 229 | Status = AcpiEvExecuteRegMethods (Node, SpaceId); |
|
191 | Status = AcpiEvExecuteRegMethods (Node, SpaceId); |
230 | |
192 | 231 | ||
193 | UnlockAndExit: |
232 | UnlockAndExit: |