Skip to content

Commit 9977667

Browse files
committed
Merge remote-tracking branch 'upstream/main'
2 parents 7584905 + b677e82 commit 9977667

File tree

1,298 files changed

+30102
-4148
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,298 files changed

+30102
-4148
lines changed

.editorconfig

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,10 @@ indent_size = 8
8686
[COMMIT_EDITMSG]
8787
max_line_length = 75
8888

89+
# Patches
90+
[{*.patch,*.diff}]
91+
trim_trailing_whitespace = false
92+
8993
# Kconfig
9094
[Kconfig*]
9195
indent_style = tab

.github/workflows/doc-build.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
name: Documentation Build
55

66
on:
7-
schedule:
8-
- cron: '0 */3 * * *'
97
push:
8+
branches:
9+
- main
1010
tags:
1111
- v*
1212
pull_request:
@@ -61,7 +61,7 @@ jobs:
6161
container:
6262
image: ghcr.io/zephyrproject-rtos/ci-repo-cache:v0.28.6.20251003
6363
options: '--entrypoint /bin/bash'
64-
timeout-minutes: 20
64+
timeout-minutes: 60
6565
concurrency:
6666
group: doc-build-html-${{ github.ref }}
6767
cancel-in-progress: true

MAINTAINERS.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3047,9 +3047,10 @@ JSON Web Token:
30473047
- libraries.encoding.jwt
30483048

30493049
Kconfig:
3050-
status: odd fixes
3051-
collaborators:
3050+
status: maintained
3051+
maintainers:
30523052
- tejlmand
3053+
collaborators:
30533054
- nashif
30543055
files:
30553056
- scripts/kconfig/

arch/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ config ARM64
5757
select ARCH_HAS_DEMAND_MAPPING
5858
select ARCH_SUPPORTS_EVICTION_TRACKING
5959
select EVICTION_TRACKING if DEMAND_PAGING
60+
select MEM_DOMAIN_HAS_THREAD_LIST if ARM_MPU
6061
help
6162
ARM64 (AArch64) architecture
6263

