Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!cornell!uw-beaver!rice!sun-spots-request From: agesen@daimi.dk (Ole Agesen) Newsgroups: comp.sys.sun Subject: Help needed: clearing the 68020 cache. Keywords: Software Message-ID: <83@brazos.Rice.edu> Date: 6 Jul 89 09:26:13 GMT Sender: root@rice.edu Organization: Sun-Spots Lines: 22 Approved: Sun-Spots@rice.edu X-Sun-Spots-Digest: Volume 8, Issue 68, message 8 of 22 Help needed.... The MC68020 incorporates an on-chip cache memory. The cache is used to store the instruction stream prefetch accesses from the main memory. I'm currently implementing a kind of incremental linking implying the need to write self-modifying code. Therefore, I have to clear the cache upon a modification of the code. According to the MC68020 User's Manual the cache is cleared by issuing a MOVEC instruction (move control register). However, this is a privileged instruction (requiring supervisor state). Can anyone tell me how to clear the cache? Can I get supervisor privileges for a user process? Is there a kernel operation clearing the cache? Can I easily create a modified kernel with the desired operation? Other (more) realistic possibilities? (We are using Unix 4.0 on sun 3/50). Thanks in advance! Ole Agesen