TianoCore EDK2 master
Loading...
Searching...
No Matches
AmlResourceDataParser.h File Reference

Go to the source code of this file.

Functions

BOOLEAN EFIAPI AmlRdIsResourceDataBuffer (IN CONST AML_STREAM *FStream)
 
EFI_STATUS EFIAPI AmlParseResourceData (IN AML_OBJECT_NODE *BufferNode, IN AML_STREAM *FStream)
 

Detailed Description

AML Resource Data Parser.

Copyright (c) 2019 - 2020, Arm Limited. All rights reserved.

SPDX-License-Identifier: BSD-2-Clause-Patent

Glossary:
  • Rd or RD - Resource Data
  • Rds or RDS - Resource Data Small
  • Rdl or RDL - Resource Data Large

Definition in file AmlResourceDataParser.h.

Function Documentation

◆ AmlParseResourceData()

EFI_STATUS EFIAPI AmlParseResourceData ( IN AML_OBJECT_NODE BufferNode,
IN AML_STREAM FStream 
)

Parse a ResourceDataBuffer.

For each resource data element, create a data node and add them to the variable list of arguments of the BufferNode.

The input stream is expected to point to a valid list of resource data elements. A function is available to check it for the caller.

Parameters
[in]BufferNodeBuffer node.
[in]FStreamForward stream pointing to a resource data element. The stream must not be at its end.
Return values
EFI_SUCCESSThe function completed successfully.
EFI_INVALID_PARAMETERInvalid parameter.
EFI_OUT_OF_RESOURCESCould not allocate memory.

Definition at line 269 of file AmlResourceDataParser.c.

◆ AmlRdIsResourceDataBuffer()

BOOLEAN EFIAPI AmlRdIsResourceDataBuffer ( IN CONST AML_STREAM FStream)

Check whether the input stream is pointing to a valid list of resource data elements.

The check is based on the size of resource data elements. This means that a buffer can pass this check with non-existing descriptor Ids that have a correct size.

A list of resource data elements can contain one unique resource data element, without an end tag resource data. This is the case for a FieldList.

Parameters
[in]FStreamForward stream ideally pointing to a resource data element. The stream is not modified/progressing. The stream must not be at its end.
Return values
TRUEThe buffer is holding a valid list of resource data elements.
FALSEOtherwise.

Definition at line 166 of file AmlResourceDataParser.c.