boot/arch/arm: disable FPU initialization on bootloader start

Change-Id: Idd71940d22a9004e93f613899725d299a7932d8c
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4702
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: Fredrik Holmqvist <[email protected]>
Reviewed-by: Adrien Destugues <[email protected]>
This commit is contained in:
David Karoly
2021-12-02 08:07:42 +00:00
committed by Adrien Destugues
parent d1f10fcef9
commit 8a18d81d7a
-20
View File
@@ -81,26 +81,6 @@ check_cpu_features()
break;
}
// We could check for VFP/NEON support here, but for the moment we only
// really target ARM CPU's with VFP/NEON built-in (cortex-a7+)
if (arch >= ARCH_ARM_v7)
{
// Enable VFP/NEON. We HAVE to do this before the trace call below,
// which is the first time we call vprintf. Otherwise, it will crash
// when trying to push floating point registers on the stack.
asm volatile(
" MRC p15, #0, r1, c1, c0, #2\n" // r1 = Access Control Register
" ORR r1, r1, #(0xf << 20)\n" // enable full access for p10,11
" MCR p15, #0, r1, c1, c0, #2\n" // Access Control Register = r1
" MOV r1, #0\n"
" MCR p15, #0, r1, c7, c5, #4\n" // flush prefetch buffer because of
// FMXR below and CP 10 & 11 were only just enabled
" MOV r0,#0x40000000 \n" // Enable VFP itself
" FMXR FPEXC, r0" //FPEXC = r0
:::"r0", "r1");
}
TRACE(("%s: implementor=0x%x('%c'), arch=%d, variant=0x%x, part=0x%x, revision=0x%x\n",
__func__, implementor, implementor, arch, variant, part, revision));