qemu-patch-raspberry4/include/hw/arm
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
..
allwinner-a10.h hw/arm/allwinner-a10: initialize EMAC 2014-02-08 14:50:48 +00:00
arm.h hw/arm: pass pristine kernel image to guest firmware over fw_cfg 2014-12-22 23:39:20 +00:00
digic.h hw/arm/digic: add UART support 2013-12-17 20:12:51 +00:00
exynos4210.h i2c: Rename i2c_bus to I2CBus 2014-02-14 16:22:31 +01:00
imx.h hw: move headers to include/ 2013-04-08 18:13:10 +02:00
omap.h hw: Convert from BlockDriverState to BlockBackend, mostly 2014-10-20 14:02:25 +02:00
primecell.h hw: move headers to include/ 2013-04-08 18:13:10 +02:00
pxa.h hw: Convert from BlockDriverState to BlockBackend, mostly 2014-10-20 14:02:25 +02:00
sharpsl.h hw: move headers to include/ 2013-04-08 18:13:10 +02:00
soc_dma.h hw: move headers to include/ 2013-04-08 18:13:10 +02:00