Commit graph

58773 commits

Author SHA1 Message Date
wangmingrong1
f2bc226d26 gcov: use lib_get_tempbuffer instead of using stack
Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com>
2025-07-03 00:17:58 +08:00
wangmingrong1
7bbb96205b CMake: Fix link error
Bringing the code coverage option when linking may cause gcc or g++ to automatically link the libgcov.a that comes with the toolchain.

Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com>
2025-07-03 00:17:58 +08:00
wangmingrong1
a5cb084c1f CMake: fix add compile options
Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com>
2025-07-03 00:17:58 +08:00
f4e8def270 drivers/net/Kconfig: Move NET_IGC_TXDESC and NET_IGC_RXDESC to NET_IGC menu 2025-07-03 00:16:24 +08:00
Jukka Laitinen
5594c2e887 imx9/lpuart: Fix race condition / regression in imx9_txint
Commit 83a119160 fixed SMP by removing call to uart_xmitchars from inside spinlock.

This only works for SMP, since uart_xmitchars has a lock only in SMP. In a single
core configuration the function can be called in parallel from the interrupt
handler and from the imx9_txint.

Fix this by filling the uart buffers already before enabling the
interrupt, this way it is not possible to get the function called in parallel
for the same device.

Signed-off-by: Jukka Laitinen <jukka.laitinen@tii.ae>
2025-07-01 15:02:54 -03:00
Pressl, Stepan
55bef681e1 arch/arm/src/stm32/stm32_i2cslave_v2.c: add STM32 I2C Slave support for the v2 ip core
This commit adds the lowerhalf driver support for the I2C Slave.
While not currently ideal, it is compatible with the upperhalf i2c slave driver.
A workqueue can be used to delegate the isr work to the upperhalf driver.
But keep in mind wq introduces a lot of delay and in certain scenarios,
it is better to write your own better upperhalf driver.

Signed-off-by: Stepan Pressl <pressl.stepan@gmail.com>
2025-07-02 01:59:46 +08:00
zhongzhijie1
3d37e85b13 Remove minread para in btuart_read.
In file_read(), asynchronous reading is supported, so partial reads and the minread parameter are no longer needed.

Signed-off-by: zhongzhijie1 <zhongzhijie1@xiaomi.com>
2025-07-01 09:06:43 -03:00
zhongzhijie1
4a4ad26474 Support bt H4_ISO packet parsel in bt_uart_shim driver.
In btuart_rxwork, There is no case for parsel HCI data of ISO type, but there are corresponding processes in the SIM and vendor driver code.

Signed-off-by: zhongzhijie1 <zhongzhijie1@xiaomi.com>
2025-07-01 09:06:43 -03:00
zhongzhijie1
d81a28097a btuart_read and returned the correct value.
When the nread return value < 0, if the total length ntotal that has been read is > 0, the function returns ntotal; otherwise, it returns the nread error code.

Signed-off-by: zhongzhijie1 <zhongzhijie1@xiaomi.com>
2025-07-01 09:06:43 -03:00
zhongzhijie1
386dbfa449 Refactored the btuart_rxwork function to improve data reception stability.
Read as much data as possible initially, then process each packet individually. Defined the read buffer within the structure and added a rx_len variable to indicate the current read offset. After processing each complete packet, leftover data is moved to rxbuf[0] and rx_len is reduced by the length of the processed packet. The next packet process will start from rxbuf[0] after the read ends at new rxbuf[rx_len].

Signed-off-by: zhongzhijie1 <zhongzhijie1@xiaomi.com>
2025-07-01 09:06:43 -03:00
wangmingrong1
750ae961a8 kasan watchpoint: Fix judgment problem
Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com>
2025-07-01 09:04:03 -03:00
cuiziwei
4de718f98f kasan: Fix assert judgment condition to correctly detect out-of-bounds causing trampling.
Signed-off-by: cuiziwei <cuiziwei@xiaomi.com>
2025-07-01 09:04:03 -03:00
wangmingrong1
aead1981a7 kasan: Potential recursive registration shadow area error
When initializing a memory block, the shadow area record of the first
memory block is used first.When uninitializing, unpoison is required, otherwise the memory will be marked incorrectly.
The following case will cause problems:
    void *mem = malloc(1024);
    struct mm_heap_s *a = mm_initialize("hello", mem, 1024);
    int *b = mm_malloc(a, sizeof(int *));
    *b = 100;
    printf("Hello, World!! %d\n", *b);
    mm_free(a, b);
    mm_uninitialize(a);
    free(mem);

Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com>
2025-07-01 09:04:03 -03:00
Filipe Cavalcanti
e57d2a5247 arch/risc-v: update lower-half drivers for ESP32-C3|C6|H2 2025-06-30 22:40:26 +08:00
Filipe Cavalcanti
187a386cc7 arch/xtensa: update lower-half drivers for ESP32|S2|S3 2025-06-30 22:40:26 +08:00
wangmingrong1
0a71cbe542 fix kasan_bypss compile unused error
Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com>
2025-06-30 18:19:38 +08:00
buxiasen
c5bfc4d233 mm/kasan: fix wanring expression result unused
nuttx/mm/mm_heap/mm_malloc_size.c:77:16: error: expression result unused [-Werror,-Wunused-value]
  kasan_bypass(flag);
               ^~~~
