Commit Graph

55531 Commits

Author SHA1 Message Date
fangxinyong d63056bd72 fs/semaphore: fix a minor issue with goto label
Signed-off-by: fangxinyong <fangxinyong@xiaomi.com>
2024-10-08 23:21:54 +08:00
Xu Xingliang b75412d96a libc/base64: check buffer overflow for last char
Signed-off-by: Xu Xingliang <xuxingliang@xiaomi.com>
2024-10-08 22:33:19 +08:00
Xu Xingliang 4ed506d6ab board/coredump: add option to use base64 stream
Signed-off-by: Xu Xingliang <xuxingliang@xiaomi.com>
2024-10-08 22:33:19 +08:00
Xu Xingliang 64e3a1fa0b libc/stream: add base64 encoded stream output
Signed-off-by: Xu Xingliang <xuxingliang@xiaomi.com>
2024-10-08 22:33:19 +08:00
Xu Xingliang 127527acf6 libc/stream: increase nput in hexdumpstream
Signed-off-by: Xu Xingliang <xuxingliang@xiaomi.com>
2024-10-08 22:33:19 +08:00
zhangjun21 16124b0926 fix snprintf truncation warnings
gcc7.1 adds truncation warning, netdev_ifconf.c fix snprintf truncation warnings

Signed-off-by: zhangjun21 <zhangjun21@xiaomi.com>
2024-10-08 22:31:32 +08:00
daichuan c32c8da761 fix compile warning with implicit declaration of function 'icmp_reply'
Signed-off-by: daichuan <daichuan@xiaomi.com>
2024-10-08 22:30:11 +08:00
daichuan eebe18b802 fix compile warning with ipt_sockopt.c and ip6t_sockopt.c: implicit declaration of function 'popcount'
Signed-off-by: daichuan <daichuan@xiaomi.com>
2024-10-08 22:30:11 +08:00
chenrun1 d154755729 files_getlist:Handling the situation when tcb's grouplist is empty
Summary:
  When the device reboot through reboot_notify to notify the task fsync time, if there is a task in the exit process, there may be priority robbed off the phenomenon, and at this time the group->tg_filelist crefs has been 0, resulting in the ASSERT

Signed-off-by: chenrun1 <chenrun1@xiaomi.com>
2024-10-08 22:29:29 +08:00
Jouni Ukkonen b4de080b1f usbdev/cdcacm: Fix read queue counter in shutdown
nrdq is already set 0 in resetconfig.

Signed-off-by: Jouni Ukkonen <jouni.ukkonen@unikie.com>
2024-10-08 22:28:51 +08:00
chenrun1 58044e3026 fs_open:Adjust the definition of the open path
Summary:
  Reference https://man7.org/linux/man-pages/man2/open.2.html
       EISDIR pathname refers to a directory and the access requested
              involved writing (that is, O_WRONLY or O_RDWR is set).

Signed-off-by: chenrun1 <chenrun1@xiaomi.com>
2024-10-08 22:21:33 +08:00
buxiasen 846cb7d432 board/arm/stm32: highpri up_interrupt_context to is_nesting_interrupt
up_interrupt_context indicates that we self inside interrupt/handler mode,
replaced to private function is_nesting_interrupt to make less confused.

Signed-off-by: buxiasen <buxiasen@xiaomi.com>
2024-10-08 21:22:30 +08:00
buxiasen 7cb9b07802 board/arm/nrf52: fix use up_interrupt_context to is_nesting_interrupt
The case want to determine if a interrupt with higher priority and the
interrupt preemption occurred, but up_interrupt_context indicates that we
self inside interrupt/handler mode. As we previously did not handle the
ramvector interrupt correctly, after update breaked the case. We should
use a more clear private function is_nesting_interrupt.

Signed-off-by: buxiasen <buxiasen@xiaomi.com>
2024-10-08 21:22:30 +08:00
raiden00pl 60549d3572 boards/stm32f7/stm32f746g-disco: fix FMC pin
during migration from legacy pinout some of the FMC pins were ommited because
their names were identical to the new pinout, which didn't cause a compilation error.

This fixes LCD examples.

Also update incomplete stm32f769i-disco FMC support to avoid this kind of bug in the future
2024-10-08 21:21:49 +08:00
anjiahao 4ac2a5a5ba compiler:add visibility & constructor keywords in compiler.h
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2024-10-08 19:56:33 +08:00
anjiahao e9e01506d3 dlcn:need select MODULES when compile
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2024-10-08 19:56:33 +08:00
anjiahao 9ed93c6b1e unify MODULE & ELF flag to Toolchain.defs
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2024-10-08 19:56:33 +08:00
Ville Juven e5aef873a2 riscv_internal.h: Remove riscv_sbi.h from the file
riscv_internal.h is used literally everywhere, while the SBI definitions
are needed only by whomever needs the services.

