Kernel locking cache lines for user mode

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Kernel locking cache lines for user mode

828件の閲覧回数
alexy_torres-au
Contributor I

Hello,

I am currently writing a kernel module that will lock cache lines for applications at context switch. 

My kernel is mapped 1:1 so I lock physical addresses corresponding to data used by the application directly.

However when my application executes, all memory accesses to supposedly locked line seems to produce a cache misses.

Am I doing something wrong?

Caches are enabled and lines are correctly locked in caches (I could check that with a debug probe).

I am using a NXP MPC5777C e200z7 core.

Thanks in advance!

ラベル(1)
0 件の賞賛
返信
2 返答(返信)

731件の閲覧回数
davidtosenovjan
NXP TechSupport
NXP TechSupport

Hi, do you have set MMU entry with copy back mode? The same with cache control register.

An example to see how to lock the data in the cache you may find in the following appnote, section 9:
https://www.nxp.com/docs/en/application-note/AN2865.pdf

0 件の賞賛
返信

731件の閲覧回数
alexy_torres-au
Contributor I

No, we use cache in WT mode.

An other issue we discovered is that the cache is only used in supervisor mode. 

When we switch to User mode, the cache is never used. Only kernel mode seems to use the ICache and DCache.

0 件の賞賛
返信