[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [RFC PATCH 7/8] hw/arm: boot
From: |
Christian Pinto |
Subject: |
[Qemu-devel] [RFC PATCH 7/8] hw/arm: boot |
Date: |
Tue, 29 Sep 2015 15:57:38 +0200 |
Modify the boot process of an ARM machine in order to check
whether it is a slave, by checking the slave machine flag.
When the slave flag is on, no kernel, dtb or initrd are loaded into memory.
The boot address of each core is set to the start address of the RAM,
that depends on the machine model executed.
Signed-off-by: Christian Pinto <address@hidden>
---
hw/arm/boot.c | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/hw/arm/boot.c b/hw/arm/boot.c
index bef451b..ee0c4a1 100644
--- a/hw/arm/boot.c
+++ b/hw/arm/boot.c
@@ -590,6 +590,19 @@ static void arm_load_kernel_notify(Notifier *notifier,
void *data)
/* Load the kernel. */
if (!info->kernel_filename || info->firmware_loaded) {
+ if (!info->kernel_filename && machine_slave(current_machine)) {
+ /* If a machine is booted as a slave instance there is no need to
+ * provide the DTB blob or kernel image, that will instead
+ * be copied into memory later by a master instance.
+ * The boot address is set to be at the beginning of the RAM.
+ */
+ info->entry = info->loader_start;
+ CPU_FOREACH(cs) {
+ ARM_CPU(cs)->env.boot_info = info;
+ }
+ return;
+ }
+
if (have_dtb(info)) {
/* If we have a device tree blob, but no kernel to supply it to (or
* the kernel is supposed to be loaded by the bootloader), copy the
--
1.9.1
- [Qemu-devel] [RFC PATCH 0/8] Towards an Heterogeneous QEMU, Christian Pinto, 2015/10/07
- [Qemu-devel] [RFC PATCH 6/8] qemu: slave machine flag, Christian Pinto, 2015/10/07
- [Qemu-devel] [RFC PATCH 2/8] backend: shared memory backend, Christian Pinto, 2015/10/07
- [Qemu-devel] [RFC PATCH 1/8] backend: multi-socket, Christian Pinto, 2015/10/07
- [Qemu-devel] [RFC PATCH 4/8] hw/misc: IDM Device, Christian Pinto, 2015/10/07
- [Qemu-devel] [RFC PATCH 5/8] hw/arm: sysbus-fdt, Christian Pinto, 2015/10/07
- [Qemu-devel] [RFC PATCH 3/8] migration: add shared migration type, Christian Pinto, 2015/10/07
- [Qemu-devel] [RFC PATCH 7/8] hw/arm: boot,
Christian Pinto <=
- [Qemu-devel] [RFC PATCH 8/8] qemu: numa, Christian Pinto, 2015/10/07
- Re: [Qemu-devel] [RFC PATCH 0/8] Towards an Heterogeneous QEMU, Peter Crosthwaite, 2015/10/08
- Re: [Qemu-devel] [RFC PATCH 0/8] Towards an Heterogeneous QEMU, Christian Pinto, 2015/10/08
- Re: [Qemu-devel] [RFC PATCH 0/8] Towards an Heterogeneous QEMU, Peter Crosthwaite, 2015/10/08
- Re: [Qemu-devel] [RFC PATCH 0/8] Towards an Heterogeneous QEMU, Christian Pinto, 2015/10/22
- Re: [Qemu-devel] [RFC PATCH 0/8] Towards an Heterogeneous QEMU, Peter Crosthwaite, 2015/10/25
- Re: [Qemu-devel] [RFC PATCH 0/8] Towards an Heterogeneous QEMU, mar.krzeminski, 2015/10/26
- Re: [Qemu-devel] [RFC PATCH 0/8] Towards an Heterogeneous QEMU, Peter Crosthwaite, 2015/10/26
- Re: [Qemu-devel] [RFC PATCH 0/8] Towards an Heterogeneous QEMU, Christian Pinto, 2015/10/27