From nobody Mon Feb 9 17:24:51 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1549307134743314.2358753957126; Mon, 4 Feb 2019 11:05:34 -0800 (PST) Received: from localhost ([127.0.0.1]:47657 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gqjYh-0003Ht-H1 for importer@patchew.org; Mon, 04 Feb 2019 14:05:31 -0500 Received: from eggs.gnu.org ([209.51.188.92]:59653) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gqj78-0005Jd-Kr for qemu-devel@nongnu.org; Mon, 04 Feb 2019 13:37:04 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gqj76-0003jE-Pd for qemu-devel@nongnu.org; Mon, 04 Feb 2019 13:37:02 -0500 Received: from mail-wm1-x344.google.com ([2a00:1450:4864:20::344]:35692) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gqj75-0003iE-W7 for qemu-devel@nongnu.org; Mon, 04 Feb 2019 13:37:00 -0500 Received: by mail-wm1-x344.google.com with SMTP id t200so1042520wmt.0 for ; Mon, 04 Feb 2019 10:36:59 -0800 (PST) Received: from 640k.lan ([93.56.166.5]) by smtp.gmail.com with ESMTPSA id s132sm8836236wmf.28.2019.02.04.10.36.57 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 04 Feb 2019 10:36:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=i1n8jLvWrUzAyecYeF85aYrxW/dgM4MAF5HJIRp6TYU=; b=g67Zrm26+2Eww3JhyDp0S2As2EJBvfgscUNnvCLV7ysTOAEr2jpLrOKAq9/IVwFy2G YzPBBU8QL+JzkuJJL/zrsOTUPuXLddcIBRK3bq3K00eY0A+0/75BToR8Ec+N98jz/fPP 8DsrMrDBu5WI29VCxszaD7pssNaJm6D3DBw/Ld5kVRMbLCDNQ0XPs3Qf4QeTFPFaR34o ZZvjBZ4GoOoGyoqjVLzc7m4xyM4wKfPbmYuyiUh7N2lHGzz/wPtE9ltkxIKXtBCPSK+k EVKCC4hvmOUqyV92m8d9QyccB+nABpJmbSyn6mS8UHeQ0sGvpYBTkdHK3n561o0UN/8E gawQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=i1n8jLvWrUzAyecYeF85aYrxW/dgM4MAF5HJIRp6TYU=; b=haSRNq3UEluj80R2HOTo3LvsKTHQgAojaXIs2EQjBv41rGdy+ikAuosNXKTMTUI6iv TdqmgDtzAaFLVcX6X7/76aKQeFCCr3FYbxYRtnLs6SVIWklUaeuOg/tCiEes6YlPB2z+ MEGEy7Ymv3+Y+lHohJTix0xYDst/19esZ7sta75OsooYBYapspu6g6cuybMoy06YNBNK eWFxYu87viSF2AYaJ1/MUj38Fa3ojvcFTwCUIO6WRePiIhMcQ1Z+7PtIGZzw2jZAulf+ 6zpl8wJj7dzAP2Je6uK1nEFsQtAudJtAYxvhyYz+P99Kv7+a7Q3hW4gIZv6V8ay0Yp8w Wbfw== X-Gm-Message-State: AHQUAuY3qSW2u7Os8/MfMUWJZ06W/J/HEt0UfjephS6WH9KlWunQ6IpH iOOHDmdS2duG62jaKppc40h3C6RY X-Google-Smtp-Source: AHgI3IY/HHIQ4C1SOKDOJnr8Peg6GwnT/CGOjVL3BsFFGxiX6KOyfYipkcbNs3FfnAquG5/qEX8gxA== X-Received: by 2002:a1c:1902:: with SMTP id 2mr582899wmz.150.1549305418539; Mon, 04 Feb 2019 10:36:58 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Date: Mon, 4 Feb 2019 19:35:40 +0100 Message-Id: <1549305379-51117-39-git-send-email-pbonzini@redhat.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1549305379-51117-1-git-send-email-pbonzini@redhat.com> References: <1549305379-51117-1-git-send-email-pbonzini@redhat.com> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::344 Subject: [Qemu-devel] [PULL 38/77] i386: import & use bootparam.h X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "Michael S. Tsirkin" , Li Zhijian , Stefano Garzarella Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Li Zhijian it's from v4.20-rc5. CC: Stefano Garzarella CC: Michael S. Tsirkin Signed-off-by: Li Zhijian Reviewed-by: Michael S. Tsirkin Reviewed-by: Stefano Garzarella Signed-off-by: Paolo Bonzini --- 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 00166d1..9664822 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" =20 /* debug PC/ISA interrupts */ //#define DEBUG_IRQ @@ -1059,13 +1060,6 @@ static long get_file_size(FILE *f) return size; } =20 -/* 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/standar= d-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 0a964fe..3578cfe 100755 --- a/scripts/update-linux-headers.sh +++ b/scripts/update-linux-headers.sh @@ -120,6 +120,12 @@ for arch in $ARCHLIST; do cp "$tmpdir/include/asm/unistd_x32.h" "$output/linux-headers/asm-x= 86/" cp "$tmpdir/include/asm/unistd_64.h" "$output/linux-headers/asm-x8= 6/" cp_portable "$tmpdir/include/asm/kvm_para.h" "$output/include/stan= dard-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 =20 --=20 1.8.3.1