On Mon, Dec 03, 2018 at 10:48:51PM +0800, Li Zhijian wrote: > It provides setup_data struct and header fields > > CC: Michael S. Tsirkin <m...@redhat.com> > Signed-off-by: Li Zhijian <lizhij...@cn.fujitsu.com>
Sorry I was unclear when I said "import it from Linux". The way to import it is to copy the header from the linux kernel by adding it to ./scripts/update-linux-headers.sh and placing a copy into include/standard-headers/ Hope that helps. > --- > V3: new patch > --- > hw/i386/pc.c | 15 +-------------- > 1 file changed, 1 insertion(+), 14 deletions(-) > > diff --git a/hw/i386/pc.c b/hw/i386/pc.c > index 067d23a..8db7417 100644 > --- a/hw/i386/pc.c > +++ b/hw/i386/pc.c > @@ -74,6 +74,7 @@ > #include "hw/nmi.h" > #include "hw/i386/intel_iommu.h" > #include "hw/net/ne2000-isa.h" > +#include <asm/bootparam.h> > > /* debug PC/ISA interrupts */ > //#define DEBUG_IRQ > @@ -820,20 +821,6 @@ static long get_file_size(FILE *f) > return size; > } > > -/* setup_data types */ > -#define SETUP_NONE 0 > -#define SETUP_E820_EXT 1 > -#define SETUP_DTB 2 > -#define SETUP_PCI 3 > -#define SETUP_EFI 4 > - > -struct setup_data { > - uint64_t next; > - uint32_t type; > - uint32_t len; > - uint8_t data[0]; > -} __attribute__((packed)); > - > static void load_linux(PCMachineState *pcms, > FWCfgState *fw_cfg) > { > -- > 2.7.4