qemu-e2k/hw
Laszlo Ersek 07abe45c48 hw/arm: pass pristine kernel image to guest firmware over fw_cfg
Introduce the new boolean field "arm_boot_info.firmware_loaded". When this
field is set, it means that the portion of guest DRAM that the VCPU
normally starts to execute, or the pflash chip that the VCPU normally
starts to execute, has been populated by board-specific code with
full-fledged guest firmware code, before the board calls
arm_load_kernel().

Simultaneously, "arm_boot_info.firmware_loaded" guarantees that the board
code has set up the global firmware config instance, for arm_load_kernel()
to find with fw_cfg_find().

Guest kernel (-kernel) and guest firmware (-bios, -pflash) has always been
possible to specify independently on the command line. The following cases
should be considered:

nr  -bios    -pflash  -kernel  description
             unit#0
--  -------  -------  -------  -------------------------------------------
1   present  present  absent   Board code rejects this case, -bios and
    present  present  present  -pflash unit#0 are exclusive. Left intact
                               by this patch.

2   absent   absent   present  Traditional kernel loading, with qemu's
                               minimal board firmware. Left intact by this
                               patch.

3   absent   present  absent   Preexistent case for booting guest firmware
    present  absent   absent   loaded with -bios or -pflash. Left intact
                               by this patch.

4   absent   absent   absent   Preexistent case for not loading any
                               firmware or kernel up-front. Left intact by
                               this patch.

5   present  absent   present  New case introduced by this patch: kernel
    absent   present  present  image is passed to externally loaded
                               firmware in unmodified form, using fw_cfg.

An easy way to see that this patch doesn't interfere with existing cases
is to realize that "info->firmware_loaded" is constant zero at this point.
Which makes the "outer" condition unchanged, and the "inner" condition
(with the fw_cfg-related code) dead.

Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-id: 1419250305-31062-11-git-send-email-pbonzini@redhat.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2014-12-22 23:39:20 +00:00
..
9pfs
acpi
alpha ide: Update ide_drive_get to be HBA agnostic 2014-10-03 10:30:33 +01:00
arm hw/arm: pass pristine kernel image to guest firmware over fw_cfg 2014-12-22 23:39:20 +00:00
audio
block
bt
char
core hw/loader: split out load_image_gzipped_buffer() 2014-12-22 23:39:19 +00:00
cpu
cris
display
dma
gpio
i2c
i386 fw_cfg: move boards to fw_cfg_init_io() / fw_cfg_init_mem() 2014-12-22 23:39:15 +00:00
ide
input
intc
ipack
isa
lm32
m68k
mem
microblaze
mips
misc
moxie
net e1000: defer packets until BM enabled 2014-12-19 13:17:06 +00:00
nvram fw_cfg_mem: expose the "data_width" property with fw_cfg_init_mem_wide() 2014-12-22 23:39:18 +00:00
openrisc
pci
pci-bridge
pci-host
pcmcia
ppc fw_cfg: move boards to fw_cfg_init_io() / fw_cfg_init_mem() 2014-12-22 23:39:15 +00:00
s390x
scsi - Migration and linuxboot fixes for 2.2 regressions 2014-12-15 16:43:42 +00:00
sd
sh4
sparc fw_cfg: move boards to fw_cfg_init_io() / fw_cfg_init_mem() 2014-12-22 23:39:15 +00:00
sparc64 fw_cfg: move boards to fw_cfg_init_io() / fw_cfg_init_mem() 2014-12-22 23:39:15 +00:00
ssi
timer
tpm
tricore
unicore32
usb
virtio
watchdog
xen
xenpv
xtensa
Makefile.objs