]>
git.proxmox.com Git - mirror_edk2.git/blob - DynamicTablesPkg/Library/Common/AmlLib/NameSpace/AmlNameSpace.h
4 Copyright (c) 2019 - 2020, Arm Limited. All rights reserved.<BR>
6 SPDX-License-Identifier: BSD-2-Clause-Patent
9 #ifndef AML_NAMESPACE_H_
10 #define AML_NAMESPACE_H_
12 #include <AmlNodeDefines.h>
13 #include <Stream/AmlStream.h>
15 /** Return the first AML namespace node up in the parent hierarchy.
17 Return the root node if no namespace node is found is the hierarchy.
19 @param [in] Node Node to look at the parents from.
20 If Node is the root node, OutNode is NULL.
21 @param [out] OutNode If a namespace node is found, pointer to the
22 first namespace node of Node's parents.
23 Stop at the root node otherwise.
25 @retval EFI_SUCCESS The function completed successfully.
26 @retval EFI_INVALID_PARAMETER Invalid parameter.
30 AmlGetFirstAncestorNameSpaceNode (
31 IN CONST AML_NODE_HEADER
* Node
,
32 OUT AML_NODE_HEADER
** OutNode
35 /** Build the raw absolute AML pathname to Node and write it to a stream.
37 A raw AML pathname is an AML pathname where the root char ('\'),
38 prefix chars ('^') and NameString prefix byte (e.g.: DualNamePrefix)
39 have been removed. A raw AML pathname is a list of concatenated
43 ASL absolute path: "[RootChar]AAAA.BBBB.CCCC\0"
44 AML absolute path: "[RootChar][MultiNamePrefix][3(NameSegs)]AAAABBBBCCCC"
45 Raw absolute path: "AAAABBBBCCCC"
47 @param [in] Node Node to build the raw absolute path to
48 Must be a root node, or a namespace node.
49 @param [in] InputParent Skip InputParent AML namespace levels before
50 starting building the raw absolute pathname.
51 E.g.: - Node's name being "^AAAA.BBBB.CCCC";
53 "BBBB.CCCC" will be skipped (2
54 levels), and "^AAAA" will remain. The
55 first caret is not related to InputParent.
56 @param [out] RawAbsPathBStream Backward stream to write the raw
58 If Node is the root node, the Stream data
59 Buffer will stay empty.
60 The stream must not be at its end.
62 @retval EFI_SUCCESS The function completed successfully.
63 @retval EFI_BUFFER_TOO_SMALL No space left in the buffer.
64 @retval EFI_INVALID_PARAMETER Invalid parameter.
68 AmlGetRawNameSpacePath (
69 IN CONST AML_NODE_HEADER
* Node
,
70 IN UINT32 InputParent
,
71 OUT AML_STREAM
* RawAbsPathBStream
74 #endif // AML_NAMESPACE_H_