Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!cornell!uw-beaver!rice!sun-spots-request From: bnr-fos!bnr-public!mlord@watmath.waterloo.edu (Mark Lord) Newsgroups: comp.sys.sun Subject: Re: Help needed: clearing the 68020 cache. Keywords: SunOS Message-ID: <332@brazos.Rice.edu> Date: 21 Jul 89 16:23:18 GMT Sender: root@rice.edu Organization: Sun-Spots Lines: 16 Approved: Sun-Spots@rice.edu X-Sun-Spots-Digest: Volume 8, Issue 81, message 2 of 15 In article <83@brazos.Rice.edu> agesen@daimi.dk (Ole Agesen) writes: >X-Sun-Spots-Digest: Volume 8, Issue 68, message 8 of 22 >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 >... >Can anyone tell me how to clear the cache? Easy, if you don't care about real time. Just execute 128 sequential NOP instructions (no looping!). This will cause the entire cache contents to be overwritten with the NOPs, effectively flushing the on-chip cache. This is probably faster than doing the appropriate system/kernel call (assuming there IS an appropriate system/kernel call). -Mark