]> git.ipfire.org Git - thirdparty/ipxe.git/commit
[librm] Test for FXSAVE/FXRSTOR instruction support 267/head
authorMichael Brown <mcb30@ipxe.org>
Thu, 18 Feb 2021 14:30:27 +0000 (14:30 +0000)
committerMichael Brown <mcb30@ipxe.org>
Thu, 18 Feb 2021 15:38:56 +0000 (15:38 +0000)
commit900f1f98d3dbb64803e427318ad61c9d7aa6f9bb
tree93397baefd0b1391e321dcdfe04afabd1578e89b
parente63b8c3302b1e80e14f3d3628ff279f7316ee208
[librm] Test for FXSAVE/FXRSTOR instruction support

Assume that preservation of the %xmm registers is unnecessary during
installation of iPXE into memory, since this is an operation that by
its nature substantially disrupts large portions of the system anyway
(such as the E820 memory map).  This assumption allows us to utilise
the existing CPUID code to check that FXSAVE/FXRSTOR are supported.

Test for support during the call to init_librm and store the flag for
use during subsequent calls to virt_call.

Reduce the scope of TIVOLI_VMM_WORKAROUND to affecting only the call
to check_fxsr(), to reduce #ifdef pollution in the remaining code.

Debugged-by: Johannes Heimansberg <git@jhe.dedyn.io>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
src/arch/x86/include/ipxe/cpuid.h
src/arch/x86/transitions/librm.S
src/arch/x86/transitions/librm_mgmt.c