Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 1 Nov 2001 10:06:13 +0000 (GMT)
From:      Doug Rabson <dfr@nlsystems.com>
To:        <ia64@freebsd.org>
Subject:   Calling ast()
Message-ID:  <20011101100442.K549-100000@salmon.nlsystems.com>

index | next in thread | raw e-mail

I think this patch should do the right thing. It appears to work (well the
box doesn't hang instantly anyway). I really need to rewrite the rest of
exception.s - its a bit of a mess.

Index: exception.s
===================================================================
RCS file: /home/ncvs/src/sys/ia64/ia64/exception.s,v
retrieving revision 1.24
diff -u -r1.24 exception.s
--- exception.s	2001/10/31 20:02:28	1.24
+++ exception.s	2001/11/01 09:59:35
@@ -948,20 +948,24 @@
  */
 ENTRY(exception_restore, 0)

-	rsm	psr.ic|psr.dt|psr.i	// disable interrupt collection and vm
-	add	r3=16,sp;
-	;;
-	srlz.i
-	dep	r3=0,r3,61,3		// physical address
-	;;
-	add	r16=TF_CR_IPSR,r3
+	alloc	r14=ar.pfs,0,0,1,0	// in case we call ast()
+	add	r3=TF_CR_IPSR+16,sp
 	;;
-	ld8	rIPSR=[r16]
+	ld8	rIPSR=[r3]
 	;;
 	extr.u	r16=rIPSR,32,2		// extract ipsr.cpl
 	;;
 	cmp.eq	p1,p2=r0,r16		// test for return to kernel mode
 	;;
+(p2)	add	out0=16,sp		// trapframe argument to ast()
+(p2)	br.call.dptk.many rp=ast	// note: p1, p2 preserved
+
+	rsm	psr.ic|psr.dt|psr.i	// disable interrupt collection and vm
+	add	r3=16,sp;
+	;;
+	srlz.i
+	dep	r3=0,r3,61,3		// physical address
+	;;
 (p2)	add	r16=SIZEOF_TRAPFRAME+16,sp  // restore ar.k6 (kernel sp)
 	;;
 (p2)	mov	ar.k6=r16

-- 
Doug Rabson				Mail:  dfr@nlsystems.com
					Phone: +44 20 8348 6160



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ia64" in the body of the message



help

Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20011101100442.K549-100000>