Commit Graph

54191 Commits

Author SHA1 Message Date
Filipe Cavalcanti
29ae9d1110 esp32s2: fix SPI flash and file system mounting
Copied spi flash files from risc-v
Removed old spiflash from make.defs
KConfig modifications for common spiflash
Added new spiflash entry to make.defs
S2 Board config update
Modifications working on S2. Need fix on ROM function
Board fixes
Deleted old spiflash files
Fixes for smartfs operation
Set new HAL version
Fixed wrong change on S3
2024-09-03 19:13:46 -03:00
yangsong8
918ae4cc84 drivers: usbdev: Fix USB descriptor
This commit fixes the regression from https://github.com/apache/nuttx/pull/13190

Signed-off-by: yangsong8 <yangsong8@xiaomi.com>
2024-09-03 11:45:45 -03:00
yinshengkai
baf79de7e5 task: assign_pid retry after malloc
Calling malloc in the critical section may cause thread switching.
Add a retry mechanism to handle the situation where other threads have been successfully expanded.

Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
Signed-off-by: ligd <liguiding1@xiaomi.com>
2024-09-03 09:45:33 -03:00
yinshengkai
8b13572d64 sched: update spinlock in nxsched_get_tcb to enter_critical_section
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2024-09-03 09:45:33 -03:00
simbit18
ccb20feb25 tools/ci/docker/linux/Dockerfile: Restarting the Docker-Linux workflow a new attempt
tools/ci/docker/linux/Dockerfile

revert from --strip-components=1 to --strip-components 1

.github/workflows/docker_linux.yml

   added -> workflow_dispatch:

Manual execution of a workflow
https://docs.github.com/en/actions/managing-workflow-runs-and-deployments/managing-workflow-runs/manually-running-a-workflow
2024-09-02 14:11:51 -04:00
YAMAMOTO Takashi
53795fd497 esp32: enable smp for esp32-devkitc:psram_usrheap config 2024-09-02 10:24:26 -03:00
YAMAMOTO Takashi
96f19aa719 esp32: enable smp for esp32-devkitc:psram config 2024-09-02 10:24:26 -03:00
Tiago Medicci Serrano
6df9de8788 esp32: fix initialization with PSRAM + SMP
Cache flush must be done prior to the APP cpu initalization. This,
however, must be true for the case where PSRAM is not available or
not selected. To do that, this commit flushs the cache during the
device initialization.
2024-09-02 10:24:26 -03:00
YAMAMOTO Takashi
c06a742a63 esp32: fix a crash with PSRAM + SMP
this function is called via esp_spiram_init_cache early in the boot.
2024-09-02 10:24:26 -03:00
chao an
f084685da8 sched/event: clear pending events before enable the scheduler
enable the scheduler may cause the context to switch to a high-priority task,
which will failure to clear pending events correctly.

Signed-off-by: chao an <anchao@lixiang.com>
2024-09-02 18:24:28 +08:00
chao an
85c39e96d6 global/variables: add g_ prefix to some global variables
Signed-off-by: chao an <anchao@lixiang.com>
2024-09-02 18:23:57 +08:00
chao an
39e873f269 sched/policy: move g_policy from data to rodata
Signed-off-by: chao an <anchao@lixiang.com>
2024-09-02 18:23:57 +08:00
SPRESENSE
d1c7e1816f libc/netdb: Separate IPv4 and IPv6 cache size limit
Some domains have a lot of IPv6 addresses. Because of that, it is
not possible to get the IPv4 address with getaddrinfo.

This change separate IPv4 and IPv6 cache size limit to enable to
get both IP addresses.
2024-09-02 06:16:50 -04:00
simbit18
63ed723d93 tools/ci/docker/linux/Dockerfile: Restarting the Docker-Linux workflow
The docker image has not been updated we currently use that one
from 22 days ago.

It seems that the error encountered is due to an incomplete download. It will probably work fine if downloaded again..

 https://github.com/apache/nuttx/actions/runs/10619683045/job/29437799464#step:7:1339

28.31
28.31 gzip: stdin: unexpected end of file
28.31 tar: Unexpected EOF in archive
28.32 tar: Unexpected EOF in archive
28.32 tar: Error is not recoverable: exiting now
2024-09-02 10:27:57 +08:00
Yanfeng Liu
32801d3047 fs/mq_open: revising comments
This contains minor revision on comments of `file_mq_open()`.

