[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 17/40] hw/ppc/spapr: Fix error message when firmware
From: |
Alexander Graf |
Subject: |
[Qemu-devel] [PULL 17/40] hw/ppc/spapr: Fix error message when firmware could not be loaded |
Date: |
Wed, 3 Jun 2015 23:45:18 +0200 |
From: Thomas Huth <address@hidden>
When specifying a non-existing file with the "-bios" parameter, QEMU
complained that it "could not find LPAR rtas". That's obviously a
copy-n-paste bug from the code which loads the spapr-rtas.bin, it
should complain about a missing firmware file instead.
Additionally the error message was printed with hw_error() - which
also dumps the whole CPU state. However, this does not make much
sense here since the CPU is not running yet and thus the registers
only contain zeroes. So let's use error_report() here instead.
And while we're at it, let's also bail out if the firmware file
had zero length.
Signed-off-by: Thomas Huth <address@hidden>
Signed-off-by: David Gibson <address@hidden>
Signed-off-by: Alexander Graf <address@hidden>
---
hw/ppc/spapr.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c
index 971cb5f..9c05787 100644
--- a/hw/ppc/spapr.c
+++ b/hw/ppc/spapr.c
@@ -1641,12 +1641,12 @@ static void ppc_spapr_init(MachineState *machine)
}
filename = qemu_find_file(QEMU_FILE_TYPE_BIOS, bios_name);
if (!filename) {
- hw_error("Could not find LPAR rtas '%s'\n", bios_name);
+ error_report("Could not find LPAR firmware '%s'", bios_name);
exit(1);
}
fw_size = load_image_targphys(filename, 0, FW_MAX_SIZE);
- if (fw_size < 0) {
- hw_error("qemu: could not load LPAR rtas '%s'\n", filename);
+ if (fw_size <= 0) {
+ error_report("Could not load LPAR firmware '%s'", filename);
exit(1);
}
g_free(filename);
--
1.8.1.4
- [Qemu-devel] [PULL 09/40] spapr_pci: Define default DMA window size as a macro, (continued)
- [Qemu-devel] [PULL 09/40] spapr_pci: Define default DMA window size as a macro, Alexander Graf, 2015/06/03
- [Qemu-devel] [PULL 07/40] spapr_pci: Introduce a liobn number generating macros, Alexander Graf, 2015/06/03
- [Qemu-devel] [PULL 18/40] hw/ppc/spapr: Use error_report() instead of hw_error(), Alexander Graf, 2015/06/03
- [Qemu-devel] [PULL 14/40] spapr_iommu: Give unique QOM name to TCE table, Alexander Graf, 2015/06/03
- [Qemu-devel] [PULL 16/40] pseries: Add pseries-2.4 machine type, Alexander Graf, 2015/06/03
- [Qemu-devel] [PULL 13/40] spapr_pci: Rework device-tree rendering, Alexander Graf, 2015/06/03
- [Qemu-devel] [PULL 38/40] tci: do not use CPUArchState in tcg-target.h, Alexander Graf, 2015/06/03
- [Qemu-devel] [PULL 37/40] Add David Gibson for sPAPR in MAINTAINERS file, Alexander Graf, 2015/06/03
- [Qemu-devel] [PULL 35/40] spapr: override default ram size to 512MB, Alexander Graf, 2015/06/03
- [Qemu-devel] [PULL 29/40] spapr_pci: add dynamic-reconfiguration option for spapr-pci-host-bridge, Alexander Graf, 2015/06/03
- [Qemu-devel] [PULL 17/40] hw/ppc/spapr: Fix error message when firmware could not be loaded,
Alexander Graf <=
- [Qemu-devel] [PULL 21/40] spapr_rtas: add get/set-power-level RTAS interfaces, Alexander Graf, 2015/06/03
- [Qemu-devel] [PULL 11/40] spapr_pci: Make find_phb()/find_dev() public, Alexander Graf, 2015/06/03
- [Qemu-devel] [PULL 22/40] spapr_rtas: add set-indicator RTAS interface, Alexander Graf, 2015/06/03
- [Qemu-devel] [PULL 27/40] spapr_events: event-scan RTAS interface, Alexander Graf, 2015/06/03
- [Qemu-devel] [PULL 39/40] tcg: add TCG_TARGET_TLB_DISPLACEMENT_BITS, Alexander Graf, 2015/06/03
- [Qemu-devel] [PULL 25/40] spapr_rtas: add ibm, configure-connector RTAS interface, Alexander Graf, 2015/06/03
- [Qemu-devel] [PULL 40/40] softmmu: support up to 12 MMU modes, Alexander Graf, 2015/06/03
- [Qemu-devel] [PULL 34/40] machine: add default_ram_size to machine class, Alexander Graf, 2015/06/03
- [Qemu-devel] [PULL 36/40] pseries: Enable in-kernel H_LOGICAL_CI_{LOAD, STORE} implementations, Alexander Graf, 2015/06/03