public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Igor Mammedov <imammedo@redhat.com>
To: Zhao Liu <zhao1.liu@intel.com>
Cc: "Paolo Bonzini" <pbonzini@redhat.com>,
	"Michael S . Tsirkin" <mst@redhat.com>,
	"Philippe Mathieu-Daudé" <philmd@linaro.org>,
	"Marcel Apfelbaum" <marcel.apfelbaum@gmail.com>,
	"Thomas Huth" <thuth@redhat.com>,
	qemu-devel@nongnu.org, devel@lists.libvirt.org,
	kvm@vger.kernel.org, qemu-riscv@nongnu.org, qemu-arm@nongnu.org,
	"Richard Henderson" <richard.henderson@linaro.org>,
	"Sergio Lopez" <slp@redhat.com>,
	"Gerd Hoffmann" <kraxel@redhat.com>,
	"Peter Maydell" <peter.maydell@linaro.org>,
	"Laurent Vivier" <lvivier@redhat.com>,
	"Jiaxun Yang" <jiaxun.yang@flygoat.com>,
	"Yi Liu" <yi.l.liu@intel.com>,
	"Eduardo Habkost" <eduardo@habkost.net>,
	"Alistair Francis" <alistair.francis@wdc.com>,
	"Daniel Henrique Barboza" <dbarboza@ventanamicro.com>,
	"Marcelo Tosatti" <mtosatti@redhat.com>,
	"Weiwei Li" <liwei1518@gmail.com>, "Amit Shah" <amit@kernel.org>,
	"Xiaoyao Li" <xiaoyao.li@intel.com>,
	"Yanan Wang" <wangyanan55@huawei.com>,
	"Helge Deller" <deller@gmx.de>,
	"Palmer Dabbelt" <palmer@dabbelt.com>,
	"Daniel P . Berrangé" <berrange@redhat.com>,
	"Ani Sinha" <anisinha@redhat.com>,
	"Fabiano Rosas" <farosas@suse.de>,
	"Liu Zhiwei" <zhiwei_liu@linux.alibaba.com>,
	"Clément Mathieu--Drif" <clement.mathieu--drif@eviden.com>,
	"Marc-André Lureau" <marcandre.lureau@redhat.com>,
	"Huacai Chen" <chenhuacai@kernel.org>,
	"Jason Wang" <jasowang@redhat.com>,
	"Mark Cave-Ayland" <mark.caveayland@nutanix.com>,
	"BALATON Zoltan" <balaton@eik.bme.hu>,
	"Peter Krempa" <pkrempa@redhat.com>,
	"Jiri Denemark" <jdenemar@redhat.com>
Subject: Re: [PATCH v5 14/28] hw/i386/pc: Remove multiboot.bin
Date: Wed, 17 Dec 2025 15:07:47 +0100	[thread overview]
Message-ID: <20251217150747.13d77fab@imammedo> (raw)
In-Reply-To: <20251202162835.3227894-15-zhao1.liu@intel.com>

On Wed,  3 Dec 2025 00:28:21 +0800
Zhao Liu <zhao1.liu@intel.com> wrote:

> From: Philippe Mathieu-Daudé <philmd@linaro.org>
> 
> All PC machines now use the multiboot_dma.bin binary,
> we can remove the non-DMA version (multiboot.bin).
> 
> This doesn't change multiboot_dma binary file.
> 
> Suggested-by: Thomas Huth <thuth@redhat.com>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> Reviewed-by: Zhao Liu <zhao1.liu@intel.com>
> Signed-off-by: Zhao Liu <zhao1.liu@intel.com>

Reviewed-by: Igor Mammedov <imammedo@redhat.com>

