nuttx/arch/arm/src
hujun5 0e1b432dd0 armv7/8m: fix regresion from https://github.com/apache/nuttx/pull/14881
reason:
svc call may trigger hardfault

Background
    The origin of this issue is our desire to eliminate the function of storing
"regs" in g_current_regs and instead utilize (*running_task)->xcp.regs for storage.
The benefits of this approach include faster storage speed and
avoiding multiple accesses to g_current_regs during context switching,
thus ensuring that whether returning from an interrupt or an exception,
we consistently use this_task()->xcp.regs

Issue Encountered
    However, when storing registers, we must ensure that (running_task)->xcp.regs is invalid
so that it can be safely overwritten.
According to the existing logic, the only scenario where (running_task)->xcp.regs
is valid is during restore_context. We must accurately identify this scenario.
Initially, we used the condition (running_task)==NULL for this purpose, but we deemed
this approach unsatisfactory as it did not align well with the actual logic.
(running_task) should not be NULL. Consequently, we adopted other arch-specific methods for judgment,
but due to special logic in some arch, the judgment was not accurate, leading to this issue.

Solution:
    For armv6-m, we haven't found a more suitable solution, so we are sticking with (*running_task)==NULL.
    For armv7-m/armv8-m, by removing support for primask, we can achieve accurate judgment.

    PRIMASK is a design in armv6-m, that's why arm introduce BASEPRI from armv7-m.
It's wrong to provide this option for armv7-m/armv8-m arch.