Having the SBI definitions:
a) Copied from OpenSBI (why has this been done? even the names are same)
b) Presented publicly to 99% of risc-v modules

creates a build error when building with OpenSBI, due to duplicate
definitions of the SBI service identifiers:

In file included from /nuttx/arch/risc-v/src/common/riscv_internal.h:40,
                 from /nuttx/arch/risc-v/src/chip/chip.h:32,
                 from board/mpfs_domain.c:30:
/nuttx/arch/risc-v/src/common/riscv_sbi.h:36: error: "SBI_EXT_BASE" redefined [-Werror]
   36 | #define SBI_EXT_BASE            0x00000010

and so forth...

Fix this by removing riscv_sbi.h i.e. not exposing the ABI publicly.
2024-10-08 19:55:53 +08:00
yinshengkai f26ae83900 arch/irq: add the up_getusrpc macro to get the PC of the interrupted thread in the interrupt
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
Signed-off-by: ligd <liguiding1@xiaomi.com>
2024-10-08 19:55:28 +08:00
anjiahao 6382b02d2b zipfs:zipfs not need mtd drivers
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2024-10-08 19:55:09 +08:00
wangmingrong1 55c9697efe mm/kconfig: The default alignment of global variable out-of-bounds detection is 1
It is recommended to use 1 on qemu and 16 or even 32 on the device.

Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com>
2024-10-08 19:53:38 +08:00
zhanghongyu 948d51cd67 e1000: add polling mode support for tx/rx
In scenarios that require high time accuracy, we do not want an
interrupt from the NIC to interrupt the current task, so add support
for polling mode.

Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2024-10-08 13:15:31 +02:00
Bowen Wang 064eb5fd35 rpmsg services: should release the tx buffer when rpmsg_send_nocopy failed
Otherwise, the tx buffer will be discarded and can no longer be obtained

Signed-off-by: Bowen Wang <wangbowen6@xiaomi.com>
2024-10-08 18:26:39 +08:00
lipengfei28 fa5fef2b95 pci: msi and msix irq need release irq
Signed-off-by: lipengfei28 <lipengfei28@xiaomi.com>
2024-10-08 18:04:13 +08:00
wangmingrong1 b0581b7a46 cmake/multiple link: cmake supports multiple link global variables out of bounds
1. Modify the original symbol table cmake file, the same as the cmake file for multiple links
2. Added global variable out-of-bounds detection shadow area multiple linking process

Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com>
2024-10-08 16:55:45 +08:00
wangmingrong1 447a73003c cmake/allsyms: Generate empty files using scripts instead of implementing them within cmake files
The function of generating an empty symbol table has been implemented in tools/mkallsyms.py. Makefile is implemented in python script. Cmake needs to be consistent with Makefile.

Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com>
2024-10-08 16:55:45 +08:00
zhangyuan29 651a5e6afa sched/signal: change pthread_exit to nx_pthread_exit
In protected build, kernel cannot call usersapce interface.

1. change pthread_exit to nx_pthread_exit.
2. add kernel tls cleanup.

Signed-off-by: zhangyuan29 <zhangyuan29@xiaomi.com>
2024-10-08 16:53:21 +08:00
hujun5 99b364c880 x86_64: fix regression
This commit fixes the regression from https://github.com/apache/nuttx/pull/13768

