Commit Graph

57631 Commits

Author SHA1 Message Date
hujun5
e908fb6d51 armv7a/r: fix regression from https://github.com/apache/nuttx/pull/14596
reason:
In kernel mode, sighand_test() may failed.
because nxsig_unmask_pendingsignal may change tcb->xcp.regs,and we should update return value(regs).

Signed-off-by: hujun5 <hujun5@xiaomi.com>
2025-01-15 17:13:29 +08:00
chenrun1
06540e7be1 fs_procfsproc:fix proc_heap to get kernel task info
Signed-off-by: chenrun1 <chenrun1@xiaomi.com>
2025-01-15 17:12:50 +08:00
chenrun1
38c217bbfd fs_heap:add fs_heap_mallinfo_task
Summary:
  Added fs_heap_mallinfo_task implementation, which is used in proc_heap

Signed-off-by: chenrun1 <chenrun1@xiaomi.com>
2025-01-15 17:12:50 +08:00
Jukka Laitinen
19fe41cb1b mm/kmap/kmm_map.c: Fix argument to gran_free
Fix a memory corruption & deadlocks while calling gran_free.

The function expects a GRAN_HANDLE as a paramter, not a pointer to it.

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2025-01-15 17:10:57 +08:00
Jukka Laitinen
8d635ed0bf arch/arm64/src/common/arm64_addrenv_pgmap.c: Add normal region flags to kernel page mappings
In up_addrenv_kmap_pages, the MMU_MT_NORMAL_FLAGS are needed for the MMU
mappings in order for the memory & caches to function normally

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2025-01-15 17:10:57 +08:00
raiden00pl
0652cbf304 Documentation: update sensors documentation
update sensors documentation:

- add info about different sensor frameworks in one place
- fix headers style for sensors_uorb.rst: headers
- fix long lines for sensors_uorb.rst so it's possible to read this file in terminal IDE
- add code sections for sensors_uorb.rst

Signed-off-by: raiden00pl <raiden00@railab.me>
2025-01-15 17:09:25 +08:00
wangzhi16
4558db18e4 Use small lock to protect usbdev and endpoint in sim.
Signed-off-by: wangzhi16 <wangzhi16@xiaomi.com>
2025-01-15 17:04:58 +08:00
Yanfeng Liu
95f11e02c1 arch/arm/qemu: select NEON at processor level
This moves ARM_HAVE_NEON from QEMU ARM family level down to the
processor level as not all processors have it (e.g. Cortex R5).

Signed-off-by: Yanfeng Liu <p-liuyanfeng9@xiaomi.com>
2025-01-15 16:54:10 +08:00
raiden00pl
d9edc7c01a gitignore: add Emacs auto-save files
add Emacs auto-save files to gitignore

Signed-off-by: raiden00pl <raiden00@railab.me>
2025-01-15 16:10:22 +08:00
raiden00pl
9a3fd90db9 nrf5340-dk/configs/qspi_cpuapp: remove temporary file added by accident
remove temporary emacs file added by accident

Signed-off-by: raiden00pl <raiden00@railab.me>
2025-01-15 16:10:22 +08:00
dongjiuzhu1
500b55c330 Documentation: update uorb and sensor driver doc
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2025-01-15 08:57:57 +01:00
wangzhi16
007a3fffac Use small lock to protect usbdev and endpoint in AVR.
Signed-off-by: wangzhi16 <wangzhi16@xiaomi.com>
2025-01-15 10:05:16 +08:00
wangjianyu3
b629daf61c tools/refresh.sh: Add log for progress
Log

  $ ./tools/refresh.sh --silent --defaults arch:risc-v
  Normalizing all boards in arch: risc-v !
    [1/227] Normalize arty_a7/nsh
    [2/227] Normalize arty_a7/netnsh
    [3/227] Normalize arty_a7/knsh
    # ... ...

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2025-01-15 03:31:53 +08:00
wangjianyu3
aa24051628 boards: Refresh configurations with refresh.sh
With patch https://github.com/apache/nuttx/pull/15531

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2025-01-15 00:08:28 +08:00
wangjianyu3
f3b31ef1df boards: Replace CONFIG_NSH_LINELEN with CONFIG_LINE_MAX
Details: https://github.com/apache/nuttx-apps/pull/2943

1. find boards/ -name defconfig | xargs sed -i 's/CONFIG_NSH_LINELEN/CONFIG_LINE_MAX/g'
2. ./tools/refresh.sh --silent --defaults all

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2025-01-15 00:07:58 +08:00
Kyle Wilson
9701b0f660 Fix memory map for EMAC, ICACHE, and DCACHE.
It was dis overed during debug of the ethernet driver that the EMAC base was incorrect. After examination, it was determined that ICACHE and DCACHE also had incorrect base addresses. This commit fixes the base addresses according to the reference manual.
2025-01-15 00:07:43 +08:00
wangjianyu3
d014867766 tools/refresh.sh: Should continue to refresh other configs when matching debug configs
Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2025-01-14 23:08:01 +08:00
Matteo Golin
36507cc7b2 drivers/sensors: Wrote a driver for the MCP9600 thermocouple amplifier. 2025-01-14 23:04:18 +08:00
chenrun1
cf66a1d5ce hostfs_open:return errno from host
Summary:
  Returns the error code returned directly by the host to avoid conversion to EBADF

