MCPcopy Create free account
hub / github.com/F-Stack/f-stack / npxinit_bsp2

Function npxinit_bsp2

freebsd/i386/i386/npx.c:398–414  ·  view source on GitHub ↗

* Calculate the fpu save area size. */

Source from the content-addressed store, hash-verified

396 * Calculate the fpu save area size.
397 */
398static void
399npxinit_bsp2(void)
400{
401 u_int cp[4];
402
403 if (use_xsave) {
404 cpuid_count(0xd, 0x0, cp);
405 cpu_max_ext_state_size = cp[1];
406
407 /*
408 * Reload the cpu_feature2, since we enabled OSXSAVE.
409 */
410 do_cpuid(1, cp);
411 cpu_feature2 = cp[2];
412 } else
413 cpu_max_ext_state_size = sizeof(union savefpu);
414}
415
416/*
417 * Initialize floating point unit.

Callers 1

npxinitFunction · 0.85

Calls 2

cpuid_countFunction · 0.50
do_cpuidFunction · 0.50

Tested by

no test coverage detected