Commit Graph

16078 Commits

Author SHA1 Message Date
xuxin19 7def0983f6 cmake:sync arm sub arch CMake scripts missing sources
Signed-off-by: xuxin19 <xuxin19@xiaomi.com>
2024-10-13 02:25:06 +08:00
yangguangcai 80f2890c17 systick:when isr_handle is NULL will be crash.
Signed-off-by: yangguangcai <yangguangcai@xiaomi.com>
2024-10-13 00:32:55 +08:00
wangmingrong1 b12bf1ef33 arm/cmake: fix cmake compile error
1. The -c parameter should not be added during the link phase, otherwise the link will fail.
2. If it is the clang compiler, its toolchain library should use --print-file-name to find it, otherwise an error will occur

Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com>
2024-10-12 20:37:43 +08:00
Jinliang Li 36c63705db armv8-r/gicv3: disable 64bits access gic 64bits registers
When neon is enabled, compiler may optimize 64bits access to vstr, that
will cause data aborts.
Split 64bits access to double 32bits access for GIC_IROUTER/GICR_TYPER,
just like linux.

Signed-off-by: Jinliang Li <lijinliang1@lixiang.com>
Signed-off-by: chao an <anchao@lixiang.com>
2024-10-12 18:11:00 +08:00
xuxingliang 38858b6cc3 arch: set current regs firstly in undefinedinsn
Need to save the regs firstly in case syslog triggers another crash.
Otherwise we may loose the register contents for the first exception.

Signed-off-by: xuxingliang <xuxingliang@xiaomi.com>
2024-10-12 14:19:36 +08:00
fanjiangang d8b042126e arch/arm: fix the bug of armv8-r macro GET_MPIDR
should be core not cpu

Signed-off-by: fanjiangang <fanjiangang@lixiang.com>
Signed-off-by: chao an <anchao@lixiang.com>
2024-10-12 14:00:32 +08:00
fanjiangang 044ee68e80 arm/armv8-r: add implements of arm_get_mpid()
Signed-off-by: fanjiangang <fanjiangang@lixiang.com>
Signed-off-by: chao an <anchao@lixiang.com>
2024-10-12 14:00:32 +08:00
hujun5 1ff49872a7 arch: There is no need to use sched_[un]lock
Signed-off-by: hujun5 <hujun5@xiaomi.com>
2024-10-12 13:28:23 +08:00
hujun5 ef8d8ee627 rtc: There is no need to use sched_[un]lock
Signed-off-by: hujun5 <hujun5@xiaomi.com>
2024-10-12 13:28:23 +08:00
anjiahao e5f9b42ea0 binfmt/libelf:Remove libelf implementation [2/2]
this commit is part two, all logic move to modlib, so we can remove it.
and change all use defconfig

Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2024-10-12 12:29:06 +08:00
Tim Hardisty 3027be72c3 Update sam_udphs.c 2024-10-12 09:51:19 +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
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
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
lipengfei28 631b551727 goldfish add gicv2m support
Signed-off-by: lipengfei28 <lipengfei28@xiaomi.com>
2024-10-11 17:06:16 +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
yinshengkai 211a56910a syslog: support syslog redirection to sched_note
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2024-10-11 01:30:11 +08:00
wangmingrong1 ec3c27df0d makefile/clang: Compare versions for upward compatibility
Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com>
2024-10-11 00:45:39 +08:00
yinshengkai 02eb280302 arch/perf: modify the return value of up_perf_gettime to clock_t
When using alarm_arch implementation, 64-bit time can be returned. Using unsign long will cause precision loss.

Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2024-10-10 23:17:14 +08:00
yinshengkai eb8449cb0c sched/gprof: add gprof support
gprof can analyze code hot spots based on scheduled sampling.
After adding the "-pg" parameter when compiling, you can view the code call graph.

Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2024-10-10 18:46:51 +08:00
hujun5 e249dd2672 arch: support customized up_cpu_index() in AMP mode
Some app with same code runs on different cores in AMP mode,
need the physical core on which the function is called.

Signed-off-by: hujun5 <hujun5@xiaomi.com>
Signed-off-by: fangxinyong <fangxinyong@xiaomi.com>
2024-10-10 02:38:40 +08:00
ligd ff99745b22 arm-m: support zero interrupt back to game
Signed-off-by: ligd <liguiding1@xiaomi.com>
2024-10-10 01:01:17 +08:00
ligd a9da6ab4b5 arm-M: set current regs for crash dump
Signed-off-by: ligd <liguiding1@xiaomi.com>
2024-10-10 01:01:17 +08:00
ligd 780acd7827 armv6/7/8m: use pendsv to handle context switch
This PR support Nested interrupt in armv6/7/8m:

There are two types of nested interrupt model:

Zero latency nested interrupt
Interrupt           Priority            Note
Data abort          Highest
SVC                 0x50
High irq1           0x60             ISR can't access system API
irq_save()          0x70
High irq2           0x80             ISR can't access system API
normal irq3         0xB0
We have already support this mode before this PR

Nested interrupt which interrupt level lower than up_irq_save()
Interrupt           Priority            Note
Data abort          Highest
SVC                 0x70
irq_save()          0x80
High irq1           0x90              ISR can access system API
High irq2           0xA0              ISR can access system API
normal irq3         0xB0
Now, this PR can support this mode