Signed-off-by: hujun5 <hujun5@xiaomi.com>
2024-10-08 15:27:57 +08:00
buxiasen a6b12eb29c goldfinsh: fix timer compile issue
Signed-off-by: buxiasen <buxiasen@xiaomi.com>
2024-10-08 15:27:33 +08:00
ligd e7094ec40a goldfish: use goldfish timer
Signed-off-by: ligd <liguiding1@xiaomi.com>
2024-10-08 15:27:33 +08:00
ligd 39bfdb95e1 timers: add goldfish timer support
Signed-off-by: ligd <liguiding1@xiaomi.com>
2024-10-08 15:27:33 +08:00
buxiasen 0b3859521a arch: fix the sched parameter update when exiting
Signed-off-by: buxiasen <buxiasen@xiaomi.com>
2024-10-08 13:53:06 +08:00
Xiang Xiao 4e5a963443 drivers/net: Register "/dev/net/tun" as tun node too
to compatible with Linux convention

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2024-10-08 11:16:01 +08:00
Xiang Xiao 77821fb7eb net: Remove IFF_DOWN flag to compatible with Linux/*BSD
turn off interface by checking IFF_UP flag isn't set:
https://github.com/apache/nuttx/issues/1838

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2024-10-08 10:15:16 +08:00
Bowen Wang 4df19fd6c5 rpmsgfs/rpmsgfs_client: init the priv->wait before register rpmsg callback
Should init the priv->wait before rpmsg_register_callback() because
rpmsgfs_ns_bound() may has been called before rpmsg_register_callback()
returned.

Signed-off-by: Bowen Wang <wangbowen6@xiaomi.com>
2024-10-08 09:00:12 +08:00
fangzhenwei 51623d1751 rpmsgfs: add tty fd ioctl(TCGETS/TCSETS) support
rpmsgfs client ioctl support TCDRN/TCFLSH/TCGETS/TCSETS

Signed-off-by: fangzhenwei <fangzhenwei@xiaomi.com>
2024-10-08 09:00:12 +08:00
Bowen Wang 9b736c1c27 rpmsgfs_server: add error log for rpmsgfs server ept callback
Because the rpmsg_virtio will assert when endpoint callback return
error, so add more error log to the rpmsgfs server to help to locate
the root cause.

Signed-off-by: Bowen Wang <wangbowen6@xiaomi.com>
2024-10-08 09:00:12 +08:00
ligd 057e608bb8 rpmsgfs: remove memcpy in rpmsgfs open/close
improve the rpmsgfs performance

Signed-off-by: ligd <liguiding1@xiaomi.com>
2024-10-08 09:00:12 +08:00
ligd 07b27cd199 sched: swap setting for g_npidhash
in case of crash in kmm_zalloc, and crash dump use
nxsched_foreach()

Signed-off-by: ligd <liguiding1@xiaomi.com>
2024-10-08 08:59:39 +08:00
ligd aff700f8ca timer: set g_timer.lower after TIMER_START()
in case of up_perf_gettime() get non-start value

Signed-off-by: ligd <liguiding1@xiaomi.com>
2024-10-08 08:59:39 +08:00
zhangwenjian 869271f5b8 drivers/note: suport rpmsg transfer channel for note,some note api
need to adapte for rpmsg.

We can transfer note content through rpmsg

Signed-off-by: zhangwenjian <zhangwenjian@xiaomi.com>
2024-10-08 08:58:43 +08:00
xuxingliang 33a8760a14 arch/sim: fix uart could lose log
Need to loop to write untill all data written or error happened

Signed-off-by: xuxingliang <xuxingliang@xiaomi.com>
2024-10-08 08:57:28 +08:00
Xiang Xiao 904bb7a6ea arch/sim: dataheap should disable exec permission
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2024-10-08 08:57:28 +08:00
yinshengkai bdcc325e1f sim/gcov: Fix conflicts between fprofile-orderate and __asan_default_options
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2024-10-08 08:57:28 +08:00
yinshengkai acca2430a9 Revert "arch/sim: suppress libasan checks"
This reverts commit 53ddc3ef7f

Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
Signed-off-by: ligd <liguiding1@xiaomi.com>
2024-10-08 08:57:28 +08:00
ligd a3568af105 sim: fix context-switch when do wdog callback()
Signed-off-by: ligd <liguiding1@xiaomi.com>
2024-10-08 08:57:28 +08:00
ligd ba3a55b445 cache: do cache_invalidate_all before enable dcache
Signed-off-by: ligd <liguiding1@xiaomi.com>
2024-10-08 08:15:41 +08:00
Bowen Wang e8467a9bd5 fdt_virtio_mmio: bug fix, should not return when ret == -ENODEV
-ENODEV is a normal error code for function virtio_register_mmio_device()
because the virtio device is not must be in the mmio register address

Signed-off-by: Bowen Wang <wangbowen6@xiaomi.com>
2024-10-08 08:15:00 +08:00
Bowen Wang e83c7aba1c devicetree/fdt_virtio_mmio: implement the fdt_virtio_mmio_devices_register()
So the borad level do not need implement the
register_virtio_devices_from_fdt() again and again.

Signed-off-by: Bowen Wang <wangbowen6@xiaomi.com>
2024-10-08 08:15:00 +08:00
Michal Lenc dc6f406e7f documentation/inotify: add newly supported events
IN_CLOSE_WRITE and IN_CLOSE_NOWRITE are now supported and IN_MODIFY
can be used for truncate as well.

Signed-off-by: Michal Lenc <michallenc@seznam.cz>
2024-10-08 08:14:19 +08:00