qemu-patch-raspberry4/hw/i386
Laszlo Ersek 637a5acb46 hw/i386/pc_sysfw: support two flash drives
This patch allows the user to usefully specify

  -drive file=img_1,if=pflash,format=raw,readonly \
  -drive file=img_2,if=pflash,format=raw

on the command line. The flash images will be mapped under 4G in their
reverse unit order -- that is, with their base addresses progressing
downwards, in increasing unit order.

(The unit number increases with command line order if not explicitly
specified.)

This accommodates the following use case: suppose that OVMF is split in
two parts, a writeable host file for non-volatile variable storage, and a
read-only part for bootstrap and decompressible executable code.

The binary code part would be read-only, centrally managed on the host
system, and passed in as unit 0. The variable store would be writeable,
VM-specific, and passed in as unit 1.

  00000000ffe00000-00000000ffe1ffff (prio 0, R-): system.flash1
  00000000ffe20000-00000000ffffffff (prio 0, R-): system.flash0

(If the guest tries to write to the flash range that is backed by the
read-only drive, pflash_update() is never called; various flash
programming/erase errors are returned to the guest instead. See the
callers of pflash_update(), and the initialization of "pfl->ro", in
"hw/block/pflash_cfi01.c".)

Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2013-12-23 13:12:34 +02:00
..
kvm Merge remote-tracking branch 'qemu-kvm/uq/master' into staging 2013-11-21 07:09:52 -08:00
acpi-build.c acpi: strip compiler info in built-in DSDT 2013-12-10 13:29:22 +02:00
acpi-build.h i386: ACPI table generation code from seabios 2013-10-14 17:48:57 +03:00
acpi-defs.h i386: ACPI table generation code from seabios 2013-10-14 17:48:57 +03:00
acpi-dsdt-cpu-hotplug.dsl i386: add ACPI table files from seabios 2013-10-14 17:48:51 +03:00
acpi-dsdt-dbug.dsl i386: add ACPI table files from seabios 2013-10-14 17:48:51 +03:00
acpi-dsdt-hpet.dsl i386: add ACPI table files from seabios 2013-10-14 17:48:51 +03:00
acpi-dsdt-isa.dsl i386: add ACPI table files from seabios 2013-10-14 17:48:51 +03:00
acpi-dsdt-pci-crs.dsl i386: add ACPI table files from seabios 2013-10-14 17:48:51 +03:00
acpi-dsdt.dsl ACPI DSDT: Make control method IQCR serialized 2013-12-10 13:29:22 +02:00
acpi-dsdt.hex.generated ACPI DSDT: Make control method IQCR serialized 2013-12-10 13:29:22 +02:00
bios-linker-loader.c acpi-build: fix build on glib < 2.14 2013-11-21 07:54:03 -08:00
bios-linker-loader.h i386: add bios linker/loader 2013-10-14 17:48:52 +03:00
kvmvapic.c kvmvapic: Prevent reading beyond the end of guest RAM 2013-10-04 13:13:16 +03:00
Makefile.objs hw/i386/Makefile.obj: use $(PYTHON) to run .py scripts consistently 2013-11-17 00:30:14 +04:00
multiboot.c multiboot: Calculate upper_mem in the ROM 2013-06-28 14:01:52 -05:00
multiboot.h refer to FWCfgState explicitly 2013-06-02 18:14:02 +03:00
pc.c pc: use macro for HPET type 2013-12-11 20:11:10 +02:00
pc_piix.c pc_piix: document gigabyte_align 2013-12-23 13:12:34 +02:00
pc_q35.c hpet: enable to entitle more irq pins for hpet 2013-12-11 20:11:09 +02:00
pc_sysfw.c hw/i386/pc_sysfw: support two flash drives 2013-12-23 13:12:34 +02:00
q35-acpi-dsdt.dsl ACPI DSDT: Make control method IQCR serialized 2013-12-10 13:29:22 +02:00
q35-acpi-dsdt.hex.generated ACPI DSDT: Make control method IQCR serialized 2013-12-10 13:29:22 +02:00
smbios.c smbios: Set system manufacturer, product & version by default 2013-12-10 13:29:22 +02:00
ssdt-misc.dsl i386: add ACPI table files from seabios 2013-10-14 17:48:51 +03:00
ssdt-misc.hex.generated acpi: pre-compiled ASL files 2013-10-14 17:48:51 +03:00
ssdt-pcihp.dsl i386: add ACPI table files from seabios 2013-10-14 17:48:51 +03:00
ssdt-pcihp.hex.generated acpi: ssdt pcihp: updat generated file 2013-10-14 17:48:52 +03:00
ssdt-proc.dsl ssdt: fix PBLK length 2013-10-14 17:48:57 +03:00
ssdt-proc.hex.generated ssdt-proc: update generated file 2013-10-14 17:48:57 +03:00
xen_domainbuild.c aio / timers: Switch entire codebase to the new timer API 2013-08-22 19:14:24 +02:00
xen_domainbuild.h hw: move private headers to hw/ subdirectories. 2013-04-08 18:13:16 +02:00
xen_machine_pv.c hw: Clean up bogus default boot order 2013-08-28 10:16:47 +03:00