linux/drivers/soc/qcom
Shawn Guo 833d51d7c6 soc: qcom: mdt_loader: Drop PT_LOAD check on hash segment
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
2021-09-19 19:55:20 -05:00
..
apr.c bus: Make remove callback return void 2021-07-21 11:53:42 +02:00
cmd-db.c soc: qcom: cmd-db: allow loading as a module 2020-10-26 16:02:29 -05:00
cpr.c PM: AVS: qcom-cpr: Use nvmem_cell_read_variable_le_u32() 2021-08-03 18:00:18 -05:00
Kconfig soc: qcom: Kconfig: make RPMH match Command DB setting 2020-10-27 16:44:58 -05:00
kryo-l2-accessors.c soc: qcom: kryo-l2-accessors: Fix misnaming of 'val' 2020-11-10 23:23:02 -06:00
llcc-qcom.c soc: qcom: llcc: Add configuration data for SC7280 2021-03-11 20:22:20 -06:00
Makefile PM: AVS: qcom-cpr: Move the driver to the qcom specific drivers 2020-10-22 18:38:21 +02:00
mdt_loader.c soc: qcom: mdt_loader: Drop PT_LOAD check on hash segment 2021-09-19 19:55:20 -05:00
ocmem.c soc: qcom: ocmem: don't return NULL in of_get_ocmem 2021-02-02 15:39:13 -06:00
pdr_interface.c soc: qcom: pdr: Fix error return code in pdr_register_listener 2021-04-07 22:31:39 -05:00
pdr_internal.h soc: qcom: pdr: Fixup array type of get_domain_list_resp message 2020-09-14 23:53:29 +00:00
qcom_aoss.c soc: qcom: aoss: Fix the out of bound usage of cooling_devs 2021-07-19 15:20:55 -05:00
qcom_gsbi.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 409 2019-06-05 17:37:14 +02:00
qcom-geni-se.c soc: qcom: geni: Add support for gpi dma 2021-08-04 14:23:31 -05:00
qmi_encdec.c soc: qcom: Fix typos in the file qmi_encdec.c 2021-03-11 20:22:20 -06:00
qmi_interface.c soc: qcom: qmi: Return EPROBE_DEFER if no address family 2019-12-10 22:44:34 -08:00
rmtfs_mem.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 284 2019-06-05 17:36:37 +02:00
rpmh-internal.h soc: qcom: rpmh-rsc: Sleep waiting for tcs slots to be free 2020-09-10 16:56:12 +00:00
rpmh-rsc.c soc: qcom: rpmh-rsc: Fold WARN_ON() into if condition 2021-03-11 20:22:21 -06:00
rpmh.c soc: qcom: rpmh: Use __fill_rpmh_msg API during rpmh_write() 2020-11-26 11:43:00 -06:00
rpmhpd.c soc: qcom: rpmhpd: Use corner in power_off 2021-07-19 15:20:50 -05:00
rpmpd.c drivers: soc: qcom: rpmpd: Add SM6115 RPM Power Domains 2021-07-19 17:32:50 -05:00
smd-rpm.c soc: qcom: smd-rpm: Add SM6115 compatible 2021-08-04 18:22:22 -05:00
smem_state.c soc: qcom: smem_state: Add devm_qcom_smem_state_get() 2021-06-23 13:35:12 -05:00
smem.c soc: qcom: smem: Update max processor count 2021-03-11 20:22:20 -06:00
smp2p.c soc: qcom: smp2p: Remove unused struct attribute provide another 2020-11-10 23:20:44 -06:00
smsm.c soc: qcom: smsm: Fix missed interrupts if state changes while masked 2021-08-04 22:20:09 -05:00
socinfo.c soc: qcom: socinfo: Fixed argument passed to platform_set_data() 2021-09-13 10:39:59 -05:00
trace-rpmh.h drivers: qcom: rpmh-rsc: log RPMH requests in FTRACE 2018-07-21 13:32:31 -05:00
wcnss_ctrl.c soc: qcom: wcnss_ctrl: Allow reading firmware-name from DT 2021-04-05 22:35:06 -05:00