lkml.org 
[lkml]   [2024]   [Mar]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH] soc: qcom: cmd-db: map shared memory as WT, not WB
From


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.

This can also be included in commit message.

Thanks,
Maulik

\
 
 \ /
  Last update: 2024-05-27 16:14    [W:0.384 / U:0.036 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site