utobject.c (99679) | utobject.c (107325) |
---|---|
1/****************************************************************************** 2 * 3 * Module Name: utobject - ACPI object create/delete/size/cache routines | 1/****************************************************************************** 2 * 3 * Module Name: utobject - ACPI object create/delete/size/cache routines |
4 * $Revision: 76 $ | 4 * $Revision: 79 $ |
5 * 6 *****************************************************************************/ 7 8/****************************************************************************** 9 * 10 * 1. Copyright Notice 11 * 12 * Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp. --- 164 unchanged lines hidden (view full) --- 177 178 SecondObject = AcpiUtAllocateObjectDescDbg (ModuleName, LineNumber, ComponentId); 179 if (!SecondObject) 180 { 181 AcpiUtDeleteObjectDesc (Object); 182 return_PTR (NULL); 183 } 184 | 5 * 6 *****************************************************************************/ 7 8/****************************************************************************** 9 * 10 * 1. Copyright Notice 11 * 12 * Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp. --- 164 unchanged lines hidden (view full) --- 177 178 SecondObject = AcpiUtAllocateObjectDescDbg (ModuleName, LineNumber, ComponentId); 179 if (!SecondObject) 180 { 181 AcpiUtDeleteObjectDesc (Object); 182 return_PTR (NULL); 183 } 184 |
185 SecondObject->Common.Type = INTERNAL_TYPE_EXTRA; | 185 SecondObject->Common.Type = ACPI_TYPE_LOCAL_EXTRA; |
186 SecondObject->Common.ReferenceCount = 1; 187 188 /* Link the second object to the first */ 189 190 Object->Common.NextObject = SecondObject; 191 break; 192 193 default: --- 12 unchanged lines hidden (view full) --- 206 /* Any per-type initialization should go here */ 207 208 return_PTR (Object); 209} 210 211 212/******************************************************************************* 213 * | 186 SecondObject->Common.ReferenceCount = 1; 187 188 /* Link the second object to the first */ 189 190 Object->Common.NextObject = SecondObject; 191 break; 192 193 default: --- 12 unchanged lines hidden (view full) --- 206 /* Any per-type initialization should go here */ 207 208 return_PTR (Object); 209} 210 211 212/******************************************************************************* 213 * |
214 * FUNCTION: AcpiUtCreateBufferObject 215 * 216 * PARAMETERS: BufferSize - Size of buffer to be created 217 * 218 * RETURN: Pointer to a new Buffer object 219 * 220 * DESCRIPTION: Create a fully initialized buffer object 221 * 222 ******************************************************************************/ 223 224ACPI_OPERAND_OBJECT * 225AcpiUtCreateBufferObject ( 226 ACPI_SIZE BufferSize) 227{ 228 ACPI_OPERAND_OBJECT *BufferDesc; 229 UINT8 *Buffer; 230 231 232 ACPI_FUNCTION_TRACE_U32 ("UtCreateBufferObject", BufferSize); 233 234 235 /* 236 * Create a new Buffer object 237 */ 238 BufferDesc = AcpiUtCreateInternalObject (ACPI_TYPE_BUFFER); 239 if (!BufferDesc) 240 { 241 return_PTR (NULL); 242 } 243 244 /* Allocate the actual buffer */ 245 246 Buffer = ACPI_MEM_CALLOCATE (BufferSize); 247 if (!Buffer) 248 { 249 ACPI_REPORT_ERROR (("CreateBuffer: could not allocate size %X\n", 250 (UINT32) BufferSize)); 251 AcpiUtRemoveReference (BufferDesc); 252 return_PTR (NULL); 253 } 254 255 /* Complete buffer object initialization */ 256 257 BufferDesc->Buffer.Flags |= AOPOBJ_DATA_VALID; 258 BufferDesc->Buffer.Pointer = Buffer; 259 BufferDesc->Buffer.Length = (UINT32) BufferSize; 260 261 /* Return the new buffer descriptor */ 262 263 return_PTR (BufferDesc); 264} 265 266 267/******************************************************************************* 268 * |
|
214 * FUNCTION: AcpiUtValidInternalObject 215 * 216 * PARAMETERS: Object - Object to be validated 217 * 218 * RETURN: Validate a pointer to be an ACPI_OPERAND_OBJECT 219 * 220 ******************************************************************************/ 221 --- 4 unchanged lines hidden (view full) --- 226 227 ACPI_FUNCTION_NAME ("UtValidInternalObject"); 228 229 230 /* Check for a null pointer */ 231 232 if (!Object) 233 { | 269 * FUNCTION: AcpiUtValidInternalObject 270 * 271 * PARAMETERS: Object - Object to be validated 272 * 273 * RETURN: Validate a pointer to be an ACPI_OPERAND_OBJECT 274 * 275 ******************************************************************************/ 276 --- 4 unchanged lines hidden (view full) --- 281 282 ACPI_FUNCTION_NAME ("UtValidInternalObject"); 283 284 285 /* Check for a null pointer */ 286 287 if (!Object) 288 { |
234 ACPI_DEBUG_PRINT ((ACPI_DB_INFO, 235 "**** Null Object Ptr\n")); | 289 ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "**** Null Object Ptr\n")); |
236 return (FALSE); 237 } 238 239 /* Check the descriptor type field */ 240 241 switch (ACPI_GET_DESCRIPTOR_TYPE (Object)) 242 { 243 case ACPI_DESC_TYPE_OPERAND: --- 9 unchanged lines hidden (view full) --- 253 break; 254 255 case ACPI_DESC_TYPE_PARSER: 256 257 ACPI_DEBUG_PRINT ((ACPI_DB_INFO, 258 "**** Obj %p is a parser obj, not ACPI obj\n", Object)); 259 break; 260 | 290 return (FALSE); 291 } 292 293 /* Check the descriptor type field */ 294 295 switch (ACPI_GET_DESCRIPTOR_TYPE (Object)) 296 { 297 case ACPI_DESC_TYPE_OPERAND: --- 9 unchanged lines hidden (view full) --- 307 break; 308 309 case ACPI_DESC_TYPE_PARSER: 310 311 ACPI_DEBUG_PRINT ((ACPI_DB_INFO, 312 "**** Obj %p is a parser obj, not ACPI obj\n", Object)); 313 break; 314 |
315 case ACPI_DESC_TYPE_CACHED: 316 317 ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, 318 "**** Obj %p has already been released to internal cache\n", Object)); 319 break; 320 |
|
261 default: 262 | 321 default: 322 |
263 ACPI_DEBUG_PRINT ((ACPI_DB_INFO, 264 "**** Obj %p is of unknown type\n", Object)); | 323 ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, 324 "**** Obj %p has unknown descriptor type %X\n", Object, 325 ACPI_GET_DESCRIPTOR_TYPE (Object))); |
265 break; 266 } 267 268 return (FALSE); 269} 270 271 272/******************************************************************************* --- 176 unchanged lines hidden (view full) --- 449 case ACPI_TYPE_POWER: 450 451 /* 452 * No extra data for these types 453 */ 454 break; 455 456 | 326 break; 327 } 328 329 return (FALSE); 330} 331 332 333/******************************************************************************* --- 176 unchanged lines hidden (view full) --- 510 case ACPI_TYPE_POWER: 511 512 /* 513 * No extra data for these types 514 */ 515 break; 516 517 |
457 case INTERNAL_TYPE_REFERENCE: | 518 case ACPI_TYPE_LOCAL_REFERENCE: |
458 459 switch (InternalObject->Reference.Opcode) 460 { 461 case AML_INT_NAMEPATH_OP: 462 463 /* 464 * Get the actual length of the full pathname to this object. 465 * The reference will be converted to the pathname to the object --- 195 unchanged lines hidden --- | 519 520 switch (InternalObject->Reference.Opcode) 521 { 522 case AML_INT_NAMEPATH_OP: 523 524 /* 525 * Get the actual length of the full pathname to this object. 526 * The reference will be converted to the pathname to the object --- 195 unchanged lines hidden --- |