Commit graph

57404 commits

Author SHA1 Message Date
wangjianyu3
0fe3aebd6a nuttx/uorb.h: Add carrier frequency for GNSS Satellite
The `struct sensor_gnss_satellite.cf` may be parsed from `GSV.signal_id`(e.g. NMEA 0183 v4.11) and `struct sensor_gnss_satellite.constellation`

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2024-12-20 20:05:26 +08:00
Zhe Weng
035fdb4951 net: Refresh config dependency of NET_READAHEAD
ICMP(v6) uses IOB queue as readahead, but TCP/UDP don't now.

Signed-off-by: Zhe Weng <wengzhe@xiaomi.com>
2024-12-20 20:01:19 +08:00
chao an
d36ddb5790 arm/modifyreg: Use common lock to protect the modify address to ensure consistency
Signed-off-by: chao an <anchao@lixiang.com>
2024-12-20 19:54:07 +08:00
hujun5
59a849a7cc esp_rtc: use small lock in arch/risc-v/src/common/espressif/esp_rtc.c
reason:
We would like to replace the big lock with a small lock.

Signed-off-by: hujun5 <hujun5@xiaomi.com>
2024-12-20 14:10:56 +08:00
hujun5
48c439190d fix compile erorr
chip/stm32_gpio.c:44:11: note: '#pragma message: CONFIG_STM32_USE_LEGACY_PINMAP will be deprecated migrate board.h see tools/stm32_pinmap_tool.py'
   44 | #  pragma message "CONFIG_STM32_USE_LEGACY_PINMAP will be deprecated migrate board.h see tools/stm32_pinmap_tool.py"
      |           ^~~~~~~
CC:  pthread/pthread_mutexconsistent.c In file included from chip/stm32_flash.c:40:
chip/stm32f20xxf40xx_flash.c:53:4: warning: #warning "Default Flash Configuration Used - See Override Flash Size Designator" [-Wcpp]
   53 | #  warning "Default Flash Configuration Used - See Override Flash Size Designator"
      |    ^~~~~~~
board/stm32_ethernet.c:84:19: warning: 'g_phy_lock' defined but not used [-Wunused-variable]
   84 | static spinlock_t g_phy_lock = SP_UNLOCKED;
      |                   ^~~~~~~~~~
LD: nuttx

Signed-off-by: hujun5 <hujun5@xiaomi.com>
2024-12-20 14:09:34 +08:00
hujun5
2b762267f3 imx9_flexcan: use small lock in arch/arm/src/imx9/imx9_flexcan.c
reason:
We would like to replace the big lock with a small lock.

Signed-off-by: hujun5 <hujun5@xiaomi.com>
2024-12-20 14:09:34 +08:00
hujun5
a8353eef51 imx9_lpuart: use small lock in arch/arm(64)/src/imx9/imx9_lpuart.c
reason:
We would like to replace the big lock with a small lock.

Signed-off-by: hujun5 <hujun5@xiaomi.com>
2024-12-20 11:53:02 +08:00
Alan Carvalho de Assis
0e162eeb7a drivers/sensors: Add Velocity sensor type to UORB
This patch adds support for velocity measurement sensors.
I plan to use it as a generic velocity type to be used for
Renesas FS3000 (Air Velocity Flow).

Signed-off-by: Alan C. Assis <acassis@gmail.com>
2024-12-19 23:58:04 +01:00
George Poulios
884b4604c2 Map user memory passed to accept() in kernel build
Fixes an issue in kernel build where the user addresses passed
to accept() would be accessed when the wrong MMU mappings were
active. A crash would manifest when attempting to accept() on a
TCP server socket for instance under significant load. The accept
event handler would be called by the HP worker upon client
connection. At this point, accept_tcpsender() would attempt to
write to `addr` resulting in a page fault. Reproducibility would
depend on the current system load (num tasks or CPU stress) but
in loaded environments, it would crash almost 100% of the times.

