TianoCore EDK2 master
Loading...
Searching...
No Matches
FdtHwInfoParser.c File Reference
#include "FdtHwInfoParser.h"

Go to the source code of this file.

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)
 

Detailed Description

Flattened Device Tree parser library for KvmTool.

Copyright (c) 2021, ARM Limited. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent

Definition in file FdtHwInfoParser.c.

Function Documentation

◆ HwInfoParse()

EFI_STATUS EFIAPI HwInfoParse ( IN HW_INFO_PARSER_HANDLE  ParserHandle)

Parse the data provided by the HwDataSource.

Parameters
[in]ParserHandleA handle to the parser instance.
Return values
EFI_SUCCESSThe function completed successfully.
EFI_INVALID_PARAMETERInvalid parameter.
EFI_OUT_OF_RESOURCESAn allocation has failed.

Definition at line 74 of file FdtHwInfoParser.c.

◆ HwInfoParserInit()

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.

Parameters
[in]HwDataSourcePointer 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]ContextA pointer to the caller's context.
[in]HwInfoAddFunction pointer called by the parser when adding information.
[out]ParserHandleA handle to the parser instance.
Return values
EFI_SUCCESSThe function completed successfully.
EFI_INVALID_PARAMETERInvalid parameter.

Definition at line 31 of file FdtHwInfoParser.c.

◆ HwInfoParserShutdown()

EFI_STATUS EFIAPI HwInfoParserShutdown ( IN HW_INFO_PARSER_HANDLE  ParserHandle)

Cleanup any internal state and resources that were allocated by the HwInfoParser.

Parameters
[in]ParserHandleA handle to the parser instance.
Return values
EFI_SUCCESSThe function completed successfully.
EFI_INVALID_PARAMETERInvalid parameter.

Definition at line 104 of file FdtHwInfoParser.c.