Commit Graph

8 Commits

Author SHA1 Message Date
John Baldwin
4ef6ea38fc Add a <machine/fpu.h> for i386 that includes <machine/npx.h>.
arm64 has a similar wrapper.  This permits defining <machine/fpu.h> as
the standard header for fpu_kern_*.

Reviewed by:	kib
Sponsored by:	Netflix
Differential Revision:	https://reviews.freebsd.org/D26753
2020-10-13 17:26:12 +00:00
Conrad Meyer
4e6bbdd6fe fpu_kern.9: Document fpu_kern_enter API change in r329878
While here, clean up some of the language.

Reported by:	delphij
Sponsored by:	Dell EMC Isilon
2018-03-07 18:31:31 +00:00
Andrew Turner
6ed982a221 Add support for the fpu_kern(9) KPI on arm64. It hooks into the existing
VFP code to store the old context, with lazy loading of the new context
when needed.

FPU_KERN_NOCTX is missing as this is unused in the crypto code this has
been tested with, and I am unsure on the requirements of the UEFI
Runtime Services.

Reviewed by:	kib
Obtained from:	ABT Systeems Ltd
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D8276
2016-10-20 09:22:10 +00:00
Konstantin Belousov
cf1c47763f Add FPU_KERN_NOCTX flag to the fpu_kern_enter() function on amd64.
The flag specifies that the block which uses FPU must be executed in
critical section, i.e. take no context switches, and does not need an
FPU save area during the execution.

It is intended to be applied around fast and short code pathes where
save area allocation is impossible or undesirable, due to context or
due to the relative cost of calculation vs. allocation.

Sponsored by:	The FreeBSD Foundation
MFC after:	2 weeks
2016-09-11 09:14:07 +00:00
Warren Block
7c64ddd5b0 Spelling fixes supplied by pfg@, detected with codespell, plus
additional misspellings detected by igor.

MFC after:	1 week
2016-05-01 22:00:41 +00:00
John-Mark Gurney
dbb91b1415 minor updates to make it more explicit that when using fpu_kern_thread,
you don't need to use fpu_kern_enter/_leave...

Reviewed by:	kib
2014-10-23 17:24:50 +00:00
Christian Brueffer
04d4c8e4ed Several small fixes (typos, grammar, mdoc). 2014-06-23 12:43:30 +00:00
Konstantin Belousov
56388ef94b Add documentation for the fpu_kern(9) interfaces.
Many thanks to jmg for reviewing the (previous version) of the text
and providing grammar and content fixes.

Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2014-06-23 07:45:44 +00:00