TianoCore EDK2 master
|
#include <ConfigurationManagerObject.h>
Go to the source code of this file.
Typedefs | |
typedef VOID * | HW_INFO_PARSER_HANDLE |
typedef EFI_STATUS(EFIAPI * | HW_INFO_ADD_OBJECT) (IN HW_INFO_PARSER_HANDLE ParserHandle, IN VOID *Context, IN CONST CM_OBJ_DESCRIPTOR *CmObjDesc, OUT CM_OBJECT_TOKEN *Token OPTIONAL) |
Functions | |
EFI_STATUS EFIAPI | HwInfoParserInit (IN VOID *HwDataSource, IN VOID *Context, IN HW_INFO_ADD_OBJECT HwInfoAdd, OUT HW_INFO_PARSER_HANDLE *ParserHandle) |
EFI_STATUS EFIAPI | HwInfoParse (IN HW_INFO_PARSER_HANDLE ParserHandle) |
EFI_STATUS EFIAPI | HwInfoParserShutdown (IN HW_INFO_PARSER_HANDLE ParserHandle) |
Hardware information parser library.
Copyright (c) 2021, ARM Limited. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent
Definition in file HwInfoParserLib.h.
typedef EFI_STATUS(EFIAPI * HW_INFO_ADD_OBJECT) (IN HW_INFO_PARSER_HANDLE ParserHandle, IN VOID *Context, IN CONST CM_OBJ_DESCRIPTOR *CmObjDesc, OUT CM_OBJECT_TOKEN *Token OPTIONAL) |
Function pointer called by the parser to add information.
Callback function that the parser can use to add new CmObj. This function must copy the CmObj data and not rely on the parser preserving the CmObj memory. This function is responsible of the Token allocation.
[in] | ParserHandle | A handle to the parser instance. |
[in] | Context | A pointer to the caller's context provided in HwInfoParserInit (). |
[in] | CmObjDesc | CM_OBJ_DESCRIPTOR containing the CmObj(s) to add. |
[out] | Token | If provided and success, contain the token generated for the CmObj. |
EFI_SUCCESS | The function completed successfully. |
EFI_INVALID_PARAMETER | Invalid parameter. |
Definition at line 35 of file HwInfoParserLib.h.
typedef VOID* HW_INFO_PARSER_HANDLE |
A handle to the HwInfoParser instance.
Definition at line 15 of file HwInfoParserLib.h.
EFI_STATUS EFIAPI HwInfoParse | ( | IN HW_INFO_PARSER_HANDLE | ParserHandle | ) |
Parse the data provided by the HwDataSource.
[in] | ParserHandle | A handle to the parser instance. |
EFI_SUCCESS | The function completed successfully. |
EFI_INVALID_PARAMETER | Invalid parameter. |
EFI_OUT_OF_RESOURCES | An allocation has failed. |
Definition at line 74 of file FdtHwInfoParser.c.
EFI_STATUS EFIAPI HwInfoParserInit | ( | IN VOID * | HwDataSource, |
IN VOID * | Context, | ||
IN HW_INFO_ADD_OBJECT | HwInfoAdd, | ||
OUT HW_INFO_PARSER_HANDLE * | ParserHandle | ||
) |
Initialise the HwInfoParser.
The HwInfoParser shall use the information provided by the HwDataSource to initialise the internal state of the parser or to index the data. This internal state shall be linked to the ParserHandle using an implementation defined mechanism.
[in] | HwDataSource | Pointer to the blob containing the hardware information. It can be a pointer to a Device Tree, an XML file, etc. or any other data structure defined by the HwInfoParser. |
[in] | Context | A pointer to the caller's context. |
[in] | HwInfoAdd | Function pointer called by the parser when adding information. |
[out] | ParserHandle | A handle to the parser instance. |
EFI_SUCCESS | The function completed successfully. |
EFI_INVALID_PARAMETER | Invalid parameter. |
Definition at line 31 of file FdtHwInfoParser.c.
EFI_STATUS EFIAPI HwInfoParserShutdown | ( | IN HW_INFO_PARSER_HANDLE | ParserHandle | ) |
Cleanup any internal state and resources that were allocated by the HwInfoParser.
[in] | ParserHandle | A handle to the parser instance. |
EFI_SUCCESS | The function completed successfully. |
EFI_INVALID_PARAMETER | Invalid parameter. |
Definition at line 104 of file FdtHwInfoParser.c.