[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-ppc] [PATCH 14/33] hw/ppc/spapr: Fix error message when firmware c
From: |
David Gibson |
Subject: |
[Qemu-ppc] [PATCH 14/33] hw/ppc/spapr: Fix error message when firmware could not be loaded |
Date: |
Thu, 7 May 2015 15:33:40 +1000 |
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>
---
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 30ed494..ced455e 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);
--
2.1.0
- [Qemu-ppc] [PATCH 00/33] Accumulated -machine pseries patches 2015-05-07, David Gibson, 2015/05/07
- [Qemu-ppc] [PATCH 02/33] spapr_iommu: Disable in-kernel IOMMU tables for >4GB windows, David Gibson, 2015/05/07
- [Qemu-ppc] [PATCH 03/33] spapr_iommu: Make H_PUT_TCE_INDIRECT endian-safe, David Gibson, 2015/05/07
- [Qemu-ppc] [PATCH 05/33] spapr_vio: Introduce a liobn number generating macros, David Gibson, 2015/05/07
- [Qemu-ppc] [PATCH 07/33] spapr_iommu: Add separate trace points for PCI DMA operations, David Gibson, 2015/05/07
- [Qemu-ppc] [PATCH 04/33] spapr_pci: Introduce a liobn number generating macros, David Gibson, 2015/05/07
- [Qemu-ppc] [PATCH 06/33] spapr_pci: Define default DMA window size as a macro, David Gibson, 2015/05/07
- [Qemu-ppc] [PATCH 01/33] spapr_pci: Fix unsafe signed/unsigned comparisons, David Gibson, 2015/05/07
- [Qemu-ppc] [PATCH 09/33] spapr_iommu: Make spapr_tce_find_by_liobn() public, David Gibson, 2015/05/07
- [Qemu-ppc] [PATCH 14/33] hw/ppc/spapr: Fix error message when firmware could not be loaded,
David Gibson <=
- [Qemu-ppc] [PATCH 10/33] spapr_pci: Rework device-tree rendering, David Gibson, 2015/05/07
- [Qemu-ppc] [PATCH 13/33] pseries: Add pseries-2.4 machine type, David Gibson, 2015/05/07
- [Qemu-ppc] [PATCH 11/33] spapr_iommu: Give unique QOM name to TCE table, David Gibson, 2015/05/07
- [Qemu-ppc] [PATCH 08/33] spapr_pci: Make find_phb()/find_dev() public, David Gibson, 2015/05/07
- [Qemu-ppc] [PATCH 15/33] hw/ppc/spapr: Use error_report() instead of hw_error(), David Gibson, 2015/05/07
- [Qemu-ppc] [PATCH 32/33] spapr: override default ram size to 512MB, David Gibson, 2015/05/07
- [Qemu-ppc] [PATCH 12/33] hw/ppc/spapr_iommu: Fix the check for invalid upper bits in liobn, David Gibson, 2015/05/07
- [Qemu-ppc] [PATCH 18/33] spapr_rtas: add get/set-power-level RTAS interfaces, David Gibson, 2015/05/07
- [Qemu-ppc] [PATCH 21/33] spapr: add rtas_st_buffer_direct() helper, David Gibson, 2015/05/07
- [Qemu-ppc] [PATCH 27/33] spapr_pci: create DRConnectors for each PCI slot during PHB realize, David Gibson, 2015/05/07