Signed-off-by: ligd <liguiding1@xiaomi.com>
2024-10-10 01:01:17 +08:00
ligd f221c9ecb4 armv6m: add up_trigger_irq() support
Signed-off-by: ligd <liguiding1@xiaomi.com>
2024-10-10 01:01:17 +08:00
ligd f20ae064b0 armv7/8m: unmask all the IRQ when thread start
NVIC_SYSH_PRIORITY_MIN not the basepri loweest prio
spec says:
basepri 0 - Disables masking by BASEPRI

Signed-off-by: ligd <liguiding1@xiaomi.com>
2024-10-10 01:01:17 +08:00
yinshengkai 034af29aab arch: adjust gcov configuration name
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2024-10-09 21:27:47 +08:00
raiden00pl e419d2c392 arch/arm/Kconfig: fix copy-paste error
ARCH_CHIP_CSK6 has nothing to do with ST chips:
fix option string and move below ST related options
2024-10-09 18:11:20 +08:00
lipengfei28 56495bc9ce The gicv2m spinlock init status should unlocked
Signed-off-by: lipengfei28 <lipengfei28@xiaomi.com>
2024-10-09 15:07:37 +08:00
Xiang Xiao b068e2357a circbuf: Move from mm/circbuf to libs/libc/misc
so that it can be used by userspace program.

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Signed-off-by: Neo Xu <neo.xu1990@gmail.com>
2024-10-09 08:41:49 +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
anjiahao 9ed93c6b1e unify MODULE & ELF flag to Toolchain.defs
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2024-10-08 19:56:33 +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
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
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
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
raiden00pl c1c5d8d611 arch/arm/stm32{|f7}/socketcan: fix debugassert for extid frames
fix debugassert for extid frames, we have to remove
CAN_EFF_FLAG bit from the expression
2024-10-08 08:14:07 +08:00
hujun5 31a3cea64a arch: rename xxxx_pause.c to xxxx_smpcall.c
Signed-off-by: hujun5 <hujun5@xiaomi.com>
2024-10-08 08:13:22 +08:00
hujun5 d8cb7759b6 arch: remove up_cpu_pause up_cpu_resume up_cpu_paused up_cpu_pausereq
reason:
  To remove the "sync pause" and decouple the critical section from the dependency on enabling interrupts,
  after that we need to further implement "schedlock + spinlock".
changelist
  1 Modify the implementation of critical sections to no longer involve enabling interrupts or handling synchronous pause events.
  2 GIC_SMP_CPUCALL attach to pause handler to remove arch interface up_cpu_paused_restore up_cpu_paused_save
  3 Completely remove up_cpu_pause, up_cpu_resume, up_cpu_paused, and up_cpu_pausereq
  4 change up_cpu_pause_async to up_send_cpu_sgi

Signed-off-by: hujun5 <hujun5@xiaomi.com>
2024-10-08 08:13:22 +08:00
SPRESENSE 9bfc426321 arch: cxd56xx: Add SD card 4-bit capability
The mmcsd driver has been updated to require SDIO_CAPS_4BIT to be
explicitly specified for SD card 4-bit support.
2024-10-07 17:35:19 +08:00
buxiasen b444bf2e6a goldfish: fix sched api update missed godlfish_cpuboot
add cmake support

Signed-off-by: buxiasen <buxiasen@xiaomi.com>
2024-10-07 17:33:14 +08:00
buxiasen 5bf7d0e4a7 goldfish: boot add missing header when CONFIG_SCHED_INSTRUMENTATION
Signed-off-by: buxiasen <buxiasen@xiaomi.com>
Signed-off-by: ligd <liguiding1@xiaomi.com>
2024-10-07 17:33:14 +08:00
wangmingrong1 3e66cc30d0 arch/qemu: up_perf_init depends on CONFIG_ARCH_PERF_EVENTS
Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com>
Signed-off-by: ligd <liguiding1@xiaomi.com>
2024-10-07 17:33:14 +08:00
hujun5 0ed47c5f7e qemu: fix smp boot not enter idle
Signed-off-by: hujun5 <hujun5@xiaomi.com>
Signed-off-by: ligd <liguiding1@xiaomi.com>
2024-10-07 17:33:14 +08:00
Bowen Wang a952e9ca78 arm/qemu_boot: fix the rpmsg syslog init warning
chip/qemu_boot.c:84:3: warning: implicit declaration of function 'syslog_rpmsg_init_early' [-Wimplicit-function-declaration]
   84 |   syslog_rpmsg_init_early(g_syslog_rpmsg_buf, sizeof(g_syslog_rpmsg_buf));
      |   ^~~~~~~~~~~~~~~~~~~~~~~

Signed-off-by: Bowen Wang <wangbowen6@xiaomi.com>
Signed-off-by: ligd <liguiding1@xiaomi.com>
2024-10-07 17:33:14 +08:00
Bowen Wang 9e76bc610f arm/qemu_boot: add rpmsg syslog support for qemu armv7a
Signed-off-by: Bowen Wang <wangbowen6@xiaomi.com>
Signed-off-by: ligd <liguiding1@xiaomi.com>
2024-10-07 17:33:14 +08:00
wangming9 00857c7fd9 arm/qemu: The PSCI can be configured with CONFIG_ARM_PSCI
Signed-off-by: wangming9 <wangming9@xiaomi.com>
Signed-off-by: ligd <liguiding1@xiaomi.com>
2024-10-07 17:33:14 +08:00
ligd 4818707870 glodfish: add SMP boot support
Signed-off-by: ligd <liguiding1@xiaomi.com>
2024-10-07 17:33:14 +08:00