Page MenuHomeFreeBSD

Initialize FPU sooner. Prompted by: cperciva@
AbandonedPublic

Authored by cem on Aug 23 2017, 3:42 AM.
Tags
None
Referenced Files
Unknown Object (File)
Dec 24 2023, 2:54 AM
Unknown Object (File)
Dec 23 2023, 12:20 AM
Unknown Object (File)
Dec 18 2023, 8:54 AM
Unknown Object (File)
Sep 10 2023, 2:41 PM
Unknown Object (File)
Jul 13 2023, 10:56 PM
Unknown Object (File)
Jun 26 2023, 12:19 PM
Unknown Object (File)
Jun 15 2023, 6:43 PM
Unknown Object (File)
Jun 13 2023, 12:55 AM
Subscribers
None

Details

Reviewers
cperciva
jhb

Diff Detail

Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 11206
Build 11584: arc lint + arc unit

Event Timeline

This patch works fine, but when I try to use the FPU from an SI_SUB_CPU sysinit (after calling fpu_kern_enter) I get:

kernel trap 22 with interrupts disabled
kernel trap 6 with interrupts disabled


Fatal trap 6: arithmetic trap while in kernel mode
cpuid = 0; apic id = 00
instruction pointer	= 0x20:0xffffffff8105fa8b
stack pointer	        = 0x28:0xffffffff8227ba90
frame pointer	        = 0x28:0xffffffff8227bb20
code segment		= base 0x0, limit 0xfffff, type 0x1b
			= DPL 0, pres 1, long 1, def32 0, gran 1
processor eflags	= resume, IOPL = 0
current process		= 0 ()
[ thread pid 0 tid 0 ]
Stopped at      init_TSC+0x3cb: fstpl   -0x68(%rbp)
db>

This is a different error from before, but maybe there's something else trap-related which needs to be done before the FPU becomes usable?

Insufficiently motivated to follow this up :-).