[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <053b96d7-9af7-4afe-88c8-48a71b2d309f@quicinc.com>
Date: Fri, 12 Jul 2024 15:53:27 +0530
From: Pavan Kondeti <quic_pkondeti@...cinc.com>
To: "Maulik Shah (mkshah)" <quic_mkshah@...cinc.com>
CC: Volodymyr Babchuk <Volodymyr_Babchuk@...m.com>,
Caleb Connolly
<caleb.connolly@...aro.org>,
"andersson@...nel.org >> Bjorn Andersson"
<andersson@...nel.org>,
Konrad Dybcio <konrad.dybcio@...aro.org>,
linux-arm-msm <linux-arm-msm@...r.kernel.org>,
LKML
<linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] soc: qcom: cmd-db: map shared memory as WT, not WB
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@...cinc.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
Powered by blists - more mailing lists