2 QEMU/KVM Firmware Configuration access
4 Copyright (c) 2011 - 2012, Intel Corporation. All rights reserved.<BR>
5 This program and the accompanying materials
6 are licensed and made available under the terms and conditions of the BSD License
7 which accompanies this distribution. The full text of the license may be found at
8 http://opensource.org/licenses/bsd-license.php
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
15 #ifndef __FW_CFG_LIB__
16 #define __FW_CFG_LIB__
19 QemuFwCfgItemSignature
= 0x0000,
20 QemuFwCfgItemInterfaceVersion
= 0x0001,
21 QemuFwCfgItemSystemUuid
= 0x0002,
22 QemuFwCfgItemRamSize
= 0x0003,
23 QemuFwCfgItemGraphicsEnabled
= 0x0004,
24 QemuFwCfgItemSmpCpuCount
= 0x0005,
25 QemuFwCfgItemMachineId
= 0x0006,
26 QemuFwCfgItemKernelAddress
= 0x0007,
27 QemuFwCfgItemKernelSize
= 0x0008,
28 QemuFwCfgItemKernelCommandLine
= 0x0009,
29 QemuFwCfgItemInitrdAddress
= 0x000a,
30 QemuFwCfgItemInitrdSize
= 0x000b,
31 QemuFwCfgItemBootDevice
= 0x000c,
32 QemuFwCfgItemNumaData
= 0x000d,
33 QemuFwCfgItemBootMenu
= 0x000e,
34 QemuFwCfgItemMaximumCpuCount
= 0x000f,
35 QemuFwCfgItemKernelEntry
= 0x0010,
36 QemuFwCfgItemKernelData
= 0x0011,
37 QemuFwCfgItemInitrdData
= 0x0012,
38 QemuFwCfgItemCommandLineAddress
= 0x0013,
39 QemuFwCfgItemCommandLineSize
= 0x0014,
40 QemuFwCfgItemCommandLineData
= 0x0015,
41 QemuFwCfgItemKernelSetupAddress
= 0x0016,
42 QemuFwCfgItemKernelSetupSize
= 0x0017,
43 QemuFwCfgItemKernelSetupData
= 0x0018,
45 QemuFwCfgItemX86AcpiTables
= 0x8000,
46 QemuFwCfgItemX86SmbiosTables
= 0x8001,
47 QemuFwCfgItemX86Irq0Override
= 0x8002,
48 QemuFwCfgItemX86E820Table
= 0x8003,
49 QemuFwCfgItemX86HpetData
= 0x8004,
51 } FIRMWARE_CONFIG_ITEM
;
55 Returns a boolean indicating if the firmware configuration interface
58 @retval TRUE The interface is available
59 @retval FALSE The interface is not available
64 QemuFwCfgIsAvailable (
70 Selects a firmware configuration item for reading.
72 Following this call, any data read from this item will start from
73 the beginning of the configuration item's data.
75 @param[in] QemuFwCfgItem - Firmware Configuration item to read
81 IN FIRMWARE_CONFIG_ITEM QemuFwCfgItem
86 Reads firmware configuration bytes into a buffer
88 If called multiple times, then the data read will
89 continue at the offset of the firmware configuration
90 item where the previous read ended.
92 @param[in] Size - Size in bytes to read
93 @param[in] Buffer - Buffer to store data into
100 IN VOID
*Buffer OPTIONAL
105 Reads a UINT8 firmware configuration value
107 @return Value of Firmware Configuration item read
118 Reads a UINT16 firmware configuration value
120 @return Value of Firmware Configuration item read
131 Reads a UINT32 firmware configuration value
133 @return Value of Firmware Configuration item read
144 Reads a UINT64 firmware configuration value
146 @return Value of Firmware Configuration item read