diff options
author | kib <kib@FreeBSD.org> | 2010-06-05 15:59:59 +0000 |
---|---|---|
committer | kib <kib@FreeBSD.org> | 2010-06-05 15:59:59 +0000 |
commit | 2d77212fe48ecc0a97a3c56ca4cb8dc37493a066 (patch) | |
tree | bcc333531405cbc8269cbb94116e1781440b2ed4 /sys/amd64/ia32 | |
parent | fbdcfea8cb5a809b733223e1c53a383040e1dc4b (diff) | |
download | FreeBSD-src-2d77212fe48ecc0a97a3c56ca4cb8dc37493a066.zip FreeBSD-src-2d77212fe48ecc0a97a3c56ca4cb8dc37493a066.tar.gz |
Introduce the x86 kernel interfaces to allow kernel code to use
FPU/SSE hardware. Caller should provide a save area that is chained
into the stack of the areas; pcb save_area for usermode FPU state is
on top. The pcb now contains a pointer to the current FPU saved area,
used during FPUDNA handling and context switches. There is also a
facility to allow the kernel thread to use pcb save_area.
Change the dreaded warnings "npxdna in kernel mode!" into the panics
when FPU usage is not registered.
KPI discussed with: fabient
Tested by: pho, fabient
Hardware provided by: Sentex Communications
MFC after: 1 month
Diffstat (limited to 'sys/amd64/ia32')
-rw-r--r-- | sys/amd64/ia32/ia32_reg.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/amd64/ia32/ia32_reg.c b/sys/amd64/ia32/ia32_reg.c index da5190f..30fcffb 100644 --- a/sys/amd64/ia32/ia32_reg.c +++ b/sys/amd64/ia32/ia32_reg.c @@ -147,7 +147,7 @@ fill_fpregs32(struct thread *td, struct fpreg32 *regs) { struct save87 *sv_87 = (struct save87 *)regs; struct env87 *penv_87 = &sv_87->sv_env; - struct savefpu *sv_fpu = &td->td_pcb->pcb_save; + struct savefpu *sv_fpu = &td->td_pcb->pcb_user_save; struct envxmm *penv_xmm = &sv_fpu->sv_env; int i; @@ -182,7 +182,7 @@ set_fpregs32(struct thread *td, struct fpreg32 *regs) { struct save87 *sv_87 = (struct save87 *)regs; struct env87 *penv_87 = &sv_87->sv_env; - struct savefpu *sv_fpu = &td->td_pcb->pcb_save; + struct savefpu *sv_fpu = &td->td_pcb->pcb_user_save; struct envxmm *penv_xmm = &sv_fpu->sv_env; int i; |