Subject: locore.s -> mmu handler
To: None <>
From: Tim Newsham <newsham@uhunix.uhcc.Hawaii.Edu>
List: amiga-dev
Date: 09/14/1994 00:39:38
  I'm reading through the buserror/addrerror fault handler in
locore.s (the '030 branch in particular) and I came across something
I dont quite understand.  The SSW is fetched and RB and RC are tested.
If RB is 1 then FB is set.  If RC is 1 then FC is set.  The reference
I have (which isn't the motorola refernce :(  says that in order
to rerun the instruction that caused the instruction alls that need
be done is an RTE.

Also the book I have doesnt mention the method of finding the
fault address so I dug through the code and this is what I
came up with.  Please let me know if you see any errors in

  if short format trap
    if DF set in SSW 
       fault = fault address  (offset 16 from trap frame)
       fault = pc (offset 2 from trap frame)
       if FB set in SSW
         fault += 4
       else if FC set in SSW
         fault += 2
    fault = stage B address (offset 36)
    if FC set in SSW
      fault += 2

  fault contains fault address

Seems pretty complicated just to get the fault address that the
CPU could have shoved into a single register at the time of
the fault.  What does 'fault address' contain in the cases
it is not being used above?

                            Tim N.