hw/arm: new interface for devices which need to behave differently for kernel boot
commitd8b1ae4237b5f8cf5037a7f341ff43dc02955256
authorPeter Maydell <peter.maydell@linaro.org>
Tue, 8 Sep 2015 16:38:43 +0000 (8 17:38 +0100)
committerPeter Maydell <peter.maydell@linaro.org>
Tue, 8 Sep 2015 16:38:43 +0000 (8 17:38 +0100)
tree501ba7d482464acd36735116693f5d564f92854e
parentd714b8de7747f20fe42e5716d1d44f91e2b891f4
hw/arm: new interface for devices which need to behave differently for kernel boot

For ARM we have a little minimalist bootloader in hw/arm/boot.c which
takes the place of firmware if we're directly booting a Linux kernel.
Unfortunately a few devices need special case handling in this situation
to do the initialization which on real hardware would be done by
firmware. (In particular if we're booting a kernel in NonSecure state
then we need to make a TZ-aware GIC put all its interrupts into Group 1,
or the guest will be unable to use them.)

Create a new QOM interface which can be implemented by devices which
need to do something different from their default reset behaviour.
The callback will be called after machine initialization and before
first reset.

Suggested-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Tested-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
Message-id: 1441383782-24378-3-git-send-email-peter.maydell@linaro.org
hw/arm/boot.c
include/hw/arm/linux-boot-if.h [new file with mode: 0644]