Skip to content

Commit 7b22b77

Browse files
Sibi Sankarandersson
Sibi Sankar
authored andcommitted
remoteproc: qcom_q6v5_mss: Re-order writes to the IMEM region
Any write access to the IMEM region when the Q6 is setting up XPU protection on it will result in a XPU violation. Fix this by ensuring IMEM writes related to the MBA post-mortem logs happen before the Q6 is brought out of reset. Fixes: 318130c ("remoteproc: qcom_q6v5_mss: Add MBA log extraction support") Signed-off-by: Sibi Sankar <[email protected]> Reviewed-by: Douglas Anderson <[email protected]> Tested-by: Douglas Anderson <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Bjorn Andersson <[email protected]>
1 parent 70d3581 commit 7b22b77

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

drivers/remoteproc/qcom_q6v5_mss.c

+3-3
Original file line numberDiff line numberDiff line change
@@ -1158,6 +1158,9 @@ static int q6v5_mba_load(struct q6v5 *qproc)
11581158
goto disable_active_clks;
11591159
}
11601160

1161+
if (qproc->has_mba_logs)
1162+
qcom_pil_info_store("mba", qproc->mba_phys, MBA_LOG_SIZE);
1163+
11611164
writel(qproc->mba_phys, qproc->rmb_base + RMB_MBA_IMAGE_REG);
11621165
if (qproc->dp_size) {
11631166
writel(qproc->mba_phys + SZ_1M, qproc->rmb_base + RMB_PMI_CODE_START_REG);
@@ -1168,9 +1171,6 @@ static int q6v5_mba_load(struct q6v5 *qproc)
11681171
if (ret)
11691172
goto reclaim_mba;
11701173

1171-
if (qproc->has_mba_logs)
1172-
qcom_pil_info_store("mba", qproc->mba_phys, MBA_LOG_SIZE);
1173-
11741174
ret = q6v5_rmb_mba_wait(qproc, 0, 5000);
11751175
if (ret == -ETIMEDOUT) {
11761176
dev_err(qproc->dev, "MBA boot timed out\n");

0 commit comments

Comments
 (0)