cvs commit: src/sys/ia64/ia64 machdep.c support.s

Marcel Moolenaar marcel at FreeBSD.org
Mon May 26 18:00:14 PDT 2003


marcel      2003/05/26 18:00:13 PDT

  FreeBSD src repository

  Modified files:
    sys/ia64/ia64        machdep.c support.s 
  Log:
  Fix fu{byte|word*} and su{byte|word*}:
  o  If the address was not within user space we jumped to fusufault
     where we would clear pcb_onfault and return 0. There are two
     bugs here:
     1. We never got to the point where we assigned the address of
        pcb_onfault to r15, which means that we would clobber some
        random memory location, including I/O space or ROM.
     2. We're supposed to return -1 on error.
  o  Make sure we have proper memory ordering for setting pcb_onfault,
     doing the memory access to user space and clearing pcb_onfault.
     For the fu* family of functions this means that we need a mf
     instruction, because we don't have acquire semantics on stores
     and release semantics on loads (hence st;ld cannot be ordered
     without intermediate mf).
  
  While here, implement casuptr() so that we are a (small) step
  closer to supporting libthr and deobfuscate the non-implementation
  of {f|s}uswintr.
  
  Approved by: re@ (blanket)
  
  Revision  Changes    Path
  1.135     +0 -6      src/sys/ia64/ia64/machdep.c
  1.18      +455 -150  src/sys/ia64/ia64/support.s


More information about the cvs-src mailing list