cvs commit: src/sys/ia64/ia64 trap.c src/sys/ia64/include cpu.h
Marcel Moolenaar
marcel at FreeBSD.org
Sat May 24 14:16:21 PDT 2003
marcel 2003/05/24 14:16:19 PDT
FreeBSD src repository
Modified files:
sys/ia64/ia64 trap.c
sys/ia64/include cpu.h
Log:
Consistently us the same metric to differentiate between kernel mode
and user mode. We need to take into account that the EPC syscall path
introduces a grey area in which one can argue either way, including a
third: neither.
We now use the region in which the IP address lies. Regions 5, 6 and 7
are kernel VA regions and if the IP lies any any of those regions we
assume we're in kernel mode. Hence, we can be in kernel mode even if
we're not on the kernel stack and/or have user privileges. There're
gremlins living in the twilight zone :-)
For the EPC syscall path this particularly means that the process
leaves user mode the moment it calls into the gateway page. This
makes the most sense because from a process' point of view the call
represents a request to the kernel for some service and that service
has been performed if the call returns. With the metric we picked,
this also means that we're back in user mode IFF the call returns.
Approved by: re@ (blanket)
Revision Changes Path
1.77 +1 -1 src/sys/ia64/ia64/trap.c
1.31 +1 -2 src/sys/ia64/include/cpu.h
More information about the cvs-all
mailing list