qemu-e2k/hw/ppc
Peter Maydell 3b4f50bd7d hw/ppc/e500.c: Handle qemu_find_file() failure
If qemu_find_file() doesn't find the BIOS it returns NULL; we were
passing that unchecked through to load_elf(), which assumes a non-NULL
pointer and may misbehave. In practice it fails with a weird message:

  $ qemu-system-ppc -M ppce500 -display none -kernel nonesuch
  Bad address
  qemu-system-ppc: could not load firmware '(null)'

Handle the failure case better:

  $ qemu-system-ppc -M ppce500 -display none -kernel nonesuch
  qemu-system-ppc: could not find firmware/kernel file 'nonesuch'

Spotted by Coverity (CID 1238954).

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Message-Id: <20200324121216.23899-1-peter.maydell@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2020-04-07 08:55:10 +10:00
..
e500-ccsr.h
e500.c hw/ppc/e500.c: Handle qemu_find_file() failure 2020-04-07 08:55:10 +10:00
e500.h
e500plat.c
fdt.c
fw_cfg.c
Kconfig
mac_newworld.c Pull request 2020-03-19 11:14:24 +00:00
mac_oldworld.c Pull request 2020-03-19 11:14:24 +00:00
mac.h
Makefile.objs
mpc8544_guts.c
mpc8544ds.c
pnv_bmc.c
pnv_core.c
pnv_homer.c
pnv_lpc.c hw/ppc/pnv: Fix typo in comment 2020-03-17 09:41:14 +11:00
pnv_occ.c
pnv_pnor.c
pnv_psi.c
pnv_xscom.c
pnv.c
ppc4xx_devs.c
ppc4xx_pci.c
ppc405_boards.c ppc/ppc405_boards: Remove unnecessary NULL check 2020-03-24 11:56:37 +11:00
ppc405_uc.c
ppc405.h
ppc440_bamboo.c
ppc440_pcix.c
ppc440_uc.c
ppc440.h
ppc_booke.c
ppc.c
ppce500_spin.c
prep_systemio.c
prep.c hw/ide: Remove unneeded inclusion of hw/ide.h 2020-03-17 12:22:36 -04:00
rs6000_mc.c
sam460ex.c
spapr_caps.c ppc/spapr: Allow FWNMI on TCG 2020-03-17 17:00:22 +11:00
spapr_cpu_core.c ppc/spapr: Move GPRs setup to one place 2020-03-17 15:08:50 +11:00
spapr_drc.c qom/object: enable setter for uint types 2020-03-16 23:02:23 +01:00
spapr_events.c ppc/spapr: Set the effective address provided flag in mc error log. 2020-03-24 11:05:37 +11:00
spapr_hcall.c spapr: Fix memory leak in h_client_architecture_support() 2020-03-24 11:56:37 +11:00
spapr_iommu.c
spapr_irq.c
spapr_nvdimm.c spapr: Fix Coverity warning while validating nvdimm options 2020-03-17 09:41:14 +11:00
spapr_ovec.c spapr: Rename DT functions to newer naming convention 2020-03-17 17:00:19 +11:00
spapr_pci_nvlink2.c
spapr_pci_vfio.c
spapr_pci.c
spapr_rng.c
spapr_rtas_ddw.c
spapr_rtas.c ppc/spapr: Ignore common "ibm,nmi-interlock" Linux bug 2020-03-17 17:00:22 +11:00
spapr_rtc.c
spapr_tpm_proxy.c
spapr_vio.c
spapr.c ppc patch queue 2020-03-17 2020-03-18 15:07:57 +00:00
trace-events
virtex_ml507.c