arch/arm/core/mmu/arm_mmu.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -890,6 +890,9 @@ static int __arch_mem_map(void *virt, uintptr_t phys, size_t size, uint32_t flag
890890

891891
switch (flags & K_MEM_CACHE_MASK) {
892892

893+
case K_MEM_ARM_NORMAL_NC:
894+
conv_flags |= MT_NORMAL;
895+
break;
893896
case K_MEM_CACHE_NONE:
894897
default:
895898
conv_flags |= MT_DEVICE;

arch/arm64/core/cortex_r/arm_mpu.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -760,8 +760,8 @@ static int configure_domain_partitions(struct k_mem_domain *domain)
760760
struct k_thread *thread;
761761
int ret;
762762

763-
SYS_DLIST_FOR_EACH_CONTAINER(&domain->mem_domain_q, thread,
764-
mem_domain_info.mem_domain_q_node) {
763+
SYS_DLIST_FOR_EACH_CONTAINER(&domain->thread_mem_domain_list, thread,
764+
mem_domain_info.thread_mem_domain_node) {
765765
ret = configure_dynamic_mpu_regions(thread);
766766
if (ret != 0) {
767767
return ret;

arch/riscv/core/pmp.c

Lines changed: 21 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,6 @@ LOG_MODULE_REGISTER(mpu);
4848
#define PMP_NA4_SUPPORTED !IS_ENABLED(CONFIG_PMP_NO_NA4)
4949
#define PMP_NAPOT_SUPPORTED !IS_ENABLED(CONFIG_PMP_NO_NAPOT)
5050

51-
#define PMPCFG_STRIDE sizeof(unsigned long)
52-
5351
#define PMP_ADDR(addr) ((addr) >> 2)
5452
#define NAPOT_RANGE(size) (((size) - 1) >> 1)
5553
#define PMP_ADDR_NAPOT(addr, size) PMP_ADDR(addr | NAPOT_RANGE(size))
@@ -170,20 +168,35 @@ static inline void z_riscv_pmp_write_config(unsigned long *pmp_cfg, size_t pmp_c
170168
#endif
171169
}
172170

173-
static void dump_pmp_regs(const char *banner)
171+
/**
172+
* @brief Reads the PMP address CSRs (pmpaddrX) for all configured slots.
173+
*
174+
* This helper function abstracts the iterative logic required to read the
175+
* individual PMP address registers (pmpaddr0, pmpaddr1, ..., pmpaddrN)
176+
* up to the total number of PMP slots configured by CONFIG_PMP_SLOTS.
177+
*
178+
* @param pmp_addr Pointer to the array where the CSR contents will be stored.
179+
* @param pmp_addr_size The size of the pmp_addr array, measured in unsigned long entries.
180+
*/
181+
static inline void z_riscv_pmp_read_addr(unsigned long *pmp_addr, size_t pmp_addr_size)
174182
{
175-
unsigned long pmp_addr[CONFIG_PMP_SLOTS];
176-
unsigned long pmp_cfg[CONFIG_PMP_SLOTS / PMPCFG_STRIDE];
183+
__ASSERT(pmp_addr_size == (size_t)(CONFIG_PMP_SLOTS), "PMP address array size mismatch");
177184

178185
#define PMPADDR_READ(x) pmp_addr[x] = csr_read(pmpaddr##x)
179-
180186
FOR_EACH(PMPADDR_READ, (;), 0, 1, 2, 3, 4, 5, 6, 7);
187+
181188
#if CONFIG_PMP_SLOTS > 8
182189
FOR_EACH(PMPADDR_READ, (;), 8, 9, 10, 11, 12, 13, 14, 15);
183190
#endif
184-
185191
#undef PMPADDR_READ
192+
}
186193

194+
static void dump_pmp_regs(const char *banner)
195+
{
196+
unsigned long pmp_addr[CONFIG_PMP_SLOTS];
197+
unsigned long pmp_cfg[CONFIG_PMP_SLOTS / PMPCFG_STRIDE];
198+
199+
z_riscv_pmp_read_addr(pmp_addr, (size_t)(CONFIG_PMP_SLOTS));
187200
z_riscv_pmp_read_config(pmp_cfg, (size_t)(CONFIG_PMP_SLOTS / PMPCFG_STRIDE));
188201
print_pmp_entries(0, CONFIG_PMP_SLOTS, pmp_addr, pmp_cfg, banner);
189202
}
@@ -596,7 +609,7 @@ void z_riscv_pmp_stackguard_disable(void)
596609
{
597610

598611
unsigned long pmp_addr[CONFIG_PMP_SLOTS];
599-
unsigned long pmp_cfg[CONFIG_PMP_SLOTS / sizeof(unsigned long)];
612+
unsigned long pmp_cfg[CONFIG_PMP_SLOTS / PMPCFG_STRIDE];
600613
unsigned int index = global_pmp_end_index;
601614

602615
/* Retrieve the pmpaddr value matching the last global PMP slot. */

arch/riscv/include/pmp.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
#ifndef PMP_H_
88
#define PMP_H_
99

10+
#define PMPCFG_STRIDE (__riscv_xlen / 8)
11+
1012
void z_riscv_pmp_init(void);
1113
void z_riscv_pmp_stackguard_prepare(struct k_thread *thread);
1214
void z_riscv_pmp_stackguard_enable(struct k_thread *thread);

boards/adafruit/trinkey_qt2040/adafruit_trinkey_qt2040.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,5 @@ supported:
1515
- gpio
1616
- hwinfo
1717
- i2c
18-
- usb
1918
- watchdog
2019
- zephyr_i2c
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
# Copyright (c) 2024-2025 Analog Devices, Inc.
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
if BOARD_MAX32658EVKIT
5+
6+
# Code Partition:
7+
#
8+
# For the secure version of the board the firmware is linked at the beginning
9+
# of the flash, or into the code-partition defined in DT if it is intended to
10+
# be loaded by MCUboot. If the secure firmware is to be combined with a non-
11+
# secure image (TRUSTED_EXECUTION_SECURE=y), the secure FW image shall always
12+
# be restricted to the size of its code partition.
13+
#
14+
# For the non-secure version of the board, the firmware
15+
# must be linked into the code-partition (non-secure) defined in DT, regardless.
16+
# Apply this configuration below by setting the Kconfig symbols used by
17+
# the linker according to the information extracted from DT partitions.
18+
19+
# Workaround for not being able to have commas in macro arguments
20+
DT_CHOSEN_Z_CODE_PARTITION := zephyr,code-partition
21+
22+
config FLASH_LOAD_SIZE
23+
default $(dt_chosen_reg_size_hex,$(DT_CHOSEN_Z_CODE_PARTITION))
24+
25+
if BOARD_MAX32658EVKIT_MAX32658_NS
26+
27+
config FLASH_LOAD_OFFSET
28+
default $(dt_chosen_reg_addr_hex,$(DT_CHOSEN_Z_CODE_PARTITION))
29+
30+
# MAX32658 has one UART interface,
31+
# It can be used either on TFM or Zephyr
32+
# Enabling debug (TFM_SPM_LOG_LEVEL || TFM_PARTITION_LOG_LEVEL) will transfer it to the TFM side
33+
# Disabling TFM debug will transfer it to the Zephyr side.
34+
35+
choice TFM_SPM_LOG_LEVEL
36+
default TFM_SPM_LOG_LEVEL_SILENCE
37+
endchoice
38+
39+
choice TFM_PARTITION_LOG_LEVEL
40+
default TFM_PARTITION_LOG_LEVEL_SILENCE
41+
endchoice
42+
43+
endif # BOARD_MAX32658EVKIT_MAX32658_NS
44+
45+
config I3C
46+
default y if ADXL367
47+
48+
endif # BOARD_MAX32658EVKIT

0 commit comments

Comments
 (0)