Commit graph

55644 commits

Author SHA1 Message Date
anjiahao
e9550783d3 modlib:add new api to uninitialize modp
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2024-10-12 12:29:06 +08:00
anjiahao
91c7e8e44b modlib:move Exception section logic to modlib
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2024-10-12 12:29:06 +08:00
anjiahao
dfc5e4dd55 modlib:Move addrenv logic to modlib
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2024-10-12 12:29:06 +08:00
anjiahao
52126aede1 coredump:Move coredump to sched/misc
1. move coredump form libelf to sched/misc
2. rename core_dump to coredump

Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2024-10-12 12:29:06 +08:00
anjiahao
9e868cadfb coredump:Move private functions to internal header files
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2024-10-12 12:29:06 +08:00
anjiahao
4ec4c5e1b4 modlib:fix bug when read modlib sections name
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2024-10-12 12:29:06 +08:00
anjiahao
489223f0d5 modlib:move get file info logic to modlib
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2024-10-12 12:29:06 +08:00
anjiahao
18d113e06e modlib:move elf LMA logic to modlib
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2024-10-12 12:29:06 +08:00
anjiahao
ae4538646b modlib:Modify modlib loading DYN elf file conditions
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2024-10-12 12:29:06 +08:00
wangyongrong
24b0fa0072 pci.h: add pci_write/read_mmio_qword support
1. optimize the macro, add () for the marco arguments;
2. add pci_write_mmio_qword() and pci_read_mmio_qword() api;

Signed-off-by: wangyongrong <wangyongrong@xiaomi.com>
2024-10-12 12:16:25 +08:00
wangxiaoxin
1b8c17ff15 add lin error flags to lin.h
Signed-off-by: wangxiaoxin <wangxiaoxin@xiaomi.com>
2024-10-12 12:15:58 +08:00
wangyongrong
ad2e6fb2ba pci_ivshmem.c: ivshmem_support_irq API support
ivshmem based driver can use this api to judge weather current
ivshmem device support irq or not, and use polling mode or irq
mode to process the event.

Signed-off-by: wangyongrong <wangyongrong@xiaomi.com>
2024-10-12 12:13:23 +08:00
Bowen Wang
99b6c77c79 drivers/rptun: minor fix about rptun
1. follow the nxstyle, change formot of rptun_init();
2. remove used wqueue header file;

Signed-off-by: Bowen Wang <wangbowen6@xiaomi.com>
2024-10-12 12:12:00 +08:00
cuiziwei
57e901e5ea nuttx/arch: Enabling ARCH_MATH_H is required when compiling sim with the 13.2 version of the toolchain.
Signed-off-by: cuiziwei <cuiziwei@xiaomi.com>
2024-10-12 12:05:05 +08:00
zhanghongyu
6f9543daec sim: fix crash caused by function recursion.
114 up_interrupt_context () at /home/zhhyu/source/vela/dev/nuttx/include/arch/irq.h:163
115 stack_monitor_enter (this_fn=0x400145dc <up_current_regs>, call_site=0x4002d5c7 <__cyg_profile_func_enter+120>, arg=0x0) at instrument/stack_monitor.c:63
116 0x000000004002d5c7 in __cyg_profile_func_enter (this_fn=0x400145dc <up_current_regs>, call_site=0x4002d5c7 <__cyg_profile_func_enter+120>) at misc/lib_instrument.c:68
117 0x00000000400156c7 in up_current_regs () at instrument/stack_monitor.c:62
118 up_interrupt_context () at /home/zhhyu/source/vela/dev/nuttx/include/arch/irq.h:163
119 stack_monitor_enter (this_fn=0x400145dc <up_current_regs>, call_site=0x4002d5c7 <__cyg_profile_func_enter+120>, arg=0x0) at instrument/stack_monitor.c:63
120 0x000000004002d5c7 in __cyg_profile_func_enter (this_fn=0x400145dc <up_current_regs>, call_site=0x4002d5c7 <__cyg_profile_func_enter+120>) at misc/lib_instrument.c:68
121 0x00000000400156c7 in up_current_regs () at instrument/stack_monitor.c:62
...

Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2024-10-12 11:49:18 +08:00
cuiziwei
eb4d1a14b3 nuttx/libcxxtest: Fix build error.
libcxx/src/thread.cpp:123:2: error: #error "Thread.cpp needs to enable config of CONFIG_TLS_TASK_NELEM," " and CONFIG_TLS_TASK_NELEM > 0, please enable it"
  123 | #error "Thread.cpp needs to enable config of CONFIG_TLS_TASK_NELEM," \
      |  ^~~~~

