Commit Graph

55123 Commits

Author SHA1 Message Date
anjiahao f2bdfa43e1 coredump:Add a coreudmp api to watch custom variables
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2024-10-01 20:40:28 +08:00
anjiahao 60796a7063 coredump:add const to memory region struct ptr
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2024-10-01 20:40:28 +08:00
dongjiuzhu1 8bafb6520a sim/nsh: enable PSEUDOFS_FILE for sim:nsh
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2024-10-01 20:39:05 +08:00
dongjiuzhu1 f9283c4e70 fs/vfs: fix compile break when enable PSEUDOFS_FILE
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2024-10-01 20:39:05 +08:00
zhaohaiyang1 32b25849fe chardriver upperCAN: support to independent set TX/RX FIFO size.
support to independent set TX/RX FIFO size.

Signed-off-by: zhaohaiyang1 <zhaohaiyang1@xiaomi.com>
2024-10-01 20:38:31 +08:00
xuxingliang 7044b10c88 task: use get_task_name where possible
Signed-off-by: xuxingliang <xuxingliang@xiaomi.com>
2024-10-01 20:38:06 +08:00
Lup Yuen Lee 01bba4542a build.yml: Undo debug print
Undo the unintended changes for debug printing. I edited the wrong repo, I am deeply sorry about this.
2024-10-01 20:29:39 +08:00
Lup Yuen Lee 8fce648452
Update build.yml 2024-10-01 16:49:18 +08:00
Lup Yuen Lee 298392e283
Update build.yml 2024-10-01 16:48:48 +08:00
yangguangcai 62d7b3beeb arm-v7m systick:call irq_attach_thread.
Signed-off-by: yangguangcai <yangguangcai@xiaomi.com>
2024-10-01 12:26:07 +08:00
Alin Jerpelea 6b5dddd5d7 libs/libc: migrate to SPDX identifier
Most tools used for compliance and SBOM generation use SPDX identifiers
This change brings us a step closer to an easy SBOM generation.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2024-10-01 12:25:52 +08:00
Alin Jerpelea 9440887f9d libs/libnx: migrate to SPDX identifier
Most tools used for compliance and SBOM generation use SPDX identifiers
This change brings us a step closer to an easy SBOM generation.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2024-10-01 12:25:52 +08:00
Alin Jerpelea d56c16e2b8 libs/libxx: migrate to SPDX identifier
Most tools used for compliance and SBOM generation use SPDX identifiers
This change brings us a step closer to an easy SBOM generation.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2024-10-01 12:25:52 +08:00
Alin Jerpelea d5754ec7da libs/libm: migrate to SPDX identifier
Most tools used for compliance and SBOM generation use SPDX identifiers
This change brings us a step closer to an easy SBOM generation.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2024-10-01 12:25:52 +08:00
Alin Jerpelea d500b92db1 libs: migrate to SPDX identifier
Most tools used for compliance and SBOM generation use SPDX identifiers
This change brings us a step closer to an easy SBOM generation.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2024-10-01 12:25:52 +08:00
Alin Jerpelea 3ac9a6e179 libs/libdsp: migrate to SPDX identifier
Most tools used for compliance and SBOM generation use SPDX identifiers
This change brings us a step closer to an easy SBOM generation.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2024-10-01 12:25:52 +08:00
hujun5 c039ea77ba arm64: fix use arch-timer in SMP
reason:
only one timer will be effective at a time.

Signed-off-by: hujun5 <hujun5@xiaomi.com>
2024-10-01 12:10:06 +08:00
hujun5 ea29217442 arm64: fix tickless mode in SMP
Signed-off-by: hujun5 <hujun5@xiaomi.com>
2024-10-01 12:10:06 +08:00
xuxingliang 060ac93f82 arm64: allow to use custom up_timer_initialize
Signed-off-by: xuxingliang <xuxingliang@xiaomi.com>
2024-10-01 12:10:06 +08:00
guoshichao ff4ad07576 greenhills: add cmake support
1. refactor the ghs/gcc/clang/armclang toolchain management in CMake
2. unify the cmake toolchain naming style
3. support greenhills build procedure with CMake
4. add protect build for greenhills and gnu toolchain with CMake

Signed-off-by: guoshichao <guoshichao@xiaomi.com>
2024-10-01 11:48:09 +08:00
hujun5 17b31d2037 xtensa: add parameters to xtensa_pause_handler
reason:
nxsched_smp_call_handler need these parameters