Signed-off-by: chenrun1 <chenrun1@xiaomi.com>
2025-01-14 23:03:20 +08:00
wangmingrong1
450b47fbb0 gcov.py: Add copy skip path, prevent recursion
When the copy path is a subdirectory of the source path, the copy will occur recursively

Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com>
2025-01-14 23:02:16 +08:00
Huang Qi
b1d97688b7 arch/risc-v: Remove riscv_mhartid
Summary:
This commit removes the riscv_mhartid function and replaces all its
usages with up_cpu_index. The functionality is consolidated into
up_cpu_index which provides a more consistent API for getting the
current CPU/hart ID across different execution modes (machine/supervisor).

Impact:
- Removes riscv_mhartid.S and its references from build systems
- Updates all arch-specific code to use up_cpu_index instead
- Adds more detailed documentation for up_cpu_index behavior
- Changes the implementation of up_cpu_index to use percpu scratch
register in supervisor mode

Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2025-01-14 11:48:40 -03:00
Huang Qi
6e82ca3013 arch/risc-v: Decouple ARCH_RV_CPUID_MAP and up_cpu_index()
Summary:
- Separated CPU index functionality from CPU ID mapping configuration
- Moved CPU ID mapping functions to new riscv_cpuidmap.c file
- Made up_cpu_index() implementation dependent on ARCH_USE_S_MODE
- Updated build system to handle new file organization

Impact:
- Improves code organization by separating concerns between basic CPU index
functionality and advanced CPU ID mapping features
- Makes CPU index functionality available independently of CPU ID mapping
- Reduces conditional compilation complexity in header files
- Better aligns with RISC-V architecture modes (M-mode vs S-mode)

Testing:
GitHub CI and local testing

Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2025-01-14 20:19:37 +08:00
YAMAMOTO Takashi
00010089b8 drivers/serial/serial.c: adapt to the iovec-based api
This would fix readv/writev issues mentioned in
https://github.com/apache/nuttx/pull/12674.
(only for this specific driver though. with this approach,
we basically have to fix every single drivers and
filesystems.)

Lightly tested on the serial console, using micropython REPL
on toywasm with esp32s3-devkit:toywasm, which used to be
suffered by the readv issue.
2025-01-14 20:18:21 +08:00
YAMAMOTO Takashi
30ad31e9d7 uio api tweaks
* Make readv/writev implementations update struct uio
  This can simplify partial result handling.

* change the error number on the overflow from EOVERFLOW to EINVAL
  to match NetBSD

* add a commented out uio_offset field. I used "#if 0" here as
  C comments can't nest.

* add a few helper functions

Note on uio_copyfrom/uio_copyto:
although i'm not quite happy with the "offset" functionality,
it's necessary to simplify the adaptation of some drivers like
drivers/serial/serial.c, which (ab)uses the user-supplied buffer
as a line-buffer.
2025-01-14 20:18:21 +08:00
YAMAMOTO Takashi
2749510413 Update a few comments after the recent readv/writev changes 2025-01-14 20:18:21 +08:00
anjiahao
cbb5e8fee2 modlib:gen-elf.ld.in DATA section need add CONFIG_MM_PGSIZE
arch/risc-v/src/common/riscv_addrenv.c:418:

{
...
  database = resvbase + MM_PGALIGNUP(resvsize);
...
}

need use MM_PGALIGNUP(resvsize) inside of ARCH_DATA_RESERVE_SIZE
if not add MM_PGALIGNUP(resvsize), will mismatch address load .data
section

Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2025-01-14 20:13:28 +08:00
Yanfeng Liu
d385d9f7d2 arm/common: fix KERNEL build vfork
This fixes vfork test for kernel build, checked with qemu-armv7a:nsh
and qemu-armv7a:knsh

