1/******************************************************************************* 2 * 3 * Module Name: nsaccess - Top-level functions for accessing ACPI namespace |
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 { |
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 |
192 Status = AcpiNsLookup (NULL, InitVal->Name, InitVal->Type, |
193 ACPI_IMODE_LOAD_PASS2, ACPI_NS_NO_UPSEARCH, 194 NULL, &NewNode); |
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 { |
213 ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, 214 "Could not override predefined %s\n", |
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: |
242 ObjDesc->Method.ParamCount = (UINT8) ACPI_STRTOUL 243 (Val, NULL, 10); |
244 ObjDesc->Common.Flags |= AOPOBJ_DATA_VALID; 245 |
246#if defined (_ACPI_ASL_COMPILER) || defined (_ACPI_DUMP_APP) |
247 |
248 /* iASL Compiler cheats by putting parameter count in the OwnerID */ |
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; |
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; |
280 ObjDesc->Mutex.SyncLevel = (UINT16) ACPI_STRTOUL 281 (Val, NULL, 10); |
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 |
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 --- |