Signed-off-by: cuiziwei <cuiziwei@xiaomi.com>
2024-10-12 11:48:44 +08:00
liwenxiang1
43a8a80c74 arch/x86_64:Code style is consistent
Signed-off-by: liwenxiang1 <liwenxiang1@xiaomi.com>
2024-10-12 11:20:24 +08:00
chao an
5aa13bc490 sched/spinlock: remove nesting spinlock support
developers must be careful to hold spinlocks and ensure all
of protected code is under control, so remove support for nested
spinlocks to improve performance.

Signed-off-by: chao an <anchao@lixiang.com>
2024-10-12 11:18:10 +08:00
hujun5
302d2f3b56 x86_64: align some code
Signed-off-by: hujun5 <hujun5@xiaomi.com>
2024-10-12 10:19:48 +08:00
Neo Xu
49eee3841c stm32f429i-disco/systemview: enable example of noteprintf
Also enable task name for better demo purpose.

Signed-off-by: Neo Xu <neo.xu1990@gmail.com>
2024-10-12 09:58:00 +08:00
xuxingliang
62f0126b06 drivers/segger: add note vprint support
Print note log to sysview terminal.

See https://www.segger.com/products/development-tools/systemview/#logging-output

Signed-off-by: xuxingliang <xuxingliang@xiaomi.com>
2024-10-12 09:58:00 +08:00
ligd
01676cb9cd local_socket: corrent send/recv return value after shutdown
Signed-off-by: ligd <liguiding1@xiaomi.com>
2024-10-12 09:57:20 +08:00
wangmingrong1
a5c0dbe772 mm/sw_tags: add config for no longer checking for tags 0
1. When dynamically loading, the read-only data of arm64 architecture is accessed through PC offset. When opening the tag kasan, because the PC value does not have a tag, accessing the read-only data will be detected with a tag mismatch error.
2. uninitial heap use 0xff poison, initial heap use 1-254 unpoison.

Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com>
2024-10-12 09:52:27 +08:00
Tim Hardisty
3027be72c3 Update sam_udphs.c 2024-10-12 09:51:19 +08:00
makejian
b27272936b nuttx/libc: mutex support to set default mode even configured with priority protect
Signed-off-by: makejian <makejian@xiaomi.com>
2024-10-12 09:50:54 +08:00
makejian
e8a890ef42 nuttx/syscall: export nxsem_getprioceiling and nxsem_setprioceiling via syscall
Signed-off-by: makejian <makejian@xiaomi.com>
2024-10-12 09:50:54 +08:00
buxiasen
ca45ad69bd misc: flush syslog before possible long time cost coredump
When coredump to mtd, it maybe cost lots of time, do flush syslog can
make user access all log when coredump processing, should be better.

Signed-off-by: buxiasen <buxiasen@xiaomi.com>
2024-10-12 09:32:44 +08:00
buxiasen
4b315b3606 mm: dump more information when failed dump detail
Signed-off-by: buxiasen <buxiasen@xiaomi.com>
2024-10-12 09:32:44 +08:00
anjiahao
c0d416584f malloc:if malloc filed need print leak memory detatls
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2024-10-12 09:32:44 +08:00
buxiasen
c4f82c1f66 drivers/timer: fix goldfish timer did not included in cmake
Signed-off-by: buxiasen <buxiasen@xiaomi.com>
2024-10-12 09:31:15 +08:00
buxiasen
9ea38368ad goldfish_timer: fix interrupt not cleared
will cause a loop interrupt handler, in some new version qemu

