1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-27 11:55:06 +00:00

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)
This commit is contained in:
Marcel Moolenaar 2007-07-16 16:47:35 +00:00
parent 99227f1ec4
commit 871f1ddd46
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=171463

View File

@ -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
;;