From 44985f00d30dc1b6106abe5ded4dd22e4c068832 Mon Sep 17 00:00:00 2001 From: baohongde Date: Sat, 30 May 2020 17:29:25 +0800 Subject: [PATCH] components/bt: Disable exception mode after saving special registers To store some registers first, avoid stuck due to live lock after disabling exception mode --- components/bt/hli_vectors.S | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/components/bt/hli_vectors.S b/components/bt/hli_vectors.S index 11655ac15f..7d612c7250 100644 --- a/components/bt/hli_vectors.S +++ b/components/bt/hli_vectors.S @@ -39,11 +39,6 @@ _l4_save_ctx: .type xt_highint4,@function .align 4 xt_highint4: - /* disable exception mode, window overflow */ - movi a0, PS_INTLEVEL(5) | PS_EXCM /*TOCHECK*/ - wsr a0, PS - rsync - movi a0, _l4_save_ctx /* save 4 lower registers */ s32i a1, a0, 4 @@ -69,6 +64,11 @@ xt_highint4: rsr a2, EPC1 s32i a2, a0, 24 + /* disable exception mode, window overflow */ + movi a0, PS_INTLEVEL(5) | PS_EXCM /*TOCHECK*/ + wsr a0, PS + rsync + /* Save the remaining physical registers. * 4 registers are already saved, which leaves 60 registers to save. * (FIXME: consider the case when the CPU is configured with physical 32 registers)