seabios update
cover seabios update
Hi,
SeaBIOS update patch series. A bit more complicated than just "update submodule and binaries" this time as seabios doesn't fit into 256k any more. So we have to go & build seabios twice, one stripped down version for old machine types and one full-featured for 2.0. Also qemu needs some changes so we can use different firmeare binaries per machine type.
This patch series also switches vgabios from lgplvgabios to seavgabios.
Git tree with updated binary blobs for easy testing available at:
git://git.kraxel.org/qemu seabios-6233543
Please review and test.
seabios plans for the 1.7.4 release are freeze on 6th, release on 20th of december. I want get a snapshot into qemu once we are in freeze so the new bits get some qemu testing during the freeze period. Once we have a final release update to that of course.
cheers,
Gerd
Gerd Hoffmann (8):
add pc-{i440fx,q35}-2.0 machine types
add firmware to machine options
roms: update seabios submodule to latest master
roms: build two seabios binaries
roms: enable seabios cross builds
roms: update seabios binaries
roms: update vgabios binaries
pc: switch 2.0 machine types to large seabios binary
hw/i386/pc_piix.c | 16 ++++++++++++++-- hw/i386/pc_q35.c | 13 ++++++++++++- pc-bios/acpi-dsdt.aml | Bin 4407 -> 4407 bytes pc-bios/bios-256k.bin | Bin 0 -> 262144 bytes pc-bios/bios.bin | Bin 131072 -> 131072 bytes pc-bios/q35-acpi-dsdt.aml | Bin 7344 -> 7344 bytes pc-bios/vgabios-cirrus.bin | Bin 35840 -> 36352 bytes pc-bios/vgabios-qxl.bin | Bin 40448 -> 36352 bytes pc-bios/vgabios-stdvga.bin | Bin 40448 -> 36352 bytes pc-bios/vgabios-vmware.bin | Bin 40448 -> 36352 bytes pc-bios/vgabios.bin | Bin 40448 -> 36352 bytes roms/Makefile | 9 ++++++--- roms/config.seabios | 1 - roms/config.seabios-128k | 6 ++++++ roms/config.seabios-256k | 3 +++ roms/seabios | 2 +- vl.c | 7 ++++++- 17 files changed, 48 insertions(+), 9 deletions(-) create mode 100644 pc-bios/bios-256k.bin delete mode 100644 roms/config.seabios create mode 100644 roms/config.seabios-128k create mode 100644 roms/config.seabios-256k
Signature · 1 line
1.8.3.1
PATCH 1/8 add pc-{i440fx,q35}-2.0 machine types
--- hw/i386/pc_piix.c | 14 ++++++++++++-- hw/i386/pc_q35.c | 11 ++++++++++- 2 files changed, 22 insertions(+), 3 deletions(-)
hw/i386/pc_piix.c +12 -2
@@ -339,13 +339,22 @@ static void pc_xen_hvm_init(QEMUMachineInitArgs *args) .desc = "Standard PC (i440FX + PIIX, 1996)", \ .hot_add_cpu = pc_hot_add_cpu +#define PC_I440FX_2_0_MACHINE_OPTIONS PC_I440FX_MACHINE_OPTIONS + +static QEMUMachine pc_i440fx_machine_v2_0 = { +PC_I440FX_2_0_MACHINE_OPTIONS , + .name ="pc-i440fx-2.0" , + .alias ="pc" , + .init = pc_init_pci, + .is_default =1 , +}; +#define PC_I440FX_1_7_MACHINE_OPTIONS PC_I440FX_MACHINE_OPTIONS +static QEMUMachine pc_i440fx_machine_v1_7 = {PC_I440FX_1_7_MACHINE_OPTIONS , .name ="pc-i440fx-1.7" , - .alias ="pc" , .init = pc_init_pci, - .is_default =1 , };#define PC_I440FX_1_6_MACHINE_OPTIONS PC_I440FX_MACHINE_OPTIONS
@@ -747,6 +756,7 @@ static QEMUMachine xenfv_machine = {static void pc_machine_init (void ) { +qemu_register_machine (&pc_i440fx_machine_v2_0);qemu_register_machine (&pc_i440fx_machine_v1_7);qemu_register_machine (&pc_i440fx_machine_v1_6);qemu_register_machine (&pc_i440fx_machine_v1_5);
hw/i386/pc_q35.c +10 -1
@@ -259,12 +259,20 @@ static void pc_q35_init_1_4(QEMUMachineInitArgs *args) .desc = "Standard PC (Q35 + ICH9, 2009)", \ .hot_add_cpu = pc_hot_add_cpu +#define PC_Q35_2_0_MACHINE_OPTIONS PC_Q35_MACHINE_OPTIONS + +static QEMUMachine pc_q35_machine_v2_0 = { +PC_Q35_2_0_MACHINE_OPTIONS , + .name ="pc-q35-2.0" , + .alias ="q35" , + .init = pc_q35_init, +}; +#define PC_Q35_1_7_MACHINE_OPTIONS PC_Q35_MACHINE_OPTIONSstatic QEMUMachine pc_q35_machine_v1_7 = {PC_Q35_1_7_MACHINE_OPTIONS , .name ="pc-q35-1.7" , - .alias ="q35" , .init = pc_q35_init, };
@@ -306,6 +314,7 @@ static QEMUMachine pc_q35_machine_v1_4 = {static void pc_q35_machine_init (void ) { +qemu_register_machine (&pc_q35_machine_v2_0);qemu_register_machine (&pc_q35_machine_v1_7);qemu_register_machine (&pc_q35_machine_v1_6);qemu_register_machine (&pc_q35_machine_v1_5);
Signature · 1 line
1.8.3.1
Re: [Qemu-devel] [PATCH 1/8] add pc-{i440fx,q35}-2.0 machine types
On Mon, 2 Dec 2013 13:24:36 +0100
Gerd Hoffmann <[email protected]> wrote:
why 2.0, are we jumping from 1.7 strait to 2.0?
Quoted 77 lines
Signed-off-by Gerd Hoffmann <[email protected]>--- hw/i386/pc_piix.c | 14 ++++++++++++-- hw/i386/pc_q35.c | 11 ++++++++++- 2 files changed, 22 insertions(+), 3 deletions(-)hw/i386/pc_piix.c +12
-2@@ -339,13 +339,22 @@ static void pc_xen_hvm_init(QEMUMachineInitArgs *args) .desc = "Standard PC (i440FX + PIIX, 1996)", \ .hot_add_cpu = pc_hot_add_cpu +#define PC_I440FX_2_0_MACHINE_OPTIONS PC_I440FX_MACHINE_OPTIONS + +static QEMUMachine pc_i440fx_machine_v2_0 = { +PC_I440FX_2_0_MACHINE_OPTIONS , + .name ="pc-i440fx-2.0" , + .alias ="pc" , + .init = pc_init_pci, + .is_default =1 , +}; +#define PC_I440FX_1_7_MACHINE_OPTIONS PC_I440FX_MACHINE_OPTIONS +static QEMUMachine pc_i440fx_machine_v1_7 = {PC_I440FX_1_7_MACHINE_OPTIONS , .name ="pc-i440fx-1.7" , - .alias ="pc" , .init = pc_init_pci, - .is_default =1 , };#define PC_I440FX_1_6_MACHINE_OPTIONS PC_I440FX_MACHINE_OPTIONS@@ -747,6 +756,7 @@ static QEMUMachine xenfv_machine = {static void pc_machine_init (void ) { +qemu_register_machine (&pc_i440fx_machine_v2_0);qemu_register_machine (&pc_i440fx_machine_v1_7);qemu_register_machine (&pc_i440fx_machine_v1_6);qemu_register_machine (&pc_i440fx_machine_v1_5);hw/i386/pc_q35.c +10
-1@@ -259,12 +259,20 @@ static void pc_q35_init_1_4(QEMUMachineInitArgs *args) .desc = "Standard PC (Q35 + ICH9, 2009)", \ .hot_add_cpu = pc_hot_add_cpu +#define PC_Q35_2_0_MACHINE_OPTIONS PC_Q35_MACHINE_OPTIONS + +static QEMUMachine pc_q35_machine_v2_0 = { +PC_Q35_2_0_MACHINE_OPTIONS , + .name ="pc-q35-2.0" , + .alias ="q35" , + .init = pc_q35_init, +}; +#define PC_Q35_1_7_MACHINE_OPTIONS PC_Q35_MACHINE_OPTIONSstatic QEMUMachine pc_q35_machine_v1_7 = {PC_Q35_1_7_MACHINE_OPTIONS , .name ="pc-q35-1.7" , - .alias ="q35" , .init = pc_q35_init, };@@ -306,6 +314,7 @@ static QEMUMachine pc_q35_machine_v1_4 = {static void pc_q35_machine_init (void ) { +qemu_register_machine (&pc_q35_machine_v2_0);qemu_register_machine (&pc_q35_machine_v1_7);qemu_register_machine (&pc_q35_machine_v1_6);qemu_register_machine (&pc_q35_machine_v1_5);
Re: [Qemu-devel] [PATCH 1/8] add pc-{i440fx,q35}-2.0 machine types
Quoted 3 lines · Igor Mammedov
On Mon, 2 Dec 2013 13:24:36 +0100
Gerd Hoffmann <[email protected]> wrote:
why 2.0, are we jumping from 1.7 strait to 2.0?
Looks like this is the plan ...
nilsson kraxel ~/projects/qemu# git show master
commit 7dc65c02fe3fb8f3146ce0b9ff5fec5945329f0e
Author: Anthony Liguori <[email protected]> Date: Wed Nov 27 14:02:45 2013 -0800
Open 2.0 development tree
cheers,
Gerd
Re: [Qemu-devel] [PATCH 1/8] add pc-{i440fx,q35}-2.0 machine types
Am 02.12.2013 15:44, schrieb Gerd Hoffmann:
Quoted 5 lines · Igor Mammedov
Quoted 1 line
why 2.0, are we jumping from 1.7 strait to 2.0?
Looks like this is the plan ...
Quoted 8 lines
nilsson kraxel ~/projects/qemu# git show master
commit7dc65c02fe3fb8f3146ce0b9ff5fec5945329f0eAuthor: Anthony Liguori <[email protected]> Date: Wed Nov 27 14:02:45 2013 -0800Open 2.0 development tree
Signed-off-by Anthony Liguori <[email protected]>
Yes, Anthony announced at QEMU Summit to do regular major version updates, and in theory that should be in the minutes posted to the list after KVM Forum...
Regards,
Andreas
Signature · 2 lines
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg
PATCH 2/8 add firmware to machine options
In reply to Gerd HoffmannThis patch adds firmware to the machine options. -bios <file> becomes a shortcut for -machine firmware=<file>. Advantage is that the firmware can be specified via config file as -machine is parsed using QemuOpts and it is also possible to use different defaults for different machine types (via QEMUMachine->default_machine_opts).
--- vl.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
vl.c +6 -1
@@ -428,6 +428,10 @@ static QemuOptsList qemu_machine_opts = { .name = "usb", .type = QEMU_OPT_BOOL, .help = "Set on/off to enable/disable usb", + },{ + .name = "firmware", + .type = QEMU_OPT_STRING, + .help = "firmware image", }, {/* End of list */ } },
@@ -3229,7 +3233,7 @@ int main(int argc, char **argv, char **envp) }break ;case QEMU_OPTION_bios: - bios_name = optarg; +qemu_opts_set (qemu_find_opts ("machine" ),0 ,"firmware" , optarg);break ;case QEMU_OPTION_singlestep: singlestep =1 ;
@@ -4050,6 +4054,7 @@ int main(int argc, char **argv, char **envp) kernel_filename =qemu_opt_get (machine_opts,"kernel" ); initrd_filename =qemu_opt_get (machine_opts,"initrd" ); kernel_cmdline =qemu_opt_get (machine_opts,"append" ); + bios_name =qemu_opt_get (machine_opts,"firmware" ); boot_order = machine->default_boot_order; opts =qemu_opts_find (qemu_find_opts ("boot-opts" ),NULL );
Signature · 1 line
1.8.3.1
PATCH 3/8 roms: update seabios submodule to latest master
In reply to Gerd Hoffmann--- roms/seabios | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
roms/seabios +1 -1
@@ -1 +1 @@ -Subproject commit ece025f5980bae88fa677bc9c0d24d2e580e205d +Subproject commit 62335436b649aea80242b6961f23c59b8f989f73
Signature · 1 line
1.8.3.1
PATCH 4/8 roms: build two seabios binaries
In reply to Gerd HoffmannAdding xhci support to seabios made it jump over the 128k line. Changing the bios size breaks migration, so we have to keep a 128k seabios binary for old machine types. New machine types can use a large 256k bios which should be big enougth for a while.
This patch updates the seabios build process to build seabios twice, once full featured and once with xen and xhci turned off so the resulting binary is small enougth to fit into 128k.
--- roms/Makefile | 7 ++++--- roms/config.seabios | 1 - roms/config.seabios-128k | 6 ++++++ roms/config.seabios-256k | 3 +++ 4 files changed, 13 insertions(+), 4 deletions(-) delete mode 100644 roms/config.seabios create mode 100644 roms/config.seabios-128k create mode 100644 roms/config.seabios-256k
roms/Makefile +4 -3
@@ -56,9 +56,10 @@ default: @echo " the EfiRom utility from edk2 / tianocore)" @echo " slof -- update slof.bin" -bios: build-seabios-config-seabios - cp seabios/builds/seabios/bios.bin ../pc-bios/bios.bin - cp seabios/builds/seabios/*dsdt.aml ../pc-bios/ +bios: build-seabios-config-seabios-128k build-seabios-config-seabios-256k + cp seabios/builds/seabios-128k/bios.bin ../pc-bios/bios.bin + cp seabios/builds/seabios-256k/bios.bin ../pc-bios/bios-256k.bin + cp seabios/builds/seabios-256k/src/fw/*dsdt.aml ../pc-bios/ seavgabios: $(patsubst %,seavgabios-%,$(vgabios_variants))
roms/config.seabios deleted +0 -1
@@ -1 +0,0 @@ -# empty, default config works for us
roms/config.seabios-128k new file +6 -0
@@ -0,0 +1,6 @@ +# for qemu machine types 1.7 + older +# need to turn off features (xhci) to make it fit into 128k +CONFIG_QEMU=y +CONFIG_ROM_SIZE=128 +CONFIG_XEN=n +CONFIG_USB_XHCI=n
roms/config.seabios-256k new file +3 -0
@@ -0,0 +1,3 @@ +# for qemu machine types 2.0 + newer +CONFIG_QEMU=y +CONFIG_ROM_SIZE=256
Signature · 1 line
1.8.3.1
PATCH 5/8 roms: enable seabios cross builds
In reply to Gerd Hoffmann--- roms/Makefile | 2 ++ 1 file changed, 2 insertions(+)
roms/Makefile +2 -0
@@ -73,9 +73,11 @@ build-seabios-config-%: config.% mkdir -p seabios/builds/$* cp $< seabios/builds/$*/.config $(MAKE) $(MAKEFLAGS) -C seabios \ + CROSS_COMPILE=$(x86_64_cross_prefix) \ KCONFIG_CONFIG=$(CURDIR)/seabios/builds/$*/.config \ OUT=$(CURDIR)/seabios/builds/$*/ oldnoconfig $(MAKE) $(MAKEFLAGS) -C seabios \ + CROSS_COMPILE=$(x86_64_cross_prefix) \ KCONFIG_CONFIG=$(CURDIR)/seabios/builds/$*/.config \ OUT=$(CURDIR)/seabios/builds/$*/ all
Signature · 1 line
1.8.3.1
PATCH 6/8 roms: update seabios binaries
In reply to Gerd Hoffmann--- pc-bios/acpi-dsdt.aml | Bin 4407 -> 4407 bytes pc-bios/bios-256k.bin | Bin 0 -> 262144 bytes pc-bios/bios.bin | Bin 131072 -> 131072 bytes pc-bios/q35-acpi-dsdt.aml | Bin 7344 -> 7344 bytes 4 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 pc-bios/bios-256k.bin
pc-bios/acpi-dsdt.aml binary +0 -0
pc-bios/bios-256k.bin new file binary +0 -0
pc-bios/bios.bin binary +0 -0
pc-bios/q35-acpi-dsdt.aml binary +0 -0
Signature · 1 line
1.8.3.1
PATCH 7/8 roms: update vgabios binaries
In reply to Gerd HoffmannThis also switches from lgplvgabios to seavgabios.
--- pc-bios/vgabios-cirrus.bin | Bin 35840 -> 36352 bytes pc-bios/vgabios-qxl.bin | Bin 40448 -> 36352 bytes pc-bios/vgabios-stdvga.bin | Bin 40448 -> 36352 bytes pc-bios/vgabios-vmware.bin | Bin 40448 -> 36352 bytes pc-bios/vgabios.bin | Bin 40448 -> 36352 bytes 5 files changed, 0 insertions(+), 0 deletions(-)
pc-bios/vgabios-cirrus.bin binary +0 -0
pc-bios/vgabios-qxl.bin binary +0 -0
pc-bios/vgabios-stdvga.bin binary +0 -0
pc-bios/vgabios-vmware.bin binary +0 -0
pc-bios/vgabios.bin binary +0 -0
Signature · 1 line
1.8.3.1
PATCH 8/8 pc: switch 2.0 machine types to large seabios binary
In reply to Gerd Hoffmann--- hw/i386/pc_piix.c | 4 +++- hw/i386/pc_q35.c | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-)
hw/i386/pc_piix.c +3 -1
@@ -339,7 +339,9 @@ static void pc_xen_hvm_init(QEMUMachineInitArgs *args) .desc = "Standard PC (i440FX + PIIX, 1996)", \ .hot_add_cpu = pc_hot_add_cpu -#define PC_I440FX_2_0_MACHINE_OPTIONS PC_I440FX_MACHINE_OPTIONS +#define PC_I440FX_2_0_MACHINE_OPTIONS \ + PC_I440FX_MACHINE_OPTIONS, \ + .default_machine_opts = "firmware=bios-256k.bin"static QEMUMachine pc_i440fx_machine_v2_0 = {PC_I440FX_2_0_MACHINE_OPTIONS ,
hw/i386/pc_q35.c +3 -1
@@ -259,7 +259,9 @@ static void pc_q35_init_1_4(QEMUMachineInitArgs *args) .desc = "Standard PC (Q35 + ICH9, 2009)", \ .hot_add_cpu = pc_hot_add_cpu -#define PC_Q35_2_0_MACHINE_OPTIONS PC_Q35_MACHINE_OPTIONS +#define PC_Q35_2_0_MACHINE_OPTIONS \ + PC_Q35_MACHINE_OPTIONS, \ + .default_machine_opts = "firmware=bios-256k.bin"static QEMUMachine pc_q35_machine_v2_0 = {PC_Q35_2_0_MACHINE_OPTIONS ,
Signature · 1 line
1.8.3.1