[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 47/49] i386: import & use bootparam.h
From: |
Paolo Bonzini |
Subject: |
[Qemu-devel] [PULL 47/49] i386: import & use bootparam.h |
Date: |
Mon, 21 Jan 2019 19:06:18 +0100 |
From: Li Zhijian <address@hidden>
it's from v4.20-rc5.
CC: Stefano Garzarella <address@hidden>
CC: Michael S. Tsirkin <address@hidden>
Signed-off-by: Li Zhijian <address@hidden>
Reviewed-by: Michael S. Tsirkin <address@hidden>
Reviewed-by: Stefano Garzarella <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>
---
hw/i386/pc.c | 8 +------
include/standard-headers/asm-x86/bootparam.h | 34 ++++++++++++++++++++++++++++
scripts/update-linux-headers.sh | 6 +++++
3 files changed, 41 insertions(+), 7 deletions(-)
create mode 100644 include/standard-headers/asm-x86/bootparam.h
diff --git a/hw/i386/pc.c b/hw/i386/pc.c
index 2833b13..90e684d 100644
--- a/hw/i386/pc.c
+++ b/hw/i386/pc.c
@@ -76,6 +76,7 @@
#include "hw/usb.h"
#include "hw/i386/intel_iommu.h"
#include "hw/net/ne2000-isa.h"
+#include "standard-headers/asm-x86/bootparam.h"
/* debug PC/ISA interrupts */
//#define DEBUG_IRQ
@@ -1050,13 +1051,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;
diff --git a/include/standard-headers/asm-x86/bootparam.h
b/include/standard-headers/asm-x86/bootparam.h
new file mode 100644
index 0000000..67d4f01
--- /dev/null
+++ b/include/standard-headers/asm-x86/bootparam.h
@@ -0,0 +1,34 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
+#ifndef _ASM_X86_BOOTPARAM_H
+#define _ASM_X86_BOOTPARAM_H
+
+/* setup_data types */
+#define SETUP_NONE 0
+#define SETUP_E820_EXT 1
+#define SETUP_DTB 2
+#define SETUP_PCI 3
+#define SETUP_EFI 4
+#define SETUP_APPLE_PROPERTIES 5
+#define SETUP_JAILHOUSE 6
+
+/* ram_size flags */
+#define RAMDISK_IMAGE_START_MASK 0x07FF
+#define RAMDISK_PROMPT_FLAG 0x8000
+#define RAMDISK_LOAD_FLAG 0x4000
+
+/* loadflags */
+#define LOADED_HIGH (1<<0)
+#define KASLR_FLAG (1<<1)
+#define QUIET_FLAG (1<<5)
+#define KEEP_SEGMENTS (1<<6)
+#define CAN_USE_HEAP (1<<7)
+
+/* xloadflags */
+#define XLF_KERNEL_64 (1<<0)
+#define XLF_CAN_BE_LOADED_ABOVE_4G (1<<1)
+#define XLF_EFI_HANDOVER_32 (1<<2)
+#define XLF_EFI_HANDOVER_64 (1<<3)
+#define XLF_EFI_KEXEC (1<<4)
+
+
+#endif /* _ASM_X86_BOOTPARAM_H */
diff --git a/scripts/update-linux-headers.sh b/scripts/update-linux-headers.sh
index c933489..a310a90 100755
--- a/scripts/update-linux-headers.sh
+++ b/scripts/update-linux-headers.sh
@@ -127,6 +127,12 @@ for arch in $ARCHLIST; do
cp "$tmpdir/include/asm/unistd_x32.h" "$output/linux-headers/asm-x86/"
cp "$tmpdir/include/asm/unistd_64.h" "$output/linux-headers/asm-x86/"
cp_portable "$tmpdir/include/asm/kvm_para.h"
"$output/include/standard-headers/asm-$arch"
+ # Remove everything except the macros from bootparam.h avoiding the
+ # unnecessary import of several video/ist/etc headers
+ sed -e '/__ASSEMBLY__/,/__ASSEMBLY__/d' \
+ "$tmpdir/include/asm/bootparam.h" > "$tmpdir/bootparam.h"
+ cp_portable "$tmpdir/bootparam.h" \
+ "$output/include/standard-headers/asm-$arch"
fi
done
--
1.8.3.1
- [Qemu-devel] [PULL 41/49] configure: enable elf2dmp build for Windows hosts, (continued)
- [Qemu-devel] [PULL 41/49] configure: enable elf2dmp build for Windows hosts, Paolo Bonzini, 2019/01/21
- [Qemu-devel] [PULL 34/49] Revert "i386: Add CPUID bit for PCONFIG", Paolo Bonzini, 2019/01/21
- [Qemu-devel] [PULL 35/49] target-i386: hvf: remove MPX support, Paolo Bonzini, 2019/01/21
- [Qemu-devel] [PULL 37/49] contrib/elf2dmp: use GLib in ELF processing, Paolo Bonzini, 2019/01/21
- [Qemu-devel] [PULL 02/49] include: update Linux headers to 4.21-rc1/5.0-rc1, Paolo Bonzini, 2019/01/21
- [Qemu-devel] [PULL 29/49] linuxboot_dma: move common functions in a new header, Paolo Bonzini, 2019/01/21
- [Qemu-devel] [PULL 33/49] i386: remove the 'INTEL_PT' CPUID bit from named CPU models, Paolo Bonzini, 2019/01/21
- [Qemu-devel] [PULL 42/49] monitor: do not use QTAILQ_FOREACH_SAFE across critical sections, Paolo Bonzini, 2019/01/21
- [Qemu-devel] [PULL 43/49] crypto: finish removing TABs, Paolo Bonzini, 2019/01/21
- [Qemu-devel] [PULL 44/49] ui: vnc: finish removing TABs, Paolo Bonzini, 2019/01/21
- [Qemu-devel] [PULL 47/49] i386: import & use bootparam.h,
Paolo Bonzini <=
- [Qemu-devel] [PULL 48/49] i386: allow to load initrd below 4 GB for recent linux, Paolo Bonzini, 2019/01/21
- [Qemu-devel] [PULL 46/49] hw/core/loader.c: Read as long as possible in load_image_size(), Paolo Bonzini, 2019/01/21
- [Qemu-devel] [PULL 45/49] unify len and addr type for memory/address APIs, Paolo Bonzini, 2019/01/21
- [Qemu-devel] [PULL 49/49] docker: disable Xen on CentOS 7, Paolo Bonzini, 2019/01/21
- Re: [Qemu-devel] [PULL 00/49] Misc patches for 2019-01-21, Peter Maydell, 2019/01/22