Signed-off-by: buxiasen <buxiasen@xiaomi.com>
2024-10-12 09:31:15 +08:00
ligd
3479622fec serial: use nxsig_tgkill instead of nxsig_kill
Caused nxsig_tgkill is for the one thread, nxsig_kill for the group

Signed-off-by: ligd <liguiding1@xiaomi.com>
2024-10-12 09:30:37 +08:00
lipengfei28
9f170a36e3 white list: add cJSON
Signed-off-by: lipengfei28 <lipengfei28@xiaomi.com>
2024-10-12 09:30:06 +08:00
ligd
5c29c18199 mm.h: remove depends on addrenv.h
Signed-off-by: ligd <liguiding1@xiaomi.com>
2024-10-12 09:29:37 +08:00
ligd
76e77ff184 assert: add header files to resolve compile failed
error: 'NULL' undecleard

Signed-off-by: ligd <liguiding1@xiaomi.com>
2024-10-12 09:29:37 +08:00
ligd
dae2a39443 sched: fix warning
sched/sched_sysinfo.c:55:19: warning: unused variable 'minfo' [-Wunused-variable]
   55 |   struct mallinfo minfo;
      |                   ^~~~~

Signed-off-by: ligd <liguiding1@xiaomi.com>
2024-10-12 09:29:37 +08:00
fangxinyong
55d7708fa0 boards/arm/qemu: enable kernel build for armv7a
See Documentation/platforms/arm/qemu/boards/qemu-armv7a/README.txt for details

Signed-off-by: fangxinyong <fangxinyong@xiaomi.com>
2024-10-12 09:28:45 +08:00
yanghuatao
323ee075be nuttx/qemu: Fix funciton up_idle multiple definition
Signed-off-by: yanghuatao <yanghuatao@xiaomi.com>
2024-10-12 09:28:45 +08:00
Tomasz 'CeDeROM' CEDRO
2c5091415e Contributing and PR template fix.
* Fix CONTRIBUTING.md github link reference.
* Full URL is provided to avoid relative/fork reference issues.
* Minor update on full contributing documentation.

Signed-off-by: Tomasz 'CeDeROM' CEDRO <tomek@cedro.info>
2024-10-12 08:12:05 +08:00
ligd
994e15710f goldfish: sync with qemu do rpmsg_syslog init at goldfish
Signed-off-by: ligd <liguiding1@xiaomi.com>
2024-10-11 22:42:34 +08:00
ligd
6e68dde445 sem: fix assert failed when open CONFIG_PRIORITY_INHERITANCE
set CONFIG_PRIORITY_INHERITANCE=y
set CONFIG_SEM_PREALLOCHOLDERS=0 or CONFIG_SEM_PREALLOCHOLDERS=8

    #24 0x4dcab71 in __assert assert/lib_assert.c:37
    #25 0x4d6b0e9 in nxsem_destroyholder semaphore/sem_holder.c:602
    #26 0x4d80cf7 in nxsem_destroy semaphore/sem_destroy.c:80
    #27 0x4d80db9 in sem_destroy semaphore/sem_destroy.c:120
    #28 0x4dcb077 in nxmutex_destroy misc/lib_mutex.c:122
    #29 0x4dc6611 in pipecommon_freedev pipes/pipe_common.c:117
    #30 0x4dc7fdc in pipecommon_close pipes/pipe_common.c:397
    #31 0x4ed4f6d in file_close vfs/fs_close.c:78
    #32 0x6a91133 in local_free local/local_conn.c:184
    #33 0x6a92a9c in local_release local/local_release.c:129
    #34 0x6a91d1a in local_subref local/local_conn.c:271
    #35 0x6a75767 in local_close local/local_sockif.c:797
    #36 0x4e978f6 in psock_close socket/net_close.c:102
    #37 0x4eed1b9 in sock_file_close socket/socket.c:115
    #38 0x4ed4f6d in file_close vfs/fs_close.c:78
    #39 0x4ed1459 in nx_close_from_tcb inode/fs_files.c:754
    #40 0x4ed1501 in nx_close inode/fs_files.c:781
    #41 0x4ed154a in close inode/fs_files.c:819
    #42 0x6bcb9ce in property_get kvdb/client.c:307
    #43 0x6bcd465 in property_get_int32 kvdb/common.c:270
    #44 0x5106c9a in tz_offset_restore app/miwear_bluetooth.c:745
    #45 0x510893f in miwear_bluetooth_main app/miwear_bluetooth.c:1033
    #46 0x4dcf5c8 in nxtask_startup sched/task_startup.c:70
    #47 0x4d70873 in nxtask_start task/task_start.c:134
    #48 0x4e04a07 in pre_start sim/sim_initialstate.c:52

