[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [MiNT] Trans.: Re: Questions about 68040
Hello Frank,
Selon Frank Naumann <fnaumann@cs.uni-magdeburg.de>:
> > 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...