Commit graph

57355 commits

Author SHA1 Message Date
zhangshoukui
aef24f5f3c rename lib_pathbuffer to lib_tempbuffer
Signed-off-by: zhangshoukui <zhangshoukui@xiaomi.com>
2025-01-07 21:54:33 +08:00
rongyichang
553406e801 drivers/video: add BRGA8888 support for goldfish gpu fb
Some checks are pending
Build Documentation / build-html (push) Waiting to run
Signed-off-by: rongyichang <rongyichang@xiaomi.com>
2025-01-07 21:47:56 +08:00
Gao Feng
f64a48f4e5 cxx: size and un-size functions should be defined in one file
fix error when "-Werror=sized-deallocation" is enabled.

refer to https://timsong-cpp.github.io/cppwp/n4861/new.delete,
displace the default versions defined by the C++ standard library.
2025-01-07 21:45:59 +08:00
wangmingrong1
c5655d5a11 arm64/tbi: Unified TBI flags for MTE and software kasan
The TCMA flag is not critical, it will be set separately in "arm64_mte.c"

Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com>
2025-01-07 21:44:18 +08:00
Jani Paalijarvi
dd4ee256c3 arch/risc-v/src/mpfs/mpfs_ethernet.c: Set correct return value
Return error in case of mpfs_i2cbus_initialize() failure.

Signed-off-by: Jani Paalijarvi <jani.paalijarvi@unikie.com>
2025-01-07 21:42:00 +08:00
Jani Paalijarvi
e1fb0b30c4 drivers/net/ksz9477.c: Check return values in init
Check that writes to configuration registers success.