Signed-off-by: Yanfeng Liu <yfliu2008@qq.com>
2024-08-31 12:04:17 -03:00
guoshichao
4c01594d5b nuttx: remove the unnecessary -pipe build option
Signed-off-by: guoshichao <guoshichao@xiaomi.com>
2024-08-31 10:22:20 +08:00
Tiago Medicci Serrano
c72c66fff8 espressif: Fix deadlock in RT timer caused by critical section
This commit fixes a deadlock in `esp32s3-devkit:sta_softap`
defconfig: `spin_lock_irqsave` was being used to enter a critical
section that calls `nxsem_post`. In this case, it's recommended
to use `[enter|leave]_critical_section` to avoid deadlocks when a
context switch may happen, for instance.
2024-08-30 17:00:51 -03:00
YAMAMOTO Takashi
e8b1876f99 esp32: enable APP_CPU cache earlier
NuttX uses PSRAM, possibly using the APP_CPU cache MMU,
way before starting the APP_CPU in up_cpu_start().
Flushing the cache when launching the APP_CPU can cause
data corruptions on PSRAM.
Eg. mm_heap structures if the PSRAM is added to a heap.
2024-08-31 00:13:42 +08:00
simbit18
ebbd585f97 cmake/nuttx_kconfig.cmake: fixed the correct .config path in the build folder
Fixing the correct .config path during the setconfig process.

changed ${NUTTX_DIR} -> ${CMAKE_BINARY_DIR}

see https://github.com/apache/nuttx/pull/13175#issuecomment-2320360957
2024-08-30 23:47:11 +08:00
Alan Carvalho de Assis
b998afdc04 doc: Fix Documentation build procedure
User reported an issue caused by not clear documentation:
https://github.com/apache/nuttx/issues/13232
2024-08-30 23:18:32 +08:00
chao an
cf4a92c81e armv8-r/gicv3: correct cpu index of irouter
interrupt routing cpu should be index not cpuset

Signed-off-by: chao an <anchao@lixiang.com>
2024-08-30 21:48:58 +08:00
YAMAMOTO Takashi
a722b74de7 esp32: cache_sram_mmu_set: update the correct register bits 2024-08-30 21:46:31 +08:00
Tiago Medicci Serrano
a916de0e14 espressif: Update HAL library reference to include debug assert
During the board bringup, the new HAL reference includes an assert
to check if the critical section flags is being stored as expected.
2024-08-30 21:41:47 +08:00
hujun5
b1884d2fa2 wqueue: add interface work_queue_priority_wq and work_queue_priority
reason:
These interfaces are used when we assign interrupt
handling of the same priority to the corresponding priority work queues.

Signed-off-by: hujun5 <hujun5@xiaomi.com>
2024-08-30 21:40:55 +08:00
zhaoxingyu1
79199e25f1 mtd/nvs: fix align size
when gc, move data requires byte alignment

Signed-off-by: zhaoxingyu1 <zhaoxingyu1@xiaomi.com>
2024-08-30 21:25:33 +08:00
YAMAMOTO Takashi
8e5f6de7e5 CI: drop stm3240g-eval:knxwm for now
cf. https://github.com/apache/nuttx/issues/13246
2024-08-30 21:03:08 +08:00
ligd
ce2ad51b3a wqueue: expose wqueue API for customization
Signed-off-by: ligd <liguiding1@xiaomi.com>
2024-08-30 01:52:22 +08:00
ligd
f5095d781b wqueue: handle work_cancel() called in irq mode or idle thread
Signed-off-by: ligd <liguiding1@xiaomi.com>
2024-08-30 01:52:22 +08:00
ligd
04e746967a wqueue: remove unused work_foreach() API
Signed-off-by: ligd <liguiding1@xiaomi.com>
2024-08-30 01:52:22 +08:00
dulibo1
5e8ce0b9f0 work queue:fix work_cancel_sync can not cancel the work which call work_queue in handler
1.work_queue a work which call work_queue again
2.work_cancel_sync the work
3.the work is just calling in workthread
4.work_queue the work again,and post the work_cancel_sync wakeup
5.the work is not canceled

Signed-off-by: dulibo1 <dulibo1@xiaomi.com>
2024-08-30 01:52:22 +08:00
daichuan
e48d5d8271 add for support cmake with netdev_notify_recvcpu.c
Signed-off-by: daichuan <daichuan@xiaomi.com>
2024-08-30 01:45:06 +08:00
daichuan
b5753d06f2 support rss/arfs with device
Signed-off-by: daichuan <daichuan@xiaomi.com>
2024-08-30 01:45:06 +08:00
ligd
c75886b8f8 kasan: add new API kasan_init_early()
Signed-off-by: ligd <liguiding1@xiaomi.com>
2024-08-30 01:35:09 +08:00
wangmingrong
64cbafeaa0 mm/kasan: Delete the lock when adding regions
Signed-off-by: wangmingrong <wangmingrong@xiaomi.com>
2024-08-30 01:35:09 +08:00
wangjianyu3
fa5d843aa9 assert in kasan_set_poison() if size is zero
e.g. mm_realloc() => kasan_poison() => kasan_set_poison()
  _assert: Assertion failed p != ((void*)0): at file: kasan/kasan.c:239 task: nsh_main process: nsh_main 0x4402caa5
Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2024-08-30 01:35:09 +08:00
yinshengkai
5d0ffdf44e mm: add disable kasan panic configuration
In some cases we hope to be able to find errors without affecting the running of the program

Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2024-08-30 01:35:09 +08:00
yinshengkai
a9afed96b9 mm/kasan: print memory around poisoned address
Print shadow memory following asan format.
==3118004==ERROR: AddressSanitizer: global-buffer-overflow on address 0x5618ac32a100 at pc 0x5618ac32727f bp 0x7ffe5f3e66f0 sp 0x7ffe5f3e66e0
WRITE of size 4 at 0x5618ac32a100 thread T0

