From fnaumann@mail.cs.uni-magdeburg.de Fri Jul 9 13:45:34 2004 Message-ID: <1089373327.40ee848f2f3c5@imp.free.fr> Date: Fri, 9 Jul 2004 13:42:07 +0200 From: Xavier Joubert To: mint@fishpool.com Subject: Re: [MiNT] Trans.: Re: Questions about 68040 References: <1089262936.40ecd558ec19f@imp6-q.free.fr> <009001c464d7$f49a36b0$b80863d9@blaszak> <1089290023.40ed3f2735791@imp4-q.free.fr> <002701c4652c$648af050$480f63d9@blaszak> <1089324297.40edc509467aa@imp5-q.free.fr> In-Reply-To: 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 i69Bj7B5028014 Hello Frank, Selon Frank Naumann : > > Anyway, it's not that easy. Reading the top of sys/arch/mprot030.c show us > that > > MiNT uses 8K pages on 68 030. This means we can only protect 0x0000-0x1FFF > at > > once. This is too much, since only 0x0000-0x07FF needs to be supervisor > I don't understand, what's the problem? On a standard Atari or clone, the low mem (0x0000-0x07FF) is supervisor only. This check is done by a chip called MMU on the ST family (which is very different from the MMU inside an m68k, this is why we use to call this a PMMU - PAGED Memory Management Unit - on Atari.), or COMBEL on the Falcon. Since it's an external chip that generate the bus error (acces fault in the 68 0 [46]0 terminology), we cannot skip it with the PMMU. Even if we say in the PMMU tree that this zone is user-readable, any attempt to do so will still generate an exception. A problem of the CT2 is that 0x0000-0x07FF is user readable (and 0x0008-0x07FF user writable) on this board. Didier wrote a patch that protect this using the PMMU for TOS, MagiC and MiNT without memory protection. But with MP, the problem is different. The MMU configuration that MiNT uses defines a page size of 8 Ko. We cannot change this without rewritting a large part of MiNT's protected memory management. So we can only affect memory protection on 0x0000-0x2000 at once. But 0x0800- 0x2000 is user readable/writable on standard Atari, so programs are allowed to access it in user mode. This would generate a bus error under MiNT MP if we protect the whole memory page. This is a problem since there are some interresting datas there (Line-A variables among others, IIRC), that a program may legally try to access in user mode. BTW, this is a design flaw of the CT2 board. Centek's developpers didn't see all the problems that would arise when they agreed with Rodolphe Czuba on this to simplify the board. I don't think it's worth spending too much time... Of course, we learned from the past when we created the CT60. The problem doesn't exist there. Best regards, Xavier PS: I guess I was too verbose, but I wasn't sure how I should uderstand your question. So I decided to explain the whole thing. I hope you will find your answer inside all this noise...