Signed-off-by: Jani Paalijarvi <jani.paalijarvi@unikie.com>
2025-01-07 21:42:00 +08:00
simbit18
0641e6f287 [DOC] implementation/simulation.rst: Removed the execute permissions. 2025-01-07 21:40:40 +08:00
simbit18
aaef87e5b6 Fix Kconfig style
Remove spaces from Kconfig files
Add TABs
2025-01-07 21:39:50 +08:00
wangjianyu3
350f396aa5 drivers/sensors/gnss: Fix integer overflow error
CID 1309501: (#1 of 1): Overflow constant (INTEGER_OVERFLOW)
overflow_const: Expression upper->crefs, which is equal to 255, where enable ? 1 : -1 is known to be equal to -1, overflows the type that receives it, an unsigned integer 8 bits wide.

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2025-01-07 21:38:17 +08:00
buxiasen
7e0e4dea75 arm/irq.h: fix ARCH_ARM7TDMI missing up_getusrsp after move to irq.h
Causing c5471evm/httpd ci break.

Signed-off-by: buxiasen <buxiasen@xiaomi.com>
2025-01-07 14:29:32 +08:00
Gao Feng
55da7d89b5 xtensa/esp32s3: porting of spi_flash_chip_generic_write_encrypted from ESP-IDF 2025-01-07 12:18:43 +08:00
Kyle Wilson
4bd2c0443b Preliminary add of fdcan source files.
Some checks are pending
Build Documentation / build-html (push) Waiting to run
Adding source files to the fdcan branch based on identical register set. These files should mostly just work.

Removed references to FDCAN3. H5 only has 2 FDCAN interfaces.

Add basic FDCAN Kconfig

FDCAN Kconfig options

Added various options for FDCAN mode, FDCAN bitrate, clock selection and division, and timing.

Added bit timing config options (nominal and data). Added stm32h56xxx pin mappings.

Fixed Data Bit Timing. Pulled in STM32H5_FDCAN_PDIV_VALUE. Added stm32_fdcan.c to Make.defs. Added DBITRATE to Kconfig

Clock source changes to FDCAN

Moved the setting of the clock source to the stm32h5xx_rcc.c file. Added notes to stm32_fdcan.c that STM32_FDCAN_FREQUENCY and STM32_FDCAN_PDIV should be set in board.h

Change STM32H5_FDCAN_PDIV to STM32_FDCAN_PDIV

Updated Kconfig to match G4 implementation. Removed stm32_fdcan_sock for now.

Removed FDCAN3 from stm32_fdcan.h

incomplete changes for bit timning

Set NBRP and DBRP registers based on STM32H7 FDCAN socket algorithm.

Added board file for initializing 1 can device. Will update later to initialize second device.

Fixed ifdefs. Changed STM32 to STM32H5.

Add some can testing changes.

Added option to configure bit timing, with automatic bit timing set as default.

Style fixes

Fixed FDCAN2 and memory access issues

FDCAN2 msgram offset was wrong by 1 word (4 bytes). I removed the + 4 at the end of the definition. This fixed the issues with fdcan2. Also changed ifdefs when setting ESI, FDF, and BRS bits. When CAN FD was used, this resulted in the first command after the endif (the setting of dest at line 2325) being skipped because it was included in the else block when it shouldn't have. This resulted in exceptions. Adjust ifdefs fixes this problem. Other minor fixes.

Restoring board files to upstream versions. These files will be pulled in later in a separate pull request. stm32h5_fdcan_test branch created for this.

Fixed Queue Mode Transmit

The can driver checks the TFFL bits in the TXFQS register. In Queue mode, this always returns 0. As a result, fdcan_txempty was always returning false, which resulted in no transmissions. This code fixes that.

Add stm32h5 fdcan chardriver to Make.defs
2025-01-07 01:05:23 +08:00
Eren Terzioglu
6eabe35a60 esp32[h2]: Fix esp32h2 get mac address issue 2025-01-07 01:03:44 +08:00
Eren Terzioglu
5e2fc181c2 tools/Unix.mk: Add host_info target to print nxdiag output
Nxdiag examples scripts  modified to print system information
without building and flashing nxdiag application to get report
about system without reflash or reconfigure.
2025-01-07 01:03:44 +08:00
hujun5
57e54b399b sched: remove all spin_lock_irqsave(NULL)
Signed-off-by: hujun5 <hujun5@xiaomi.com>
2025-01-06 23:11:44 +08:00
hujun5
4e563e3a86 SEGGER_RTT_Conf.h: rm spin_lock_irqsave(NULL) in drivers/segger/config/SEGGER_RTT_Conf.h
Signed-off-by: hujun5 <hujun5@xiaomi.com>
2025-01-06 23:07:58 +08:00
hujun5
62566734a4 rp23xx_pio.c: rm spin_lock_irqsave(NULL) in arch/arm/src/rp23xx/rp23xx_pio.c
Signed-off-by: hujun5 <hujun5@xiaomi.com>
2025-01-06 23:07:58 +08:00
hujun5
57ca4e1789 up_rtc_gettime: add spinlock to protect up_rtc_gettime
reason:
We have removed the critical section protection
for the up_rtc_gettime function in common code.

Signed-off-by: hujun5 <hujun5@xiaomi.com>
2025-01-06 23:07:58 +08:00
buxiasen
89455bc9a1 arch: up_getusrsp change to inline and implement in irq.h
Signed-off-by: buxiasen <buxiasen@xiaomi.com>
2025-01-06 23:03:05 +08:00
buxiasen
1358942132 arch/tricore: move tricore_csa2addr from internal.h to arch.h
Make up_getusrsp possible move to irq as depends on tricore_csa2addr

Signed-off-by: buxiasen <buxiasen@xiaomi.com>
2025-01-06 23:03:05 +08:00
buxiasen
7a0ea108f6 arch/arm-m: add api getpsp, for exception direct case
For exception_direct causing unwind to read NULL and breaks thread backtrace.

Signed-off-by: buxiasen <buxiasen@xiaomi.com>
2025-01-06 23:03:05 +08:00
buxiasen
9bdcc4dc4b arch/irq.h: update all inline to inline_function
Inline & inline_function both used make confuze, let's modify all inline
in irq.h to inline_function, also clear the always_inline_funcion
declaration.

Signed-off-by: buxiasen <buxiasen@xiaomi.com>
2025-01-06 23:03:05 +08:00
Kevin Zhou
1bc2e1a175 xtensa/esp32s3: set cpuint to initial value after deallocate 2025-01-06 22:57:14 +08:00
Yanfeng Liu
ae26129e6e stm32ldiscovery/chrono: add CONFIG_SLCD
This is to unblock CI check,
https://github.com/apache/nuttx/actions/runs/12628628318/job/35185115826

following suggestion per:
https://github.com/apache/nuttx/pull/15423#pullrequestreview-2530760373

Signed-off-by: Yanfeng Liu <p-liuyanfeng9@xiaomi.com>
2025-01-06 22:11:54 +08:00
Yanfeng Liu
5f1a2696b3 board/qemu-armv7a: add board_power_off
This allows to power off qemu-armv7a target via NSH `quit` command.

Signed-off-by: Yanfeng Liu <p-liuyanfeng9@xiaomi.com>
2025-01-06 22:11:54 +08:00
Ritvik
3e6649856b Fix Overlap Handling in sim_copyfullstate to Prevent Undefined Behavior 2025-01-06 08:19:04 +08:00
hujun5
4d63921f0a use atomic operation for g_system_ticks
Signed-off-by: hujun5 <hujun5@xiaomi.com>
2025-01-05 12:01:16 +08:00
wangzhi16
bbaf1ff9fd use small lock in following files:
arch/arm64/src/a64/a64_twi.c
arch/arm64/src/imx9/imx9_gpioirq.c
arch/arm64/src/imx9/imx9_lpi2c.c
arch/arm64/src/imx9/imx9_usbdev.c
arch/arm64/src/imx9/imx9_usdhc.c

Signed-off-by: wangzhi16 <wangzhi16@xiaomi.com>
2025-01-04 22:43:20 -03:00
Tiago Medicci Serrano
7c24ef438e risc-v/qemu-rv: Initialize the userleds without late initialization
If CONFIG_BOARD_LATE_INITIALIZE is not selected, the userleds will
not be initialized. The userled initialization is not required to
be done within board_late_initialize(), thus this commit enables
initializing it in board_app_initialize() too.
2025-01-04 01:30:41 +08:00
wangmingrong1
2c5d849e01 gcov.py: Supports parsing multiple sets of gcov outputs at the same time and merging the results
Use the "-a" parameter to pass in gcda files exported by multiple devices

Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com>
2025-01-03 21:15:28 +08:00
wangmingrong1
66e074ed97 gcov: add reboot gcov storage coverage info
Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com>
2025-01-03 21:15:04 +08:00
cuiziwei
781c27a98e sim/oneshot: Remove redundant variables.
Signed-off-by: cuiziwei <cuiziwei@xiaomi.com>
2025-01-03 21:12:41 +08:00
wangjianyu3
6020cdb816 esp32s3-devkit/adb: ADB shell service depends on SCHED_CHILD_STATUS
Log

  $ adb -s 1234 shell
  error: closed

  # BULK out
  0000   4f 50 45 4e cb 71 06 00 00 00 00 00 07 00 00 00   OPEN.q..........
  0010   52 02 00 00 b0 af ba b1                           R.......

  # BULK out
  0000   73 68 65 6c 6c 3a 00                              shell:.

  # BULK in
  0000   43 4c 53 45 00 00 00 00 cb 71 06 00 00 00 00 00   CLSE.....q......
  0010   00 00 00 00 bc b3 ac ba                           ........

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2025-01-03 21:12:20 +08:00
p-szafonimateusz
f0137d51a3 drivers/serial: simplify 16550_PCI_UARTx_CLOCK config
drivers/serial: simplify 16550_PCI_UARTx_CLOCK config

Signed-off-by: p-szafonimateusz <p-szafonimateusz@xiaomi.com>
2025-01-03 08:52:43 +08:00
p-szafonimateusz
9f93621b90 libs/libc/gdbstub/lib_gdbstub.c: fix warning
libs/libc/gdbstub/lib_gdbstub.c: fix warning

Signed-off-by: p-szafonimateusz <p-szafonimateusz@xiaomi.com>
2025-01-03 08:52:32 +08:00
p-szafonimateusz
6f9d0c97d2 libs/libc/gdbstub/lib_gdbstub.c: fix format for trap response
fix gdb crash after a few step breakpoints because trap is not correctly reported

Signed-off-by: p-szafonimateusz <p-szafonimateusz@xiaomi.com>
2025-01-03 08:52:32 +08:00
Tiago Medicci Serrano
6b1be7c66c virtio-rng: Register /dev/urandom driver if CONFIG_DEV_URANDOM=y
Virtio RNG support (CONFIG_DRIVERS_VIRTIO_RNG=y) selects
CONFIG_ARCH_HAVE_RNG. On the other hand, if CONFIG_DEV_URANDOM=y,
it defaults to CONFIG_DEV_URANDOM_ARCH if CONFIG_ARCH_HAVE_RNG=y.
DEV_URANDOM_ARCH definition states that the implementation of the
/dev/urandom should be provided by the architecture-specifig logic,
including the function devurandom_register(). In this case, the
/dev/urandom may refer to the same driver as /dev/random that is
provided by the Virtio RNG driver, which is implemented by this
commit.
2025-01-03 08:52:20 +08:00
wangzhi16
893c5e92c2 Reduce the size of tcb by four bytes.
Signed-off-by: wangzhi16 <wangzhi16@xiaomi.com>
2025-01-02 23:18:42 +08:00
Zhe Weng
3b26c6df51 net/udp: Let cansend return EWOULDBLOCK when send buffer is full
Notes:
1. This commit do the same thing as TCP did: https://github.com/apache/nuttx/pull/10627
2. UDP uses `iob_navail(false)` but TCP uses `iob_navail(true)`, this is because of a problem related to TCP recv window (https://github.com/apache/nuttx/pull/4142), so we don't need to change UDP now.

Signed-off-by: Zhe Weng <wengzhe@xiaomi.com>
2025-01-02 23:13:39 +08:00
Yanfeng Liu
6fb12b0284 arch/qemu-armv7a: kernel mode cmake support
This allows to build kernel mode NuttX with cmake.

Signed-off-by: Yanfeng Liu <p-liuyanfeng9@xiaomi.com>
2025-01-02 23:13:07 +08:00
Filipe Cavalcanti
75aa80dba8 arch/xtensa: enable SPIRAM test during boot of ESP32|S3 2025-01-02 23:12:39 +08:00
p-szafonimateusz
eeef185558 arch/x86_64/include/intel64/irq.h: align definitions
align all definitions in intel64/irq.h

Signed-off-by: p-szafonimateusz <p-szafonimateusz@xiaomi.com>
2025-01-02 23:11:38 +08:00
p-szafonimateusz
cfaeb74dd3 arch/intel64: allow to attach handlers to ISR
arch/intel64: allow to attach handlers to ISR

Signed-off-by: p-szafonimateusz <p-szafonimateusz@xiaomi.com>
2025-01-02 23:10:14 +08:00
chenrun1
6f4f50e2fe v9fs/client.c:Use int ret as the return value to avoid uint32_t not supporting negative values
Summary:
 iModify the return variable in the v9fs_client_walk

Signed-off-by: chenrun1 <chenrun1@xiaomi.com>
2025-01-02 22:34:35 +08:00
chenrun1
1f540a93d2 v9fs/client.c:add check response.nwqid == nwname
Summary:
  There are differences in different server implementations, so it is necessary to check whether the returned nwqid satisfies the requested number.

Signed-off-by: chenrun1 <chenrun1@xiaomi.com>
2025-01-02 22:34:35 +08:00
chenrun1
2ac2d5d511 v9fs/client.c:fix struct attach wrong parameter size
Summary:
  Change uint16_t afid -> uint32_t afid in struct v9fs_attach_s
  See: https://github.com/chaos/diod/blob/master/protocol.md

Signed-off-by: chenrun1 <chenrun1@xiaomi.com>
2025-01-02 22:34:35 +08:00
chenrun1
928656f3cb v9fs/client.c:count should be assigned a value before being used
Summary:
  move request.count = buflen > fidp->iounit ? fidp->iounit : buflen
before request.header.size

Signed-off-by: chenrun1 <chenrun1@xiaomi.com>
2025-01-02 22:34:35 +08:00
liwenxiang1
1fad0f1654 arch/x86_64: this_task is stored in the CPU private data
By default in SMP, obtaining this_task requires disabling interrupts, obtaining the current CPU index, accessing a global variable, and re-enabling interrupts. Storing this_task in percpu makes retrieval faster.

Signed-off-by: liwenxiang1 <liwenxiang1@xiaomi.com>
2025-01-02 15:19:25 +08:00
Bowen Wang
6485093277 rpproxy_virtio/rpserver_virtio: fix the compile error
1. Change the CONFIG_RPMSG_VIRTIO to CONFIG_RPMSG_VIRTIO_LITE
2. fix the error when modify the sim_rpmsg_virtio to port to
rpsmg_virtio_lite;

Signed-off-by: Bowen Wang <wangbowen6@xiaomi.com>
2024-12-31 18:01:47 +08:00
Huang Qi
6eb2f33278 arch/risc-v: inline up_cpu_index if RISCV_PERCPU_SCRATCH is not enabled
Inline the short function to provide better performance.

Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2024-12-31 04:02:22 -03:00