Deleted Added
sdiff udiff text old ( 241973 ) new ( 243347 )
full compact
1/*******************************************************************************
2 *
3 * Module Name: dmresrc.c - Resource Descriptor disassembly
4 *
5 ******************************************************************************/
6
7/*
8 * Copyright (C) 2000 - 2012, Intel Corp.

--- 265 unchanged lines hidden (view full) ---

274
275 /* Get the descriptor type and length */
276
277 ResourceType = AcpiUtGetResourceType (Aml);
278 ResourceLength = AcpiUtGetResourceLength (Aml);
279
280 /* Validate the Resource Type and Resource Length */
281
282 Status = AcpiUtValidateResource (Aml, &ResourceIndex);
283 if (ACPI_FAILURE (Status))
284 {
285 AcpiOsPrintf ("/*** Could not validate Resource, type (%X) %s***/\n",
286 ResourceType, AcpiFormatException (Status));
287 return;
288 }
289
290 /* Point to next descriptor */

--- 70 unchanged lines hidden (view full) ---

361 }
362}
363
364
365/*******************************************************************************
366 *
367 * FUNCTION: AcpiDmIsResourceTemplate
368 *
369 * PARAMETERS: Op - Buffer Op to be examined
370 *
371 * RETURN: Status. AE_OK if valid template
372 *
373 * DESCRIPTION: Walk a byte list to determine if it consists of a valid set
374 * of resource descriptors. Nothing is output.
375 *
376 ******************************************************************************/
377
378ACPI_STATUS
379AcpiDmIsResourceTemplate (
380 ACPI_PARSE_OBJECT *Op)
381{
382 ACPI_STATUS Status;
383 ACPI_PARSE_OBJECT *NextOp;
384 UINT8 *Aml;
385 UINT8 *EndAml;
386 ACPI_SIZE Length;
387
388
389 /* This op must be a buffer */
390
391 if (Op->Common.AmlOpcode != AML_BUFFER_OP)
392 {
393 return (AE_TYPE);
394 }
395
396 /* Get the ByteData list and length */
397
398 NextOp = Op->Common.Value.Arg;
399 NextOp = NextOp->Common.Next;
400 if (!NextOp)
401 {
402 return (AE_TYPE);
403 }
404
405 Aml = NextOp->Named.Data;
406 Length = (ACPI_SIZE) NextOp->Common.Value.Integer;
407
408 /* Walk the byte list, abort on any invalid descriptor type or length */
409
410 Status = AcpiUtWalkAmlResources (Aml, Length, NULL, &EndAml);
411 if (ACPI_FAILURE (Status))
412 {
413 return (AE_TYPE);
414 }
415
416 /*
417 * For the resource template to be valid, one EndTag must appear
418 * at the very end of the ByteList, not before. (For proper disassembly

--- 16 unchanged lines hidden ---