Commit graph

55366 commits

Author SHA1 Message Date
ligd
f7f8f6c104 rpmsg_socket: add shutdown support
Signed-off-by: ligd <liguiding1@xiaomi.com>
2024-10-09 08:36:19 +08:00
yinshengkai
6ce7b70a3a note: change sched_note_counter to a macro
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2024-10-09 02:51:23 +08:00
wangmingrong1
ba05a36eed board_reset: flush cache before reset
Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com>
2024-10-09 02:30:21 +08:00
yintao
583dd00034 net/rpmsg: add SO_SNDBUF and SO_RCVBUF support
Signed-off-by: yintao <yintao@xiaomi.com>
2024-10-09 02:22:02 +08:00
ligd
6dc08ee681 pci: fix compile failed, fdt_get_reg_base() need 3 args
goldfish: fix compile failed, fdt_get_irq_by_path() need 4 args

Signed-off-by: ligd <liguiding1@xiaomi.com>
2024-10-09 02:18:49 +08:00
Bowen Wang
ba18f87a9e devicetree/fdt: fix fdt_get_reg_size() get wrong size
Signed-off-by: Bowen Wang <wangbowen6@xiaomi.com>
Signed-off-by: ligd <liguiding1@xiaomi.com>
2024-10-09 02:18:49 +08:00
zhengyu9
323e2518d9 drivers/devicetree/fdt: get 'reg' property
Original code can only deal with single 'address & size' cell
Add function dealing with multiple 'address & size' cell
Add function getting 'bankwidth' property, for cfi-flash device

Signed-off-by: zhengyu9 <zhengyu9@xiaomi.com>
Signed-off-by: ligd <liguiding1@xiaomi.com>
2024-10-09 02:18:49 +08:00
liwenxiang1
cd03ec3266 arch/x86_64:Add check stack function
Signed-off-by: liwenxiang1 <liwenxiang1@xiaomi.com>
2024-10-09 01:53:09 +08:00
liwenxiang1
afe1cc59b6 arch/x86_64: Add vfork support
Signed-off-by: liwenxiang1 <liwenxiang1@xiaomi.com>
2024-10-09 01:41:35 +08:00
fangxinyong
f2cc9e8410 fs: support VFS-based named event group
This extension for the event group, to establish a connection between
named event groups and a task. The task may reference the event group
associated with a VFS-based name. Then the event group can be used
in subsequent calls to nxevent_wait() or nxevent_post().

This is an internal OS interface and should not be used by applications.

Signed-off-by: fangxinyong <fangxinyong@xiaomi.com>
2024-10-09 01:40:00 +08:00
ouyangxiangzhen
c0ae6525c4 sched/signal: Fix compilation errors for MSVC.
This commit removed empty struct to fix compilation errors for the MSVC compiler.

Signed-off-by: ouyangxiangzhen <ouyangxiangzhen@xiaomi.com>
2024-10-09 01:36:39 +08:00
cuiziwei
39576af753 libcxxabi: Optimize cxx code size
enable LIBSUPCXX:
text data bss dec hex filename
93080 592 5472 99144 18348 nuttx/nuttx

enable LIBCXXABI:
before:
text data bss dec hex filename
126468 352 5960 132780 206ac nuttx/nuttx

after:
text data bss dec hex filename
68048 352 5960 74360 12278 nuttx/nuttx

Summary:
Optimize text segment code size by about 46%.

Signed-off-by: cuiziwei <cuiziwei@xiaomi.com>
2024-10-09 01:35:13 +08:00
likun17
a9c1684a1e usensor.c:fix container_of member error.
Signed-off-by: likun17 <likun17@xiaomi.com>
2024-10-09 01:33:19 +08:00
buxiasen
d6348d85f0 board/opensbi: exclude procfs/memdump to save .data size
Signed-off-by: buxiasen <buxiasen@xiaomi.com>
2024-10-08 23:55:59 +08:00
buxiasen
6e057f5e62 board/mcuboot: exclude procfs/memdump to save .text size
Signed-off-by: buxiasen <buxiasen@xiaomi.com>
2024-10-08 23:55:59 +08:00
xuxingliang
74725b9412 procfs: access tcb in critical section
Signed-off-by: xuxingliang <xuxingliang@xiaomi.com>
2024-10-08 23:55:59 +08:00
buxiasen
8def44b65a mm/dump: pretty the log and thin dump call
Signed-off-by: buxiasen <buxiasen@xiaomi.com>
2024-10-08 23:55:59 +08:00
anjiahao
fb176c02ca gdb/thread.py:Remove dependence on g_current_regs
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2024-10-08 23:55:59 +08:00
buxiasen
067ec7bab1 fs/procfs: fix cmake no mm_pressure, fix kernel build error
Signed-off-by: buxiasen <buxiasen@xiaomi.com>
2024-10-08 23:55:59 +08:00
anjiahao
60aa08e365 procfsmeminfo:move heap name to last,avoid display misalignment
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2024-10-08 23:55:59 +08:00
buxiasen
9f2b08a91a memdump: add dump for the orphan nodes(neighbor of free node)
Signed-off-by: buxiasen <buxiasen@xiaomi.com>
2024-10-08 23:55:59 +08:00
buxiasen
fd9a9f67cc memdump: add biggest allocated node dump
Signed-off-by: buxiasen <buxiasen@xiaomi.com>
2024-10-08 23:55:59 +08:00
buxiasen
fd6634ecb5 mm/dump: make macro more common, fix help prompt
Signed-off-by: buxiasen <buxiasen@xiaomi.com>
2024-10-08 23:55:59 +08:00
wangmingrong1
1fdb3f5107 notesnap_driver.c: modify struct notesnap_s member type
clang atomic no support other type:
modify .index type size_t --- atomic_int
modify .dumping type bool --- atomic_bool

Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com>
2024-10-08 23:48:32 +08:00
yezhonghui
c90b654598 release msi/msix irq clean capability struct
Signed-off-by: yezhonghui <yezhonghui@xiaomi.com>
2024-10-08 23:47:45 +08:00
xuxingliang
b7824264f6 sched: optimize deadlock detection readability
Use meaningful variable names.