#0 0x5618ac32727e in main /home/baerg/vela/x4b/asan_test.c:12
#1 0x7f221ce29d8f in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58
#2 0x7f221ce29e3f in __libc_start_main_impl ../csu/libc-start.c:392
#3 0x5618ac327144 in _start (/home/baerg/vela/x4b/asan_test+0x1144)
0x5618ac32a100 is located 0 bytes to the right of global variable 'buffer' defined in 'asan_test.c:5:6' (0x5618ac32a0e0) of size 32
SUMMARY: AddressSanitizer: global-buffer-overflow /home/baerg/vela/x4b/asan_test.c:12 in main
Shadow bytes around the buggy address:
0x0ac39585d3d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0ac39585d3e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0ac39585d3f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0ac39585d400: 00 00 00 00 00 00 00 00 f9 f9 f9 f9 f9 f9 f9 f9
0x0ac39585d410: f9 f9 f9 f9 f9 f9 f9 f9 00 00 00 00 00 00 00 00
=>0x0ac39585d420:[f9]f9 f9 f9 00 00 00 00 00 00 00 00 00 00 00 00
0x0ac39585d430: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0ac39585d440: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0ac39585d450: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0ac39585d460: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0ac39585d470: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2024-08-30 01:35:09 +08:00
yangsong8
5a39e83c05 usbdev: extend the usb req len to size_t
Some USB controllers can receive or send multiple data packets then
generate one interrupt. This mechanism can reduce the number of data
copies. Extend req buf to accommodate this.

Signed-off-by: yangsong8 <yangsong8@xiaomi.com>
2024-08-30 01:32:02 +08:00
simbit18
75eea1b74e tools/ci/docker/linux/Dockerfile: image cleaned of unnecessary files and folders
Trying to reduce the size of the docker image, I found files and folders to be deleted.

For now, I have commented Swift from the  Dockerfile because the package is too large.
2024-08-30 01:19:55 +08:00
raiden00pl
55170d2ca2 Documentation: replace m2r2 with myst-parser
sphinx recommends myst-parser for markdown conversion:
https://www.sphinx-doc.org/en/master/usage/markdown.html

m2r2 is not supported for Python versions >= 3.12 so
we can't build Documentation for example on latest Arch Linux

by the way myst-parser detected a bad link to SECURITY.md that is now fixed
2024-08-30 01:14:36 +08:00
Ville Juven
23e0bf5953 imx9_usdhc.c: Fix build error when CONFIG_ARM64_DCACHE_DISABLE=y
priv->rxbuffer does not exist when CONFIG_ARM64_DCACHE_DISABLE=y so
references to it will create a build error -> flag / remove accesses
to it.
2024-08-30 01:13:26 +08:00
YAMAMOTO Takashi
52baca0a89 Increase the chance for _assert to work early in the boot 2024-08-30 01:12:45 +08:00
chenzhijia
1086a05e50 libc/sysconf: add _SC_GETPW_R_SIZE_MAX
pass tlpi example: https://man7.org/tlpi/code/online/dist/users_groups/t_getpwnam_r.c.html

Signed-off-by: chenzhijia <chenzhijia@xiaomi.com>
2024-08-29 09:05:45 +08:00
Tiago Medicci Serrano
a763ed1e07 espressif: Fix build with RTC
This commit ensures that RTC data is properly allocated in the RTC
segment in the linker. This fixes the reported problem about using
the legacy bootloader and RTC.
2024-08-29 09:05:17 +08:00
pangzhen1
c8e56ff63a CMake: fix CMake compile errors during the protected build mode
There are 2 CMake compile errors during the protected build mode. One is forget to add library for nuttx_user, another is the wrong macro used when compile wqueue.

Signed-off-by: pangzhen1 <pangzhen1@xiaomi.com>
2024-08-29 01:59:29 +08:00
chenzhijia
f526b91165 nuttx/drivers:Modify errcode returned by relay_ioctl
Fixed system function call failure due to return errcode error

Signed-off-by: chenzhijia <chenzhijia@xiaomi.com>
2024-08-29 01:04:03 +08:00
Felipe Moura
37e1f5db47 Add spi slave dev to esp32 xtensa 2024-08-29 01:01:04 +08:00
Ville Juven
a0a85e5c10 arch/arm64: Move ELF_64BIT selection to arch/Kconfig
Unify the elf file format for the whole arm64 architecture
2024-08-28 07:45:36 -04:00
yinshengkai
263f8955da fs/procfs: Supports any number of thread displays
After the number of threads exceeds the array size, it will not be displayed.
Any number of threads can be displayed using dynamic adaptation

Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2024-08-28 14:01:25 +08:00
yangguangcai
efbf43cdfa driver/mem:add Mem Driver.
Signed-off-by: yangguangcai <yangguangcai@xiaomi.com>
2024-08-28 13:59:04 +08:00