TianoCore EDK2 master
Loading...
Searching...
No Matches
AmlNameSpace.h File Reference
#include <AmlNodeDefines.h>
#include <Stream/AmlStream.h>

Go to the source code of this file.

Functions

EFI_STATUS EFIAPI AmlGetFirstAncestorNameSpaceNode (IN CONST AML_NODE_HEADER *Node, OUT AML_NODE_HEADER **OutNode)
 
EFI_STATUS EFIAPI AmlGetRawNameSpacePath (IN CONST AML_NODE_HEADER *Node, IN UINT32 InputParent, OUT AML_STREAM *RawAbsPathBStream)
 

Detailed Description

AML NameSpace.

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

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

Definition in file AmlNameSpace.h.

Function Documentation

◆ AmlGetFirstAncestorNameSpaceNode()

EFI_STATUS EFIAPI AmlGetFirstAncestorNameSpaceNode ( IN CONST AML_NODE_HEADER Node,
OUT AML_NODE_HEADER **  OutNode 
)

Return the first AML namespace node up in the parent hierarchy.

Return the root node if no namespace node is found is the hierarchy.

Parameters
[in]NodeNode to look at the parents from. If Node is the root node, OutNode is NULL.
[out]OutNodeIf a namespace node is found, pointer to the first namespace node of Node's parents. Stop at the root node otherwise.
Return values
EFI_SUCCESSThe function completed successfully.
EFI_INVALID_PARAMETERInvalid parameter.

Definition at line 142 of file AmlNameSpace.c.

◆ AmlGetRawNameSpacePath()

EFI_STATUS EFIAPI AmlGetRawNameSpacePath ( IN CONST AML_NODE_HEADER Node,
IN UINT32  InputParent,
OUT AML_STREAM RawAbsPathBStream 
)

Build the raw absolute AML pathname to Node and write it to a stream.

A raw AML pathname is an AML pathname where the root char ('\'), prefix chars ('^') and NameString prefix byte (e.g.: DualNamePrefix) have been removed. A raw AML pathname is a list of concatenated NameSegs.

E.g.: ASL absolute path: "[RootChar]AAAA.BBBB.CCCC\0" AML absolute path: "[RootChar][MultiNamePrefix][3(NameSegs)]AAAABBBBCCCC" Raw absolute path: "AAAABBBBCCCC"

Parameters
[in]NodeNode to build the raw absolute path to Must be a root node, or a namespace node.
[in]InputParentSkip InputParent AML namespace levels before starting building the raw absolute pathname. E.g.: - Node's name being "^AAAA.BBBB.CCCC";
  • InputParent = 2; "BBBB.CCCC" will be skipped (2 levels), and "^AAAA" will remain. The first caret is not related to InputParent.
[out]RawAbsPathBStreamBackward stream to write the raw pathname to. If Node is the root node, the Stream data Buffer will stay empty. The stream must not be at its end.
Return values
EFI_SUCCESSThe function completed successfully.
EFI_BUFFER_TOO_SMALLNo space left in the buffer.
EFI_INVALID_PARAMETERInvalid parameter.

Definition at line 422 of file AmlNameSpace.c.