Commit graph

55606 commits

Author SHA1 Message Date
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
Bowen Wang
20db146b64 x86/x86_64: change the build result from nuttx.elf to nuttx
Just sync with other architecture.

Signed-off-by: Bowen Wang <wangbowen6@xiaomi.com>
2024-10-11 17:20:15 +08:00
lipengfei28
631b551727 goldfish add gicv2m support
Signed-off-by: lipengfei28 <lipengfei28@xiaomi.com>
2024-10-11 17:06:16 +08:00
lipengfei28
78a6ba6d5f PFU: do not cause execution of any instructions to be trapped
Signed-off-by: lipengfei28 <lipengfei28@xiaomi.com>
2024-10-11 17:04:28 +08:00
Bowen Wang
313d6df787 include/nuttx.h: replace all the align macros to nuttx version
1. add IS_ALIGNED()  definitions for NuttX;
2. replace all the ALIGN_UP() and ALIGN_DOWN() to use common
   align implementation;

Signed-off-by: Bowen Wang <wangbowen6@xiaomi.com>
2024-10-11 16:55:43 +08:00
dongjiuzhu1
a041ebbaef Revert "sched/group/setuptask_file: duplicate idle task fd for kernel thread"
let's using shared group for kthreads, see pull/12320

This reverts commit 4e24eec7b6.
2024-10-11 16:53:19 +08:00
guohao15
69f3774f30 littlefs:remove the '/' in the end of relpath in mkdir
mkdir /data/log   success
mkdir /data/log/  failed  in littlefs (but fatfs/yaffs/tmpfs success)

Signed-off-by: guohao15 <guohao15@xiaomi.com>
2024-10-11 15:46:02 +08:00
ligd
da5839c6f2 littlefs: fix warnings
Signed-off-by: ligd <liguiding1@xiaomi.com>
2024-10-11 15:46:02 +08:00
zhouliang3
8f6ea8896f fs/littlefs: revert fstat and use lfs_file_attr function
Signed-off-by: zhouliang3 <zhouliang3@xiaomi.com>
2024-10-11 15:46:02 +08:00
Jiuzhu Dong
c5779297cf littlefs/stat: return OK when stat success
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2024-10-11 15:46:02 +08:00
zhouliang3
0ab637f57e fs/littlefs: Add attr to dirA
Signed-off-by: zhouliang3 <zhouliang3@xiaomi.com>
2024-10-11 15:46:02 +08:00
zhouliang3
f70de1c65f fs/littlefs: Fix the bug of missing file types
Signed-off-by: zhouliang3 <zhouliang3@xiaomi.com>
2024-10-11 15:46:02 +08:00
zhouliang3
44992c8821 fs/littlefs: Implement fchstat and chstat of littlefs
Signed-off-by: zhouliang3 <zhouliang3@xiaomi.com>
2024-10-11 15:46:02 +08:00
Tomasz 'CeDeROM' CEDRO
140ce28616 Update github pull request template.
* Update CONTRIBUTING.md guide with hints and examples.
* Minor GitHub Pull Request Template update hinting expected information.

Signed-off-by: Tomasz 'CeDeROM' CEDRO <tomek@cedro.info>
2024-10-11 15:45:36 +08:00
ouyangxiangzhen
0936c97d3e arch/x86_64: Fix SMP startup for ACRN Hypervisor
This patch fixed SMP startup for ACRN Hypervisor.

Signed-off-by: ouyangxiangzhen <ouyangxiangzhen@xiaomi.com>
2024-10-11 15:43:01 +08:00
liwenxiang1
9189800760 arch/x86_64:Add configuration to disable vectorization optimization
With aggresive optimization enabled (-O3), ostest FPU test will fail.This is because the compiler will generate additional vector instructions between subsequent up_fpucmp() calls (loop vectorization somewhere in usleep() call), which will consequently overwrite the expected FPU context (XMM registers).The compilation option -fno-tree-vectorize can avoid this issue.

Signed-off-by: liwenxiang1 <liwenxiang1@xiaomi.com>
2024-10-11 15:40:55 +08:00
andi6
19e34b7f6e x64: modify addr limit to support 64 bits addr backtrace
Signed-off-by: andi6 <andi6@xiaomi.com>
2024-10-11 15:32:28 +08:00
Yongrong Wang
976c4173f0 rpmsg_ping.c: fix msg data memset length
The range of memset exceeds the size of the buffer

Signed-off-by: Yongrong Wang <wangyongrong@xiaomi.com>
2024-10-11 14:59:26 +08:00
Yongrong Wang
4b77dd03db rpmsg_ping.c: change msg cmd type for more compatible
Use bit mask method to represent the command, because it's more
convenient to express multiple characteristics simultaneously.

Signed-off-by: Yongrong Wang <wangyongrong@xiaomi.com>
2024-10-11 14:59:26 +08:00
Yongrong Wang
1cf97ac4d0 rpmsg_ping.c: improve log level to LOG_EMERG
Usually rpmsg ping logs are needed during testing,
but too many other module logs can easily overwrite it,
so improve the rpmsg ping log level, later we can setlogmask to
a higher log level to mask other modules' logs.

