qemu/include/hw
Daniel Henrique Barboza 487d73fc47
hw/riscv/boot.c: consolidate all kernel init in riscv_load_kernel()
The microchip_icicle_kit, sifive_u, spike and virt boards are now doing
the same steps when '-kernel' is used:

- execute load_kernel()
- load init_rd()
- write kernel_cmdline

Let's fold everything inside riscv_load_kernel() to avoid code
repetition. To not change the behavior of boards that aren't calling
riscv_load_init(), add an 'load_initrd' flag to riscv_load_kernel() and
allow these boards to opt out from initrd loading.

Cc: Palmer Dabbelt <palmer@dabbelt.com>
Reviewed-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Signed-off-by: Daniel Henrique Barboza <dbarboza@ventanamicro.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-Id: <20230206140022.2748401-3-dbarboza@ventanamicro.com>
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
2023-02-16 07:55:30 -08:00
..
acpi pcihp: make bridge describe itself using AcpiDevAmlIfClass:build_dev_aml 2023-01-28 06:21:29 -05:00
adc hw/arm/npcm7xx: Declare QOM macros using OBJECT_DECLARE_SIMPLE_TYPE() 2023-01-12 17:15:09 +00:00
arm Drop duplicate #include 2023-02-08 07:28:05 +01:00
audio
block include/hw/block: Include hw/block/block.h where needed 2023-01-20 07:25:06 +01:00
char hw/char/pl011: refactor FIFO depth handling code 2023-02-03 12:59:21 +00:00
core accel: introduce accelerator blocker API 2023-01-11 09:59:39 +01:00
cpu
cris include: Include headers where needed 2023-01-08 01:54:22 -05:00
cxl hw/cxl: Clean up includes 2023-02-08 07:16:23 +01:00
display include: Include headers where needed 2023-01-08 01:54:22 -05:00
dma include: Include headers where needed 2023-01-08 01:54:22 -05:00
firmware hw/smbios: add core_count2 to smbios table type 4 2022-11-07 14:08:17 -05:00
gpio
hyperv
i2c hw/i2c/versatile_i2c: Replace TYPE_VERSATILE_I2C -> TYPE_ARM_SBCON_I2C 2023-01-23 13:32:38 +00:00
i386 x86: don't let decompressed kernel image clobber setup_data 2023-01-28 06:21:29 -05:00
ide virtio,pc,pci: features, cleanups, fixes 2023-01-09 10:07:12 +00:00
input hw/input: Clean up includes 2023-02-08 07:16:23 +01:00
intc hw/intc: Extract the IRQ counting functions into a separate file 2023-01-13 16:22:57 +01:00
ipack
ipmi
isa hw/isa/isa-bus: Turn isa_build_aml() into qbus_build_aml() 2023-01-27 11:47:02 -05:00
kvm
loongarch hw/loongarch/virt: Add cfi01 pflash device 2022-12-15 15:46:12 +08:00
m68k
mem acpi/nvdimm: Define trace events for NVDIMM and substitute nvdimm_debug() 2022-07-26 10:37:46 -04:00
mips hw/mips/bootloader: Handle buffers as opaque arrays 2023-01-13 09:32:32 +01:00
misc Don't include headers already included by qemu/osdep.h 2023-02-08 07:28:05 +01:00
net hw/arm/npcm7xx: Declare QOM macros using OBJECT_DECLARE_SIMPLE_TYPE() 2023-01-12 17:15:09 +00:00
nubus
nvram aspeed queue: 2023-02-07 20:13:38 +00:00
openrisc hw/openrisc: Split re-usable boot time apis out to boot.c 2022-09-04 07:02:56 +01:00
pci Don't include headers already included by qemu/osdep.h 2023-02-08 07:28:05 +01:00
pci-bridge
pci-host ppc/pnv/pci: Update PHB5 version register 2023-02-05 06:40:28 -03:00
ppc include/hw/ppc include/hw/pci-host: Drop extra typedefs 2023-01-20 07:25:22 +01:00
rdma
remote include/hw/pci: Split pci_device.h off pci.h 2023-01-08 01:54:22 -05:00
riscv hw/riscv/boot.c: consolidate all kernel init in riscv_load_kernel() 2023-02-16 07:55:30 -08:00
rtc hw/rtc/mc146818rtc: Make the mc146818 RTC device target independent 2023-01-13 16:22:57 +01:00
rx
s390x s390x/pci: reset ISM passthrough devices on shutdown and system reset 2022-12-15 15:02:34 +01:00
scsi include/hw/scsi/scsi.h: Remove unused scsi_legacy_handle_cmdline() prototype 2022-10-22 23:21:16 +02:00
sd hw/arm/npcm7xx: Declare QOM macros using OBJECT_DECLARE_SIMPLE_TYPE() 2023-01-12 17:15:09 +00:00
sensor hw/sensor: Add IC_DEVICE_ID to ISL voltage regulators 2022-07-14 16:24:38 +02:00
sh4
southbridge include/hw/pci: Split pci_device.h off pci.h 2023-01-08 01:54:22 -05:00
sparc
ssi include: Include headers where needed 2023-01-08 01:54:22 -05:00
timer include: Include headers where needed 2023-01-08 01:54:22 -05:00
tricore hw/tricore: Clean up includes 2023-02-08 07:16:23 +01:00
usb include: Include headers where needed 2023-01-08 01:54:22 -05:00
vfio
virtio virtio-mem: Migrate immutable properties early 2023-02-06 19:22:56 +01:00
watchdog hw/watchdog/wdt_aspeed: Log unimplemented registers as UNIMP level 2023-02-07 09:02:05 +01:00
xen hw/xen: use G_GNUC_PRINTF/SCANF for various functions 2023-01-11 10:44:33 +01:00
xtensa
boards.h virtio,pc,pci: features, cleanups, fixes 2023-01-09 10:07:12 +00:00
clock.h
elf_ops.h treewide: Remove the unnecessary space before semicolon 2022-10-24 13:41:10 +02:00
fw-path-provider.h
hotplug.h
hw.h
ide.h
irq.h
loader-fit.h
loader.h hw/core/loader: Remove declarations of option_rom_has_mr/rom_file_has_mr 2023-02-07 09:02:04 +01:00
nmi.h
or-irq.h
pcmcia.h
platform-bus.h
ptimer.h
qdev-clock.h
qdev-core.h hw: Remove device_legacy_reset() 2022-12-16 15:55:32 +00:00
qdev-dma.h
qdev-properties-system.h
qdev-properties.h
register.h
registerfields.h
resettable.h
stream.h
sysbus.h
usb.h hw/usb: fix tab indentation 2022-11-08 11:13:48 +01:00
vmstate-if.h