Setting symbol default value without 'configdefault', or without
explicit 'if' checks of dependencies, results in dependency weakening.
In this case, CACHE_MANAGEMENT is redefined and set to the given
default value even if dependencies D/ICACHE are not enabled.
Also remove CACHE_MANAGEMENT enabling from ARC-SEM and ARC-EM as they do
no actually have cache.
Signed-off-by: Abderrahmane JARMOUNI <git@jarmouni.me>
AM13E shares the IOMUX/PINCM interface with MSPM0. Add a thin
pinctrl_soc.h wrapper that includes the MSPM0 common header.
Signed-off-by: Aman Lachhiramka <a-lachhiramka@ti.com>
Add support for Six301 radio crypto. The low-level crypto operations
needed by the radio are performed in the HAL, and require a glue
layer to get access to OS primitives. Implement this glue in
modules/hal_silabs.
Introduce a soc-specific crypto management driver that exposes the
crypto peripherals from devicetree and implements device lifecycle
management.
Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
Rename the Kconfig option to SOC_VENDOR_SILABS_DEVICE_IS_MODULE
to match the guidelines requiring all Kconfig symbols in soc/
to have specific prefixes.
Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
Rename to SOC_FAMILY_SILABS_S2_XG* to reflect that they are
sub-options for the silabs_s2 SoC family, abiding by the
naming policy for Kconfig options in soc/.
Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
Rename the Kconfig option to SOC_VENDOR_SILABS_HAS_RADIO to
match the guidelines requiring all Kconfig symbols in soc/
to have specific prefixes.
Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
Since this driver can and will also be used for series 1, move it one level
up into the respective if-guard.
Signed-off-by: Michael Zimmermann <michael.zimmermann@sevenlab.de>
Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
The STM32F730 series is very similar to STM32F723.
The main difference is the smaller flash memory size.
Signed-off-by: Eve Redero <eve.redero@gmail.com>
The CMake code was hardcoding a filename, which it should never
have done. This moves the configuration to Kconfig instead, where
it can be freely updated by users
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
__NRF_TFM__ is defined out of tree, so soc.c selects the secure or
non-secure address of a peripheral from NRF_APPLICATION and __ZEPHYR__
instead. soc.h still used __NRF_TFM__ to pick the address of the antenna
switch control register, leaving the two files disagreeing on how a
secure build is identified.
Use !defined(__ZEPHYR__) for the same purpose. The selection is
unchanged in all three cases: a TF-M build does not define __ZEPHYR__
and takes the secure address; a secure Zephyr build does not define
CONFIG_TRUSTED_EXECUTION_NONSECURE and also takes the secure address;
a non-secure Zephyr build defines both and takes the non-secure
address.
Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
Assisted-by: Claude:claude-opus-5
wicr_setup() compares each WICR word against its intended value and
skips the write when they already match, to limit MRAM wear. The
comparison was done before the CONFIGNVR page was unlocked, but the page
permissions gate reads as well as writes, so every read returned
0xFFFFFFFF and no word ever matched. All ten words were rewritten to
MRAM on every boot.
Unlock the page before the loop so the comparison sees the stored
contents. Also wait for MRAMC to report ready before reading a written
value back and before locking the page again.
Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
Assisted-by: Claude:claude-opus-5
Before starting communication with the Wi-Fi core, the antenna switch
(ANTSW) needs to be steered towards WLAN. This has to happen before the
LMAC processor is kickstarted in soc_early_init_hook(), which runs before
the GPIO driver is available (and, for TF-M, in the secure image), so
GPIO hogs or the GPIO driver cannot be used here.
Describe the steering line in devicetree through a new
nordic,nrf71-wifi-antsw node instead of hardcoding the pin, and drive it
in soc_early_init_hook() using NRF_DT_GPIOS_TO_PSEL with the nrf_gpio
HAL. Going through the HAL keeps the access on the P0 alias that matches
the build's security state, so it works in both secure and non-secure
builds.
The steering is sequenced after the antenna switch is powered
(pwr_antswc) and before the Wi-Fi core is kickstarted. A build assertion
enforces that steering is only configured when pwr_antswc is present, so
the switch is never steered without being powered.
Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
Assisted-by: Claude:claude-opus-4.8
The antenna switch power (pwr_antswc, via the PWR_ANTSWC register) was
enabled after wifi_setup() had already kickstarted the Wi-Fi core. Move
it ahead of the Wi-Fi boot so the switch is powered before the core
starts using it.
Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
Assisted-by: Claude:claude-opus-4.8
lld reports its synthetic .symtab, .strtab and .shstrtab sections as
orphans when linking with --orphan-handling=warn, which is the default
LINKER_ORPHAN_SECTION_WARN setting. Give them output section
descriptions under CONFIG_LLVM_USE_LLD, as the arm, arm64, riscv and
x86 linker scripts already do.
Assisted-by: Claude:claude-fable-5-1
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Add the PM_STATE_SUSPEND_TO_RAM case to pm_state_set, entering via
arch_pm_s2ram_suspend with rp2350_s2ram_off as the callback: power down
the domains via POWMAN (keeping XIP cache and SRAM bank0/1 on) and
execute WFI. On resume, pm_state_exit_post_ops clears the debug-power
override set right before the power-down (it must be cleared on the
resume path, since a real wake resumes into arch_pm_s2ram_suspend()'s
caller rather than returning from rp2350_s2ram_off(), so clearing it
there would never run) and reconfigures the clocks.
SysTick is powered down along with the rest of the switched core, so
hook the RP2350 up to the generic system-timer low-power companion
interface (CONFIG_SYSTEM_TIMER_LPM_COMPANION_HOOKS) instead of
reimplementing timer restart locally: z_sys_clock_lpm_enter() arms a
POWMAN alarm for the requested timeout and z_sys_clock_lpm_exit()
reports the elapsed time from the POWMAN timer, both added to
rp2350_powman.c. Selecting CONFIG_SYSTEM_TIMER_RESET_BY_LPM makes the
cortex_m_systick driver reprogram SysTick from scratch on exit, so no
SoC-specific restart hook is needed.
Clock restoration is delegated to clock_control_rpi_pico_reconfigure(),
factored out of the rpi_pico clock_control driver's init function rather
than reimplementing a fixed XOSC/PLL_SYS/clk_ref/sys/peri sequence in
power.c: this restores every devicetree-declared clock at the board's
actual configured rates, not just a hardcoded subset, and keeps a single
source of truth between cold boot and S2RAM resume.
Signed-off-by: Gabriel Germano <gabriel.lucasgermano@gmail.com>
Add rp2350_powman.{h,c}: a SoC-level POWMAN wakeup/timer API so
applications no longer touch POWMAN registers directly. It calibrates
the LPOSC against the frequency counter (the RP2350 LPOSC is ~28 kHz,
not the 32768 Hz assumed by the pico HAL, which would make the AON
timer alarm fire ~8x late), selects it as the 1 kHz tick source
(idempotently, so the timer count is not reset each entry), arms
alarm/GPIO wakeups (GPIO with a chip-range guard), decodes the last
wakeup source, and reports whether a switched-core power-down
occurred.
Signed-off-by: Gabriel Germano <gabriel.lucasgermano@gmail.com>
Add pm_s2ram_mark_set/pm_s2ram_mark_check_and_clear, which mark the
POWMAN BOOT0..3 registers with the resume trampoline's boot vector in
RAM, letting the bootrom branch there after SWCORE is powered back up
instead of doing a cold boot. Enable HAS_PM_S2RAM_CUSTOM_MARKING and
build the file when CONFIG_PM_S2RAM is enabled. Also restore the core
CPU state that the SWCORE power-down clears before the (FP-active)
context restore: besides VTOR, re-enable all coprocessors (FPU
CP10/CP11, GPIO CP0, CP4) via runtime_init_per_core_enable_coprocessors,
and rebuild the exception and IRQ priorities via
z_arm_exc_setup()/z_arm_interrupt_init(). Without this the kernel
faults non-deterministically when resuming from deep sleep.
Add a raspberrypi,pico-powman devicetree binding and node so the
POWMAN base address used for the BOOT0..3/SCRATCH0 registers comes
from devicetree, matching this SoC family's convention, rather than
being hardcoded. The node intentionally overlaps the existing vreg
node's address: RP2350 folds VREG_AND_CHIP_RESET into POWMAN, unlike
RP2040, so the two nodes describe the same physical block from
different logical angles. Access those registers via
sys_write32()/sys_read32() rather than raw volatile pointer
dereferences.
Signed-off-by: Gabriel Germano <gabriel.lucasgermano@gmail.com>
Implement pm_state_set/pm_state_exit_post_ops for the RUNTIME_IDLE and
SUSPEND_TO_IDLE states via a plain WFI with IRQs disabled during
sleep. Enable HAS_PM and build power.c when CONFIG_PM is enabled.
Gate HAS_PM on ARM, since this PM code depends on CMSIS and ARM
intrinsics and would not build for the Hazard3 (RISC-V) variant of
this SoC series.
Signed-off-by: Gabriel Germano <gabriel.lucasgermano@gmail.com>
Add tpm0, tpm1, and tpm2 nodes to the KL25Z base devicetree and
configure the clock initialization in the SoC setup code to allow
PWM functionality using the kinetis-tpm driver.
Signed-off-by: Gabriel Ivo <gabriel.bozi@usp.br>
The eSPI virtual UART channel cannot receive host traffic once the fast
clock (FMCLK) to the eSPI_SIF module stops, so the chip drops incoming
data as soon as it enters Sleep or Deep Sleep. Setting the
ESPI_FMCLK_ENSLP field of ENSLP_CTL keeps that clock running in those
states.
Add the fast-clk-to-espi-sleep-support property to describe the series
that implement the field, set it on npcx4, and gate the register write
on the new CLOCK_CONTROL_NPCX_ESPI_FMCLK_IN_SLEEP option, which is only
selectable when the property is present and both ESPI_PERIPHERAL_UART
and PM are enabled.
Assisted-by: Copilot:claude-opus-5
Signed-off-by: Jun Lin <CHLin56@nuvoton.com>
The PMC register at offset 0x003 is named ENSLP_CTL (Enable in Sleep
Control) in the datasheets; the struct field and its bit macros carried
the ENIDL_CTL name, which belongs to no register in this block. Rename
the field and the NPCX_ENIDL_CTL_* macros in both the npcxn and npckn
variants.
Out-of-tree code uses the old names, so keep them working: ENIDL_CTL
becomes a second member of an anonymous union covering the same byte,
and the bit macros get aliases. No functional change.
Assisted-by: Copilot:claude-opus-5
Signed-off-by: Jun Lin <CHLin56@nuvoton.com>
With USE_SWITCH=y, a context restore can be preempted by an
interrupt. This interrupt may switch contexts, pushing a second
stack frame on top of the frame that was part-restored.
If this frame is later restored by a cooperative
arm_m_switch call, and this restore is preempted, a third frame
is pushed on top. In the kernel.memory_protection.sys_sem test,
the stars happen to align so that the idle thread overflows its
stack.
Increasing the idle stack size unblocks CI. A more long term
fix will be needed later.
Signed-off-by: Laurie Fay <Laurie.Fay@arm.com>
Derive SYS_CLOCK_HW_CYCLES_PER_SEC from devicetree.
This allows to override the system clock frequency.
Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
cavstool.py needs Python, which is often unavailable on products, and
running it without -l (log-only mode) takes over the audio PCI device
(unbinding the kernel driver, driving HDA/IPC directly) to load
firmware, none of which is wanted when the goal is just to observe the
mtrace debug-window log slot on a device where the firmware is already
being booted and driven by the normal kernel driver, e.g. to catch a
crash or hang while a library/module is being loaded.
mtracetool is a small, dependency-free C program that only mmaps BAR4
read-only and polls the debug window descriptor table for the mtrace
slot, roughly equivalent to cavstool.py -l but without the Python
dependency, so it can run alongside a live driver/firmware stack. It
builds as a static binary, is easy to push to any test rig (including
via adb to a rooted Android device) and dumps the slot's full current
content the moment it's found before following newly appended bytes
live, re-arming itself if the slot disappears across a DSP reset.
Note that with the default CONFIG_LOG_MODE_DEFERRED, log messages only
reach the mtrace window once a background thread later flushes them, so
capturing a genuine DSP deadlock/hang (as opposed to a clean panic) may
need CONFIG_LOG_MODE_IMMEDIATE=y as well, since a hung thread can strand
the most recent log lines in an internal queue where no amount of
external polling can see them. This is documented in the tool's built-in
help and header comment.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Add a -m/--mtrace option to cavstool.py to observe logs produced by the
mtrace logging backend (log_backend_adsp_mtrace.c), similar to how -l
shows the winstream backend (log_backend_adsp.c) output.
The mtrace backend writes to a debug-window slot organized as a ring
buffer with a host read pointer and a DSP write pointer. The reader is
strictly passive: it tracks its own cursor and never advances the host
read pointer, leaving the primary mtrace client (running on the host
CPU) in full control of when a log has been consumed and the buffer can
be reused. This allows cavstool.py to be run in parallel with the Linux
kernel SOF driver on the same system without disturbing it. This is
especially useful to debug early boot failures.
Like -l, the option does not load firmware, unload the running driver,
or drive IPC.
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
After rename of TFM_NRF_MRAMC_SERVICE to SOC_NRF7120_TFM_MRAMC_SERVICE
in trusted firmware module, the CMake option passed to TF-M build was
not updated. This commit passes the updated cmake option.
Updated to match the change in TF-M module:
f8772fc
Signed-off-by: Robert Robinson <robert.robinson@nordicsemi.no>
Add #ifdef for ll_pwr_set_wake_up_line_polarity_* functions that don't
exist on F1-like power controller.
This fixes a compilation and CI issue.
Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
__rodata_region_end closed before the linker-collected rom
sections, so device API structures, which live in an iterable
rom section, fell outside it. arch_buffer_validate() accepts a
read only within that region, so passing a pointer into a driver
API structure to a syscall was rejected and the calling thread
killed.
Assisted-by: Claude:opus-5
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
Enable RISCV_SOC_SYSCALL_CLOSE_ECALL on the esp32c5 hpcore. A
PMP stack guard fault taken while the syscall ECALL exception is
open is reported asynchronously on this core and locks it up,
so a user-mode application that drives a granted service deep
enough resets the chip instead of being killed.
With the exception closed before the syscall body runs, the same
overflow is reported as a stack overflow and only the offending
application is reclaimed.
Assisted-by: Claude:opus-5
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
Enable RISCV_SOC_HAS_SYSCALL_INTMASK and
RISCV_USER_STRING_NLEN_VALIDATE on the esp32c5 hpcore and provide
soc_syscall.h with the SOC_SYSCALL_INTMASK macro. It raises the
CLIC preemption threshold (mintthresh) to its maximum on syscall
entry so no interrupt is taken while the ECALL exception is
open, avoiding the lockup reset, while leaving mstatus.MIE set
as the kernel expects. The per-context threshold is restored on
exit by the SoC context save/restore hooks, so the default is
gated on those hooks and on switching through ECALL.
Assisted-by: Claude:opus-5
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
Disable the CPU access-permission filter in hardware_init(). It
gates the CPU's own bus access per security mode and defaults
the user-mode permissions to deny, so a user thread fetching
from flash is silently blocked with no architectural fault.
Save the CLIC mcause and mintthresh per thread in the SoC
context hooks and, on restore, force mcause.interrupt to match
the entry type of the trap being returned from, clearing mpil
for exception-saved frames. Writing the saved mcause back
verbatim leaves a mismatched mret whenever a thread interrupted
in user mode is resumed from an ecall-entered trap, after which
the next trap from user mode locks the core up (CPU_LOCKUP).
Two busy user threads under time slicing reproduce it within a
second; the same entry-type matching already fixes it on the
esp32p4.
Assisted-by: Claude:opus-5
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
Select RISCV_PMP on the esp32c5 hpcore so it can run user mode,
and lay out the PMP regions the userspace model needs under
MPRV.
Align the flash-mapped and IRAM/DRAM boundaries to the PMP
granularity and size the ROM entry to a single NAPOT slot. Keep
the IRAM text and flash rodata as SoC regions, visible to both
modes. The CPU subsystem and peripheral windows get no entry:
kernel accesses are covered by the kernel-mode catch-all, and
user threads must not reach them.
Assisted-by: Claude:opus-5
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
External allocator client is used on flpr or ppr which has only a single
IPC connection. Use single IPC node instead of expecting ipc0 label.
Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
Drop the espressif/<soc>/<soc>_<module>.dtsi files in favor of one
<soc>.dtsi per SoC, and matching SOC_ESP32*_<MODULE> symbols in
favor of the plain SoC symbol. SOC_PART_NUMBER now reports the SoC.
Each board instead states its own flash, giving both reg and ranges
because the SoC dtsi no longer sets either, and its own psram size where
it has one.
Assisted-by: Claude:claude-opus-5
Signed-off-by: Marek Matej <marek.matej@espressif.com>
Add a coredump backend for the AMD ACP DSP that stores the Zephyr
coredump together with a SOF compatible DSP "oops" record in the ACP
exception buffer. The backend writes the panic code where the SOF host
driver expects it and raises a DSP-to-host interrupt so the host can
collect the dump.
Enable ARCH_SUPPORTS_COREDUMP for the acp_7_x SoC and wire the new
backend into the coredump core and build.
Signed-off-by: DineshKumar Kalva <DineshKumar.Kalva@amd.com>
Replace direct NVIC_ClearPendingIRQ() calls with
k_irq_clear_pending(). The raw NVIC ISPR/ISER wake-source scan in the
psoc4100tp power code stays as-is: there is no portable
"any interrupt pending" query.
Assisted-by: Claude:claude-opus-5
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Add device tree and SoC definitions for the remaining Cortex-R5F
cores on the TI J721e SoC (MAIN R5FSS0 core 1, MAIN R5FSS1 cores 0
and 1, and MCU R5FSS0 cores 0 and 1).
Signed-off-by: Dhruv Menon <dhruvmenon1104@gmail.com>
Add PSC3M6 as a die under SOC_SERIES_PSC3 in cat1b/psc3/: Kconfig
entries, NUM_IRQS and null-pointer-detection overrides, and the
secure SRAM/noinit handling.
Assisted-by: Claude:claude-opus-4.6
Signed-off-by: Richard Mc Sweeney <Richard.McSweeney@infineon.com>
Signed-off-by: Niranjan M <niranjan@aerlync.com>
Add Hexagon DSP architecture support to Zephyr RTOS, targeting the
Qualcomm Hexagon V67+ ISA running as a guest under the H2 hypervisor.
This includes:
- Architecture scaffolding (Kconfig, CMakeLists, arch selection)
- Public headers (arch.h, thread.h, exception.h, error.h)
- Core runtime: context switch, interrupt/exception handling, idle, TLS
- Memory management stubs for flat-memory H2 guest model
- SoC support for QEMU hexagon virt machine
- CMake/LLVM toolchain integration for hexagon cross-compilation
Hexagon uses H2's GEVB (Guest Event Vector Base) for interrupt dispatch
rather than a traditional function-pointer vector table, so
GEN_IRQ_VECTOR_TABLE is disabled by default.
Signed-off-by: Brian Cain <brian.cain@oss.qualcomm.com>
A window was only reported when a fragment woke within the sleep floor of
its deadline, but a real sleep can wake earlier than that, so on some
configurations no window was reported at all. Close the window on the RTC
timer wake instead, and keep the time left to the deadline to close a wait
that never slept.
Assisted-by: Claude:opus-5
Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
Added support for Infineon's CAT1C based CYT4DN series SoC.
CONFIG_GEN_IRQ_VECTOR_TABLE is disabled because gen_isr_tables.py
sizes the hardware vector table to the multi-level CONFIG_NUM_IRQS.
This would result in unnecessary flash consumption and excessive
VTOR alignment padding. A static 16-entry table matching the physical
Cortex-M NVIC lines is provided instead.
Signed-off-by: Sanjay Vallimanalan <sanjay@linumiz.com>
Signed-off-by: Christoph Seitz <christoph.seitz@infineon.com>
Signed-off-by: Alexpandi Muniyandi <alexpandi@linumiz.com>
The drom0 segment origin sat at 0x42800000 although instructions
and data go through one unified flash cache window that starts
at 0x42000000. The memory mapper reserves irom_len + drom_len
linear bytes from the window start, so the gap between the two
mappings was not accounted for and a later mapping could land
on rodata.
Place drom0 at the irom origin and add a .flash_rodata_dummy
section so rodata is emitted right after the aligned text span.
Assisted-by: Claude:opus-5
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>