]>
git.proxmox.com Git - mirror_edk2.git/blob - DynamicTablesPkg/Library/Common/AmlLib/Parser/AmlResourceDataParser.h
13dfb352c416ff2be86d28dc5020529c9442fa2a
2 AML Resource Data Parser.
4 Copyright (c) 2019 - 2020, Arm Limited. All rights reserved.<BR>
6 SPDX-License-Identifier: BSD-2-Clause-Patent
9 - Rd or RD - Resource Data
10 - Rds or RDS - Resource Data Small
11 - Rdl or RDL - Resource Data Large
14 #ifndef AML_RESOURCE_DATA_PARSER_H_
15 #define AML_RESOURCE_DATA_PARSER_H_
17 #include <AmlNodeDefines.h>
18 #include <Stream/AmlStream.h>
19 #include <ResourceData/AmlResourceData.h>
21 /** Check whether the input stream is pointing to a valid list
22 of resource data elements.
24 The check is based on the size of resource data elements.
25 This means that a buffer can pass this check with non-existing descriptor Ids
26 that have a correct size.
28 A list of resource data elements can contain one unique resource data
29 element, without an end tag resource data. This is the case for
32 @param [in] FStream Forward stream ideally pointing to a resource
33 data element. The stream is not
35 The stream must not be at its end.
37 @retval TRUE The buffer is holding a valid list of resource data elements.
38 @retval FALSE Otherwise.
42 AmlRdIsResourceDataBuffer (
43 IN CONST AML_STREAM
* FStream
46 /** Parse a ResourceDataBuffer.
48 For each resource data element, create a data node
49 and add them to the variable list of arguments of the BufferNode.
51 The input stream is expected to point to a valid list of resource data
52 elements. A function is available to check it for the caller.
54 @param [in] BufferNode Buffer node.
55 @param [in] FStream Forward stream pointing to a resource data
57 The stream must not be at its end.
59 @retval EFI_SUCCESS The function completed successfully.
60 @retval EFI_INVALID_PARAMETER Invalid parameter.
61 @retval EFI_OUT_OF_RESOURCES Could not allocate memory.
65 AmlParseResourceData (
66 IN AML_OBJECT_NODE
* BufferNode
,
67 IN AML_STREAM
* FStream
70 #endif // AML_RESOURCE_DATA_PARSER_H_