Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!usc!elroy.jpl.nasa.gov!sdd.hp.com!hplabs!hpcc01!hpcuhb!hpcllla!hpclisp!hpclmar!mar From: mar@hpclmar.HP.COM (Michelle Ruscetta) Newsgroups: comp.sys.hp Subject: Re: Incremental loading on the HP9000s800 Message-ID: <1340140@hpclmar.HP.COM> Date: 10 Sep 90 22:29:39 GMT References: <1503@tub.UUCP> Organization: Hewlett-Packard Calif. Language Lab Lines: 59 The cache-flushing routine in the precious response was an OLD copy. Please use the following (new) cache-flushing routine. (The old routine in the previous posting works on machines with a unfied cache, but will not work on machines which have a separate data & instruction cache. ; ; Routine to flush and synchronize data and instruction caches ; for dynamic loading ; ; Copyright Hewlett-Packard Co. 1985 ; .code ; flush_cache(addr, len) - executes FDC and FIC instructions for every cache ; line in the text region given by the starting address in arg0 and ; the length in arg1. When done, it executes a SYNC instruction and ; the seven NOPs required to assure that the cache has been flushed. ; ; Assumption: the cache line size must be at least 16 bytes. .proc .callinfo .export flush_cache,entry flush_cache .enter ldsid (0,%arg0),%r1 mtsp %r1,%sr0 ldo -1(%arg1),%arg1 copy %arg0,%arg2 copy %arg1,%arg3 fdc %arg1(0,%arg0) loop1 addib,>,n -16,%arg1,loop1 ; decrement by cache line size fdc %arg1(0,%arg0) ; flush first word at addr, to handle arbitrary cache line boundary fdc 0(0,%arg0) sync fic %arg3(%sr0,%arg2) loop2 addib,>,n -16,%arg3,loop2 ; decrement by cache line size fic %arg3(%sr0,%arg2) ; flush first word at addr, to handle arbitrary cache line boundary fic 0(%sr0,%arg2) sync nop nop nop nop nop nop nop .leave .procend .end