From owner-p4-projects@FreeBSD.ORG Fri May 30 19:13:25 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 44D6537B404; Fri, 30 May 2003 19:13:25 -0700 (PDT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id F018937B401 for ; Fri, 30 May 2003 19:13:24 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7C74143F85 for ; Fri, 30 May 2003 19:13:24 -0700 (PDT) (envelope-from marcel@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id h4V2DO0U094146 for ; Fri, 30 May 2003 19:13:24 -0700 (PDT) (envelope-from marcel@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h4V2DOR6094143 for perforce@freebsd.org; Fri, 30 May 2003 19:13:24 -0700 (PDT) Date: Fri, 30 May 2003 19:13:24 -0700 (PDT) Message-Id: <200305310213.h4V2DOR6094143@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to marcel@freebsd.org using -f From: Marcel Moolenaar To: Perforce Change Reviews Subject: PERFORCE change 32144 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 May 2003 02:13:26 -0000 http://perforce.freebsd.org/chv.cgi?CH=32144 Change 32144 by marcel@marcel_nfs on 2003/05/30 19:12:58 Some nitpicking changes: o Be less eager in restoring registers from the trapframe when exec'ing a ia32 process. Only restore the ia32 general registers that constitute ia32 state. o Clear the ia32 state registers if they don't contain important data at startup. This reduces the chance of leaking NaT bits into the ia32 process. o The SDM states that the best way to call ia32 code is to flush the RSE in the cycle immediately prior to the br.ia. Do it that way, even though it's not strictly necessary. o Make sure we set ar.k6 and ar.k7 prior to changing sp and ar.bspstore. We used to change ar.bspstore before we set ar.k6, creating a small hole in which interrupts could cause corruption. Affected files ... .. //depot/projects/ia64/sys/ia64/ia64/syscall.s#9 edit Differences ... ==== //depot/projects/ia64/sys/ia64/ia64/syscall.s#9 (text+ko) ==== @@ -101,13 +101,20 @@ ;; } gw_ret_ia32: - mov ar.rnat=r0 - mov ar.rsc=0xc - mov ar.pfs=r0 +{ .mfb + flushrs + nop 0 + nop 0 ;; +} +{ .mfb + nop 0 + nop 0 br.ia.sptk b6 ;; +} + ENTRY(break_sigtramp, 0) { .mib mov ar.rsc=0 @@ -509,33 +516,24 @@ { .mmi mov r30=ar.bspstore ;; - mov ar.bspstore=r21 + mov ar.unat=r17 dep r30=0,r30,0,9 ;; } { .mmi mov ar.k6=r30 - mov ar.unat=r17 - mov r11=r26 + mov ar.bspstore=r21 + mov r11=r0 ;; } - - ld8 r16=[r14],16 - ld8 r17=[r15],16 +{ .mmi + ld8 r16=[r14],64 + ld8 r17=[r15],80 + mov r13=r0 ;; - ld8 r18=[r14],16 - ld8 r19=[r15],16 - ;; - ld8 r20=[r14],16 - ld8 r21=[r15],16 - ;; - ld8 r22=[r14],16 - ld8 r23=[r15],16 - ;; - ld8 r24=[r14],16 - ld8 r25=[r15],16 - ;; - ld8 r26=[r14],16 +} + + ld8 r24=[r14],32 ld8 r27=[r15],16 ;; ld8 r28=[r14],16 @@ -544,18 +542,27 @@ ld8 r30=[r14],40 ld8 r31=[r15],40 ;; - ld8 r2=[r14],16 - ld8 r3=[r15],8 + +{ .mmi + ld8 r2=[r14] + ld8 r3=[r15] + mov r14=r0 ;; +} +{ .mmi mov ar.csd=r2 mov ar.ssd=r3 + mov r15=r0 ;; +} + mov r2=ar.k5 - mov psr.l=r11 + mov psr.l=r26 ;; srlz.d add r2=gw_ret_ia32-ia64_gateway_page,r2 ;; + mov ar.rsc=0x0 mov b7=r2 br.ret.sptk b7 ;;