Signed-off-by: xuxingliang <xuxingliang@xiaomi.com>
2024-10-08 23:35:01 +08:00
anjiahao
97425687cf deadlock:fix find deadlock bug
bug:
  thread 1: get mutexA
            wait a sem

  thread 2: wait mutexA

  This situation will be mistakenly judged as a deadlock.

Signed-off-by: anjiahao <anjiahao@xiaomi.com>
Signed-off-by: xuxingliang <xuxingliang@xiaomi.com>
2024-10-08 23:35:01 +08:00
anjiahao
3d69dbe1c8 deadlock:fix bug,When holder is -1 need stop search next
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2024-10-08 23:35:01 +08:00
wangshaoxin
6feec8e4c5 rpmsg_port.c:add rpmsg_port_dump function
[01/01 00:02:48] [187] [ EMERG] [ap] Remote: wit
[01/01 00:02:48] [187] [ EMERG] [ap] ept NS
[01/01 00:02:48] [187] [ EMERG] [ap] ept rpmsg-sensor
[01/01 00:02:48] [187] [ EMERG] [ap] ept rpmsg-ping
[01/01 00:02:48] [187] [ EMERG] [ap] rpmsg_port queue RX: {used: 0, avail: 5}
[01/01 00:02:48] [187] [ EMERG] [ap] rpmsg buffer list:
[01/01 00:02:48] [187] [ EMERG] [ap] rpmsg_port queue TX: {used: 4, avail: 0}
[01/01 00:02:48] [187] [ EMERG] [ap] rpmsg buffer list:
[01/01 00:02:48] [187] [ EMERG] [ap]  TX buffer 0x619b84a8 hold by rpmsg-ping
[01/01 00:02:48] [187] [ EMERG] [ap]  TX buffer 0x619b86a8 hold by rpmsg-ping
[01/01 00:02:48] [187] [ EMERG] [ap]  TX buffer 0x619b88a8 hold by rpmsg-ping
[01/01 00:02:48] [187] [ EMERG] [ap]  TX buffer 0x619b8aa8 hold by rpmsg-ping

Signed-off-by: wangshaoxin <wangshaoxin@xiaomi.com>
2024-10-08 23:34:50 +08:00
Yongrong Wang
f93688cbd5 openamp/Kconfig: add CONFIG_OPENAMP_ENABLE_VIRTIO_ONLY to enable virtio only
OPENAMP_VIRTIO_DEVICE_ONLY and OPENAMP_VIRTIO_DRIVER_ONLY can be used to
comment some unused code in OpenAMP library to save code size.

Signed-off-by: Yongrong Wang <wangyongrong@xiaomi.com>
Signed-off-by: Bowen Wang <wangbowen6@xiaomi.com>
2024-10-08 23:34:50 +08:00
Xiang Xiao
815c9c464a openamp: Refine elf_load to remoteproc_elf_loader
to avoid the name conflict with binfmt elf loader

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2024-10-08 23:34:50 +08:00
Xiang Xiao
6b0c22c775 openamp: Merge OPENAMP_RPMSG_DEBUG and OPENAMP_VQUEUE_DEBUG into OPENAMP_DEBUG
to simplify the configuration

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2024-10-08 23:34:50 +08:00
xuxingliang
3a86098c9e fs: fix compile break
/home/neo/projects/vela/nuttx/fs/vfs/fs_dup2.c: In function 'file_dup3':
/home/neo/projects/vela/nuttx/fs/inode/inode.h:73:35: error: implicit declaration of function '_SCHED_GETTID' [-Werror=implicit-function-declaration]
   73 |           int n = sched_backtrace(_SCHED_GETTID(), \
      |                                   ^~~~~~~~~~~~~
/home/neo/projects/vela/nuttx/fs/vfs/fs_dup2.c:177:3: note: in expansion of macro 'FS_ADD_BACKTRACE'
  177 |   FS_ADD_BACKTRACE(filep2);

Signed-off-by: xuxingliang <xuxingliang@xiaomi.com>
2024-10-08 23:24:13 +08:00
Xu Xingliang
f51a9d5ac5 drivers/fb: use ENOTTY to replace assert
Some drivers may not implement certain ioctls, but applications
may still call these ioctl functions for consistency.
In this case, to avoid an assertion, return ENOTTY.

Signed-off-by: Xu Xingliang <xuxingliang@xiaomi.com>
2024-10-08 23:23:26 +08:00
jianglianfang
7db5e6bdb0 driver: add GOLDFISH_GPU_FB_PRIORITY for goldfish_gpu_fb_vsync_thread
We need to configure the priority of FB Vsync thread to prevent nxcamera from preempting scheduling without sleep, which currently causes issues with Goldfish x86_64's default FIFO scheduling.

Signed-off-by: jianglianfang <jianglianfang@xiaomi.com>
2024-10-08 23:23:08 +08:00
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