remoteproc: qcom: Update rproc parse firmware callback
Change parse_fw callback in rproc ops from qcom_register_dump_segments to local function such that, it can perform coredump segments registration and it can parse section header in memory sandboxing required platforms. Signed-off-by: Srinivasa Rao Mandadapu <quic_srivasam@quicinc.com> Signed-off-by: Bjorn Andersson <andersson@kernel.org> Link: https://lore.kernel.org/r/1664368073-13659-5-git-send-email-quic_srivasam@quicinc.com
This commit is contained in:
Родитель
66cab0c5c3
Коммит
48ab209c6f
|
@ -439,6 +439,27 @@ static void *adsp_da_to_va(struct rproc *rproc, u64 da, size_t len, bool *is_iom
|
|||
return adsp->mem_region + offset;
|
||||
}
|
||||
|
||||
static int adsp_parse_firmware(struct rproc *rproc, const struct firmware *fw)
|
||||
{
|
||||
struct qcom_adsp *adsp = rproc->priv;
|
||||
int ret;
|
||||
|
||||
ret = qcom_register_dump_segments(rproc, fw);
|
||||
if (ret) {
|
||||
dev_err(&rproc->dev, "Error in registering dump segments\n");
|
||||
return ret;
|
||||
}
|
||||
|
||||
if (adsp->has_iommu) {
|
||||
ret = rproc_elf_load_rsc_table(rproc, fw);
|
||||
if (ret) {
|
||||
dev_err(&rproc->dev, "Error in loading resource table\n");
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
static unsigned long adsp_panic(struct rproc *rproc)
|
||||
{
|
||||
struct qcom_adsp *adsp = rproc->priv;
|
||||
|
@ -450,7 +471,7 @@ static const struct rproc_ops adsp_ops = {
|
|||
.start = adsp_start,
|
||||
.stop = adsp_stop,
|
||||
.da_to_va = adsp_da_to_va,
|
||||
.parse_fw = qcom_register_dump_segments,
|
||||
.parse_fw = adsp_parse_firmware,
|
||||
.load = adsp_load,
|
||||
.panic = adsp_panic,
|
||||
};
|
||||
|
|
Загрузка…
Ссылка в новой задаче