summaryrefslogtreecommitdiffstats
path: root/sys/ia64
diff options
context:
space:
mode:
authormarcel <marcel@FreeBSD.org>2007-07-16 16:47:35 +0000
committermarcel <marcel@FreeBSD.org>2007-07-16 16:47:35 +0000
commit0ea7715cdfdcca9988dcdc86148f05c6957ff94b (patch)
tree8fdb1591e22eb0bb76268263d52c01659ac7f453 /sys/ia64
parent127adac725e070acdc5a2070275fca584e0ae62d (diff)
downloadFreeBSD-src-0ea7715cdfdcca9988dcdc86148f05c6957ff94b.zip
FreeBSD-src-0ea7715cdfdcca9988dcdc86148f05c6957ff94b.tar.gz
Restore the value of ar.rnat after the assignment to ar.bspstore.
The SDM states that writing to ar.bspstore invalidates the ar.rnat register as a side-effect. This was interpreted as "bits in the ar.rnat register that correspond to registers whose value is on the stack are undefined'. Since we keep the kernel stack NaT- aligned with the user stack (i.e. the lower 9 bits of the backing store pointer remain unchanged when we switch to the kernel stack) bits that need preserving would be preserved. That interpretation is questionable. So, now, the interpretation is more absolute: ar.rnat is undefined after writing to ar.bspstore. As such, we write the saved value of ar.rnat back to ar.rnat after writing to ar.bspstore. Discussed with: christian.kandeler@hob.de Approved by: re (kensmith)
Diffstat (limited to 'sys/ia64')
-rw-r--r--sys/ia64/ia64/syscall.S6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/ia64/ia64/syscall.S b/sys/ia64/ia64/syscall.S
index 7b27907..73f8da6 100644
--- a/sys/ia64/ia64/syscall.S
+++ b/sys/ia64/ia64/syscall.S
@@ -251,10 +251,10 @@ ENTRY_NOPROFILE(epc_syscall, 8)
add sp=-16,r30
;;
}
-{ .mib
+{ .mmi
+ mov ar.rnat=r19
mov r21=ar.unat
add r31=8,r30
- nop 0
;;
}
{ .mib
@@ -561,7 +561,7 @@ epc_syscall_setup_ia32:
srlz.d
add r2=gw_ret_ia32-ia64_gateway_page,r2
;;
- mov ar.rsc=0x0
+ mov ar.rsc=0
mov b7=r2
br.ret.sptk b7
;;
OpenPOWER on IntegriCloud