Signed-off-by: buxiasen <buxiasen@xiaomi.com>
2025-06-30 18:19:38 +08:00
wangmingrong1
3fdfc702f3 a527: Remove MTE enablement
This product does not have MTE. MTE is only available for Arch or higher extensions of armv8-5+memory tags

Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com>
2025-06-30 18:19:38 +08:00
wangmingrong1
acfe9b2c15 sw_tags: Remove duplicate definitions
Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com>
2025-06-30 18:19:38 +08:00
wangmingrong1
6ac72fa7f1 kasan: Add configurable kasan initialization variable location
This can avoid crashes caused by uninitialized accesses to initialized variables in non-chip memory.

Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com>
2025-06-30 18:19:38 +08:00
wangmingrong1
8f541d2ef2 mte/kasan: Implementing KASAN memory protection for ARM64 hardware MTE
1. Add hw_tags.c, which will call arm64_mte to implement tagging of memory blocks by operating registers
2. It has been able to run normally on the default NX memory allocator, excluding mempool and tlsf
3. On more complex configurations, memory tests such as memstress can run normally without system crashes

Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com>
2025-06-30 18:19:38 +08:00
wangmingrong1
448ace4761 kasan: fix realloc memcpy tags check error
When the size of the new realloc is larger than the old one and can be expanded forward and backward, the tag of oldmem needs to be set to the same as newmem, otherwise memcpy will report a kasan error.

Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com>
2025-06-30 18:19:38 +08:00
wangmingrong1
c6da553788 kasan: kasan_reset_tag rename kasan_clear_tag
The clear tag is more explicit than the reset tag.

Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com>
2025-06-30 18:19:38 +08:00
wangmingrong1
8f6be9a9b5 arm: Enhance armv7a's dataaboart to adapt to debug mode
Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com>
2025-06-30 17:18:57 +08:00
wangmingrong1
6cc9849561 arm: Enhance armv7a's prefetchaboart to adapt to debug mode
ifar is 0 on qemu platform, the reason is unknown, so here use regs[REG_PC]

Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com>
2025-06-30 17:18:57 +08:00
wangmingrong1
3149fd453c arm: Support hardware debug
Support hardware debugging of ARM architecture, and support smp mode.We can use "up_debugpoint_add" or "up_debugpoint_remove" to add breakpoints, and the hardware will jump into the interrupt after detecting it.

Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com>
2025-06-30 17:18:57 +08:00
wangmingrong1
35071467bb arm: Add support for CP14
Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com>
2025-06-30 17:18:57 +08:00
wangmingrong1
2d7e4f7e52 arch/arm64/fvp-v8r: enable Cmake
Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com>
2025-06-30 17:12:38 +08:00
Xiang Xiao
2b360c826c arch/arm: Move lib_dummy.c from arch/arm/src/common/ghs to libs/libc/machine/arm
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2025-06-30 09:56:27 +08:00
Xiang Xiao
5758364f10 libc/machine/arm: Move all source files out of gnu folder
and unify the file prefix to arch_xxx.c

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2025-06-30 09:56:27 +08:00
yangao1
0b6188bfa2 armv8-m: Optimize cfi instructions to debug
Signed-off-by: yangao1 <yangao1@xiaomi.com>
2025-06-30 09:56:27 +08:00
Xiang Xiao
c1a37ec1fb libc/machine/arm64: Move all source files out of gnu folder
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2025-06-30 09:56:27 +08:00
Xiang Xiao
378f8a5c0f libc/machine/renesas: Move all source files out of gnu folder
and remove the empty CMakeLists.txt in the subdirectories.

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2025-06-30 09:56:27 +08:00
Xiang Xiao
ae071920b4 libc/machine/riscv: Move all source files out of gnu folder
and remove the empty CMakeLists.txt in the subdirectories.

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2025-06-30 09:56:27 +08:00
Xiang Xiao
1177ac8ee4 libc/machine/x86_64: Move all source files out of gnu folder
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2025-06-30 09:56:27 +08:00
michal matias
e0ba2efdca boards/risc-v/esp32c6: Add the NCV7410 10BASE-T1S MAC-PHY support for the ESP32-C6 boards
This commit adds NCV7410 10BASE-T1S SPI MAC-PHY support for
* esp32c6-devkitc
* esp32c6-devkitm