> ---
> Changes since v4:
>  * There's a recent change for multiboot.S: commit 4c8f69b94839.
>    Rebase this patch on that.
> ---
>  hw/i386/pc.c                      |   1 -
>  pc-bios/meson.build               |   1 -
>  pc-bios/multiboot.bin             | Bin 1024 -> 0 bytes
>  pc-bios/optionrom/Makefile        |   2 +-
>  pc-bios/optionrom/multiboot.S     | 232 -----------------------------
>  pc-bios/optionrom/multiboot_dma.S | 234 +++++++++++++++++++++++++++++-
>  pc-bios/optionrom/optionrom.h     |   4 -
>  7 files changed, 233 insertions(+), 241 deletions(-)
>  delete mode 100644 pc-bios/multiboot.bin
>  delete mode 100644 pc-bios/optionrom/multiboot.S
> 
> diff --git a/hw/i386/pc.c b/hw/i386/pc.c
> index 2b8d3982c4a0..9d88d4a5207a 100644
> --- a/hw/i386/pc.c
> +++ b/hw/i386/pc.c
> @@ -669,7 +669,6 @@ void xen_load_linux(PCMachineState *pcms)
>          assert(!strcmp(option_rom[i].name, "linuxboot.bin") ||
>                 !strcmp(option_rom[i].name, "linuxboot_dma.bin") ||
>                 !strcmp(option_rom[i].name, "pvh.bin") ||
> -               !strcmp(option_rom[i].name, "multiboot.bin") ||
>                 !strcmp(option_rom[i].name, "multiboot_dma.bin"));
>          rom_add_option(option_rom[i].name, option_rom[i].bootindex);
>      }
> diff --git a/pc-bios/meson.build b/pc-bios/meson.build
> index 9260aaad78e8..efe45c16705d 100644
> --- a/pc-bios/meson.build
> +++ b/pc-bios/meson.build
> @@ -62,7 +62,6 @@ blobs = [
>    'efi-e1000e.rom',
>    'efi-vmxnet3.rom',
>    'qemu-nsis.bmp',
> -  'multiboot.bin',
>    'multiboot_dma.bin',
>    'linuxboot.bin',
>    'linuxboot_dma.bin',
> diff --git a/pc-bios/multiboot.bin b/pc-bios/multiboot.bin
> deleted file mode 100644
> index e772713c95749bee82c20002b50ec6d05b2d4987..0000000000000000000000000000000000000000
> GIT binary patch
> literal 0
> HcmV?d00001
> 
> literal 1024
> zcmeHFF-Tic6utlZQ$OjD#Hxcx2u0GNQv6GySOkZR(ulaX<>%N!Y#>cWhY}nf36J7X
> zN(%*X6NHY>xcqO11dG^02a8L@B~ihln|%1*|7(haWa`)l@80w7;U4Ziyv0rZ8{K-w  
> zX(Ib3tLZ)RgZ}w1ei{~QEqQq9q1J-iHc<Nk_t=0qf%XfPZVHw2DY#ujc2P|}*P%6X
> z5J{pPlX4<yP&N5pXK;s@UhB~&!E&UdqEwGZF6xQMIcu9YL#zeSRCoLGt{Nh+08t>}
> z{m%E-b32A??+@XljSYirtWObwngi<ymS1Ta*dFGMp;8@=_3Z52!v09{UU~`QnFsB_
> z7BiEC)uZxH%SW9kPWCicN{_iUjmk<~D^H|R%@|m9%43Woc(Pkeq%n{&8ND5Z*tPt#
> zJua+xXAQhN4K(1MMs0{u_6sp>l#NmvPZ7KC<lsLdQgMFC@A6POvMoDMgW=M+K;T<o
> zTkpnNq6x*`vM0CGE>t40l-CQ}*)y<y--c)(x}o&1TMzwX+ToGS@VER4zR&s70fl+(  
> qI)9<-H_-!n#lLJmGq*^~<$US&%R-@)$`@YPx#A6#|L`9<;9UXPG71m?
> 
> diff --git a/pc-bios/optionrom/Makefile b/pc-bios/optionrom/Makefile
> index 30d07026c790..1183ef889228 100644
> --- a/pc-bios/optionrom/Makefile
> +++ b/pc-bios/optionrom/Makefile
> @@ -2,7 +2,7 @@ include config.mak
>  SRC_DIR := $(TOPSRC_DIR)/pc-bios/optionrom
>  VPATH = $(SRC_DIR)
>  
> -all: multiboot.bin multiboot_dma.bin linuxboot.bin linuxboot_dma.bin kvmvapic.bin pvh.bin
> +all: multiboot_dma.bin linuxboot.bin linuxboot_dma.bin kvmvapic.bin pvh.bin
>  # Dummy command so that make thinks it has done something
>  	@true
>  
> diff --git a/pc-bios/optionrom/multiboot.S b/pc-bios/optionrom/multiboot.S
> deleted file mode 100644
> index c95e35c9cb62..000000000000
> --- a/pc-bios/optionrom/multiboot.S
> +++ /dev/null
> @@ -1,232 +0,0 @@
> -/*
> - * Multiboot Option ROM
> - *
> - * This program is free software; you can redistribute it and/or modify
> - * it under the terms of the GNU General Public License as published by
> - * the Free Software Foundation; either version 2 of the License, or
> - * (at your option) any later version.
> - *
> - * This program is distributed in the hope that it will be useful,
> - * but WITHOUT ANY WARRANTY; without even the implied warranty of
> - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
> - * GNU General Public License for more details.
> - *
> - * You should have received a copy of the GNU General Public License
> - * along with this program; if not, see <http://www.gnu.org/licenses/>.
> - *
> - * Copyright Novell Inc, 2009
> - *   Authors: Alexander Graf <agraf@suse.de>
> - */
> -
> -#include "optionrom.h"
> -
> -#define BOOT_ROM_PRODUCT "multiboot loader"
> -
> -#define MULTIBOOT_MAGIC		0x2badb002
> -
> -#define GS_PROT_JUMP		0
> -#define GS_GDT_DESC		6
> -
> -
> -BOOT_ROM_START
> -
> -run_multiboot:
> -
> -	cli
> -	cld
> -
> -	mov		%cs, %eax
> -	shl		$0x4, %eax
> -
> -	/* set up a long jump descriptor that is PC relative */
> -
> -	/* move stack memory to %gs */
> -	mov		%ss, %ecx
> -	shl		$0x4, %ecx
> -	mov		%esp, %ebx
> -	add		%ebx, %ecx
> -	sub		$0x20, %ecx
> -	sub		$0x30, %esp
> -	shr		$0x4, %ecx
> -	mov		%cx, %gs
> -
> -	/* now push the indirect jump descriptor there */
> -	mov		(prot_jump), %ebx
> -	add		%eax, %ebx
> -	movl		%ebx, %gs:GS_PROT_JUMP
> -	mov		$8, %bx
> -	movw		%bx, %gs:GS_PROT_JUMP + 4
> -
> -	/* fix the gdt descriptor to be PC relative */
> -	movw		(gdt_desc), %bx
> -	movw		%bx, %gs:GS_GDT_DESC
> -	movl		(gdt_desc+2), %ebx
> -	add		%eax, %ebx
> -	movl		%ebx, %gs:GS_GDT_DESC + 2
> -
> -	xor		%eax, %eax
> -	mov		%eax, %es
> -
> -	/* Read the bootinfo struct into RAM */
> -	read_fw_blob_dma(FW_CFG_INITRD)
> -
> -	/* FS = bootinfo_struct */
> -	read_fw		FW_CFG_INITRD_ADDR
> -	shr		$4, %eax
> -	mov		%ax, %fs
> -
> -	/* Account for the EBDA in the multiboot structure's e801
> -	 * map.
> -	 */
> -	int		$0x12
> -	cwtl
> -	movl		%eax, %fs:4
> -
> -	/* ES = mmap_addr */
> -	mov 		%fs:48, %eax
> -	shr		$4, %eax
> -	mov		%ax, %es
> -
> -	/* Initialize multiboot mmap structs using int 0x15(e820) */
> -	xor		%ebx, %ebx
> -	/* Start storing mmap data at %es:0 */
> -	xor		%edi, %edi
> -
> -mmap_loop:
> -	/* The multiboot entry size has offset -4, so leave some space */
> -	add		$4, %di
> -	/* entry size (mmap struct) & max buffer size (int15) */
> -	movl		$20, %ecx
> -	/* e820 */
> -	movl		$0x0000e820, %eax
> -	/* 'SMAP' magic */
> -	movl		$0x534d4150, %edx
> -	int		$0x15
> -
> -mmap_check_entry:
> -	/* Error or last entry already done? */
> -	jb		mmap_done
> -
> -mmap_store_entry:
> -	/* store entry size */
> -	/* old as(1) doesn't like this insn so emit the bytes instead:
> -	movl		%ecx, %es:-4(%edi)
> -	*/
> -	.dc.b		0x26,0x67,0x66,0x89,0x4f,0xfc
> -
> -	/* %edi += entry_size, store as mbs_mmap_length */
> -	add		%ecx, %edi
> -	movw		%di, %fs:0x2c
> -
> -	/* Continuation value 0 means last entry */
> -	test		%ebx, %ebx
> -	jnz		mmap_loop
> -
> -mmap_done:
> -	/* Calculate upper_mem field: The amount of memory between 1 MB and
> -	   the first upper memory hole. Get it from the mmap. */
> -	xor		%di, %di
> -	mov		$0x100000, %edx
> -upper_mem_entry:
> -	cmp		%fs:0x2c, %di
> -	je		upper_mem_done
> -	add		$4, %di
> -
> -	/* Skip if type != 1 */
> -	cmpl		$1, %es:16(%di)
> -	jne		upper_mem_next
> -
> -	/* Skip if > 4 GB */
> -	movl		%es:4(%di), %eax
> -	test		%eax, %eax
> -	jnz		upper_mem_next
> -
> -	/* Check for contiguous extension (base <= %edx < base + length) */
> -	movl		%es:(%di), %eax
> -	cmp		%eax, %edx
> -	jb		upper_mem_next
> -	addl		%es:8(%di), %eax
> -	cmp		%eax, %edx
> -	jae		upper_mem_next
> -
> -	/* If so, update %edx, and restart the search (mmap isn't ordered) */
> -	mov		%eax, %edx
> -	xor		%di, %di
> -	jmp		upper_mem_entry
> -
> -upper_mem_next:
> -	addl		%es:-4(%di), %edi
> -	jmp		upper_mem_entry
> -
> -upper_mem_done:
> -	sub		$0x100000, %edx
> -	shr		$10, %edx
> -	mov		%edx, %fs:0x8
> -
> -real_to_prot:
> -	/* Load the GDT before going into protected mode */
> -lgdt:
> -	data32 lgdt	%gs:GS_GDT_DESC
> -
> -	/* get us to protected mode now */
> -	movl		$1, %eax
> -	movl		%eax, %cr0
> -
> -	/* the LJMP sets CS for us and gets us to 32-bit */
> -ljmp:
> -	data32 ljmp	*%gs:GS_PROT_JUMP
> -
> -prot_mode:
> -.code32
> -
> -	/* initialize all other segments */
> -	movl		$0x10, %eax
> -	movl		%eax, %ss
> -	movl		%eax, %ds
> -	movl		%eax, %es
> -	movl		%eax, %fs
> -	movl		%eax, %gs
> -
> -	/* Read the kernel and modules into RAM */
> -	read_fw_blob_dma(FW_CFG_KERNEL)
> -
> -	/* Jump off to the kernel */
> -	read_fw		FW_CFG_KERNEL_ENTRY
> -	mov		%eax, %ecx
> -
> -	/* EBX contains a pointer to the bootinfo struct */
> -	read_fw		FW_CFG_INITRD_ADDR
> -	movl		%eax, %ebx
> -
> -	/* EAX has to contain the magic */
> -	movl		$MULTIBOOT_MAGIC, %eax
> -ljmp2:
> -	jmp		*%ecx
> -
> -/* Variables */
> -.align 4, 0
> -prot_jump:	.long prot_mode
> -		.short 8
> -
> -.align 8, 0
> -gdt:
> -	/* 0x00 */
> -.byte	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
> -
> -	/* 0x08: code segment (base=0, limit=0xfffff, type=32bit code exec/read, DPL=0, 4k) */
> -.byte	0xff, 0xff, 0x00, 0x00, 0x00, 0x9a, 0xcf, 0x00
> -
> -	/* 0x10: data segment (base=0, limit=0xfffff, type=32bit data read/write, DPL=0, 4k) */
> -.byte	0xff, 0xff, 0x00, 0x00, 0x00, 0x92, 0xcf, 0x00
> -
> -	/* 0x18: code segment (base=0, limit=0x0ffff, type=16bit code exec/read/conf, DPL=0, 1b) */
> -.byte	0xff, 0xff, 0x00, 0x00, 0x00, 0x9e, 0x00, 0x00
> -
> -	/* 0x20: data segment (base=0, limit=0x0ffff, type=16bit data read/write, DPL=0, 1b) */
> -.byte	0xff, 0xff, 0x00, 0x00, 0x00, 0x92, 0x00, 0x00
> -
> -gdt_desc:
> -.short	(5 * 8) - 1
> -.long	gdt
> -
> -BOOT_ROM_END
> diff --git a/pc-bios/optionrom/multiboot_dma.S b/pc-bios/optionrom/multiboot_dma.S
> index d809af3e23fc..c95e35c9cb62 100644
> --- a/pc-bios/optionrom/multiboot_dma.S
> +++ b/pc-bios/optionrom/multiboot_dma.S
> @@ -1,2 +1,232 @@
> -#define USE_FW_CFG_DMA 1
> -#include "multiboot.S"
> +/*
> + * Multiboot Option ROM
> + *
> + * This program is free software; you can redistribute it and/or modify
> + * it under the terms of the GNU General Public License as published by
> + * the Free Software Foundation; either version 2 of the License, or
> + * (at your option) any later version.
> + *
> + * This program is distributed in the hope that it will be useful,
> + * but WITHOUT ANY WARRANTY; without even the implied warranty of
> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
> + * GNU General Public License for more details.
> + *
> + * You should have received a copy of the GNU General Public License
> + * along with this program; if not, see <http://www.gnu.org/licenses/>.
> + *
> + * Copyright Novell Inc, 2009
> + *   Authors: Alexander Graf <agraf@suse.de>
> + */
> +
> +#include "optionrom.h"
> +
> +#define BOOT_ROM_PRODUCT "multiboot loader"
> +
> +#define MULTIBOOT_MAGIC		0x2badb002
> +
> +#define GS_PROT_JUMP		0
> +#define GS_GDT_DESC		6
> +
> +
> +BOOT_ROM_START
> +
> +run_multiboot:
> +
> +	cli
> +	cld
> +
> +	mov		%cs, %eax
> +	shl		$0x4, %eax
> +
> +	/* set up a long jump descriptor that is PC relative */
> +
> +	/* move stack memory to %gs */
> +	mov		%ss, %ecx
> +	shl		$0x4, %ecx
> +	mov		%esp, %ebx
> +	add		%ebx, %ecx
> +	sub		$0x20, %ecx
> +	sub		$0x30, %esp
> +	shr		$0x4, %ecx
> +	mov		%cx, %gs
> +
> +	/* now push the indirect jump descriptor there */
> +	mov		(prot_jump), %ebx
> +	add		%eax, %ebx
> +	movl		%ebx, %gs:GS_PROT_JUMP
> +	mov		$8, %bx
> +	movw		%bx, %gs:GS_PROT_JUMP + 4
> +
> +	/* fix the gdt descriptor to be PC relative */
> +	movw		(gdt_desc), %bx
> +	movw		%bx, %gs:GS_GDT_DESC
> +	movl		(gdt_desc+2), %ebx
> +	add		%eax, %ebx
> +	movl		%ebx, %gs:GS_GDT_DESC + 2
> +
> +	xor		%eax, %eax
> +	mov		%eax, %es
> +
> +	/* Read the bootinfo struct into RAM */
> +	read_fw_blob_dma(FW_CFG_INITRD)
> +
> +	/* FS = bootinfo_struct */
> +	read_fw		FW_CFG_INITRD_ADDR
> +	shr		$4, %eax
> +	mov		%ax, %fs
> +
> +	/* Account for the EBDA in the multiboot structure's e801
> +	 * map.
> +	 */
> +	int		$0x12
> +	cwtl
> +	movl		%eax, %fs:4
> +
> +	/* ES = mmap_addr */
> +	mov 		%fs:48, %eax
> +	shr		$4, %eax
> +	mov		%ax, %es
> +
> +	/* Initialize multiboot mmap structs using int 0x15(e820) */
> +	xor		%ebx, %ebx
> +	/* Start storing mmap data at %es:0 */
> +	xor		%edi, %edi
> +
> +mmap_loop:
> +	/* The multiboot entry size has offset -4, so leave some space */
> +	add		$4, %di
> +	/* entry size (mmap struct) & max buffer size (int15) */
> +	movl		$20, %ecx
> +	/* e820 */
> +	movl		$0x0000e820, %eax
> +	/* 'SMAP' magic */
> +	movl		$0x534d4150, %edx
> +	int		$0x15
> +
> +mmap_check_entry:
> +	/* Error or last entry already done? */
> +	jb		mmap_done
> +
> +mmap_store_entry:
> +	/* store entry size */
> +	/* old as(1) doesn't like this insn so emit the bytes instead:
> +	movl		%ecx, %es:-4(%edi)
> +	*/
> +	.dc.b		0x26,0x67,0x66,0x89,0x4f,0xfc
> +
> +	/* %edi += entry_size, store as mbs_mmap_length */
> +	add		%ecx, %edi
> +	movw		%di, %fs:0x2c
> +
> +	/* Continuation value 0 means last entry */
> +	test		%ebx, %ebx
> +	jnz		mmap_loop
> +
> +mmap_done:
> +	/* Calculate upper_mem field: The amount of memory between 1 MB and
> +	   the first upper memory hole. Get it from the mmap. */
> +	xor		%di, %di
> +	mov		$0x100000, %edx
> +upper_mem_entry:
> +	cmp		%fs:0x2c, %di
> +	je		upper_mem_done
> +	add		$4, %di
> +
> +	/* Skip if type != 1 */
> +	cmpl		$1, %es:16(%di)
> +	jne		upper_mem_next
> +
> +	/* Skip if > 4 GB */
> +	movl		%es:4(%di), %eax
> +	test		%eax, %eax
> +	jnz		upper_mem_next
> +
> +	/* Check for contiguous extension (base <= %edx < base + length) */
> +	movl		%es:(%di), %eax
> +	cmp		%eax, %edx
> +	jb		upper_mem_next
> +	addl		%es:8(%di), %eax
> +	cmp		%eax, %edx
> +	jae		upper_mem_next
> +
> +	/* If so, update %edx, and restart the search (mmap isn't ordered) */
> +	mov		%eax, %edx
> +	xor		%di, %di
> +	jmp		upper_mem_entry
> +
> +upper_mem_next:
> +	addl		%es:-4(%di), %edi
> +	jmp		upper_mem_entry
> +
> +upper_mem_done:
> +	sub		$0x100000, %edx
> +	shr		$10, %edx
> +	mov		%edx, %fs:0x8
> +
> +real_to_prot:
> +	/* Load the GDT before going into protected mode */
> +lgdt:
> +	data32 lgdt	%gs:GS_GDT_DESC
> +
> +	/* get us to protected mode now */
> +	movl		$1, %eax
> +	movl		%eax, %cr0
> +
> +	/* the LJMP sets CS for us and gets us to 32-bit */
> +ljmp:
> +	data32 ljmp	*%gs:GS_PROT_JUMP
> +
> +prot_mode:
> +.code32
> +
> +	/* initialize all other segments */
> +	movl		$0x10, %eax
> +	movl		%eax, %ss
> +	movl		%eax, %ds
> +	movl		%eax, %es
> +	movl		%eax, %fs
> +	movl		%eax, %gs
> +
> +	/* Read the kernel and modules into RAM */
> +	read_fw_blob_dma(FW_CFG_KERNEL)
> +
> +	/* Jump off to the kernel */
> +	read_fw		FW_CFG_KERNEL_ENTRY
> +	mov		%eax, %ecx
> +
> +	/* EBX contains a pointer to the bootinfo struct */
> +	read_fw		FW_CFG_INITRD_ADDR
> +	movl		%eax, %ebx
> +
> +	/* EAX has to contain the magic */
> +	movl		$MULTIBOOT_MAGIC, %eax
> +ljmp2:
> +	jmp		*%ecx
> +
> +/* Variables */
> +.align 4, 0
> +prot_jump:	.long prot_mode
> +		.short 8
> +
> +.align 8, 0
> +gdt:
> +	/* 0x00 */
> +.byte	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
> +
> +	/* 0x08: code segment (base=0, limit=0xfffff, type=32bit code exec/read, DPL=0, 4k) */
> +.byte	0xff, 0xff, 0x00, 0x00, 0x00, 0x9a, 0xcf, 0x00
> +
> +	/* 0x10: data segment (base=0, limit=0xfffff, type=32bit data read/write, DPL=0, 4k) */
> +.byte	0xff, 0xff, 0x00, 0x00, 0x00, 0x92, 0xcf, 0x00
> +
> +	/* 0x18: code segment (base=0, limit=0x0ffff, type=16bit code exec/read/conf, DPL=0, 1b) */
> +.byte	0xff, 0xff, 0x00, 0x00, 0x00, 0x9e, 0x00, 0x00
> +
> +	/* 0x20: data segment (base=0, limit=0x0ffff, type=16bit data read/write, DPL=0, 1b) */
> +.byte	0xff, 0xff, 0x00, 0x00, 0x00, 0x92, 0x00, 0x00
> +
> +gdt_desc:
> +.short	(5 * 8) - 1
> +.long	gdt
> +
> +BOOT_ROM_END
> diff --git a/pc-bios/optionrom/optionrom.h b/pc-bios/optionrom/optionrom.h
> index 7bcdf0eeb240..2e6e2493f83f 100644
> --- a/pc-bios/optionrom/optionrom.h
> +++ b/pc-bios/optionrom/optionrom.h
> @@ -117,16 +117,12 @@
>   *
>   * Clobbers: %eax, %edx, %es, %ecx, %edi and adresses %esp-20 to %esp
>   */
> -#ifdef USE_FW_CFG_DMA
>  #define read_fw_blob_dma(var)                           \
>          read_fw         var ## _SIZE;                   \
>          mov             %eax, %ecx;                     \
>          read_fw         var ## _ADDR;                   \
>          mov             %eax, %edi ;                    \
>          read_fw_dma     var ## _DATA, %ecx, %edi
> -#else
> -#define read_fw_blob_dma(var) read_fw_blob(var)
> -#endif
>  
>  #define read_fw_blob_pre(var)                           \
>          read_fw         var ## _SIZE;                   \


  reply	other threads:[~2025-12-17 14:07 UTC|newest]

Thread overview: 52+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-02 16:28 [PATCH v5 00/28] hw/i386/pc: Remove deprecated 2.6 and 2.7 PC machines Zhao Liu
2025-12-02 16:28 ` [PATCH v5 01/28] hw/i386/pc: Remove deprecated pc-q35-2.6 and pc-i440fx-2.6 machines Zhao Liu
2025-12-10 14:01   ` Igor Mammedov
2025-12-02 16:28 ` [PATCH v5 02/28] tests/acpi: Allow DSDT table change for x86 machines Zhao Liu
2025-12-02 16:28 ` [PATCH v5 03/28] pc: Start with modern CPU hotplug interface by default Zhao Liu
2025-12-17 13:32   ` Igor Mammedov
2025-12-18  7:52     ` Zhao Liu
2025-12-02 16:28 ` [PATCH v5 04/28] hw/i386/pc: Remove PCMachineClass::legacy_cpu_hotplug field Zhao Liu
2025-12-17 13:57   ` Igor Mammedov
2025-12-02 16:28 ` [PATCH v5 05/28] acpi: Remove legacy cpu hotplug utilities Zhao Liu
2025-12-17 13:59   ` Igor Mammedov
2025-12-02 16:28 ` [PATCH v5 06/28] docs/specs/acpi_cpu_hotplug: Remove legacy cpu hotplug descriptions Zhao Liu
2025-12-17 14:00   ` Igor Mammedov
2025-12-02 16:28 ` [PATCH v5 07/28] tests/acpi: Update DSDT tables for pc machine Zhao Liu
2025-12-17 14:16   ` Igor Mammedov
2025-12-18  7:48     ` Zhao Liu
2025-12-02 16:28 ` [PATCH v5 08/28] tests/acpi: Update DSDT tables for q35 machine Zhao Liu
2025-12-17 14:03   ` Igor Mammedov
2025-12-02 16:28 ` [PATCH v5 09/28] hw/nvram/fw_cfg: Rename fw_cfg_init_mem() with '_nodma' suffix Zhao Liu
2025-12-02 16:28 ` [PATCH v5 10/28] hw/mips/loongson3_virt: Prefer using fw_cfg_init_mem_nodma() Zhao Liu
2025-12-02 16:28 ` [PATCH v5 11/28] hw/nvram/fw_cfg: Factor fw_cfg_init_mem_internal() out Zhao Liu
2025-12-02 16:28 ` [PATCH v5 12/28] hw/nvram/fw_cfg: Rename fw_cfg_init_mem_wide() -> fw_cfg_init_mem_dma() Zhao Liu
2025-12-02 16:28 ` [PATCH v5 13/28] hw/i386/x86: Remove X86MachineClass::fwcfg_dma_enabled field Zhao Liu
2025-12-02 16:28 ` [PATCH v5 14/28] hw/i386/pc: Remove multiboot.bin Zhao Liu
2025-12-17 14:07   ` Igor Mammedov [this message]
2025-12-02 16:28 ` [PATCH v5 15/28] hw/i386: Assume fw_cfg DMA is always enabled Zhao Liu
2025-12-03  6:11   ` Philippe Mathieu-Daudé
2025-12-17 14:52   ` Igor Mammedov
2025-12-02 16:28 ` [PATCH v5 16/28] hw/i386: Remove linuxboot.bin Zhao Liu
2025-12-17 14:55   ` Igor Mammedov
2025-12-18  7:45     ` Zhao Liu
2025-12-18 14:33       ` Igor Mammedov
2025-12-19  8:44         ` Zhao Liu
2025-12-02 16:28 ` [PATCH v5 17/28] hw/i386/pc: Remove pc_compat_2_6[] array Zhao Liu
2025-12-18 13:16   ` Igor Mammedov
2025-12-02 16:28 ` [PATCH v5 18/28] hw/intc/apic: Remove APICCommonState::legacy_instance_id field Zhao Liu
2025-12-02 16:28 ` [PATCH v5 19/28] hw/core/machine: Remove hw_compat_2_6[] array Zhao Liu
2025-12-18 13:33   ` Igor Mammedov
2025-12-02 16:28 ` [PATCH v5 20/28] hw/virtio/virtio-mmio: Remove VirtIOMMIOProxy::format_transport_address field Zhao Liu
2025-12-18 13:43   ` Igor Mammedov
2025-12-02 16:28 ` [PATCH v5 21/28] hw/i386/pc: Remove deprecated pc-q35-2.7 and pc-i440fx-2.7 machines Zhao Liu
2025-12-02 16:28 ` [PATCH v5 22/28] hw/i386/pc: Remove pc_compat_2_7[] array Zhao Liu
2025-12-18 13:44   ` Igor Mammedov
2025-12-02 16:28 ` [PATCH v5 23/28] target/i386/cpu: Remove CPUX86State::full_cpuid_auto_level field Zhao Liu
2025-12-18 13:51   ` Igor Mammedov
2025-12-02 16:28 ` [PATCH v5 24/28] hw/audio/pcspk: Remove PCSpkState::migrate field Zhao Liu
2025-12-02 16:28 ` [PATCH v5 25/28] hw/core/machine: Remove hw_compat_2_7[] array Zhao Liu
2025-12-18 14:04   ` Igor Mammedov
2025-12-02 16:28 ` [PATCH v5 26/28] hw/i386/intel_iommu: Remove IntelIOMMUState::buggy_eim field Zhao Liu
2025-12-02 16:28 ` [PATCH v5 27/28] hw/virtio/virtio-pci: Remove VirtIOPCIProxy::ignore_backend_features field Zhao Liu
2025-12-02 16:28 ` [PATCH v5 28/28] hw/char/virtio-serial: Do not expose the 'emergency-write' property Zhao Liu
2025-12-18 14:26   ` Igor Mammedov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20251217150747.13d77fab@imammedo \
    --to=imammedo@redhat.com \
    --cc=alistair.francis@wdc.com \
    --cc=amit@kernel.org \
    --cc=anisinha@redhat.com \
    --cc=balaton@eik.bme.hu \
    --cc=berrange@redhat.com \
    --cc=chenhuacai@kernel.org \
    --cc=clement.mathieu--drif@eviden.com \
    --cc=dbarboza@ventanamicro.com \
    --cc=deller@gmx.de \
    --cc=devel@lists.libvirt.org \
    --cc=eduardo@habkost.net \
    --cc=farosas@suse.de \
    --cc=jasowang@redhat.com \
    --cc=jdenemar@redhat.com \
    --cc=jiaxun.yang@flygoat.com \
    --cc=kraxel@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=liwei1518@gmail.com \
    --cc=lvivier@redhat.com \
    --cc=marcandre.lureau@redhat.com \
    --cc=marcel.apfelbaum@gmail.com \
    --cc=mark.caveayland@nutanix.com \
    --cc=mst@redhat.com \
    --cc=mtosatti@redhat.com \
    --cc=palmer@dabbelt.com \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=philmd@linaro.org \
    --cc=pkrempa@redhat.com \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-riscv@nongnu.org \
    --cc=richard.henderson@linaro.org \
    --cc=slp@redhat.com \
    --cc=thuth@redhat.com \
    --cc=wangyanan55@huawei.com \
    --cc=xiaoyao.li@intel.com \
    --cc=yi.l.liu@intel.com \
    --cc=zhao1.liu@intel.com \
    --cc=zhiwei_liu@linux.alibaba.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox