linux-uconsole/drivers/soc/qcom
Shawn Guo 8f977e97b2 soc: qcom: mdt_loader: Drop PT_LOAD check on hash segment
[ Upstream commit 833d51d7c6 ]

PT_LOAD type denotes that the segment should be loaded into the final
firmware memory region.  Hash segment is not one such, because it's only
needed for PAS init and shouldn't be in the final firmware memory region.
That's why mdt_phdr_valid() explicitly reject non PT_LOAD segment and
hash segment.  This actually makes the hash segment type check in
qcom_mdt_read_metadata() unnecessary and redundant.  For a hash segment,
it won't be loaded into firmware memory region anyway, due to the
QCOM_MDT_TYPE_HASH check in mdt_phdr_valid(), even if it has a PT_LOAD
type for some reason (misusing or abusing?).

Some firmware files on Sony phones are such examples, e.g WCNSS firmware
of Sony Xperia M4 Aqua phone.  The type of hash segment is just PT_LOAD.
Drop the unnecessary hash segment type check in qcom_mdt_read_metadata()
to fix firmware loading failure on these phones, while hash segment is
still kept away from the final firmware memory region.

Fixes: 498b98e939 ("soc: qcom: mdt_loader: Support loading non-split images")
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Reviewed-by: Marijn Suijten <marijn.suijten@somainline.org>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Link: https://lore.kernel.org/r/20210828070202.7033-1-shawn.guo@linaro.org
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-10-13 10:04:25 +02:00
..
apr.c
cmd-db.c
cpr.c
Kconfig
kryo-l2-accessors.c
llcc-qcom.c
Makefile
mdt_loader.c soc: qcom: mdt_loader: Drop PT_LOAD check on hash segment 2021-10-13 10:04:25 +02:00
ocmem.c
pdr_interface.c soc: qcom: pdr: Fix error return code in pdr_register_listener 2021-05-14 09:50:15 +02:00
pdr_internal.h
qcom-geni-se.c soc: qcom: geni: shield geni_icc_get() for ACPI boot 2021-04-28 13:40:01 +02:00
qcom_aoss.c soc: qcom: aoss: Fix the out of bound usage of cooling_devs 2021-09-18 13:40:07 +02:00
qcom_gsbi.c
qmi_encdec.c
qmi_interface.c
rmtfs_mem.c
rpmh-internal.h
rpmh-rsc.c
rpmh.c
rpmhpd.c soc: qcom: rpmhpd: Use corner in power_off 2021-09-15 09:50:32 +02:00
rpmpd.c
smd-rpm.c
smem.c
smem_state.c
smp2p.c
smsm.c soc: qcom: smsm: Fix missed interrupts if state changes while masked 2021-09-15 09:50:37 +02:00
socinfo.c soc: qcom: socinfo: Fixed argument passed to platform_set_data() 2021-10-13 10:04:25 +02:00
trace-rpmh.h
wcnss_ctrl.c