Signed-off-by: michal matias <mich4l.matias@gmail.com>
2025-06-29 09:11:46 -03:00
michal matias
c5a3089e87 drivers/net: Add support for the NCV7410 10BASE-T1S MAC-PHY
This commit adds driver for the Onsemi NCV7410 10BASE-T1S
Ethernet MAC-PHY.

Signed-off-by: michal matias <mich4l.matias@gmail.com>
2025-06-28 08:49:46 -03:00
Serg Podtynnyi
0883d664c4 ci/docker: bump risc-v toolchain
Signed-off-by: Serg Podtynnyi <serg@podtynnyi.com>
2025-06-28 17:54:52 +08:00
guohao15
57d83907dd bugfix: share kernel thread group should not dup files from caller group
after this commits
  commit e7fa4cae6cbf567266985c8072db1f51ad480943
  Author: Yanfeng Liu <yfliu2008@qq.com>
  Date: Fri May 17 06:11:52 2024 +0800

  sched/tcb: use shared group for kthreads

all kernel thread share group idle
and should not dup filelist to this group

Signed-off-by: guohao15 <guohao15@xiaomi.com>
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2025-06-27 21:45:33 +08:00
SPRESENSE
74d52767e9 drivers/sensors: Add a header file as a dependency
Add a dependent header file required to use cxd5602pwbimu.

Signed-off-by: SPRESENSE <41312067+SPRESENSE@users.noreply.github.com>
2025-06-27 21:45:02 +08:00
wangmingrong1
ecd6a1db1a ci/arm64: Enhance CI inspection
1. nsh_fiq: arm64 clang makefile
2. nsh_gicv2: arm64 clang cmake

Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com>
2025-06-27 20:44:41 +08:00
wangmingrong1
6b8bcd673b arm64/toolchain.defs: clang should specify target
If not specified, the corresponding libgcc. a cannot be found

Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com>
2025-06-27 20:44:41 +08:00
wangmingrong1
3314201f64 arm64/cmake: support clang compile
enable CONFIG_ARM64_TOOLCHAIN_CLANG can use clang compiler

Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com>
2025-06-27 20:44:41 +08:00
wangmingrong1
86762145de Delete unused function
Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com>
2025-06-27 20:44:41 +08:00
Filipe Cavalcanti
fbe7d3a1f0 documentation: update Xtensa ESP32|S2|S3 toolchain version
Updates the instructions to install the ESP toolchain 14.2.0.

Signed-off-by: Filipe Cavalcanti <filipe.cavalcanti@espressif.com>
2025-06-27 20:41:43 +08:00
Filipe Cavalcanti
1a5f051fbf ci: update ESP32 Xtensa compiler version
Updates ESP32, ESP32S2 and ESP32S3 compiler version to 14.2.0 of 20241119.

Signed-off-by: Filipe Cavalcanti <filipe.cavalcanti@espressif.com>
2025-06-27 20:41:43 +08:00
Alin Jerpelea
095a4ecd19 Documentation: add NuttX-12.10.0 release notes
Add release notes for 12.10.0 release

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2025-06-27 20:20:40 +08:00
Xiang Xiao
4e4cd77fd1 libc: Change atomic_fetch_cxx to macro
to align with atomic64_fetch_cxx function prototype

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2025-06-26 23:47:10 +08:00
wangmingrong1
9af2f0ee82 mempool: Support mempool address and size alignment by setting CONFIG_MM_NODE_GUARDSIZE
Setting a reasonable CONFIG_MM_NODE_GUARDSIZE can ensure absolute alignment of usersize

Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com>
2025-06-26 20:33:29 +08:00
wangmingrong1
e6f77d7f14 mempool: Use the same magic with mmheap
mmheap magic: #define MM_INIT_MAGIC    0xcc #define MM_ALLOC_MAGIC   0xaa #define MM_FREE_MAGIC    0x55

Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com>
2025-06-26 20:33:29 +08:00