Signed-off-by: hujun5 <hujun5@xiaomi.com>
2024-10-01 11:45:56 +08:00
Jukka Laitinen c3fd827ae1 include/sys/select.h: Define __SELECT_NUINT32 in generic way
Support defining OPEN_MAX freely to allow increasing it from 256

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2024-10-01 11:31:47 +08:00
hujun5 0e87a475d3 x86_64: we should call x86_64_restorestate/x86_64_savestate
reason:
In x86_64, g_current_regs is still used for context switching.

This commit fixes the regression from https://github.com/apache/nuttx/pull/13616

Signed-off-by: hujun5 <hujun5@xiaomi.com>
2024-10-01 11:47:25 +09:00
Filipe Cavalcanti 8153307da5 espressif: remove static from spiflash operations 2024-09-30 20:42:00 +02:00
Filipe Cavalcanti b3d0dca84e xtensa/esp32: fix cpuint debug asssertion bit mask 2024-09-30 20:42:00 +02:00
Filipe Cavalcanti a876f00e2a risc-v/espressif: support marking interrupt as running from IRAM 2024-09-30 20:42:00 +02:00
Kevin Zhou 7acb298f26 xtensa/esp32s3: add setup rx dma after slave receive data 2024-09-30 21:24:55 +08:00
Xiang Xiao 73f0c7c51d drivers/mmcsd: Rename mmcsd_read_csd to mmcsd_read_extcsd
since it really read extcsd register not csd register
and remove the temp buffer inside it.

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2024-09-30 21:17:27 +08:00
yangsong8 09030b5d67 cdcacm: config to enable or disable interrupt endpoint
Signed-off-by: yangsong8 <yangsong8@xiaomi.com>
2024-09-30 20:32:47 +08:00
buxiasen 731af5b42f drivers/pm: pm_smp remove sched_lock
all os-api those have post/wait feature will not allowed in pm_callbacks
and pm_handler, until we support by cpu/tcb sched_lock and add
sched_lock/unlock back here. Then should revert this commit.

Signed-off-by: buxiasen <buxiasen@xiaomi.com>
2024-09-30 20:23:11 +08:00
buxiasen 6db1e6504c document/pm: update document for pm_idle smp case
Signed-off-by: buxiasen <buxiasen@xiaomi.com>
2024-09-30 20:23:11 +08:00
buxiasen b0e8193b7a qemu/arm64: add pm support
add arm64 qemu pm compatible for demo pm_idle in not smp & smp usage
demo, chip should based on demo to add more operation in pm_idle_handler

Signed-off-by: buxiasen <buxiasen@xiaomi.com>
2024-09-30 20:23:11 +08:00
buxiasen 46d555e5d4 pm_idle: fix when prepare failed, possible relax error
Signed-off-by: buxiasen <buxiasen@xiaomi.com>
2024-09-30 20:23:11 +08:00
buxiasen 43176bbade pm: pm_idle add support for SMP
Signed-off-by: buxiasen <buxiasen@xiaomi.com>
2024-09-30 20:23:11 +08:00
chenrun1 4b7c36554c mps_allocateheap:Modify the heap logic
Summary:
  Due to the modification of 4244610, the heap_size may be used on SRAM1, which can lead to misconfiguration problems for some mps qemu configurations (e.g.MPS3) that use extern DDR as the heap, refer to the previous issue VELAPLATFO-34555.

Signed-off-by: chenrun1 <chenrun1@xiaomi.com>
Signed-off-by: ligd <liguiding1@xiaomi.com>
2024-09-30 20:06:52 +08:00
ligd 23ad93f430 mps: update the mps3-an547 mps2-an500 defconfig
Fix compile failed when open BASEPRI
Open same feature on mps3

Signed-off-by: ligd <liguiding1@xiaomi.com>
2024-09-30 20:06:52 +08:00
anjiahao f79ae00a4f mps3-an547:fix sram range error
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
Signed-off-by: ligd <liguiding1@xiaomi.com>
2024-09-30 20:06:52 +08:00
anjiahao 9122c3e44d mps:Supplement the interrupt definition about nvic
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
Signed-off-by: ligd <liguiding1@xiaomi.com>
2024-09-30 20:06:52 +08:00
qinwei1 9f97d9abb0 boards/arm.mps/mps2-an521: add support for mps-521 board
Summary
   MPS-521 support Dual Cortex-M33 and maybe suitable for AMP-like
case which is for AUTO OS, the change
  1. add support for single core at msp-521 with nsh bringup
  2. testing with ostest

TODO:
  Dual core support for flat-build
  Dual CORE support for Protected Build

