MFi386: revision 1.625.
This commit is contained in:
parent
7921291f49
commit
13a5c9f63c
@ -1232,9 +1232,22 @@ cpu_setregs(void)
|
||||
unsigned int cr0;
|
||||
|
||||
cr0 = rcr0();
|
||||
|
||||
/*
|
||||
* CR0_MP, CR0_NE and CR0_TS are also set by npx_probe() for the
|
||||
* BSP. See the comments there about why we set them.
|
||||
* CR0_MP, CR0_NE and CR0_TS are set for NPX (FPU) support:
|
||||
*
|
||||
* Prepare to trap all ESC (i.e., NPX) instructions and all WAIT
|
||||
* instructions. We must set the CR0_MP bit and use the CR0_TS
|
||||
* bit to control the trap, because setting the CR0_EM bit does
|
||||
* not cause WAIT instructions to trap. It's important to trap
|
||||
* WAIT instructions - otherwise the "wait" variants of no-wait
|
||||
* control instructions would degenerate to the "no-wait" variants
|
||||
* after FP context switches but work correctly otherwise. It's
|
||||
* particularly important to trap WAITs when there is no NPX -
|
||||
* otherwise the "wait" variants would always degenerate.
|
||||
*
|
||||
* Try setting CR0_NE to get correct error reporting on 486DX's.
|
||||
* Setting it should fail or do nothing on lesser processors.
|
||||
*/
|
||||
cr0 |= CR0_MP | CR0_NE | CR0_TS | CR0_WP | CR0_AM;
|
||||
load_cr0(cr0);
|
||||
|
Loading…
Reference in New Issue
Block a user