nsaccess.c (126372) | nsaccess.c (127175) |
---|---|
1/******************************************************************************* 2 * 3 * Module Name: nsaccess - Top-level functions for accessing ACPI namespace | 1/******************************************************************************* 2 * 3 * Module Name: nsaccess - Top-level functions for accessing ACPI namespace |
4 * $Revision: 177 $ | 4 * $Revision: 179 $ |
5 * 6 ******************************************************************************/ 7 8/****************************************************************************** 9 * 10 * 1. Copyright Notice 11 * 12 * Some or all of this work - Copyright (c) 1999 - 2004, Intel Corp. --- 164 unchanged lines hidden (view full) --- 177 178 /* Enter the pre-defined names in the name table */ 179 180 ACPI_DEBUG_PRINT ((ACPI_DB_INFO, 181 "Entering predefined entries into namespace\n")); 182 183 for (InitVal = AcpiGbl_PreDefinedNames; InitVal->Name; InitVal++) 184 { | 5 * 6 ******************************************************************************/ 7 8/****************************************************************************** 9 * 10 * 1. Copyright Notice 11 * 12 * Some or all of this work - Copyright (c) 1999 - 2004, Intel Corp. --- 164 unchanged lines hidden (view full) --- 177 178 /* Enter the pre-defined names in the name table */ 179 180 ACPI_DEBUG_PRINT ((ACPI_DB_INFO, 181 "Entering predefined entries into namespace\n")); 182 183 for (InitVal = AcpiGbl_PreDefinedNames; InitVal->Name; InitVal++) 184 { |
185 /* _OSI is optional for now, will be permanent later */ 186 187 if (!ACPI_STRCMP (InitVal->Name, "_OSI") && !AcpiGbl_CreateOsiMethod) 188 { 189 continue; 190 } 191 |
|
185 Status = AcpiNsLookup (NULL, InitVal->Name, InitVal->Type, | 192 Status = AcpiNsLookup (NULL, InitVal->Name, InitVal->Type, |
186 ACPI_IMODE_LOAD_PASS2, ACPI_NS_NO_UPSEARCH, NULL, &NewNode); | 193 ACPI_IMODE_LOAD_PASS2, ACPI_NS_NO_UPSEARCH, 194 NULL, &NewNode); |
187 188 if (ACPI_FAILURE (Status) || (!NewNode)) /* Must be on same line for code converter */ 189 { 190 ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, 191 "Could not create predefined name %s, %s\n", 192 InitVal->Name, AcpiFormatException (Status))); 193 } 194 195 /* 196 * Name entered successfully. 197 * If entry in PreDefinedNames[] specifies an 198 * initial value, create the initial value. 199 */ 200 if (InitVal->Val) 201 { 202 Status = AcpiOsPredefinedOverride (InitVal, &Val); 203 if (ACPI_FAILURE (Status)) 204 { | 195 196 if (ACPI_FAILURE (Status) || (!NewNode)) /* Must be on same line for code converter */ 197 { 198 ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, 199 "Could not create predefined name %s, %s\n", 200 InitVal->Name, AcpiFormatException (Status))); 201 } 202 203 /* 204 * Name entered successfully. 205 * If entry in PreDefinedNames[] specifies an 206 * initial value, create the initial value. 207 */ 208 if (InitVal->Val) 209 { 210 Status = AcpiOsPredefinedOverride (InitVal, &Val); 211 if (ACPI_FAILURE (Status)) 212 { |
205 ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "Could not override predefined %s\n", | 213 ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, 214 "Could not override predefined %s\n", |
206 InitVal->Name)); 207 } 208 209 if (!Val) 210 { 211 Val = InitVal->Val; 212 } 213 --- 11 unchanged lines hidden (view full) --- 225 /* 226 * Convert value string from table entry to 227 * internal representation. Only types actually 228 * used for initial values are implemented here. 229 */ 230 switch (InitVal->Type) 231 { 232 case ACPI_TYPE_METHOD: | 215 InitVal->Name)); 216 } 217 218 if (!Val) 219 { 220 Val = InitVal->Val; 221 } 222 --- 11 unchanged lines hidden (view full) --- 234 /* 235 * Convert value string from table entry to 236 * internal representation. Only types actually 237 * used for initial values are implemented here. 238 */ 239 switch (InitVal->Type) 240 { 241 case ACPI_TYPE_METHOD: |
233 ObjDesc->Method.ParamCount = 234 (UINT8) ACPI_STRTOUL (Val, NULL, 10); | 242 ObjDesc->Method.ParamCount = (UINT8) ACPI_STRTOUL 243 (Val, NULL, 10); |
235 ObjDesc->Common.Flags |= AOPOBJ_DATA_VALID; 236 | 244 ObjDesc->Common.Flags |= AOPOBJ_DATA_VALID; 245 |
237#if defined (ACPI_NO_METHOD_EXECUTION) || defined (ACPI_CONSTANT_EVAL_ONLY) | 246#if defined (_ACPI_ASL_COMPILER) || defined (_ACPI_DUMP_APP) |
238 | 247 |
239 /* Compiler cheats by putting parameter count in the OwnerID */ | 248 /* iASL Compiler cheats by putting parameter count in the OwnerID */ |
240 241 NewNode->OwnerId = ObjDesc->Method.ParamCount; | 249 250 NewNode->OwnerId = ObjDesc->Method.ParamCount; |
251#else 252 /* Mark this as a very SPECIAL method */ 253 254 ObjDesc->Method.MethodFlags = AML_METHOD_INTERNAL_ONLY; 255 ObjDesc->Method.Implementation = AcpiUtOsiImplementation; |
|
242#endif 243 break; 244 245 case ACPI_TYPE_INTEGER: 246 247 ObjDesc->Integer.Value = 248 (ACPI_INTEGER) ACPI_STRTOUL (Val, NULL, 10); 249 break; --- 8 unchanged lines hidden (view full) --- 258 ObjDesc->String.Pointer = Val; 259 ObjDesc->Common.Flags |= AOPOBJ_STATIC_POINTER; 260 break; 261 262 263 case ACPI_TYPE_MUTEX: 264 265 ObjDesc->Mutex.Node = NewNode; | 256#endif 257 break; 258 259 case ACPI_TYPE_INTEGER: 260 261 ObjDesc->Integer.Value = 262 (ACPI_INTEGER) ACPI_STRTOUL (Val, NULL, 10); 263 break; --- 8 unchanged lines hidden (view full) --- 272 ObjDesc->String.Pointer = Val; 273 ObjDesc->Common.Flags |= AOPOBJ_STATIC_POINTER; 274 break; 275 276 277 case ACPI_TYPE_MUTEX: 278 279 ObjDesc->Mutex.Node = NewNode; |
266 ObjDesc->Mutex.SyncLevel = 267 (UINT16) ACPI_STRTOUL (Val, NULL, 10); | 280 ObjDesc->Mutex.SyncLevel = (UINT16) ACPI_STRTOUL 281 (Val, NULL, 10); |
268 269 if (ACPI_STRCMP (InitVal->Name, "_GL_") == 0) 270 { 271 /* 272 * Create a counting semaphore for the 273 * global lock 274 */ 275 Status = AcpiOsCreateSemaphore (ACPI_NO_UNIT_LIMIT, --- 19 unchanged lines hidden (view full) --- 295 { 296 goto UnlockAndExit; 297 } 298 } 299 break; 300 301 302 default: | 282 283 if (ACPI_STRCMP (InitVal->Name, "_GL_") == 0) 284 { 285 /* 286 * Create a counting semaphore for the 287 * global lock 288 */ 289 Status = AcpiOsCreateSemaphore (ACPI_NO_UNIT_LIMIT, --- 19 unchanged lines hidden (view full) --- 309 { 310 goto UnlockAndExit; 311 } 312 } 313 break; 314 315 316 default: |
317 |
|
303 ACPI_REPORT_ERROR (("Unsupported initial type value %X\n", 304 InitVal->Type)); 305 AcpiUtRemoveReference (ObjDesc); 306 ObjDesc = NULL; 307 continue; 308 } 309 310 /* Store pointer to value descriptor in the Node */ --- 413 unchanged lines hidden --- | 318 ACPI_REPORT_ERROR (("Unsupported initial type value %X\n", 319 InitVal->Type)); 320 AcpiUtRemoveReference (ObjDesc); 321 ObjDesc = NULL; 322 continue; 323 } 324 325 /* Store pointer to value descriptor in the Node */ --- 413 unchanged lines hidden --- |