It should be noted that Linux does this the other way around: it
operates on kernel stack allocated data and once done, it copies
them to user. This can also be a viable alternative, albeit with
one extra copy and a little extra memory.

Signed-off-by: George Poulios <gpoulios@census-labs.com>
2024-12-20 00:57:40 +02:00
Filipe Cavalcanti
97c0b43d86 arch/risc-v/espressif: add missing spinlock to wlan_recvframe 2024-12-19 18:16:50 -03:00
bazooka Joe
a7869bb28b stm32_i2c: fix sending large data over i2c
To trigger TC interrupt NBYTES needs to be set before RELOAD is disabled
similar to previous commitdone on stm32h7 510b6221ca
2024-12-19 22:06:04 +08:00
Tiago Medicci Serrano
919cb73913 rv-virt/citest: Test GCC's tls (__thread keyword)
Test the GCC's tls with the `__thread` keyword with ostest by
enabling `CONFIG_SCHED_THREAD_LOCAL`.
2024-12-19 22:04:00 +08:00
Antoine Juckler
1f2946b7ab include/threads.h: Replace thrd_ defines by actual function definitions 2024-12-19 21:56:02 +08:00
hujun5
ecdff659d1 modifyreg[8|32]: use small lock in modifyreg[8|32]
reason:
We would like to replace the big lock with a small lock.

Signed-off-by: hujun5 <hujun5@xiaomi.com>
2024-12-19 21:55:21 +08:00
guoshichao
ef6723af9e nuttx: add get_current_dir_name implementation
Signed-off-by: guoshichao <guoshichao@xiaomi.com>
2024-12-19 20:55:51 +08:00
Alin Jerpelea
d700641921 crypto/xform.c: migrate to SPDX identifier
Most tools used for compliance and SBOM generation use SPDX identifiers
This change brings us a step closer to an easy SBOM generation.

NOTE
The code was reported as GPL by FOSS ID
and Xiaomi scanned the file xform.c with Black Duck Security and it showed
that the license was BSD-3-Clause and no risk was reported.

Since there is no clause on the license it was concluded as 0BSD

Refference
https://github.com/apache/nuttx/pull/15252

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2024-12-19 14:48:18 +08:00
anjiahao
20a0eb1064 procfs:add missing ',' to end of line
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2024-12-19 14:47:32 +08:00
YAMAMOTO Takashi
b4e5c74319 arch/sim/src/nuttx-names.in: Add pipe2
This breaks the libuv build without CONFIG_PIPES
as expected:

```
LD:  nuttx
/usr/bin/ld: nuttx.rel: in function `uv_pipe':
/src/apps/system/libuv/libuv/src/unix/pipe.c:516: undefined reference to `NXpipe2'
collect2: error: ld returned 1 exit status
make[1]: *** [Makefile:427: nuttx] Error 1
make: *** [tools/Unix.mk:551: nuttx] Error 2
```

That is, this correctly exposes https://github.com/apache/nuttx/issues/14773
on linux.
2024-12-19 14:46:59 +08:00
hujun5
5d68ab635c remove big lock in arch_phy_irq
reason:
We would like to replace the big lock with a small lock.

Signed-off-by: hujun5 <hujun5@xiaomi.com>
2024-12-18 23:28:18 +08:00
hujun5
c1b665c5d5 at32_serial: use small lock in arch/arm/src/at32/at32_serial.c
reason:
We would like to replace the big lock with a small lock.

