From owner-freebsd-ia64 Mon Oct 8 21: 4:57 2001 Delivered-To: freebsd-ia64@freebsd.org Received: from peter3.wemm.org (c1315225-a.plstn1.sfba.home.com [24.14.150.180]) by hub.freebsd.org (Postfix) with ESMTP id 5174137B40A; Mon, 8 Oct 2001 21:04:47 -0700 (PDT) Received: from overcee.netplex.com.au (overcee.wemm.org [10.0.0.3]) by peter3.wemm.org (8.11.0/8.11.0) with ESMTP id f9944kM75313; Mon, 8 Oct 2001 21:04:46 -0700 (PDT) (envelope-from peter@wemm.org) Received: from wemm.org (localhost [127.0.0.1]) by overcee.netplex.com.au (Postfix) with ESMTP id C1025380F; Mon, 8 Oct 2001 21:04:46 -0700 (PDT) (envelope-from peter@wemm.org) X-Mailer: exmh version 2.3.1 01/18/2001 with nmh-1.0.4 To: John Baldwin Cc: ia64@FreeBSD.ORG Subject: Re: ast() patch In-Reply-To: Date: Mon, 08 Oct 2001 21:04:46 -0700 From: Peter Wemm Message-Id: <20011009040446.C1025380F@overcee.netplex.com.au> Sender: owner-freebsd-ia64@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org John Baldwin wrote: > Ok, now that you all have gotten ia64 farther along, perhaps one of you can > test and fix this patch to make the kernel call ast() when returing to > userland. This should fix things like SIGARLM, userland profiling, and a few > other nits: > > http://www.freebsd.org/~jhb/ia64_ast.patch > > Index: ia64/ia64/exception.s > =================================================================== > RCS file: /usr/cvs/src/sys/ia64/ia64/exception.s,v > retrieving revision 1.21 > diff -u -r1.21 exception.s > --- ia64/ia64/exception.s 7 Oct 2001 18:40:01 -0000 1.21 > +++ ia64/ia64/exception.s 8 Oct 2001 20:20:27 -0000 > @@ -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] > ;; Sorry to say so, but it explodes... mountroot> ufs:da1c Mounting root from ufs:da1c da0 at isp0 bus 0 target 0 lun 0 da0: Fixed Direct Access SCSI-3 device da0: 80.000MB/s transfers (40.000MHz, offset 8, 16bit), Tagged Queueing Enabled da0: 8761MB (17942584 512 byte sectors: 255H 63S/T 1116C) da1 at isp0 bus 0 target 1 lun 0 da1: Fixed Direct Access SCSI-3 device da1: 80.000MB/s transfers (40.000MHz, offset 8, 16bit), Tagged Queueing Enabled da1: 17501MB (35843670 512 byte sectors: 255H 63S/T 2231C) da1c: raw partition size != slice size da1c: start 0, end 35843669, size 35843670 da1cc: start 0, end 524287, size 524288 fatal kernel trap: trap vector = 0x18 (General Exception) cr.iip = 0xe000000000962a60 cr.ipsr = 0x121008026010 (mfl,ic,i,dt,rt,cpl=0,it,ri=1,bn) cr.isr = 0x8400000030 (r,ni,ei=0) cr.ifa = 0x9ffffffffffffeb0 cr.iim = 0xcf curthread = 0xa00000001288fb60 pid = 1, comm = init Stopped at ovbcopy+0xe1: st8 [r33]=r15,8 db> trace ovbcopy(0xe0000000000156d0) at ovbcopy+0xe0 exception_restore() at exception_restore+0x70 db> Cheers, -Peter -- Peter Wemm - peter@FreeBSD.org; peter@yahoo-inc.com; peter@netplex.com.au "All of this is for nothing if we don't go to the stars" - JMS/B5 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ia64" in the body of the message