Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 08 Oct 2001 21:04:46 -0700
From:      Peter Wemm <peter@wemm.org>
To:        John Baldwin <jhb@FreeBSD.ORG>
Cc:        ia64@FreeBSD.ORG
Subject:   Re: ast() patch 
Message-ID:  <20011009040446.C1025380F@overcee.netplex.com.au>
In-Reply-To: <XFMail.011008172822.jhb@FreeBSD.org> 

next in thread | previous in thread | raw e-mail | index | archive | help
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: <QUANTUM ATLAS IV 9 WLS 0B0B> 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: <IBM DDYS-T18350N S80D> 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




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