From 5923a66512365241357c759d27419d2a1f6640eb Mon Sep 17 00:00:00 2001 From: pca006132 Date: Fri, 15 Jan 2021 12:00:35 +0800 Subject: [PATCH] libsupport_zynq/boot: enable FPU on boot --- libsupport_zynq/src/boot.rs | 3 ++- szl/src/main.rs | 2 -- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/libsupport_zynq/src/boot.rs b/libsupport_zynq/src/boot.rs index 54315ac..8f16597 100644 --- a/libsupport_zynq/src/boot.rs +++ b/libsupport_zynq/src/boot.rs @@ -4,7 +4,7 @@ use libregister::{ VolatileCell, RegisterR, RegisterW, RegisterRW, }; -use libcortex_a9::{asm, l2c, regs::*, cache, mmu, spin_lock_yield, notify_spin_lock}; +use libcortex_a9::{asm, l2c, regs::*, cache, mmu, spin_lock_yield, notify_spin_lock, enable_fpu}; use libboard_zynq::{slcr, mpcore}; extern "C" { @@ -43,6 +43,7 @@ pub unsafe extern "C" fn Reset() -> ! { unsafe fn boot_core0() -> ! { l1_cache_init(); + enable_fpu(); let mpcore = mpcore::RegisterBlock::mpcore(); mpcore.scu_invalidate.invalidate_all_cores(); diff --git a/szl/src/main.rs b/szl/src/main.rs index 19e69f0..98f21a3 100644 --- a/szl/src/main.rs +++ b/szl/src/main.rs @@ -20,7 +20,6 @@ use libconfig::{bootgen, sd_reader, Config}; use libcortex_a9::{ asm::{dsb, isb}, cache::{bpiall, dcciall, iciallu}, - enable_fpu, l2c::enable_l2_cache, }; use libregister::RegisterR; @@ -66,7 +65,6 @@ fn boot_sd( #[no_mangle] pub fn main_core0() { GlobalTimer::start(); - enable_fpu(); logger::init().unwrap(); log::set_max_level(log::LevelFilter::Debug); println!(