aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Baldwin <jhb@FreeBSD.org>2023-08-25 19:33:00 +0000
committerJohn Baldwin <jhb@FreeBSD.org>2023-10-11 15:09:52 +0000
commite6dbc4dfd1444a38647fb55e9238112291b9e4cd (patch)
treeb588ee8cc1d5b2eb5a8b2e844623b14d3232738f
parente4a51dbf5d8d75766519a8f775f30b5026227072 (diff)
downloadsrc-e6dbc4dfd1444a38647fb55e9238112291b9e4cd.tar.gz
src-e6dbc4dfd1444a38647fb55e9238112291b9e4cd.zip
efirt: Move comment about fpu_kern_enter to where it is called
Reviewed by: imp, kib, andrew, markj Differential Revision: https://reviews.freebsd.org/D41576 (cherry picked from commit 8173fa60ddb7e9a805dec9fef7bf07e74ae4144d)
-rw-r--r--sys/amd64/amd64/efirt_machdep.c5
-rw-r--r--sys/dev/efidev/efirt.c5
2 files changed, 5 insertions, 5 deletions
diff --git a/sys/amd64/amd64/efirt_machdep.c b/sys/amd64/amd64/efirt_machdep.c
index 4c6ee4ee88a2..5734e0300df8 100644
--- a/sys/amd64/amd64/efirt_machdep.c
+++ b/sys/amd64/amd64/efirt_machdep.c
@@ -280,11 +280,6 @@ fail:
* reason to bother with the virtual map, and no need to add a
* complexity into loader.
*
- * The fpu_kern_enter() call allows firmware to use FPU, as mandated
- * by the specification. In particular, CR0.TS bit is cleared. Also
- * it enters critical section, giving us neccessary protection against
- * context switch.
- *
* There is no need to disable interrupts around the change of %cr3,
* the kernel mappings are correct, while we only grabbed the
* userspace portion of VA. Interrupts handlers must not access
diff --git a/sys/dev/efidev/efirt.c b/sys/dev/efidev/efirt.c
index 851385eeb8d6..29f51b78eb25 100644
--- a/sys/dev/efidev/efirt.c
+++ b/sys/dev/efidev/efirt.c
@@ -269,6 +269,11 @@ efi_rt_ok(void)
return (0);
}
+/*
+ * The fpu_kern_enter() call in allows firmware to use FPU, as
+ * mandated by the specification. It also enters a critical section,
+ * giving us neccessary protection against context switches.
+ */
static int
efi_enter(void)
{