summaryrefslogtreecommitdiff
path: root/arch/x86/cpu
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2020-07-03 06:12:12 +0300
committerBin Meng <bmeng.cn@gmail.com>2020-07-09 07:33:24 +0300
commit3dada5a1a89f336f4b751548117949cf255cfcf6 (patch)
tree3694a1863dae64f0ef7c4363d8cf607b52340cb7 /arch/x86/cpu
parent61608f395e7dcb2be6060407a72a1149b046430a (diff)
downloadu-boot-3dada5a1a89f336f4b751548117949cf255cfcf6.tar.xz
x86: fsp: Reinit the FPU after FSP meminit
The APL FSP appears to leave the FPU in a bad state in that it has registers in use. This causes an error when the next FPU operation is performed. Work around this by re-resetting the FPU after calling FSP-M. This allows the freetype console to work correctly. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Diffstat (limited to 'arch/x86/cpu')
-rw-r--r--arch/x86/cpu/i386/cpu.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/x86/cpu/i386/cpu.c b/arch/x86/cpu/i386/cpu.c
index 435e50edad..d27324cb4e 100644
--- a/arch/x86/cpu/i386/cpu.c
+++ b/arch/x86/cpu/i386/cpu.c
@@ -363,6 +363,11 @@ static void setup_cpu_features(void)
: : "i" (em_rst), "i" (mp_ne_set) : "eax");
}
+void cpu_reinit_fpu(void)
+{
+ asm ("fninit\n");
+}
+
static void setup_identity(void)
{
/* identify CPU via cpuid and store the decoded info into gd->arch */