TianoCore EDK2 master
Loading...
Searching...
No Matches
HardwareInfoLib.h
1/*/@file
2 Hardware info parsing functions.
3 Binary data is expected as a consecutive series of header - object pairs.
4 Complete library providing static Qemu fw-cfg wrappers as well as list-like
5 interface to dynamically manipulate hardware info objects and parsing from
6 a generic blob.
7
8 Copyright 2021 - 2022 Amazon.com, Inc. or its affiliates. All Rights Reserved.
9 SPDX-License-Identifier: BSD-2-Clause-Patent
10
11**/
12
13#ifndef __HARDWARE_INFO_LIB_H__
14#define __HARDWARE_INFO_LIB_H__
15
16#include "../Library/HardwareInfoLib/HardwareInfoTypesLib.h"
17
46QemuFwCfgReadNextHardwareInfoByType (
47 IN HARDWARE_INFO_TYPE Type,
48 IN UINTN TypeSize,
49 IN UINTN TotalFileSize,
50 OUT VOID *Data,
51 OUT UINTN *DataSize OPTIONAL,
52 IN OUT UINTN *ReadIndex
53 );
54
73CreateHardwareInfoList (
74 IN UINT8 *Blob,
75 IN UINTN BlobSize,
76 IN HARDWARE_INFO_TYPE TypeFilter,
77 OUT LIST_ENTRY *ListHead
78 );
79
86VOID
87FreeHardwareInfoList (
88 IN OUT LIST_ENTRY *ListHead
89 );
90
101UINTN
102GetHardwareInfoCountByType (
103 IN LIST_ENTRY *ListHead,
104 IN HARDWARE_INFO_TYPE Type,
105 IN UINTN TypeSize
106 );
107
118GetFirstHardwareInfoByType (
119 IN LIST_ENTRY *ListHead,
120 IN HARDWARE_INFO_TYPE Type,
121 IN UINTN TypeSize
122 );
123
137GetNextHardwareInfoByType (
138 IN LIST_ENTRY *ListHead,
139 IN LIST_ENTRY *Node,
140 IN HARDWARE_INFO_TYPE Type,
141 IN UINTN TypeSize
142 );
143
153BOOLEAN
154EndOfHardwareInfoList (
155 IN LIST_ENTRY *ListHead,
156 IN LIST_ENTRY *Node
157 );
158
159#endif // __HARDWARE_INFO_LIB_H__
UINT64 UINTN
#define IN
Definition: Base.h:279
#define OUT
Definition: Base.h:284
RETURN_STATUS EFI_STATUS
Definition: UefiBaseType.h:29