From: Pavan Kondeti <quic_pkondeti@quicinc.com>
To: "Maulik Shah (mkshah)" <quic_mkshah@quicinc.com>
Cc: Volodymyr Babchuk <Volodymyr_Babchuk@epam.com>,
Caleb Connolly <caleb.connolly@linaro.org>,
"andersson@kernel.org >> Bjorn Andersson" <andersson@kernel.org>,
Konrad Dybcio <konrad.dybcio@linaro.org>,
linux-arm-msm <linux-arm-msm@vger.kernel.org>,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] soc: qcom: cmd-db: map shared memory as WT, not WB
Date: Fri, 12 Jul 2024 15:53:27 +0530 [thread overview]
Message-ID: <053b96d7-9af7-4afe-88c8-48a71b2d309f@quicinc.com> (raw)
In-Reply-To: <629a2983-8db4-4ae0-8f68-72750985d5b3@quicinc.com>
Hi Volodymyr/Maulik,
On Fri, Mar 29, 2024 at 10:22:47AM +0530, Maulik Shah (mkshah) wrote:
>
>
> On 3/29/2024 3:49 AM, Volodymyr Babchuk wrote:
> >
> > Hi Maulik
> >
> > "Maulik Shah (mkshah)" <quic_mkshah@quicinc.com> writes:
> >
> > > On 3/28/2024 1:39 AM, Volodymyr Babchuk wrote:
> > > > It appears that hardware does not like cacheable accesses to this
> > > > region. Trying to access this shared memory region as Normal Memory
> > > > leads to secure interrupt which causes an endless loop somewhere in
> > > > Trust Zone.
> > >
> > > Linux does not write into cmd-db region. This region is write
> > > protected by XPU. Making this region uncached magically solves the XPU
> > > write fault
> > > issue.
> > >
> > > Can you please include above details?
> >
> > Sure, I'll add this to the next version.
> >
>
> Thanks.
>
> > >
> > > In downstream, we have below which resolved similar issue on qcm6490.
> > >
> > > cmd_db_header = memremap(rmem->base, rmem->size, MEMREMAP_WC);
> > >
> > > Downstream SA8155P also have MEMREMAP_WC. Can you please give it a try
> > > on your device?
> >
> > Yes, MEMREMAP_WC works as well. This opens the question: which type is
> > more correct? I have no deep understanding in QCOM internals so it is
> > hard to me to answer this question.
> >
>
> XPU may have falsely detected clean cache eviction as "write" into the write
> protected region so using uncached flag MEMREMAP_WC may be helping here and
> is more correct in my understanding.
>
I have got the very same explanation from my other colleagues at Qualcomm. I could
reproduce the problem 100% of the time on QCS6490 RB3 board with Linux booting
in EL2. The problem goes away with non-cached mapping
(MEMREMAP_WC/MEMREMAP_WB).
Do you guys plan to send V2? Please CC me on the V2.
Thanks,
Pavan
prev parent reply other threads:[~2024-07-12 10:23 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-27 20:09 [PATCH] soc: qcom: cmd-db: map shared memory as WT, not WB Volodymyr Babchuk
2024-03-27 20:45 ` Konrad Dybcio
2024-03-27 21:04 ` Volodymyr Babchuk
2024-03-27 21:06 ` Konrad Dybcio
2024-03-27 23:29 ` Caleb Connolly
2024-03-28 9:58 ` Stephan Gerhold
2024-03-29 0:40 ` Stephen Boyd
2024-04-11 3:54 ` Elliot Berman
2024-04-11 4:43 ` Stephen Boyd
2024-04-10 22:12 ` Volodymyr Babchuk
2024-04-11 8:02 ` Stephan Gerhold
2024-04-11 8:41 ` Stephen Boyd
2024-03-28 21:29 ` Volodymyr Babchuk
2024-03-28 11:12 ` Nikita Travkin
2024-03-28 14:06 ` Nikita Travkin
2024-03-28 12:01 ` Maulik Shah (mkshah)
2024-03-28 22:19 ` Volodymyr Babchuk
2024-03-29 4:52 ` Maulik Shah (mkshah)
2024-07-12 10:23 ` Pavan Kondeti [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=053b96d7-9af7-4afe-88c8-48a71b2d309f@quicinc.com \
--to=quic_pkondeti@quicinc.com \
--cc=Volodymyr_Babchuk@epam.com \
--cc=andersson@kernel.org \
--cc=caleb.connolly@linaro.org \
--cc=konrad.dybcio@linaro.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=quic_mkshah@quicinc.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox