qemu-e2k/hw/ppc
Alexey Kardashevskiy 14c7e06e72 ppc/vof: Fix Coverity issues
Coverity reported issues which are caused by mixing of signed return codes
from DTC and unsigned return codes of the client interface.

This introduces PROM_ERROR and makes distinction between the error types.

This fixes NEGATIVE_RETURNS, OVERRUN issues reported by Coverity.

This adds a comment about the return parameters number in the VOF hcall.
The reason for such counting is to keep the numbers look the same in
vof_client_handle() and the Linux (an OF client).

vmc->client_architecture_support() returns target_ulong and we want to
propagate this to the client (for example H_MULTI_THREADS_ACTIVE).
The VOF path to do_client_architecture_support() needs chopping off
the top 32bit but SLOF's H_CAS does not; and either way the return values
are either 0 or 32bit negative error code. For now this chops
the top 32bits.

This makes "claim" fail if the allocated address is above 4GB as
the client interface is 32bit. This still allows claiming memory above
4GB as potentially initrd can be put there and the client can read
the address from the FDT's "available" property.

Fixes: CID 1458139, 1458138, 1458137, 1458133, 1458132
Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Message-Id: <20210720050726.2737405-1-aik@ozlabs.ru>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2021-07-29 10:59:49 +10:00
..
Kconfig hw/ppc/Kconfig: Add dependency PEGASOS2 -> ATI_VGA 2021-07-20 20:10:20 +02:00
e500-ccsr.h Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00
e500.c Do not include exec/address-spaces.h if it's not really necessary 2021-05-02 17:24:51 +02:00
e500.h Use OBJECT_DECLARE_TYPE when possible 2020-09-18 14:12:32 -04:00
e500plat.c hw/ppc/e500plat: Only try to add valid dynamic sysbus devices to platform bus 2021-04-06 11:49:14 +01:00
fdt.c target/ppc: Split page size information into a separate allocation 2018-04-27 18:05:22 +10:00
fw_cfg.c hw/ppc: Implement fw_cfg_arch_key_name() 2019-05-23 14:10:31 +02:00
mac.h mac_newworld: Allow loading binary ROM image 2020-10-19 08:11:21 +01:00
mac_newworld.c ppc patch queue 2021-05-04 2021-05-05 20:29:14 +01:00
mac_oldworld.c Do not include exec/address-spaces.h if it's not really necessary 2021-05-02 17:24:51 +02:00
meson.build spapr: Implement Open Firmware client interface 2021-07-09 10:38:19 +10:00
mpc8544_guts.c Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00
mpc8544ds.c ppc/e500: use memdev for RAM 2020-02-19 16:50:00 +00:00
pef.c ppc/pef.c: initialize cgs->ready in kvmppc_svm_init() 2021-06-03 18:10:31 +10:00
pegasos2.c ppc/pegasos2: Fix spurious warning with -bios 2021-07-29 10:59:49 +10:00
pnv.c hw/ppc: moved has_spr to cpu.h 2021-05-19 10:30:28 +10:00
pnv_bmc.c Various spelling fixes 2021-03-09 21:19:10 +01:00
pnv_core.c hw/ppc/pnv_core: Update hflags after setting msr 2021-05-04 11:41:24 +10:00
pnv_homer.c ppc/pnv: change the PowerNV machine devices to be non user creatable 2020-02-02 14:07:57 +11:00
pnv_lpc.c ppc/pnv: Introduce a LPC FW memory region attribute to map the PNOR 2021-02-10 10:43:50 +11:00
pnv_occ.c ppc/pnv: change the PowerNV machine devices to be non user creatable 2020-02-02 14:07:57 +11:00
pnv_pnor.c hw: Do not include qemu/log.h if it is not necessary 2021-05-02 17:24:50 +02:00
pnv_psi.c ppc patch queue 2021-05-04 2021-05-05 20:29:14 +01:00
pnv_xscom.c exec/memory: Use struct Object typedef 2021-03-09 21:53:57 +01:00
ppc.c Do not include cpu.h if it's not really necessary 2021-05-02 17:24:51 +02:00
ppc4xx_devs.c Do not include hw/boards.h if it's not really necessary 2021-05-02 17:24:51 +02:00
ppc4xx_pci.c Do not include exec/address-spaces.h if it's not really necessary 2021-05-02 17:24:51 +02:00
ppc405.h hw/ppc/ppc405_uc: Drop use of ppcuic_init() 2021-01-19 10:20:29 +11:00
ppc405_boards.c Do not include exec/address-spaces.h if it's not really necessary 2021-05-02 17:24:51 +02:00
ppc405_uc.c hw: Do not include qemu/log.h if it is not necessary 2021-05-02 17:24:50 +02:00
ppc440.h ppc440_uc: Basic emulation of PPC440 DMA controller 2018-07-03 09:56:52 +10:00
ppc440_bamboo.c Do not include exec/address-spaces.h if it's not really necessary 2021-05-02 17:24:51 +02:00
ppc440_pcix.c Do not include exec/address-spaces.h if it's not really necessary 2021-05-02 17:24:51 +02:00
ppc440_uc.c Do not include exec/address-spaces.h if it's not really necessary 2021-05-02 17:24:51 +02:00
ppc_booke.c hw: Do not include qemu/log.h if it is not necessary 2021-05-02 17:24:50 +02:00
ppce500_spin.c powerpc tcg: Fix Lesser GPL version number 2020-11-15 16:38:50 +01:00
prep.c Do not include exec/address-spaces.h if it's not really necessary 2021-05-02 17:24:51 +02:00
prep_systemio.c prep: add ppc-parity write method 2021-02-08 15:15:32 +01:00
rs6000_mc.c Do not include hw/boards.h if it's not really necessary 2021-05-02 17:24:51 +02:00
sam460ex.c Do not include exec/address-spaces.h if it's not really necessary 2021-05-02 17:24:51 +02:00
spapr.c * More SVM fixes (Lara) 2021-07-11 22:20:51 +01:00
spapr_caps.c target/ppc: Support for H_RPT_INVALIDATE hcall 2021-07-09 11:01:06 +10:00
spapr_cpu_core.c spapr_cpu_core.c: use g_auto* in spapr_create_vcpu() 2021-01-19 10:20:29 +11:00
spapr_drc.c ppc patch queue 2021-05-04 2021-05-05 20:29:14 +01:00
spapr_events.c hw/ppc/spapr_events: Remove unused variable from check_exception 2021-07-26 07:07:07 -10:00
spapr_hcall.c spapr: Fix implementation of Open Firmware client interface 2021-07-09 10:55:11 +10:00
spapr_iommu.c Do not include exec/address-spaces.h if it's not really necessary 2021-05-02 17:24:51 +02:00
spapr_irq.c spapr/xics: Drop unused argument to xics_kvm_has_broken_disconnect() 2020-12-14 15:50:55 +11:00
spapr_numa.c spapr_numa.c: fix ibm,max-associativity-domains calculation 2021-02-10 10:43:50 +11:00
spapr_nvdimm.c spapr: nvdimm: Fix the persistent-memory root node name in device tree 2021-06-03 13:22:06 +10:00
spapr_ovec.c spapr: Improve handling of memory unplug with old guests 2021-01-19 10:20:29 +11:00
spapr_pci.c Do not include exec/address-spaces.h if it's not really necessary 2021-05-02 17:24:51 +02:00
spapr_pci_nvlink2.c spapr_numa: move NVLink2 associativity handling to spapr_numa.c 2020-09-08 10:08:43 +10:00
spapr_pci_vfio.c spapr: Fix EEH capability issue on KVM guest for PCI passthru 2021-06-03 13:22:06 +10:00
spapr_rng.c Do not include cpu.h if it's not really necessary 2021-05-02 17:24:51 +02:00
spapr_rtas.c spapr: Set LPCR to current AIL mode when starting a new CPU 2021-06-03 13:22:06 +10:00
spapr_rtas_ddw.c Do not include cpu.h if it's not really necessary 2021-05-02 17:24:51 +02:00
spapr_rtc.c Do not include cpu.h if it's not really necessary 2021-05-02 17:24:51 +02:00
spapr_softmmu.c hw/ppc: moved hcalls that depend on softmmu 2021-05-19 10:30:28 +10:00
spapr_tpm_proxy.c Do not include cpu.h if it's not really necessary 2021-05-02 17:24:51 +02:00
spapr_vio.c hw/ppc/spapr_vio: Reset TCE table object with device_cold_reset() 2021-05-04 13:12:59 +10:00
spapr_vof.c spapr: Fix implementation of Open Firmware client interface 2021-07-09 10:55:11 +10:00
trace-events ppc/vof: Fix Coverity issues 2021-07-29 10:59:49 +10:00
trace.h trace: switch position of headers to what Meson requires 2020-08-21 06:18:24 -04:00
virtex_ml507.c Do not include exec/address-spaces.h if it's not really necessary 2021-05-02 17:24:51 +02:00
vof.c ppc/vof: Fix Coverity issues 2021-07-29 10:59:49 +10:00