Help needed: clearing the 68020 cache.
Joseph Moran
legato!!mojo at uunet.uu.net
Thu Jul 27 12:52:44 AEST 1989
In article <83 at brazos.Rice.edu> agesen at daimi.dk (Ole Agesen) writes:
>Can anyone tell me how to clear the cache?
> Can I get supervisor privileges for a user process?
I hope not. :-)
> Is there a kernel operation clearing the cache?
In SunOS, you can execute a "trap #2". This undocumented interface was
used by the old pixrect code that used to build and execute subroutines on
the stack.
On an 020, doing a trap #2 will execute:
movl #9,d0 # clear and renable instruction cache
movc d0,cacr
rte
On an 030, doing a trap #2 will execute:
movl #3919,d0 # clear and renable instruction and data caches
movc d0,cacr
rte
This is exactly what you need.
Joseph Moran
Legato Systems, Inc.
260 Sheridan Avenue
Palo Alto, CA 94306
(415) 329-7886
mojo at Legato.COM or {sun,uunet}!legato!mojo
More information about the Comp.sys.sun
mailing list