Changeset View
Changeset View
Standalone View
Standalone View
sys/amd64/amd64/fpu.c
| Show First 20 Lines • Show All 466 Lines • ▼ Show 20 Lines | fpuinitstate(void *arg __unused) | ||||
| * startup program state and signal handler XMM/x87 register | * startup program state and signal handler XMM/x87 register | ||||
| * content predictable. | * content predictable. | ||||
| */ | */ | ||||
| bzero(fpu_initialstate->sv_fp, sizeof(fpu_initialstate->sv_fp)); | bzero(fpu_initialstate->sv_fp, sizeof(fpu_initialstate->sv_fp)); | ||||
| bzero(fpu_initialstate->sv_xmm, sizeof(fpu_initialstate->sv_xmm)); | bzero(fpu_initialstate->sv_xmm, sizeof(fpu_initialstate->sv_xmm)); | ||||
| /* | /* | ||||
| * Create a table describing the layout of the CPU Extended | * Create a table describing the layout of the CPU Extended | ||||
| * Save Area. | * Save Area. See Intel SDM rev. 075 Vol. 1 13.4.1 "Legacy | ||||
| * Region of an XSAVE Area" for the source of offsets/sizes. | |||||
| */ | */ | ||||
| if (use_xsave) { | if (use_xsave) { | ||||
| xstate_bv = (uint64_t *)((char *)(fpu_initialstate + 1) + | xstate_bv = (uint64_t *)((char *)(fpu_initialstate + 1) + | ||||
| offsetof(struct xstate_hdr, xstate_bv)); | offsetof(struct xstate_hdr, xstate_bv)); | ||||
| *xstate_bv = XFEATURE_ENABLED_X87 | XFEATURE_ENABLED_SSE; | *xstate_bv = XFEATURE_ENABLED_X87 | XFEATURE_ENABLED_SSE; | ||||
| /* x87 state */ | /* x87 state */ | ||||
| xsave_area_desc[0].offset = 0; | xsave_area_desc[0].offset = 0; | ||||
| ▲ Show 20 Lines • Show All 812 Lines • Show Last 20 Lines | |||||