Signed-off-by: qinwei1 <qinwei1@xiaomi.com>
Signed-off-by: ligd <liguiding1@xiaomi.com>
2024-09-30 20:06:52 +08:00
Gao Jiawei aaf63d1d85 Enable stack check feature on MPS2-AN500 board
Signed-off-by: Gao Jiawei <gaojiawei@xiaomi.com>
Signed-off-by: ligd <liguiding1@xiaomi.com>
2024-09-30 20:06:52 +08:00
chenrun1 9f1ad1fc4f mps_an547:Adjust the an547 initialization stack allocation
Summary(for an547):
  1. Add maximum external storage expansion (2GB)
  2. Change PRIMARY_RAM_START to MPS_SRAM2_START (4MB)
  3. When REGIONS > 1, use external expansion as Heap

Signed-off-by: chenrun1 <chenrun1@xiaomi.com>
Signed-off-by: ligd <liguiding1@xiaomi.com>
2024-09-30 20:06:52 +08:00
qinwei1 02f1d732a9 arch/arm/src/mps: implement Protected Build for mps2-an500
Summary
 1. add Protected build Support for ARM MPS AN500
 2. refine mps Memory layout configure and enable MPU support
Note
 1. ostest for an547:nsh
 2. ostest for an500:nsh and an500:knsh

Signed-off-by: qinwei1 <qinwei1@xiaomi.com>
Signed-off-by: ligd <liguiding1@xiaomi.com>
2024-09-30 20:06:52 +08:00
Gao Jiawei e763b0cfe6 add cmake building support for mps board
Signed-off-by: Gao Jiawei <gaojiawei@xiaomi.com>
Signed-off-by: ligd <liguiding1@xiaomi.com>
2024-09-30 20:06:52 +08:00
xuxin19 1bbcbc3440 ctype.h:move locale macro define to lib_ctype file
Macro definitions such as _S in public header files can cause compilation problems under the MSVC compiler.
Move macro definitions that are not used in public locations to the corresponding files

Signed-off-by: xuxin19 <xuxin19@xiaomi.com>
2024-09-30 19:29:34 +08:00
Jukka Laitinen 07d5bc2c50 sched/semaphore/sem_tickwait.c: Fix nxsem_tickwait_uninterruptible end condition
nxsem_tickwait correctly sleeps more than 1 tick. But nxsem_tickwait_uninterruptible
may wake up to a signal (with -EINTR), in which case the tick + 1 must also
be taken into account. Otherwise the nxsem_tickwait_uninterruptible may
wake up 1 tick too early.

Also fix the nxsem_tickwait to return with -ETIMEDOUT if called with delay 0.
This is similar to e.g.  posix sem_timedwait.

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2024-09-30 19:23:01 +08:00
Jukka Laitinen 429252152a arch/arm64/src/common/arm64_arch_timer.c: Remove clock drift from tick timer
This fixes two issues with the tick timer
1) Each tick was longer than the requested period. This is because setting
   the compare register was done by first reading the current time, and only
   after that setting the compare register. In addition, when handling the
   timer interrupts in arch_alarm.c / oneshot_callback, the current_tick is
   first read, all the tick handling is done and only after that the next tick
   is started. The whole tick processing time was added to the total tick time.

2) When the compare time is not aligned with tick period, and is drifting,
   eventually any call to ONESHOT_TICK_CURRENT would either return the current
   tick, or the next one, depending on the rounding of division by the
   cycle_per_tick. This again leads to oneshot_callback randomly handling
   two ticks at a time, which breaks all wdog based timers, causing them to
   randomly timeout too early.

The issues are fixed as follows:

Align the compare time register to be evenly divisible by cycle_per_tick.
This will lead arm64_tick_current always to return the currently ongoing tick,
fixing 2). Also calculating the next tick's start from the aligned current
count will fix 1), as there is no time drift in the start cycle.

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2024-09-30 19:23:01 +08:00
Jukka Laitinen 6f7477ab63 drivers/timers/arch_alarm.c: Clean-up oneshot_callback for non-tickless build
Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2024-09-30 19:23:01 +08:00
xuxingliang 2b8a4a361d assert: dump all CPU registers and stack
Signed-off-by: xuxingliang <xuxingliang@xiaomi.com>
2024-09-30 18:43:35 +08:00
xuxingliang 6d0180f12e assert: cleanup assert handler
1. extract dump from assert main flow
2. use OSINIT_PANIC for fatal error.
3. fix the method to judge kernel thread.

Signed-off-by: xuxingliang <xuxingliang@xiaomi.com>
2024-09-30 18:43:35 +08:00
Xu Xingliang 2749736638 assert: disable kasan in assert
Signed-off-by: Xu Xingliang <xuxingliang@xiaomi.com>
2024-09-30 18:43:35 +08:00