|
|
9ae3a8 |
From 216010b25271a2814abef68971d672632ddbd122 Mon Sep 17 00:00:00 2001
|
|
|
9ae3a8 |
From: Markus Armbruster <armbru@redhat.com>
|
|
|
9ae3a8 |
Date: Tue, 6 Aug 2013 13:17:04 +0200
|
|
|
9ae3a8 |
Subject: [PATCH 11/28] microblaze: Fix latent bug with default DTB lookup
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
RH-Author: Markus Armbruster <armbru@redhat.com>
|
|
|
9ae3a8 |
Message-id: <1375795025-28674-6-git-send-email-armbru@redhat.com>
|
|
|
9ae3a8 |
Patchwork-id: 52994
|
|
|
9ae3a8 |
O-Subject: [PATCH 7.0 qemu-kvm 5/6] microblaze: Fix latent bug with default DTB lookup
|
|
|
9ae3a8 |
Bugzilla: 980782
|
|
|
9ae3a8 |
RH-Acked-by: Laszlo Ersek <lersek@redhat.com>
|
|
|
9ae3a8 |
RH-Acked-by: Michal Novotny <minovotn@redhat.com>
|
|
|
9ae3a8 |
RH-Acked-by: Orit Wasserman <owasserm@redhat.com>
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
microblaze_load_kernel() fails to call
|
|
|
9ae3a8 |
qemu_find_file(QEMU_FILE_TYPE_BIOS, dtb_filename) when no -machine
|
|
|
9ae3a8 |
options are given. This can't normally happen, because -machine
|
|
|
9ae3a8 |
option kernel is mandatory for this target. Fix it anyway, by using
|
|
|
9ae3a8 |
qemu_get_machine_opts().
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
Cc: Peter Crosthwaite <peter.crosthwaite@petalogix.com>
|
|
|
9ae3a8 |
Signed-off-by: Markus Armbruster <armbru@redhat.com>
|
|
|
9ae3a8 |
Message-id: 1372943363-24081-6-git-send-email-armbru@redhat.com
|
|
|
9ae3a8 |
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
|
|
|
9ae3a8 |
(cherry picked from commit 7bccd9402691e712305bc3b5cc6cf2fa1cc27631)
|
|
|
9ae3a8 |
---
|
|
|
9ae3a8 |
hw/microblaze/boot.c | 27 +++++++++++++--------------
|
|
|
9ae3a8 |
1 file changed, 13 insertions(+), 14 deletions(-)
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
|
|
|
9ae3a8 |
---
|
|
|
9ae3a8 |
hw/microblaze/boot.c | 27 +++++++++++++--------------
|
|
|
9ae3a8 |
1 files changed, 13 insertions(+), 14 deletions(-)
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
diff --git a/hw/microblaze/boot.c b/hw/microblaze/boot.c
|
|
|
9ae3a8 |
index e543d88..f03934b 100644
|
|
|
9ae3a8 |
--- a/hw/microblaze/boot.c
|
|
|
9ae3a8 |
+++ b/hw/microblaze/boot.c
|
|
|
9ae3a8 |
@@ -28,6 +28,7 @@
|
|
|
9ae3a8 |
#include "qemu/config-file.h"
|
|
|
9ae3a8 |
#include "qemu-common.h"
|
|
|
9ae3a8 |
#include "sysemu/device_tree.h"
|
|
|
9ae3a8 |
+#include "sysemu/sysemu.h"
|
|
|
9ae3a8 |
#include "hw/loader.h"
|
|
|
9ae3a8 |
#include "elf.h"
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
@@ -105,20 +106,18 @@ void microblaze_load_kernel(MicroBlazeCPU *cpu, hwaddr ddr_base,
|
|
|
9ae3a8 |
void (*machine_cpu_reset)(MicroBlazeCPU *))
|
|
|
9ae3a8 |
{
|
|
|
9ae3a8 |
QemuOpts *machine_opts;
|
|
|
9ae3a8 |
- const char *kernel_filename = NULL;
|
|
|
9ae3a8 |
- const char *kernel_cmdline = NULL;
|
|
|
9ae3a8 |
-
|
|
|
9ae3a8 |
- machine_opts = qemu_opts_find(qemu_find_opts("machine"), 0);
|
|
|
9ae3a8 |
- if (machine_opts) {
|
|
|
9ae3a8 |
- const char *dtb_arg;
|
|
|
9ae3a8 |
- kernel_filename = qemu_opt_get(machine_opts, "kernel");
|
|
|
9ae3a8 |
- kernel_cmdline = qemu_opt_get(machine_opts, "append");
|
|
|
9ae3a8 |
- dtb_arg = qemu_opt_get(machine_opts, "dtb");
|
|
|
9ae3a8 |
- if (dtb_arg) { /* Preference a -dtb argument */
|
|
|
9ae3a8 |
- dtb_filename = dtb_arg;
|
|
|
9ae3a8 |
- } else { /* default to pcbios dtb as passed by machine_init */
|
|
|
9ae3a8 |
- dtb_filename = qemu_find_file(QEMU_FILE_TYPE_BIOS, dtb_filename);
|
|
|
9ae3a8 |
- }
|
|
|
9ae3a8 |
+ const char *kernel_filename;
|
|
|
9ae3a8 |
+ const char *kernel_cmdline;
|
|
|
9ae3a8 |
+ const char *dtb_arg;
|
|
|
9ae3a8 |
+
|
|
|
9ae3a8 |
+ machine_opts = qemu_get_machine_opts();
|
|
|
9ae3a8 |
+ kernel_filename = qemu_opt_get(machine_opts, "kernel");
|
|
|
9ae3a8 |
+ kernel_cmdline = qemu_opt_get(machine_opts, "append");
|
|
|
9ae3a8 |
+ dtb_arg = qemu_opt_get(machine_opts, "dtb");
|
|
|
9ae3a8 |
+ if (dtb_arg) { /* Preference a -dtb argument */
|
|
|
9ae3a8 |
+ dtb_filename = dtb_arg;
|
|
|
9ae3a8 |
+ } else { /* default to pcbios dtb as passed by machine_init */
|
|
|
9ae3a8 |
+ dtb_filename = qemu_find_file(QEMU_FILE_TYPE_BIOS, dtb_filename);
|
|
|
9ae3a8 |
}
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
boot_info.machine_cpu_reset = machine_cpu_reset;
|
|
|
9ae3a8 |
--
|
|
|
9ae3a8 |
1.7.1
|
|
|
9ae3a8 |
|