Date: Tue, 07 Aug 2001 13:35:55 -0700 (PDT) From: John Baldwin <jhb@FreeBSD.org> To: ia64@FreeBSD.org Subject: exception_return() doesn't call ast() Message-ID: <XFMail.010807133555.jhb@FreeBSD.org>
index | next in thread | raw e-mail
Currently, we aren't calling ast() during exception returns. I have an ugly patch to do this, but I'm not sure that is right. It does seem to compile and run at least. It is at http://www.FreeBSD.org/~jhb/patches/ia64_ast.patch and included below. I'm pretty sure I've screwed up the way to call the function, etc.: Index: exception.s =================================================================== RCS file: /usr/cvs/src/sys/ia64/ia64/exception.s,v retrieving revision 1.14 diff -u -r1.14 exception.s --- exception.s 2001/04/24 15:54:23 1.14 +++ exception.s 2001/08/06 21:30:02 @@ -887,9 +887,18 @@ ;; cmp.eq p1,p2=r0,r16 // test for return to kernel mode ;; -(p2) add r16=SIZEOF_TRAPFRAME+16,sp // restore ar.k6 (kernel sp) +(p1) br.cond.dpnt.few 2f + alloc r14=ar.pfs,0,0,1,0 + ;; + add out0=16,sp + ;; + // XXX: do we need to reset p1 to zero after this? + // XXX: do we need to save any other state? + br.call.sptk.many rp=ast + add r16=SIZEOF_TRAPFRAME+16,sp // restore ar.k6 (kernel sp) ;; -(p2) mov ar.k6=r16 + mov ar.k6=r16 +2: add r1=SIZEOF_TRAPFRAME-16,r3 // r1=&tf_f[FRAME_F15] add r2=SIZEOF_TRAPFRAME-32,r3 // r2=&tf_f[FRAME_F14] ;; Also, I'm trying to compile a simple program so I can test out signal handling a bit to make sure I didn't break it. I usually use 'cat' in single user mode (use Ctrl-Z, fg, and Ctrl-C as my test) but I ran into the following glitch trying to compile cat(1): > ia64-unknown-linux-gcc cat.c -o cat In file included from /usr/local/lib/gcc-lib/ia64-unknown-linux/2.9-ia64-000216-final/../../../../ia64 -unknown-linux/include/sys/param.h:91, from cat.c:51: /usr/local/lib/gcc-lib/ia64-unknown-linux/2.9-ia64-000216-final/../../../../ia64 -unknown-linux/include/sys/signal.h:241: warning: `MINSIGSTKSZ' redefined /usr/local/lib/gcc-lib/ia64-unknown-linux/2.9-ia64-000216-final/../../../../ia64 -unknown-linux/include/machine/signal.h:42: warning: this is the location of the previous definition /usr/local/lib/gcc-lib/ia64-unknown-linux/2.9-ia64-000216-final/../../../../ia64 -unknown-linux/bin/ld: cannot find -lgcc (I had to update /usr/local/ia64-unknown-linux/include/sys/types.h with -current sys/types.h to fix a compile error. The warning stems from an out of date sys/signal.h as well, but I'm trying to change as few things as possible to avoid inadvertent breakage.) -- John Baldwin <jhb@FreeBSD.org> -- http://www.FreeBSD.org/~jhb/ PGP Key: http://www.baldwin.cx/~john/pgpkey.asc "Power Users Use the Power to Serve!" - http://www.FreeBSD.org/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ia64" in the body of the messagehome | help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?XFMail.010807133555.jhb>
