cvs commit: src/sys/i386/i386 bcopy.s genassym.c globals.s machdep.c pmap.c swtch.s trap.c src/sys/i386/include asmacros.h globaldata.h npx.h src/sys/i386/isa npx.c

Matthew Dillon dillon at
Wed May 5 12:27:17 PDT 2004

dillon      2004/05/05 12:26:44 PDT

DragonFly src repository

  Modified files:
    sys/i386/i386        bcopy.s genassym.c globals.s machdep.c 
                         pmap.c swtch.s trap.c 
    sys/i386/include     asmacros.h globaldata.h npx.h 
    sys/i386/isa         npx.c 
  Another major mmx/xmm/FP commit.  This is a combination of several patches
  but since the earlier patches didn't actually fix the crashing and corruption
  issues we were seeing everything has been rolled into one well tested commit.
  Make the FP more deterministic by requiring that npxthread and the FP state
  be properly synchronized, and that the FP be in a 'safe' state (meaning
  that mmx/xmm registers be useable) when npxthread is NULL.  Allow the FP
  save area to be revectored.  Kernel entities which use the FP unit,
  such as the bcopy code, must save the app state if it hasn't already been
  saved, then revector the save area.
  Note that combinations of operations must be protected by a critical section
  or interrupt disablement.  Any clearing or setting npxthread combined with
  an fxsave/fnsave/frstor/fxrstor/fninit must be protected as an atomic entity.
  Since interrupts are threads and can preempt, such preemption will cause
  a thread switch to occur and thus cause npxthread and the FP state to be
  manipulated.  The kernel can only depend on the FP state being stable for its
  use after it has revectored the FP save area.
  This commit fixes a number of issues, including potential filesystem
  corruption and kernel crashes.
  Revision  Changes    Path
  1.5       +102 -72   src/sys/i386/i386/bcopy.s
  1.39      +2 -1      src/sys/i386/i386/genassym.c
  1.22      +3 -2      src/sys/i386/i386/globals.s
  1.58      +6 -8      src/sys/i386/i386/machdep.c
  1.37      +4 -3      src/sys/i386/i386/pmap.c
  1.34      +4 -2      src/sys/i386/i386/swtch.s
  1.51      +8 -4      src/sys/i386/i386/trap.c
  1.7       +1 -0      src/sys/i386/include/asmacros.h
  1.25      +5 -1      src/sys/i386/include/globaldata.h
  1.7       +1 -1      src/sys/i386/include/npx.h
  1.19      +35 -37    src/sys/i386/isa/npx.c

More information about the Commits mailing list