FreeRTOS-Kernel/portable/GCC
Gaurav-Aggarwal-AWS c8d31ddcff
Use saved mstatus for FPU/VPU state determination (#1330)
According to the RISC-V Privileged Architecture Specification (20211203),
writing Initial or Clean to the FS field of mstatus may result in the FS
value getting set to Dirty in some implementations. This means we cannot
rely on reading back the same FS value after writing to mstatus.

Previously, the context restore code would:
1. Write an FS value to mstatus
2. Read mstatus again at a later point
3. Use the read FS value to determine FPU status

This change updates the context restore code to use the mstatus value
from the saved context instead of re-reading mstatus after writing to
it. This required chaning the location of the mstatus slot in the
context.

Fixes: https://github.com/FreeRTOS/FreeRTOS-Kernel/issues/1327

Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>
2025-11-03 12:32:08 +05:30
..
ARM7_AT91FR40008 Use Regex for Copyright Year in Header Check (#1002) 2024-02-26 09:26:42 -08:00
ARM7_AT91SAM7S Fix spelling typos (#1168) 2024-11-01 10:09:49 -07:00
ARM7_LPC23xx Use Regex for Copyright Year in Header Check (#1002) 2024-02-26 09:26:42 -08:00
ARM7_LPC2000 Use Regex for Copyright Year in Header Check (#1002) 2024-02-26 09:26:42 -08:00
ARM_AARCH64 Move configASSERT default definition above before including portable.h. (#1185) 2024-11-04 16:35:52 +05:30
ARM_AARCH64_SRE portable: aarch64_sre: Add support for vApplicationFPUSafeIRQHandler 2025-01-22 17:00:50 -08:00
ARM_CA9 Fix function parameter shadowing global variable. (#1221) 2025-01-13 14:48:10 -08:00
ARM_CA53_64_BIT fix typos in comments: interace -> interface, swtich -> switch (#1022) 2024-04-08 17:50:55 -07:00
ARM_CA53_64_BIT_SRE fix typos in comments: interace -> interface, swtich -> switch (#1022) 2024-04-08 17:50:55 -07:00
ARM_CM0 cortex-M ports: Clarify hardware-saved exception frame size variable (#1314) 2025-09-09 14:25:42 +08:00
ARM_CM3 Move configASSERT default definition above before including portable.h. (#1185) 2024-11-04 16:35:52 +05:30
ARM_CM3_MPU cortex-M ports: Clarify hardware-saved exception frame size variable (#1314) 2025-09-09 14:25:42 +08:00
ARM_CM4_MPU cortex-M ports: Clarify hardware-saved exception frame size variable (#1314) 2025-09-09 14:25:42 +08:00
ARM_CM4F Move configASSERT default definition above before including portable.h. (#1185) 2024-11-04 16:35:52 +05:30
ARM_CM7 Move configASSERT default definition above before including portable.h. (#1185) 2024-11-04 16:35:52 +05:30
ARM_CM23 cortex-M ports: Clarify hardware-saved exception frame size variable (#1314) 2025-09-09 14:25:42 +08:00
ARM_CM23_NTZ/non_secure cortex-M ports: Clarify hardware-saved exception frame size variable (#1314) 2025-09-09 14:25:42 +08:00
ARM_CM33 cortex-M ports: Clarify hardware-saved exception frame size variable (#1314) 2025-09-09 14:25:42 +08:00
ARM_CM33_NTZ/non_secure cortex-M ports: Clarify hardware-saved exception frame size variable (#1314) 2025-09-09 14:25:42 +08:00
ARM_CM35P cortex-M ports: Clarify hardware-saved exception frame size variable (#1314) 2025-09-09 14:25:42 +08:00
ARM_CM35P_NTZ/non_secure cortex-M ports: Clarify hardware-saved exception frame size variable (#1314) 2025-09-09 14:25:42 +08:00
ARM_CM55 cortex-M ports: Clarify hardware-saved exception frame size variable (#1314) 2025-09-09 14:25:42 +08:00
ARM_CM55_NTZ/non_secure cortex-M ports: Clarify hardware-saved exception frame size variable (#1314) 2025-09-09 14:25:42 +08:00
ARM_CM85 cortex-M ports: Clarify hardware-saved exception frame size variable (#1314) 2025-09-09 14:25:42 +08:00
ARM_CM85_NTZ/non_secure cortex-M ports: Clarify hardware-saved exception frame size variable (#1314) 2025-09-09 14:25:42 +08:00
ARM_CR5 Move configASSERT default definition above before including portable.h. (#1185) 2024-11-04 16:35:52 +05:30
ARM_CR82 armv8-r: Add Arm Cortex-R82 non-MPU port (#1289) 2025-09-29 20:10:22 +05:30
ARM_CRx_MPU LLVM assembler compatibility for ARM_CRx_MPU (#1303) 2025-08-05 16:02:03 +05:30
ARM_CRx_No_GIC Add support for vApplicationFPUSafeIRQHandler (#1113) 2024-08-08 21:07:11 +05:30
ATMega323 Use Regex for Copyright Year in Header Check (#1002) 2024-02-26 09:26:42 -08:00
AVR32_UC3 Fix spelling typos (#1168) 2024-11-01 10:09:49 -07:00
AVR_AVRDx Remove AVR ports from main repo (#394) 2021-09-14 19:25:46 -07:00
AVR_Mega0 Remove AVR ports from main repo (#394) 2021-09-14 19:25:46 -07:00
ColdFire_V2 Use Regex for Copyright Year in Header Check (#1002) 2024-02-26 09:26:42 -08:00
CORTUS_APS3 Use Regex for Copyright Year in Header Check (#1002) 2024-02-26 09:26:42 -08:00
H8S2329 Use Regex for Copyright Year in Header Check (#1002) 2024-02-26 09:26:42 -08:00
HCS12 Use Regex for Copyright Year in Header Check (#1002) 2024-02-26 09:26:42 -08:00
IA32_flat Fix IA32 compilation with common IRQ entry disabled (#1137) 2024-09-09 12:54:38 +05:30
MCF5235 Replace two dashes and one whitespace with their corresponding ASCII characters. (#362) 2021-06-30 15:07:55 -07:00
MicroBlaze Use Regex for Copyright Year in Header Check (#1002) 2024-02-26 09:26:42 -08:00
MicroBlazeV8 Use Regex for Copyright Year in Header Check (#1002) 2024-02-26 09:26:42 -08:00
MicroBlazeV9 Use Regex for Copyright Year in Header Check (#1002) 2024-02-26 09:26:42 -08:00
MSP430F449 Use Regex for Copyright Year in Header Check (#1002) 2024-02-26 09:26:42 -08:00
NiosII Use Regex for Copyright Year in Header Check (#1002) 2024-02-26 09:26:42 -08:00
PPC405_Xilinx Use Regex for Copyright Year in Header Check (#1002) 2024-02-26 09:26:42 -08:00
PPC440_Xilinx Use Regex for Copyright Year in Header Check (#1002) 2024-02-26 09:26:42 -08:00
RISC-V Use saved mstatus for FPU/VPU state determination (#1330) 2025-11-03 12:32:08 +05:30
RL78 [Fixed the Issue] Fixed the Issue#1102 of RL78 of the Context switch issue. https://github.com/FreeRTOS/FreeRTOS-Kernel/issues/1102 (#1157) 2024-10-15 11:09:45 +05:30
RX100 Move configASSERT default definition above before including portable.h. (#1185) 2024-11-04 16:35:52 +05:30
RX200 Move configASSERT default definition above before including portable.h. (#1185) 2024-11-04 16:35:52 +05:30
RX600 Move configASSERT default definition above before including portable.h. (#1185) 2024-11-04 16:35:52 +05:30
RX600v2 Move configASSERT default definition above before including portable.h. (#1185) 2024-11-04 16:35:52 +05:30
RX700v3_DPFPU Move configASSERT default definition above before including portable.h. (#1185) 2024-11-04 16:35:52 +05:30
STR75x Use Regex for Copyright Year in Header Check (#1002) 2024-02-26 09:26:42 -08:00
TriCore_1782 Use Regex for Copyright Year in Header Check (#1002) 2024-02-26 09:26:42 -08:00