Signed-off-by: hujun5 <hujun5@xiaomi.com>
2024-12-18 23:07:58 +08:00
wangmingrong1
b99ca3f27b gcov: Disable stack checking
When enable CONFIG_STACK_CANARIES, in general, the stack check in the __gcov_fork function is:
" return fork();
18: e59f3020 ldr r3, [pc, #32] @ 40 <__gcov_fork+0x40>
1c: e5932000 ldr r2, [r3]
20: e59d3004 ldr r3, [sp, #4]
24: e0332002 eors r2, r3, r2
28: e3a03000 mov r3, #0
2c: 1a000002 bne 3c <__gcov_fork+0x3c>"
r3 is obtained by taking the value of sp offset. But after opening thumb, the second comparison value in
"8c6: 4a06 ldr r2, [pc, #24] @ (8e0 <__gcov_fork+0x30>)
8c8: 6811 ldr r1, [r2, #0]
8ca: 687a ldr r2, [r7, #4]
8cc: 4051 eors r1, r2"
is obtained through r7. Since r7 stores the stack address at this time, which stores the address of the parent process, the stack out of bounds will occur in the child process

Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com>
2024-12-18 23:05:52 +08:00
wangmingrong1
3d99bae59a gcov: Prevent pile insertion recursion
Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com>
2024-12-18 23:05:52 +08:00
wangmingrong1
ba50378f01 gcov: Fix gcov fork() issue
After code coverage is enabled, fork will be replaced by __gcov_fork

Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com>
2024-12-18 23:05:52 +08:00
hujun5
75ddce6e3a modifyreg16: use small lock in modifyreg16
reason:
We would like to replace the big lock with a small lock.

Signed-off-by: hujun5 <hujun5@xiaomi.com>
2024-12-18 20:28:26 +08:00
wangmingrong1
391aa9b5f3 gcov: Enhanced gcov script
1. Add "-s" to specify the path to collect gcno files
2. Add "-a" to specify the path to collect gcda files.
3. Add "-x" for copy-only operation

Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com>
2024-12-18 20:24:14 +08:00
hujun5
f367ba2842 cxd: use small lock
reason:
We would like to replace the big lock with a small lock.

Signed-off-by: hujun5 <hujun5@xiaomi.com>
2024-12-18 20:21:58 +08:00
wangjianyu3
c19e8c7861 esp32s3-devkit/adb: Enable file service
Test

  $ adb -s 1234 pull /etc/init.d/rcS
  /etc/init.d/rcS: 1 file pulled. 0.0 MB/s (7 bytes in 0.042s)

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2024-12-18 20:13:41 +08:00
hujun5
826aa4f732 imx_gpio: use small lock in arch/arm/src/imx6/imx_gpio.c
reason:
We would like to replace the big lock with a small lock.

Signed-off-by: hujun5 <hujun5@xiaomi.com>
2024-12-18 20:10:45 +08:00
Andre Heinemans
58e232863d imx95-evk: update configs; add imx95-evk:can 2024-12-18 20:09:12 +08:00
Andre Heinemans
16babb08c9 imx9: iomuxc: add assert on scmi pinconfig result 2024-12-18 20:09:12 +08:00
Andre Heinemans
01e05c2660 imx9: add config for waking WFI at systick 2024-12-18 20:09:12 +08:00
chao an
c7ccc0f9ec arm64/cache: add i/dcache check to avoid build break
arch/arm64/src/common/arm64_cache.c:344:35: error: macro "up_get_icache_linesize" passed 1 arguments, but takes just 0
  344 | size_t up_get_icache_linesize(void)
      |                                   ^

Feishu-Id: 4956395133

Signed-off-by: chao an <anchao@lixiang.com>
2024-12-18 20:07:59 +08:00
YAMAMOTO Takashi
9ad125751d Explicitly enable CONFIG_LUA_LUV_MODULE's dependencies where it's enabled
In order to replace CONFIG_LUA_LUV_MODULE's "select" items
with "depends on".
2024-12-18 20:04:05 +08:00
hujun5
2c69d62c9a bt_buf: use small lock in wireless/bluetooth/bt_buf.c
reason:
We would like to replace the big lock with a small lock.

Signed-off-by: hujun5 <hujun5@xiaomi.com>
2024-12-18 18:11:08 +08:00
chao an
29f1ca2c79 syslog/intbuffer: some improve for intbuffer
1. add static for internal function
2. add FAR for pointer prototype

Signed-off-by: chao an <anchao@lixiang.com>
2024-12-18 18:10:43 +08:00
hujun5
bc6bf019dd bt_buf: use small lock to protect bt_bufferlist_s
reason:
We would like to replace the big lock with a small lock.

Signed-off-by: hujun5 <hujun5@xiaomi.com>
2024-12-18 18:10:23 +08:00
Alin Jerpelea
658e4ffae2 arch/x86_64: migrate to SPDX identifier
Most tools used for compliance and SBOM generation use SPDX identifiers
This change brings us a step closer to an easy SBOM generation.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2024-12-18 17:51:57 +08:00
Alin Jerpelea
559b533863 arch/xtensa: migrate to SPDX identifier
Most tools used for compliance and SBOM generation use SPDX identifiers
This change brings us a step closer to an easy SBOM generation.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2024-12-18 17:51:57 +08:00
Alin Jerpelea
fe90b2ee7a include: migrate to SPDX identifier
Most tools used for compliance and SBOM generation use SPDX identifiers
This change brings us a step closer to an easy SBOM generation.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2024-12-18 17:51:57 +08:00
Alin Jerpelea
35a4fc05d9 drivers/usbhost/hid_parser: migrate to SPDX identifier
Most tools used for compliance and SBOM generation use SPDX identifiers
This change brings us a step closer to an easy SBOM generation.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2024-12-18 17:51:57 +08:00
Alin Jerpelea
438fcfb13a arch/arm: migrate to SPDX identifier
Most tools used for compliance and SBOM generation use SPDX identifiers
This change brings us a step closer to an easy SBOM generation.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2024-12-18 17:51:57 +08:00
Alin Jerpelea
83de09d31a drivers/input/uinput: migrate to ASF license
Xiaomi has submitted the SGA and the license can be migrated to ASF

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2024-12-18 17:46:28 +08:00
Alin Jerpelea
1a0c5cf63a drivers/mtd/mtd_config_fs: migrate to SPDX identifier
Most tools used for compliance and SBOM generation use SPDX identifiers
This change brings us a step closer to an easy SBOM generation.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2024-12-18 17:46:11 +08:00
hujun5
e3717b3086 esp32_rtc: use small lock in arch/xtensa/src/esp32[s2]/esp32s2_rtc.c
reason:
We would like to replace the big lock with a small lock.

Signed-off-by: hujun5 <hujun5@xiaomi.com>
2024-12-18 11:53:15 +08:00
Ville Juven
ea020a4eae sem_holder.c: Replace addrenv_select with kmm_map for holder sem access
The holder list can be modified via interrupt so using addrenv_select is
not safe. Access the semaphore by mapping it into kernel virtual memory
instead.
2024-12-18 08:57:01 +08:00
Ville Juven
510d9659b4 sem_waitirq: Use kmap interface to access the semaphore
The temporary mappings via addrenv_select() and addrenv_restore() simply
do not work from interrupt, so remove its usage and replace with kmap
which is safe.
2024-12-18 08:57:01 +08:00
Ville Juven
95d1e52535 mm/kmap: Provide the user tcb as parameter to map_user()
This allows mapping pages from others than the running task. Obiously
this can only be done with proper preparations (the task in question
cannot exit before the mapping is released).
2024-12-18 08:57:01 +08:00
Eren Terzioglu
c3d03f02fb esp32[c3|c6|h2]: Fix ledc clk issue 2024-12-17 13:35:42 -03:00
Eren Terzioglu
8256864bfe esp32[s2|s3]: Add qencoder defconfig 2024-12-17 13:35:42 -03:00
Eren Terzioglu
58be435817 esp32[h2]: Add qencoder defconfig 2024-12-17 13:35:42 -03:00