Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
111510f
arch: Remove FPU_SHARING dependence on MULTITHREADING
andyross Jan 22, 2025
b836f18
tests/kernel/mutex_api: Fix logic in PI race test
andyross Feb 1, 2025
f5c7e19
tests/arch/arm_thread_swap: Skip if USE_SWITCH=y
andyross Feb 2, 2025
c75da2e
arch/arm: New arch_switch() based context layer for Cortex M:
andyross Feb 4, 2025
a6dba04
tests/arch/arm: Add unit test for new arch_switch() implementation
andyross Feb 4, 2025
79e411a
arch/arm: Platform integration for new Cortex M arch_switch()
andyross Feb 4, 2025
b2fb152
arch/arm: Handle multi-cycle instruction in USE_SWITCH
andyross Aug 1, 2025
06aa059
kernel: Minor optimizations to z_swap()
andyross Feb 5, 2025
16fa13a
tests/benchmarks: Add a tiny microbenchmark for z_swap()
andyross Feb 5, 2025
ccd2683
arch/arm: Work around gcc codegen oddity in arch_switch()
andyross Jul 29, 2025
c0d3387
samples/openamp: Bump stack size
andyross Jul 29, 2025
9af2efc
tests/benchmarks/thread_metric: Turn off CONFIG_MPU explicitly
andyross Aug 4, 2025
c119051
tests/benchmarks/swap: Add interrupt cases too
andyross Aug 5, 2025
2db4bef
tests/benchmarks/thread_metric: Don't select IRQ_OFFLOAD_NESTED
andyross Aug 5, 2025
6102a08
kernel/sched: Add optimized next switch handle wrapper
andyross Aug 5, 2025
ad3edb7
arch/arm: Use an open coded lock and not arch_irq_lock()
andyross Aug 6, 2025
466d073
arch/arm: Split Cortex M PendSV vector from SVC
andyross Aug 6, 2025
bf61c92
arch/arm: Remove unused Cortex M thread struct elements
andyross Aug 6, 2025
1f60e69
kernel/sched: Refactor reschedule to permit better code generation
andyross Aug 6, 2025
9a6f2a6
kernel/sched: Move reschedule under lock in k_sched_unlock()
andyross Aug 6, 2025
ce60cca
arch/arm: Reorganize arm-m interrupt exit for performance
andyross Aug 6, 2025
0b20636
arch/arm: clang-format changes
andyross Aug 6, 2025
e2debdf
soc/nxp: Update SOC-specific vector tables for PendSV removal
andyross Aug 7, 2025
aa19686
arch/arm: Avoid top-level asm() blocks
andyross Aug 7, 2025
4f9ace5
tests/arm_interrupt: Disable persistent lock test when USE_SWITCH=y
andyross Aug 10, 2025
66a8011
arch/arm: Cleanup synchronization on userspace entry
andyross Aug 10, 2025
3f22f72
arch/arm: Work around FVP stkalign glitch
andyross Aug 11, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion arch/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -1031,7 +1031,7 @@ config FPU

config FPU_SHARING
bool "FPU register sharing"
depends on FPU && MULTITHREADING
depends on FPU
help
This option enables preservation of the hardware floating point registers
across context switches to allow multiple threads to perform concurrent
Expand Down
4 changes: 2 additions & 2 deletions arch/arm/core/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@
config CPU_CORTEX_M
bool
select CPU_CORTEX
select ARCH_HAS_CUSTOM_SWAP_TO_MAIN
select ARCH_HAS_CUSTOM_SWAP_TO_MAIN if !USE_SWITCH
select HAS_CMSIS_CORE
select HAS_FLASH_LOAD_OFFSET
select ARCH_HAS_SINGLE_THREAD_SUPPORT
select ARCH_HAS_THREAD_ABORT
select ARCH_HAS_THREAD_ABORT if !USE_SWITCH
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
select ARCH_HAS_THREAD_ABORT if !USE_SWITCH
select ARCH_HAS_THREAD_ABORT if !USE_SWITCH

Nit: extra whitespace

select ARCH_HAS_TRUSTED_EXECUTION if ARM_TRUSTZONE_M
select ARCH_HAS_STACK_PROTECTION if (ARM_MPU && !ARMV6_M_ARMV8_M_BASELINE) || CPU_CORTEX_M_HAS_SPLIM
select ARCH_HAS_USERSPACE if ARM_MPU
Expand Down
7 changes: 4 additions & 3 deletions arch/arm/core/cortex_m/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,21 +20,22 @@ elseif(CONFIG_ARMV8_1_M_PACBTI_NONE)
endif()

zephyr_library_sources(
exc_exit.c
fault.c
fault_s.S
fpu.c
reset.S
scb.c
thread_abort.c
vector_table.S
swap_helper.S
svc.S
irq_manage.c
prep_c.c
thread.c
cpu_idle.c
)

zephyr_library_sources_ifdef(CONFIG_USE_SWITCH arm-m-switch.c)
zephyr_library_sources_ifndef(CONFIG_USE_SWITCH exc_exit.c thread_abort.c swap_helper.S)

zephyr_library_sources_ifndef(CONFIG_ARM_CUSTOM_INTERRUPT_CONTROLLER irq_init.c)
zephyr_library_sources_ifdef(CONFIG_GEN_SW_ISR_TABLE isr_wrapper.c)
zephyr_library_sources_ifdef(CONFIG_DEBUG_COREDUMP coredump.c)
Expand Down
13 changes: 13 additions & 0 deletions arch/arm/core/cortex_m/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,9 @@ config CPU_CORTEX_M7

if CPU_CORTEX_M

config USE_SWITCH
default y if USE_SWITCH_SUPPORTED && !ARM_NONSECURE_FIRMWARE
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When using TrustZone, Do I understand correctly that the new arch_switch can only be used in the secure domain?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a mistake, I thought I'd removed the #ifery around this, ARM_(NON)?SECURE_FIRMWARE is expected to work.


config CPU_CORTEX_M_HAS_SYSTICK
bool
help
Expand Down Expand Up @@ -226,6 +229,7 @@ config ARMV7_M_ARMV8_M_MAINLINE
select CPU_CORTEX_M_HAS_VTOR
select CPU_CORTEX_M_HAS_PROGRAMMABLE_FAULT_PRIOS
select CPU_CORTEX_M_HAS_SYSTICK
select USE_SWITCH_SUPPORTED
help
This option signifies the use of an ARMv7-M processor
implementation, or the use of a backwards-compatible
Expand Down Expand Up @@ -555,6 +559,15 @@ config CORTEX_M_NULL_POINTER_EXCEPTION_PAGE_SIZE

endif # CORTEX_M_NULL_POINTER_EXCEPTION

config ARM_GCC_FP_WORKAROUND
bool "GCC/gas frame pointer workaround"
help
Enables a two-instruction workaround for a GNU toolchain
buglet in arch_switch() when the kernel must unavoidably be
compiled with -fno-omit-frame-pointer. Most code doesn't
want this, but in at least one case it's necessary. See
comment in arm-m-switch.h

rsource "tz/Kconfig"

endif # CPU_CORTEX_M
Loading
Loading