Subject: When things go really bad...
To: NetBSD Macintosh68K port mailing list <port-mac68k@netbsd.org>
From: Jason W. Fogt <jwfogt@midway.uchicago.edu>
List: port-mac68k
Date: 05/02/1999 21:51:35
Good day everyone.
	While working on writing a driver for the Apple Macintosh 8-24 GC
video card (it is a very weird card), I have gotten to the point where the
machine consistently crashes on boot.  I consider myself fairly competent
in basic UNIX system administration, and a fairly decent programmer,
however, I don't know enough about what NetBSD reports when things go very
wrong to make much sense of what is happening.

Background: I am integrating the slotman(ager) code with some parts that I
have written myself.  The slotman(ager) code is where the error is
occuring.  During boot, while attempting to initialize the card, the
system consistently panics with a UVM fault.

The gory details:
(the lines of death):
uvm_fault(0x15ad6c,0xc4000000,0,0x3)->0x1
type 8, code [mmu,,ssw]:401070d
trap type 8, code=0x401070d, v=0xc4000008
kernel program counter = 0x101f86c
Kernel: MMU fault trap
pid=0, pc=0101F86C, ps=2008, sfc=1, dfc=1
(questions on this)
1.  what is the signifigance of each of the hexadecimal numbers in the
line that starts with "uvm_fault" ?
2.  What is a type 8 ?
3.  What does the text "[mmu,,ssw]" mean in line 2 ?
4.  In general, what is the signifigance of each of the hexadecimal lines
in this section ?

(a debugger trace)
_Debugger(2004,1c7c28,8,28950,1c7c14)+6
_panic(13ac8f,3,270c,4000008,152488)+52
_trap(8,401070d,c4000008)+24e
_end(?)
_mrg_SExec(1c7d58,1c7d58,0,f,1379f6)+e8b1fc
_mrg_SPrimaryInit(1c7d58,0,10138d4,1c7e66,14a74c)+ac
...
(questions)
1.  I assume/know that the first thing on this line is the name of the
procedure being executed, but what is the signifigance of each of the hex
digits following it ?
2.  What does the "end(?)" mean (right where it died) ?

(and finally, the bit of code that is causing all the problem)
This is an assembly block inside of mrg_SExec that should emulate the
slot manager call to preform a primary init.  I am 99.9% certain that this
is the last bit of code the computer executes from this program before it
dies.

			__asm __volatile ("
				movl	%1, a0
				addql	#4, a0
				movl	a0@, a2
				addal	a0, a2
				moveal	%0, a0
				moveml	d0-d7/a0-a6,a7@-
				jsr a2@
				moveml a7@+, d0-d7/a0-a6"
			    :
			    : "d" (sp->spsExecPBlk), "d" (execAddr)
			    : "a0", "a1", "a2");
 

I am sorry for such a long question, but if anyone can help me with this,
that would be great.  If you need more information, please don't hesitate
to email me.

Jason


=============================================================================
Jason W. Fogt             |"What then shall we say in response to this -  If
jwfogt@midway.uchicago.edu| God is for us, who can be against us ?" - Rom. 8:31
=============================================================================