Signed-off-by: Yanfeng Liu <p-liuyanfeng9@xiaomi.com>
2025-01-14 20:12:31 +08:00
chenrun1
b973bf3191 fs_procfs:Fix closedir should handle the release dir handle on a case-by-case basis
Signed-off-by: chenrun1 <chenrun1@xiaomi.com>
2025-01-14 19:37:08 +08:00
YAMAMOTO Takashi
b88aba5ddc esp32s2: apply wifi deadlock fix from esp32s3
cf. https://github.com/apache/nuttx/pull/15445
2025-01-14 19:29:28 +08:00
YAMAMOTO Takashi
c954af0de1 esp32: apply wifi deadlock fix from esp32s3
cf. https://github.com/apache/nuttx/pull/15445
2025-01-14 19:29:28 +08:00
YAMAMOTO Takashi
7a54488dbb esp32c6: apply wifi deadlock fix from esp32s3
cf. https://github.com/apache/nuttx/pull/15445
2025-01-14 19:29:28 +08:00
YAMAMOTO Takashi
93dbdd4a62 esp32c3: apply wifi deadlock fix from esp32s3
cf. https://github.com/apache/nuttx/pull/15445
2025-01-14 19:29:28 +08:00
YAMAMOTO Takashi
847c1a6151 esp32c3-legacy: apply wifi deadlock fix from esp32s3
cf. https://github.com/apache/nuttx/pull/15445
2025-01-14 19:29:28 +08:00
chenrun1
a87c194b40 goldfish_memorymap:Resize VIRT_FLASH_PSECTION
Sumamry:
  Adjust VIRT_FLASH_PSECTION from 0x00000000-0x08000000 -> 0x00600000-0x08000000
  The above changes avoid the problem of directly restarting when the process accesses/executes at address 0x0 without causing assert

Signed-off-by: chenrun1 <chenrun1@xiaomi.com>
2025-01-14 19:28:54 +08:00
chenzihan0416
2db0b69335 Update goldfish_sensor_uorb.c 2025-01-14 16:44:13 +08:00
chenzihan1
c41c726161 goldfish sensor add get_info interface
Signed-off-by: chenzihan1 <chenzihan1@xiaomi.com>
2025-01-14 16:44:13 +08:00
wangjianyu3
71fe717459 esp32s3-devkit/adb: Enable used size of heap and stack for command ps
Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2025-01-14 14:52:18 +08:00
wangmingrong1
df7d062713 kasan/kconfig: Add config CONFIG_MM_KASAN_INSTRUMENT
Some checks failed
Build Documentation / build-html (push) Has been cancelled
It will be used to distinguish between hardware KASan and software KASan. Hardware KASan does not need to use plug-in

Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com>
2025-01-14 14:01:48 +08:00
wangmingrong1
9b4cd4e0a4 kasan: Extract kasan's kconfig separately
Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com>
2025-01-14 14:01:48 +08:00
hujun5
299136bdc7 rptun_bmp: add remote_cpu to rptun_secure_init
Signed-off-by: hujun5 <hujun5@xiaomi.com>
2025-01-14 13:34:35 +08:00
hujun5
1600a44d69 rptun_secure:change rptun_secure to rptun_bmp
Signed-off-by: hujun5 <hujun5@xiaomi.com>
2025-01-14 13:34:35 +08:00
hujun5
9dad781d07 sched/wdog: use small lock to protect g_wdactivelist
reason:
We would like to replace the critical section with a small lock.

Signed-off-by: hujun5 <hujun5@xiaomi.com>
2025-01-14 12:29:29 +08:00
hujun5
eb2608209a sched_note_wdog: add c_section
reason:
the external critical section protection has been removed.

Signed-off-by: hujun5 <hujun5@xiaomi.com>
2025-01-14 12:29:29 +08:00
hujun5
684ddc6ada irq: enter_critical_section_wo_note/leave_critical_section_wo_note
Signed-off-by: hujun5 <hujun5@xiaomi.com>
2025-01-14 12:29:29 +08:00
jerryslhao
f1b7d7d641 drivers/sensors/bmi088: add driver for Bosch BMI088 IMU
This adds a driver for the Bosch BMI088 IMU sensor.
The driver supports spi.

Signed-off-by: jerryslhao <jerryslhao@gmail.com>
2025-01-14 10:29:48 +08:00
chao an
c94a99326e arch/arm: read STM32L4_GTIM_CNT_OFFSET should use same lock
Signed-off-by: chao an <anchao.archer@bytedance.com>
2025-01-14 08:38:06 +08:00
chao an
c6126bcdc4 arch/arm: fix regression by spinlock change
| commit c96b8cdfdd
| Author: hujun5 <hujun5@xiaomi.com>
| Date:   Mon Dec 23 16:59:20 2024 +0800
|
|     use small lock in following files:

Signed-off-by: chao an <anchao.archer@bytedance.com>
2025-01-14 08:38:06 +08:00
chao an
849081d348 drivers/note: fix typo falgs and align local name to irq_mask
Signed-off-by: chao an <anchao.archer@bytedance.com>
2025-01-14 08:37:45 +08:00
chao an
3d3db4a375 arm/imx9: sched_unlock should called after spin_unlock()
fix deadlock if sched_unlock switch out to other task

Signed-off-by: chao an <anchao.archer@bytedance.com>
2025-01-14 08:36:53 +08:00
chao an
b7003e55b9 Revert "kconfiglib/mark: It should use pip instead of apt install"
pip source is deprecated from ubuntu 24.04

This reverts commit 7c7a64c84c.

Signed-off-by: chao an <anchao.archer@bytedance.com>
2025-01-13 19:12:25 -03:00