Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site stride.UUCP Path: utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!think!harvard!seismo!utah-cs!utah-gr!stride!bruce From: bruce@stride.UUCP (Bruce Robertson) Newsgroups: net.unix-wizards,net.micro.68k Subject: Re: Pre-fetch Message-ID: <502@stride.UUCP> Date: Thu, 11-Jul-85 14:49:18 EDT Article-I.D.: stride.502 Posted: Thu Jul 11 14:49:18 1985 Date-Received: Sat, 13-Jul-85 14:34:19 EDT References: <891@bunker.UUCP> Reply-To: bruce@stride.UUCP (Bruce Robertson) Distribution: net Organization: Stride Micro, Reno, NV Lines: 27 Xref: watmath net.unix-wizards:13818 net.micro.68k:1005 In article <891@bunker.UUCP> reno@bunker.UUCP (Jim Reno) writes: > >Suppose >you have a shared text program where the code is exactly some multiple >of the basic block size used by the MMU (1k on our system). Further >suppose that your kernel allocates exactly that amount of memory. >If the processor prefetches, the MMU will fault (and the >program dump core) when the very last instruction is executed. >The MMU, of course, has no way of knowing that the processor would >never have actually used those bytes. Actually, this shouldn't cause a problem on most systems, because the data segment is allocated on the next page immediately following the text segment, so the prefetch will come from the first few bytes of the data segment. If you have separated I/D on your 68000, though, you do have a problem. A similar problem is if you have your stack located at the very top of memory, and you pop your registers from the stack with a MOVEM instruction. This instruction prefetches from the data space, and will cause the same problem. Under UNIX, however, the problem is nicely avoided by the fact that you have your arguments and environment sitting between the very top of memory and the top of the stack. -- Bruce Robertson UUCP: {ucbvax!menlo70,seismo}!unr70!unrvax!stride!bruce