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 crater.dragonflybsd.org
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
Log:
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
http://www.dragonflybsd.org/cvsweb/src/sys/i386/i386/bcopy.s.diff?r1=1.4&r2=1.5&f=h
http://www.dragonflybsd.org/cvsweb/src/sys/i386/i386/genassym.c.diff?r1=1.38&r2=1.39&f=h
http://www.dragonflybsd.org/cvsweb/src/sys/i386/i386/globals.s.diff?r1=1.21&r2=1.22&f=h
http://www.dragonflybsd.org/cvsweb/src/sys/i386/i386/machdep.c.diff?r1=1.57&r2=1.58&f=h
http://www.dragonflybsd.org/cvsweb/src/sys/i386/i386/pmap.c.diff?r1=1.36&r2=1.37&f=h
http://www.dragonflybsd.org/cvsweb/src/sys/i386/i386/swtch.s.diff?r1=1.33&r2=1.34&f=h
http://www.dragonflybsd.org/cvsweb/src/sys/i386/i386/trap.c.diff?r1=1.50&r2=1.51&f=h
http://www.dragonflybsd.org/cvsweb/src/sys/i386/include/asmacros.h.diff?r1=1.6&r2=1.7&f=h
http://www.dragonflybsd.org/cvsweb/src/sys/i386/include/globaldata.h.diff?r1=1.24&r2=1.25&f=h
http://www.dragonflybsd.org/cvsweb/src/sys/i386/include/npx.h.diff?r1=1.6&r2=1.7&f=h
http://www.dragonflybsd.org/cvsweb/src/sys/i386/isa/npx.c.diff?r1=1.18&r2=1.19&f=h
More information about the Commits
mailing list