diff options
author | Mark Kettenis <kettenis@cvs.openbsd.org> | 2018-07-02 07:25:30 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@cvs.openbsd.org> | 2018-07-02 07:25:30 +0000 |
commit | b4073ad6076f7660615d5e4f2621b79cb9502a23 (patch) | |
tree | 8f16cc641b17f76ce9933e38d3fb067bcd5ba139 /sys | |
parent | 9efe7a29d4a3f4a17b2db0c149fea8bc2b3950f2 (diff) |
Enable the FPU when calling EFI runtime services. The new UEFI firmware for
the od1000 that I built myself seems to use the FPU when setting the RTC,
and the UEFI standard allows this.
ok drahn@
Diffstat (limited to 'sys')
-rw-r--r-- | sys/arch/arm64/dev/efi.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/sys/arch/arm64/dev/efi.c b/sys/arch/arm64/dev/efi.c index f82aac00210..ad735492cbb 100644 --- a/sys/arch/arm64/dev/efi.c +++ b/sys/arch/arm64/dev/efi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: efi.c,v 1.5 2018/06/24 10:38:44 kettenis Exp $ */ +/* $OpenBSD: efi.c,v 1.6 2018/07/02 07:25:29 kettenis Exp $ */ /* * Copyright (c) 2017 Mark Kettenis <kettenis@openbsd.org> @@ -25,6 +25,7 @@ #include <machine/cpufunc.h> #include <machine/bus.h> #include <machine/fdt.h> +#include <machine/vfp.h> #include <dev/ofw/openfirm.h> #include <dev/ofw/fdt.h> @@ -215,6 +216,8 @@ efi_enter(struct efi_softc *sc) WRITE_SPECIALREG(ttbr0_el1, pmap_kernel()->pm_pt0pa); __asm volatile("isb"); cpu_setttb(pm->pm_asid, pm->pm_pt0pa); + + vfp_kernel_enter(); } void @@ -222,6 +225,8 @@ efi_leave(struct efi_softc *sc) { struct pmap *pm = curcpu()->ci_curpm; + vfp_kernel_exit(); + WRITE_SPECIALREG(ttbr0_el1, pmap_kernel()->pm_pt0pa); __asm volatile("isb"); cpu_setttb(pm->pm_asid, pm->pm_pt0pa); |