From fnaumann@mail.cs.uni-magdeburg.de Thu Jul 8 07:08:34 2004 Message-ID: <1089262936.40ecd558ec19f@imp6-q.free.fr> Date: Thu, 8 Jul 2004 07:02:16 +0200 From: Xavier Joubert To: mint@fishpool.com Subject: [MiNT] Trans.: Re: Questions about 68040 MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 User-Agent: Internet Messaging Program (IMP) 3.2.1 X-Virus-Scanned: by amavisd-new-20030616-p7 (Debian) at fishpool.fi Delivered-To: mint@fishpool.com Delivered-To: mint@lists.fishpool.fi X-ecartis-version: Ecartis v1.0.0 Sender: mint-bounce@lists.fishpool.fi Errors-to: mint-bounce@lists.fishpool.fi X-original-sender: xavier.joubert@free.fr Precedence: bulk List-help: List-unsubscribe: List-ID: X-List-ID: X-Milter: ClamAV 0.70/0.70kjel X-Milter: milter-regex 1.5jel X-Milter: ClamAV 0.70/0.70kjel X-Milter: milter-regex 1.5jel Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by prinz.cs.uni-magdeburg.de id i6858Cj3028275 ----- Message transféré de Xavier Joubert ----- Date : Thu, 8 Jul 2004 06:56:19 +0200 De : Xavier Joubert Adresse de retour :Xavier Joubert Sujet : Re: [MiNT] Questions about 68040 À : Konrad Kokoszkiewicz Hi Konrad, Selon Konrad Kokoszkiewicz : > On 68030 this is easy, because the bus error stack frame provides a field > named "data input buffer", which is to be updated and the processor loads > this data into its viscera on RTE, and then processes further (e.g. > transfers to d0) automagically. > > How do I do the same on 68040? I should have answered earlier but missed time... This is impossible on 68 040 and 68 060 ! These CPUs cannot simulate a read or write access. They always restart an access on an RTE. This is a major differemnce between 68 030 and 68 0[46]0. You have to find another way. Here is a suggestion : When you encounter a bus fault for reading of 0x5a0, tweak PMMU to allow for reading (and reading only) of 0x0-0x1000 (or 0x0-0x2000, I don't which page size MiNT uses), modify SR on stack to set TRACE mode, and install tour own trace handler. Then ReTurn from Exception. You may get another bus fault (if the program tries to copy 0x5a0 content to another place - you'll have to terminate the process in this case, I think), or a trace exception. In the trace exception handler, restore PMMU state, turn off trace mode on the stack and restore original trace handler. You may have to find a way to deny task switching during this time to ensure MiNT won't switch to another process before you restore the trace handler. Hope this help, Xavier ----- Fin du message transféré -----