Signed-off-by: Yongrong Wang <wangyongrong@xiaomi.com>
2024-10-11 14:59:26 +08:00
Yongrong Wang
b96ad59d69 rpmsg_ping.c: change check data to fluctuation value
We can found the error happend packet more accurately based
on the data value.

Signed-off-by: Yongrong Wang <wangyongrong@xiaomi.com>
2024-10-11 14:59:26 +08:00
cuiziwei
5e96e72cb6 X86_64: Add libcxx availability macros.
Signed-off-by: cuiziwei <cuiziwei@xiaomi.com>
2024-10-11 13:53:10 +08:00
hujun5
1373957ea0 fix typo error
Signed-off-by: hujun5 <hujun5@xiaomi.com>
2024-10-11 13:52:58 +08:00
SPRESENSE
5e81726f21 binfmt/libelf: Fix return code
Fix return code in case of error in loading constructor and destructor section.

Detected by Codesonar 54667871, 54667873
2024-10-11 13:52:46 +08:00
cuiziwei
1816d752af arch/x86_64:Fix build cxx warning.
Signed-off-by: cuiziwei <cuiziwei@xiaomi.com>
2024-10-11 13:46:27 +08:00
lipengfei28
274ca2ea65 arch: arm64: Fix ARM64_CONTEXT_REGS number
This commit fixes the regression in https://github.com/apache/nuttx/pull/14063

Signed-off-by: lipengfei28 <lipengfei28@xiaomi.com>
2024-10-11 13:26:54 +08:00
yinshengkai
154cb4a860 sim/note: add note related configuration
Ensure that CI can cover all note code

Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2024-10-11 11:55:17 +08:00
yinshengkai
c83858bbb6 note: fix note_common unaligned access
Data in ARMV8-M may be aligned with less than 4 bytes, resulting in USAGE FAULT

Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2024-10-11 11:55:17 +08:00
yinshengkai
464d284587 drivers/note: simplify notesnap_dump logic
RTOSXMDPYX-969

Crash at startup, index is 0 will cause loop printing

Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2024-10-11 11:55:17 +08:00
cuiziwei
6ad06ba004 note:unified note filtering at runtime.
Signed-off-by: cuiziwei <cuiziwei@xiaomi.com>
2024-10-11 11:55:17 +08:00
yinshengkai
a70175ea06 note: make sched_note_start depend on INSTRUMENTATION_SWITCH
In some cases, we only need to use INSTRUMENTATION_DUMP to record custom data,
and we don't want the thread start and end information

Move this part to INSTRUMENTATION_SWTICH for recording

Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2024-10-11 11:55:17 +08:00
yinshengkai
453cde945f note: add note stream drivers
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2024-10-11 11:55:17 +08:00
yinshengkai
43d96a5d9e note: Increase crash dump buffer
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2024-10-11 11:55:17 +08:00
anjiahao
5076b0c74c risc-v:Unify module compilation options
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2024-10-11 11:20:45 +08:00
yinshengkai
4685175617 sched: fix the inaccurate cpuload statistics issue
Non-fixed clock source will lead to inaccurate cpuload statistics

before:
5     5 253 RR       Task      - Waiting  Signal    0000000000000000 0002000 0000624  31.2%   2.5% cpuload -p 50
6     6 253 RR       Task      - Waiting  Signal    0000000000000000 0002000 0000624  31.2%   0.7% cpuload -p 10
7     7 253 RR       Task      - Waiting  Signal    0000000000000000 0002000 0000624  31.2%   2.2% cpuload -p 20
after:
5     5 253 RR       Task      - Waiting  Signal    0000000000000000 0002000 0000624  31.2%  50.8% cpuload -p 50
6     6 253 RR       Task      - Waiting  Signal    0000000000000000 0002000 0000624  31.2%  10.8% cpuload -p 10
7     7 253 RR       Task      - Waiting  Signal    0000000000000000 0002000 0000624  31.2%  20.0% cpuload -p 20
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2024-10-11 11:04:47 +08:00
yinshengkai
f88afa5825 sched/cpuload: fix SMP situation CPULOAD statistics are inaccurate
When statistics when sched_cpuload_critMonitor, thread switching only calculates the current CPU's running time. Other CPU running threads are updated for updates

Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2024-10-11 11:04:47 +08:00
guohao15
38f0056dcd romfs:extend romfs to enable write part4
add sem for write safe

Signed-off-by: guohao15 <guohao15@xiaomi.com>
2024-10-11 10:42:20 +08:00
Xiang Xiao
322765b442 fs/romfs: Align up the file size to 16 bytes
and set volume size to 96 bytes in romfs_mkfs

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2024-10-11 10:42:20 +08:00
Xiang Xiao
7814c40a99 fs/romfs: Replace strlcpy and strcmp with memcpy and memcmp
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2024-10-11 10:42:20 +08:00