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 (
36 Selects a firmware configuration item for reading.
38 Following this call, any data read from this item will start from
39 the beginning of the configuration item's data.
41 @param[in] QemuFwCfgItem - Firmware Configuration item to read
47 IN FIRMWARE_CONFIG_ITEM QemuFwCfgItem
54 Reads firmware configuration bytes into a buffer
56 If called multiple times, then the data read will
57 continue at the offset of the firmware configuration
58 item where the previous read ended.
60 @param[in] Size - Size in bytes to read
61 @param[in] Buffer - Buffer to store data into
68 IN VOID
*Buffer OPTIONAL
75 Writes firmware configuration bytes from a buffer
77 If called multiple times, then the data written will
78 continue at the offset of the firmware configuration
79 item where the previous write ended.
81 @param[in] Size - Size in bytes to write
82 @param[in] Buffer - Buffer to read data from
96 Skip bytes in the firmware configuration item.
98 Increase the offset of the firmware configuration item without transferring
99 bytes between the item and a caller-provided buffer. Subsequent read, write
100 or skip operations will commence at the increased offset.
102 @param[in] Size Number of bytes to skip.
114 Reads a UINT8 firmware configuration value
116 @return Value of Firmware Configuration item read
130 Reads a UINT16 firmware configuration value
132 @return Value of Firmware Configuration item read
146 Reads a UINT32 firmware configuration value
148 @return Value of Firmware Configuration item read
162 Reads a UINT64 firmware configuration value
164 @return Value of Firmware Configuration item read
178 Find the configuration item corresponding to the firmware configuration file.
180 @param[in] Name - Name of file to look up.
181 @param[out] Item - Configuration item corresponding to the file, to be passed
182 to QemuFwCfgSelectItem ().
183 @param[out] Size - Number of bytes in the file.
185 @return RETURN_SUCCESS If file is found.
186 RETURN_NOT_FOUND If file is not found.
187 RETURN_UNSUPPORTED If firmware configuration is unavailable.
193 IN CONST CHAR8
*Name
,
194 OUT FIRMWARE_CONFIG_ITEM
*Item
,
198 return RETURN_UNSUPPORTED
;