Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 24 May 2003 14:16:19 -0700 (PDT)
From:      Marcel Moolenaar <marcel@FreeBSD.org>
To:        src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   cvs commit: src/sys/ia64/ia64 trap.c src/sys/ia64/include cpu.h
Message-ID:  <200305242116.h4OLGJUx005745@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
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



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