aboutsummaryrefslogtreecommitdiff
path: root/hw/arm/boot.c
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2019-02-05 16:52:42 +0000
committerPeter Maydell <peter.maydell@linaro.org>2019-02-05 16:52:42 +0000
commit5614ca800e05dc07e4045b7738351058538c6079 (patch)
tree198267c0c2417ad1376a17391aa606affa5fdc14 /hw/arm/boot.c
parent2a5bdfc8d524535e78d81f5932fc62a6b34addc6 (diff)
downloadqemu-5614ca800e05dc07e4045b7738351058538c6079.zip
qemu-5614ca800e05dc07e4045b7738351058538c6079.tar.gz
qemu-5614ca800e05dc07e4045b7738351058538c6079.tar.bz2
hw/arm/boot: Support DTB autoload for firmware-only boots
The arm_boot_info struct has a skip_dtb_autoload flag: if this is set to true by the board code then arm_load_kernel() will not load the DTB itself, but will leave this for the board code to do itself later. However, the check for this is done in a code path which is only executed for the case where we load a kernel image file. If we're taking the "boot via firmware" code path then the flag isn't honoured and the DTB is never loaded. We didn't notice this because the only real user of "boot via firmware" that cares about the DTB is the virt board (for UEFI boot), and that always wants skip_dtb_autoload anyway. But the SBSA reference board model we're planning to add will want the flag to behave correctly. Now we've refactored the arm_load_kernel() function, the fix is simple: drop the early 'return' so we fall into the same "load the DTB" code the boot-direct-kernel path uses. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Igor Mammedov <imammedo@redhat.com> Message-id: 20190131112240.8395-6-peter.maydell@linaro.org
Diffstat (limited to 'hw/arm/boot.c')
-rw-r--r--hw/arm/boot.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/hw/arm/boot.c b/hw/arm/boot.c
index 328cc6b..496c8c1 100644
--- a/hw/arm/boot.c
+++ b/hw/arm/boot.c
@@ -1215,7 +1215,6 @@ void arm_load_kernel(ARMCPU *cpu, struct arm_boot_info *info)
/* Load the kernel. */
if (!info->kernel_filename || info->firmware_loaded) {
arm_setup_firmware_boot(cpu, info);
- return;
} else {
arm_setup_direct_kernel_boot(cpu, info);
}