VirtualBox

source: vbox/trunk/src/VBox/Devices/EFI/FirmwareNew/DynamicTablesPkg/Library/FdtHwInfoParserLib/FdtHwInfoParser.h@ 108794

Last change on this file since 108794 was 108794, checked in by vboxsync, 2 weeks ago

Devices/EFI/FirmwareNew: Merge edk2-stable202502 from the vendor branch and make it build for the important platforms, bugref:4643

  • Property svn:eol-style set to native
File size: 2.9 KB
Line 
1/** @file
2 Flattened Device Tree parser definitions.
3
4 Copyright (c) 2021, ARM Limited. All rights reserved.<BR>
5 SPDX-License-Identifier: BSD-2-Clause-Patent
6**/
7
8#ifndef FDT_HW_INFO_PARSER_H_
9#define FDT_HW_INFO_PARSER_H_
10
11#include <FdtHwInfoParserInclude.h>
12
13#include <ConfigurationManagerObject.h>
14#include <Library/HwInfoParserLib.h>
15
16#include "FdtUtility.h"
17
18/** A structure describing the instance of the FdtHwInfoParser.
19*/
20typedef struct FdtHwInfoParser {
21 /// Pointer to the HwDataSource i.e. the
22 /// Flattened Device Tree (Fdt).
23 VOID *Fdt;
24
25 /// Pointer to the caller's context.
26 VOID *Context;
27
28 /// Function pointer called by the
29 /// parser when adding information.
30 HW_INFO_ADD_OBJECT HwInfoAdd;
31} FDT_HW_INFO_PARSER;
32
33/** A pointer type for FDT_HW_INFO_PARSER.
34*/
35typedef FDT_HW_INFO_PARSER *FDT_HW_INFO_PARSER_HANDLE;
36
37/** Function pointer to a parser function.
38
39 A parser parses a Device Tree to populate a specific CmObj type. None,
40 one or many CmObj can be created by the parser.
41 The created CmObj are then handed to the parser's caller through the
42 HW_INFO_ADD_OBJECT interface.
43 This can also be a dispatcher. I.e. a function that not parsing a
44 Device Tree but calling other parsers.
45
46 @param [in] ParserHandle Handle to the parser instance.
47 @param [in] FdtBranch When searching for DT node name, restrict
48 the search to this Device Tree branch.
49
50 @retval EFI_SUCCESS The function completed successfully.
51 @retval EFI_ABORTED An error occurred.
52 @retval EFI_INVALID_PARAMETER Invalid parameter.
53 @retval EFI_NOT_FOUND Not found.
54 @retval EFI_UNSUPPORTED Unsupported.
55**/
56typedef
57EFI_STATUS
58(EFIAPI *FDT_HW_INFO_PARSER_FUNC)(
59 IN CONST FDT_HW_INFO_PARSER_HANDLE ParserHandle,
60 IN INT32 FdtBranch
61 );
62
63/** Main dispatcher: sequentially call the parsers/dispatchers
64 of the HwInfoParserTable.
65
66 A parser parses a Device Tree to populate a specific CmObj type. None,
67 one or many CmObj can be created by the parser.
68 The created CmObj are then handed to the parser's caller through the
69 HW_INFO_ADD_OBJECT interface.
70 This can also be a dispatcher. I.e. a function that not parsing a
71 Device Tree but calling other parsers.
72
73 @param [in] FdtParserHandle A handle to the parser instance.
74 @param [in] FdtBranch When searching for DT node name, restrict
75 the search to this Device Tree branch.
76
77 @retval EFI_SUCCESS The function completed successfully.
78 @retval EFI_ABORTED An error occurred.
79 @retval EFI_INVALID_PARAMETER Invalid parameter.
80 @retval EFI_NOT_FOUND Not found.
81 @retval EFI_UNSUPPORTED Unsupported.
82**/
83EFI_STATUS
84EFIAPI
85ArchFdtHwInfoMainDispatcher (
86 IN CONST FDT_HW_INFO_PARSER_HANDLE FdtParserHandle,
87 IN INT32 FdtBranch
88 );
89
90#endif // FDT_HW_INFO_PARSER_H_
Note: See TracBrowser for help on using the repository browser.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette