2 Macro and type definitions corresponding to the QEMU fw_cfg interface.
4 Refer to "docs/specs/fw_cfg.txt" in the QEMU source directory.
6 Copyright (c) 2011 - 2013, Intel Corporation. All rights reserved.<BR>
7 Copyright (C) 2013 - 2017, Red Hat, Inc.
9 This program and the accompanying materials are licensed and made available
10 under the terms and conditions of the BSD License which accompanies this
11 distribution. The full text of the license may be found at
12 http://opensource.org/licenses/bsd-license.php
14 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT
15 WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
24 // The size, in bytes, of names of firmware configuration files, including at
25 // least one terminating NUL byte.
27 #define QEMU_FW_CFG_FNAME_SIZE 56
30 // If the following bit is set in the UINT32 fw_cfg revision / feature bitmap
31 // -- read from key 0x0001 with the basic IO Port or MMIO method --, then the
32 // DMA interface is available.
34 #define FW_CFG_F_DMA BIT1
37 // Macros for the FW_CFG_DMA_ACCESS.Control bitmap (in native encoding).
39 #define FW_CFG_DMA_CTL_ERROR BIT0
40 #define FW_CFG_DMA_CTL_READ BIT1
41 #define FW_CFG_DMA_CTL_SKIP BIT2
42 #define FW_CFG_DMA_CTL_SELECT BIT3
43 #define FW_CFG_DMA_CTL_WRITE BIT4
46 // The fw_cfg registers can be found at these IO Ports, on the IO-mapped
47 // platforms (Ia32 and X64).
49 #define FW_CFG_IO_SELECTOR 0x510
50 #define FW_CFG_IO_DATA 0x511
51 #define FW_CFG_IO_DMA_ADDRESS 0x514
54 // Numerically defined keys.
57 QemuFwCfgItemSignature
= 0x0000,
58 QemuFwCfgItemInterfaceVersion
= 0x0001,
59 QemuFwCfgItemSystemUuid
= 0x0002,
60 QemuFwCfgItemRamSize
= 0x0003,
61 QemuFwCfgItemGraphicsEnabled
= 0x0004,
62 QemuFwCfgItemSmpCpuCount
= 0x0005,
63 QemuFwCfgItemMachineId
= 0x0006,
64 QemuFwCfgItemKernelAddress
= 0x0007,
65 QemuFwCfgItemKernelSize
= 0x0008,
66 QemuFwCfgItemKernelCommandLine
= 0x0009,
67 QemuFwCfgItemInitrdAddress
= 0x000a,
68 QemuFwCfgItemInitrdSize
= 0x000b,
69 QemuFwCfgItemBootDevice
= 0x000c,
70 QemuFwCfgItemNumaData
= 0x000d,
71 QemuFwCfgItemBootMenu
= 0x000e,
72 QemuFwCfgItemMaximumCpuCount
= 0x000f,
73 QemuFwCfgItemKernelEntry
= 0x0010,
74 QemuFwCfgItemKernelData
= 0x0011,
75 QemuFwCfgItemInitrdData
= 0x0012,
76 QemuFwCfgItemCommandLineAddress
= 0x0013,
77 QemuFwCfgItemCommandLineSize
= 0x0014,
78 QemuFwCfgItemCommandLineData
= 0x0015,
79 QemuFwCfgItemKernelSetupAddress
= 0x0016,
80 QemuFwCfgItemKernelSetupSize
= 0x0017,
81 QemuFwCfgItemKernelSetupData
= 0x0018,
82 QemuFwCfgItemFileDir
= 0x0019,
84 QemuFwCfgItemX86AcpiTables
= 0x8000,
85 QemuFwCfgItemX86SmbiosTables
= 0x8001,
86 QemuFwCfgItemX86Irq0Override
= 0x8002,
87 QemuFwCfgItemX86E820Table
= 0x8003,
88 QemuFwCfgItemX86HpetData
= 0x8004,
90 } FIRMWARE_CONFIG_ITEM
;
93 // Communication structure for the DMA access method. All fields are encoded in