[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference hydra::amiga_v1

Title:AMIGA NOTES
Notice:Join us in the *NEW* conference - HYDRA::AMIGA_V2
Moderator:HYDRA::MOORE
Created:Sat Apr 26 1986
Last Modified:Wed Feb 05 1992
Last Successful Update:Fri Jun 06 1997
Number of topics:5378
Total number of notes:38326

2930.0. "MMU Questions" by KYOA::MIANO (Dallas is gone...Buckey is next.) Tue Sep 19 1989 00:30

In my quest to try an improve the programming environment for the Amiga
I have been playing with the MMU.  I can now set up page tables  without
crashing the system. 

For the first step I would like to write protect those ares in memory
that are read only.  The first problem is what areas of memory can be
protected without affecting the system?  For example, I assume (possible
incorrectly) that the Vector Table table can be write protected.

The second problem is what is the best way to catch access violations.
By default writing to a protected area Gurus.  I've tried Gomf, and it
works somewhat.  However, it completely destroys the process and
requires a lot of button pushing.  Linking with Lattice's catch.o
doesn't help.  Any suggestions?

John
T.RTitleUserPersonal
Name
DateLines
2930.1WJG::GUINEAUImpossible ConcentrationTue Sep 19 1989 09:443
Have you looked at Dave Haynie's SetCPU and CacheCard?

John
2930.2KYOA::MIANODallas is gone...Buckey is next.Tue Sep 19 1989 13:0617
I've looked at SetCPU but it just protects FC0000-FFFFFF.  This area
and the vector table are the two areas I have protected so far without
any ill effects.

One thing about SetCPU is that, according to the 68551 documentation, it
sets the MMU registers up incorrectly.  After looking at it closely I
wonders if the author just happened to run into a bug in the MMU that
allows it to work purely by chance. Specificly, the maximum page size is
supposed to be 2**15 while SetCPU uses 128 pages of 2*17 bytes. 

SetCPU sets the TC register to use two levels of translation while only
using one.  In the TC the values in the PS,IS,TIA,TIB,TIC and TID fields
must total 32.  It looks as though if you add extra bits to one of the
TIx fields without adding another level of translation you can increase
the page size above the 2**15 limit.

John
2930.3WJG::GUINEAUImpossible ConcentrationTue Sep 19 1989 13:534
YOu might ask Dave Haynie himself (Ask CB for his MAIL address). He
wrote SetCPU and (I believe) designed the A2620 and A2630 boards.

John
2930.4At your service... ;-)FRAMBO::BALZERChristian Balzer DTN:785-1029Wed Sep 20 1989 03:4913
    Re: .2,.3
    
    I believe Dave does some tricky stuff there, but nothing illegal...
    However, since he IS the designer of the B2000, A2620, A2630 and
    probably the A3000, I _assume_ he knows what he's doing.
    
    But as John said, you might ask him yourself, his email address
    is:
    nm%DECWRL::"[email protected]"
    
    Regards,
    
    <CB>
2930.5KYOA::MIANODallas is gone...Buckey is next.Wed Sep 20 1989 11:537
Sorry, I didn't mean to imply he didn't know what he was doing.  I was
trying to say that the thing looked like a hack. Thanks I'll send him
a message and ask him.

Now, does anyone know the best way to catch the write protect Gurus?

John
2930.6KYOA::MIANODallas is gone...Buckey is next.Thu Sep 21 1989 22:4310
I sent a mail message to Dave Haynie on the subject.  If he
replies with some interesting information I'll post it here.

I figured out my programs put the system into a halt state whenever
there is a write protect violation.  The Lattice C function that catches
Guru's, CATCH.A, appears to have a bug in the section that handles bus
errors.  It incorrectly sets the rerun flag(s).  If I change one line
in the file it catches the bus errors correctly.

John
2930.7KYOA::MIANODallas is gone...Buckey is next.Fri Sep 22 1989 12:017
I got a reply from Dave Haynie on the subject.  SetCPU does not use a
hack.  If the page table does not have entries for each level of
translation then the table entries above the bottom level represent
blocks are used to translate a range of multiple pages. 

John