Date: Mon, 10 Nov 1997 11:01:41 GMT
From: Roman Hodek <rnhodek@faui22c.informatik.uni-erlangen.de>
To: linux-m68k@lists.linux-m68k.org
In-Reply-To: <3466D452.EF5D05F2@zln.cz> (message from Petr Stehlik on Mon, 10
	Nov 1997 10:30:58 +0100)
Subject: Re: [stehlik@cas3.zlin.vutbr.cz: Re: L68K: Linux-2.1.61]
Sender: owner-linux-m68k@phil.uni-sb.de


> > 2) with tt reg setup for whole address space
> 
> this one finally works well on my Afterburner040. Thank you!

Then I'd say that we should include that... Setting up the tt regs in
that way shouldn't hurt any other machine, since they all initialize
tt regs at bootup. Also, the other machines never cared about the fact
that the tt regs weren't switched off before, so they also shouldn't
mind them being initialized differently now :-)

The patch is below.

Roman

------------------------------------------------------------------------------

--- linux-2.1.61/arch/m68k/atari/config.c~	Mon Nov 10 11:57:41 1997
+++ linux-2.1.61/arch/m68k/atari/config.c	Mon Nov 10 12:00:35 1997
@@ -1136,8 +1136,21 @@
 	   "nop\n\t"
 	   ".chip 68040\n\t"
 	   "cinva %%bc\n\t"
+	   "nop\n\t"
 	   "pflusha\n\t"
+	   "nop\n\t"
 	   "movec %%d0,%%tc\n\t"
+	   "nop\n\t"
+	   /* the following setup of transparent translations is needed on the
+	    * Afterburner040 to successfully reboot. Other machines shouldn't
+	    * care about a different tt regs setup, they also didn't care in
+	    * the past that the regs weren't turned off. */
+	   "movel #0xffc000,%%d0\n\t" /* whole insn space cacheable */
+	   "movec %%d0,%%itt0\n\t"
+	   "movec %%d0,%%itt1\n\t"
+	   "orw   #0x40,%/d0\n\t" /* whole data space non-cacheable/ser. */
+	   "movec %%d0,%%dtt0\n\t"
+	   "movec %%d0,%%dtt1\n\t"
 	   ".chip 68k\n\t"
            "jmp %0@"
            : /* no outputs */