Signed-off-by: hujun5 <hujun5@xiaomi.com>
2024-12-09 12:20:13 +08:00
..
a1x arch/arm: migrate to SPDX identifier 2024-12-06 09:25:23 +08:00
am335x arch/arm: migrate to SPDX identifier 2024-12-06 09:25:23 +08:00
arm arch/arm: migrate to SPDX identifier 2024-12-06 09:25:23 +08:00
armv6-m armv6m: fix regresion from https://github.com/apache/nuttx/pull/14881 2024-12-09 12:20:13 +08:00
armv7-a armv7-a/armv7-r/armv8-r: percpu reg store this_task 2024-12-06 09:27:33 +08:00
armv7-m armv7/8m: fix regresion from https://github.com/apache/nuttx/pull/14881 2024-12-09 12:20:13 +08:00
armv7-r armv7-a/armv7-r/armv8-r: percpu reg store this_task 2024-12-06 09:27:33 +08:00
armv8-m armv7/8m: fix regresion from https://github.com/apache/nuttx/pull/14881 2024-12-09 12:20:13 +08:00
armv8-r arch/arm: migrate to SPDX identifier 2024-12-06 09:25:23 +08:00
at32 armv7/8m: fix regresion from https://github.com/apache/nuttx/pull/14881 2024-12-09 12:20:13 +08:00
c5471 arch/arm: migrate to SPDX identifier 2024-12-06 09:25:23 +08:00
cmake arch/arm: migrate to SPDX identifier 2024-12-06 09:25:23 +08:00
common armv6m: fix regresion from https://github.com/apache/nuttx/pull/14881 2024-12-09 12:20:13 +08:00
csk6 armv7/8m: fix regresion from https://github.com/apache/nuttx/pull/14881 2024-12-09 12:20:13 +08:00
cxd32xx armv7/8m: fix regresion from https://github.com/apache/nuttx/pull/14881 2024-12-09 12:20:13 +08:00
cxd56xx armv7/8m: fix regresion from https://github.com/apache/nuttx/pull/14881 2024-12-09 12:20:13 +08:00
dm320 arch/arm: migrate to SPDX identifier 2024-12-06 09:25:23 +08:00
efm32 armv7/8m: fix regresion from https://github.com/apache/nuttx/pull/14881 2024-12-09 12:20:13 +08:00
eoss3 armv7/8m: fix regresion from https://github.com/apache/nuttx/pull/14881 2024-12-09 12:20:13 +08:00
fvp-v8r-aarch32 arch/arm: migrate to SPDX identifier 2024-12-06 09:25:23 +08:00
gd32f4 armv7/8m: fix regresion from https://github.com/apache/nuttx/pull/14881 2024-12-09 12:20:13 +08:00
goldfish arch/arm: migrate to SPDX identifier 2024-12-06 09:25:23 +08:00
imx1 arch/arm: migrate to SPDX identifier 2024-12-06 09:25:23 +08:00
imx6 arch/arm: migrate to SPDX identifier 2024-12-06 09:25:23 +08:00
imxrt armv7/8m: fix regresion from https://github.com/apache/nuttx/pull/14881 2024-12-09 12:20:13 +08:00
kinetis armv7/8m: fix regresion from https://github.com/apache/nuttx/pull/14881 2024-12-09 12:20:13 +08:00
kl arch/arm: migrate to SPDX identifier 2024-12-06 09:25:23 +08:00
lc823450 armv7/8m: fix regresion from https://github.com/apache/nuttx/pull/14881 2024-12-09 12:20:13 +08:00
lpc17xx_40xx armv7/8m: fix regresion from https://github.com/apache/nuttx/pull/14881 2024-12-09 12:20:13 +08:00
lpc31xx arch/arm: migrate to SPDX identifier 2024-12-06 09:25:23 +08:00
lpc43xx armv7/8m: fix regresion from https://github.com/apache/nuttx/pull/14881 2024-12-09 12:20:13 +08:00
lpc54xx armv7/8m: fix regresion from https://github.com/apache/nuttx/pull/14881 2024-12-09 12:20:13 +08:00
lpc214x arch/arm: migrate to SPDX identifier 2024-12-06 09:25:23 +08:00
lpc2378 arch/arm: migrate to SPDX identifier 2024-12-06 09:25:23 +08:00
max326xx armv7/8m: fix regresion from https://github.com/apache/nuttx/pull/14881 2024-12-09 12:20:13 +08:00
moxart arch/arm: migrate to SPDX identifier 2024-12-06 09:25:23 +08:00
mps arch/arm: migrate to SPDX identifier 2024-12-06 09:25:23 +08:00
mx8mp armv7/8m: fix regresion from https://github.com/apache/nuttx/pull/14881 2024-12-09 12:20:13 +08:00
nrf52 armv7/8m: fix regresion from https://github.com/apache/nuttx/pull/14881 2024-12-09 12:20:13 +08:00
nrf53 armv7/8m: fix regresion from https://github.com/apache/nuttx/pull/14881 2024-12-09 12:20:13 +08:00
nrf91 armv7/8m: fix regresion from https://github.com/apache/nuttx/pull/14881 2024-12-09 12:20:13 +08:00
nuc1xx arch/arm: migrate to SPDX identifier 2024-12-06 09:25:23 +08:00
phy62xx arch/arm: migrate to SPDX identifier 2024-12-06 09:25:23 +08:00
qemu arch/arm: migrate to SPDX identifier 2024-12-06 09:25:23 +08:00
rp23xx arch/arm: migrate to SPDX identifier 2024-12-06 09:25:23 +08:00
rp2040 arch/arm: migrate to SPDX identifier 2024-12-06 09:25:23 +08:00
rtl8720c arch/arm: migrate to SPDX identifier 2024-12-06 09:25:23 +08:00
s32k1xx armv7/8m: fix regresion from https://github.com/apache/nuttx/pull/14881 2024-12-09 12:20:13 +08:00
s32k3xx armv7/8m: fix regresion from https://github.com/apache/nuttx/pull/14881 2024-12-09 12:20:13 +08:00
sam34 armv7/8m: fix regresion from https://github.com/apache/nuttx/pull/14881 2024-12-09 12:20:13 +08:00
sama5 arch/arm: migrate to SPDX identifier 2024-12-06 09:25:23 +08:00
samd2l2 arch/arm: migrate to SPDX identifier 2024-12-06 09:25:23 +08:00
samd5e5 armv7/8m: fix regresion from https://github.com/apache/nuttx/pull/14881 2024-12-09 12:20:13 +08:00
samv7 armv7/8m: fix regresion from https://github.com/apache/nuttx/pull/14881 2024-12-09 12:20:13 +08:00
stm32 armv7/8m: fix regresion from https://github.com/apache/nuttx/pull/14881 2024-12-09 12:20:13 +08:00
stm32f0l0g0 arch/arm: migrate to SPDX identifier 2024-12-06 09:25:23 +08:00
stm32f7 armv7/8m: fix regresion from https://github.com/apache/nuttx/pull/14881 2024-12-09 12:20:13 +08:00
stm32h5 armv7/8m: fix regresion from https://github.com/apache/nuttx/pull/14881 2024-12-09 12:20:13 +08:00
stm32h7 armv7/8m: fix regresion from https://github.com/apache/nuttx/pull/14881 2024-12-09 12:20:13 +08:00
stm32l4 armv7/8m: fix regresion from https://github.com/apache/nuttx/pull/14881 2024-12-09 12:20:13 +08:00
stm32l5 armv7/8m: fix regresion from https://github.com/apache/nuttx/pull/14881 2024-12-09 12:20:13 +08:00
stm32u5 armv7/8m: fix regresion from https://github.com/apache/nuttx/pull/14881 2024-12-09 12:20:13 +08:00
stm32wb armv7/8m: fix regresion from https://github.com/apache/nuttx/pull/14881 2024-12-09 12:20:13 +08:00
stm32wl5 armv7/8m: fix regresion from https://github.com/apache/nuttx/pull/14881 2024-12-09 12:20:13 +08:00
str71x arch/arm: migrate to SPDX identifier 2024-12-06 09:25:23 +08:00
tiva armv7/8m: fix regresion from https://github.com/apache/nuttx/pull/14881 2024-12-09 12:20:13 +08:00
tlsr82 arch/arm: migrate to SPDX identifier 2024-12-06 22:31:35 +08:00
tms570 arch/arm: migrate to SPDX identifier 2024-12-06 22:31:35 +08:00
xmc4 armv7/8m: fix regresion from https://github.com/apache/nuttx/pull/14881 2024-12-09 12:20:13 +08:00
.gitignore
CMakeLists.txt arch/arm: migrate to SPDX identifier 2024-12-06 09:25:23 +08:00
Makefile arch/arm: migrate to SPDX identifier 2024-12-06 09:25:23 +08:00