qemu-patch-raspberry4/include/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
..
fdt.h target/ppc: Pass cpu instead of env to ppc_create_page_sizes_prop() 2018-04-27 18:05:22 +10:00
mac_dbdma.h Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00
openpic.h Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00
openpic_kvm.h openpic: move KVM-specific declarations into separate openpic_kvm.h file 2018-03-06 13:16:29 +11:00
pef.h spapr: Add PEF based confidential guest support 2021-02-08 16:57:38 +11:00
pnv.h ppc/pnv: Introduce a LPC FW memory region attribute to map the PNOR 2021-02-10 10:43:50 +11:00
pnv_core.h non-virt: Fix Lesser GPL version number 2020-11-15 16:38:24 +01:00
pnv_homer.h non-virt: Fix Lesser GPL version number 2020-11-15 16:38:24 +01:00
pnv_lpc.h non-virt: Fix Lesser GPL version number 2020-11-15 16:38:24 +01:00
pnv_occ.h non-virt: Fix Lesser GPL version number 2020-11-15 16:38:24 +01:00
pnv_pnor.h Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00
pnv_psi.h non-virt: Fix Lesser GPL version number 2020-11-15 16:38:24 +01:00
pnv_xive.h qom: Remove module_obj_name parameter from OBJECT_DECLARE* macros 2020-09-18 14:12:32 -04:00
pnv_xscom.h exec/memory: Use struct Object typedef 2021-03-09 21:53:57 +01:00
ppc.h hw/ppc/prep: Remove the deprecated "prep" machine and the OpenHackware BIOS 2020-02-02 14:07:57 +11:00
ppc4xx.h hw/ppc: Remove unused ppcuic_init() 2021-01-19 10:20:29 +11:00
ppc_e500.h intc/openpic: Build openpic only once 2013-07-09 21:33:02 +02:00
spapr.h target/ppc: Support for H_RPT_INVALIDATE hcall 2021-07-09 11:01:06 +10:00
spapr_cpu_core.h qom: Remove module_obj_name parameter from OBJECT_DECLARE* macros 2020-09-18 14:12:32 -04:00
spapr_drc.h spapr: rollback 'unplug timeout' for CPU hotunplugs 2021-04-12 12:27:14 +10:00
spapr_irq.h Use DECLARE_*CHECKER* macros 2020-09-09 09:27:09 -04:00
spapr_numa.h spapr_numa.c: create spapr_numa_initial_nvgpu_numa_id() helper 2021-02-10 10:43:50 +11:00
spapr_nvdimm.h spapr: nvdimm: Forward declare and move the definitions 2021-06-03 13:22:06 +10:00
spapr_ovec.h spapr: Improve handling of memory unplug with old guests 2021-01-19 10:20:29 +11:00
spapr_rtas.h tests: add RTAS command in the protocol 2016-09-23 10:29:40 +10:00
spapr_tpm_proxy.h Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00
spapr_vio.h nomaintainer: Fix Lesser GPL version number 2020-11-15 17:04:40 +01:00
spapr_xive.h spapr/xive: Make spapr_xive_pic_print_info() static 2021-01-06 11:09:59 +11:00
vof.h ppc/vof: Fix Coverity issues 2021-07-29 10:59:49 +10:00
xics.h qom: Remove module_obj_name parameter from OBJECT_DECLARE* macros 2020-09-18 14:12:32 -04:00
xics_spapr.h spapr/xics: Drop unused argument to xics_kvm_has_broken_disconnect() 2020-12-14 15:50:55 +11:00
xive.h Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00
xive_regs.h ppc/xive: Add firmware bit when dumping the ENDs 2021-02-10 10:43:50 +11:00