Skip to content

RFC Linux boot API and usage in ARM boots

Peter Crosthwaite qemu-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v0 RFC Latest4 patches 3 repliesIn review

Patches in v0 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4qom: Add recursive version of object_child_for_eachinclude/qom/object.h qom/object.c+37 -30 replies
2/4hw: Introduce Linux Device APIhw/Makefile.objs hw/guest/Makefile.objs hw/guest/linux.c +1 more+48 -00 replies
3/4intc: arm_gic: Implement Linux boothw/intc/arm_gic.c+21 -01 reply
4/4arm: boot: Add support for Linux specific boot devshw/arm/boot.c+18 -02 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v0 yet.

Read the v0 thread

Cover letter [Qemu-devel] [RFC v0 0/4] Linux boot API and usage in ARM boots

Hi Peter and All,

QEMU continues to support booting Linux kernels directly without firmware, but Linux is becoming more and more reliant on firmware or bootloader setup. In cases where the firmware is very complicated, the firmware should just be run as the guest and Linux boot is defeatured. But in many cases there is only a handful of operations needed to get into a well defined linux-operable state.

So add an interface that devices can implement that allow definition of that state. QEMU Bootloaders can call the linux_init fn for these devices when it is identified that the boot image is Linux sans firmware.

Not complete. Need to solve the problem of conditionals. I.e. how to handle a GIC NS setup only in a NS boot. Opaque data might do it.

RFCing as Peter sent a related series for GIC NS setup.

P1 adds a recursive version of object_child_for_each which allows full QOM tree iterations. I have another use of this out of tree (but well out of scope of this series).

P2 is the new API. P3 adds it to GIC, but I have #if 0'd the functional code as it should be rebased to Peter's implementation of the GIC-side functionality. P4 adds boot.c support for Linux devs.

Regards,
Peter

Peter Crosthwaite (4):
qom: Add recursive version of object_child_for_each
hw: Introduce Linux Device API
intc: arm_gic: Implement Linux boot
arm: boot: Add support for Linux specific boot devs

 hw/Makefile.objs         |  1 +
 hw/arm/boot.c            | 18 ++++++++++++++++++
 hw/guest/Makefile.objs   |  1 +
 hw/guest/linux.c         | 14 ++++++++++++++
 hw/intc/arm_gic.c        | 21 +++++++++++++++++++++
 include/hw/guest/linux.h | 32 ++++++++++++++++++++++++++++++++
 include/qom/object.h     | 15 +++++++++++++++
 qom/object.c             | 25 ++++++++++++++++++++++---
 8 files changed, 124 insertions(+), 3 deletions(-)
 create mode 100644 hw/guest/Makefile.objs
 create mode 100644 hw/guest/linux.c
 create mode 100644 include/hw/guest/linux.h
Signature · 1 line
2.4.5.3.g6a5966f