Signed-off-by: ligd <liguiding1@xiaomi.com>
2024-10-11 21:34:37 +08:00
ligd
4409db4a87 sem: fix NULL pointer when open CONFIG_PRIORITY_INHERITANCE
set CONFIG_PRIORITY_INHERITANCE=y
set CONFIG_SEM_PREALLOCHOLDERS=0

semaphore/sem_holder.c:320:34: runtime error: member access within null pointer of type 'struct tcb_s'
    #0 0xd8b540 in nxsem_boostholderprio semaphore/sem_holder.c:320
    #1 0xd8c1cf in nxsem_boost_priority semaphore/sem_holder.c:703
    #2 0xda5dfa in nxsem_wait semaphore/sem_wait.c:145
    #3 0xda61d9 in nxsem_wait_uninterruptible semaphore/sem_wait.c:248
    #4 0x12f2477 in media_service_thread0 /home/ligd/platform/dev/apps/examples/hello/hello_main.c:44
    #5 0x1204154 in pthread_startup pthread/pthread_create.c:59
    #6 0x1cd906f in pthread_start pthread/pthread_create.c:139
    #7 0xe72fcb in pre_start sim/sim_initialstate.c:52

Signed-off-by: ligd <liguiding1@xiaomi.com>
2024-10-11 21:34:37 +08:00
yinshengkai
cac90afe79 Revert "sim/note: add note related configuration"
This reverts commit 154cb4a860.
2024-10-11 21:30:19 +08:00
liaoao
82ef95b6e2 rpmsg_port_spi_slave: fix compile error when enable RPMSG_PORT_SPI_SLAVE only
Signed-off-by: liaoao <liaoao@xiaomi.com>
2024-10-11 21:20:45 +08:00
wangmingrong1
de1701c235 mm/kconfig: Remove unnecessary dependencies
If MM_KASAN judgment already exists

Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com>
2024-10-11 20:01:46 +08:00
Bowen Wang
8eabad52fd mm/Kconfig: fix build error when MM_BACKTRACE > 0 and disable mempool
mempool is always be compiled, so when enable BACKTRACE but not enable
memdpool, the MM_HEAP_MEMPOOL_BACKTRACE_SKIP is not defined
mempool_add_backtrace() will compiled failed.

Signed-off-by: Bowen Wang <wangbowen6@xiaomi.com>
2024-10-11 19:59:26 +08:00
Bowen Wang
a1f3800a9d arm_gicv2_dump: optimize gic dump
1. Add config CONFIG_ARMV7A_GICv2_DUMP to control gic dump,
because irqinfo introduce too much other log;
2. Change the log api from irqinfo() to syslog(), syslog not
append the function name in the log, so the gic dump format
will not be destoried.

Signed-off-by: Bowen Wang <wangbowen6@xiaomi.com>
2024-10-11 19:56:41 +08:00
liwenxiang1
9eb7665822 arch/x86_64:Change extern g_intstackalloc to g_isrstackalloc
Signed-off-by: liwenxiang1 <liwenxiang1@xiaomi.com>
2024-10-11 19:55:50 +08:00
xuxingliang
b9adff0e90 libm/newlib: remove -Wno-maybe-uninitialized
Since there's no warning presents now.

Signed-off-by: xuxingliang <xuxingliang@xiaomi.com>
2024-10-11 19:52:52 +08:00
wangyongrong
933e066118 common/Toolchain.defs: support CONFIG_DEBUG_NOOPT for x86_64
Signed-off-by: wangyongrong <wangyongrong@xiaomi.com>
2024-10-11 17:21:06 +08:00