3 Null implementation of the fw_cfg library.
5 Copyright (C) 2020, Rebecca Cran <rebecca@bsdio.com>
6 Copyright (C) 2013, Red Hat, Inc.
7 Copyright (c) 2011 - 2013, Intel Corporation. All rights reserved.<BR>
8 Copyright (c) 2017, Advanced Micro Devices. All rights reserved.<BR>
10 SPDX-License-Identifier: BSD-2-Clause-Patent
13 #include <Library/DebugLib.h>
14 #include <Library/QemuFwCfgLib.h>
17 Returns a boolean indicating if the firmware configuration interface
20 This function may change fw_cfg state.
22 @retval TRUE The interface is available
23 @retval FALSE The interface is not available
28 QemuFwCfgIsAvailable (
37 Selects a firmware configuration item for reading.
39 Following this call, any data read from this item will start from
40 the beginning of the configuration item's data.
42 @param[in] QemuFwCfgItem - Firmware Configuration item to read
48 IN FIRMWARE_CONFIG_ITEM QemuFwCfgItem
56 Reads firmware configuration bytes into a buffer
58 If called multiple times, then the data read will
59 continue at the offset of the firmware configuration
60 item where the previous read ended.
62 @param[in] Size - Size in bytes to read
63 @param[in] Buffer - Buffer to store data into
70 IN VOID
*Buffer OPTIONAL
78 Writes firmware configuration bytes from a buffer
80 If called multiple times, then the data written will
81 continue at the offset of the firmware configuration
82 item where the previous write ended.
84 @param[in] Size - Size in bytes to write
85 @param[in] Buffer - Buffer to read data from
100 Skip bytes in the firmware configuration item.
102 Increase the offset of the firmware configuration item without transferring
103 bytes between the item and a caller-provided buffer. Subsequent read, write
104 or skip operations will commence at the increased offset.
106 @param[in] Size Number of bytes to skip.
119 Reads a UINT8 firmware configuration value
121 @return Value of Firmware Configuration item read
136 Reads a UINT16 firmware configuration value
138 @return Value of Firmware Configuration item read
153 Reads a UINT32 firmware configuration value
155 @return Value of Firmware Configuration item read
170 Reads a UINT64 firmware configuration value
172 @return Value of Firmware Configuration item read
187 Find the configuration item corresponding to the firmware configuration file.
189 @param[in] Name - Name of file to look up.
190 @param[out] Item - Configuration item corresponding to the file, to be passed
191 to QemuFwCfgSelectItem ().
192 @param[out] Size - Number of bytes in the file.
194 @return RETURN_SUCCESS If file is found.
195 RETURN_NOT_FOUND If file is not found.
196 RETURN_UNSUPPORTED If firmware configuration is unavailable.
202 IN CONST CHAR8
*Name
,
203 OUT FIRMWARE_CONFIG_ITEM
*Item
,
207 return RETURN_UNSUPPORTED
;