Xiang Xiao
e9f5eb0823
boards: Move "-fno-exceptions -fcheck-new" from Make.defs to Toolchain.defs
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-04-25 16:22:46 +03:00
Ville Juven
a014daf44f
RISC-V: Add implementation for vfork
2022-04-25 15:44:32 +08:00
Ville Juven
2580520828
RISC-V: Fix system crash when FPU is in use
...
FPU registers need to be written prior to updating CSR_STATUS
2022-04-25 15:44:06 +08:00
Xiang Xiao
75326e563d
boards: Move -fno-common from Make.defs to Toolchain.defs
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-04-25 07:57:29 +03:00
Abdelatif Guettouche
3942f4d133
arch/xtensa: No need to save SP in EXCSAVE_1 when linking the interrupt
...
frame with the previous frame. The SP is already saved in A12.
Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2022-04-23 10:19:23 +08:00
Abdelatif Guettouche
f130d8c143
xtensa_user_handler.S: Fix backtrace.
...
Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2022-04-23 10:19:23 +08:00
Abdelatif Guettouche
7a3ad4b224
xtensa_user_handler.S: Use the ps_setup
macro when dealing with an
...
exception.
Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2022-04-23 10:19:23 +08:00
Xiang Xiao
5a565e753c
pm: Move pm_initialize call from driver_initialize to xxx_pminitialize
...
since it's too late with the below commit:
ommit a594a5d7a8
Author: chao.an <anchao@xiaomi.com>
Date: Mon Apr 11 19:44:26 2022 +0800
sched/init: drivers_initialize() should be late than up_initialize()
up_initialize
|
->up_serialinit
|
->uart_register /* ("/dev/console", &CONSOLE_DEV); */
drivers_initialize
|
->syslog_console_init
|
->register_driver /* ("/dev/console", &g_consoleops, 0666, NULL); */
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-04-22 14:36:27 +03:00
Masayuki Ishikawa
04f81ecddb
arch: risc-v: Do not enable FPU for K210 with QEMU
...
Summary:
- I noticed that maix-bit:smp does not work with QEMU.
- Actually, QEMU supports sifive_u (not K210) but it works
if FPU is disabled.
- This commit fixes this issue.
Impact:
- K210 with QEMU only
Testing:
- Tested with qemu-5.2
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2022-04-22 14:52:04 +08:00
Huang Qi
06c7a3ca59
arch/risc-v/riscv_misaligned: Implement float load/store support
...
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2022-04-22 12:23:10 +08:00
Huang Qi
be95e76910
arch/risc-v: Enable FPU for K210
...
K210 support rv64gc ISA, now we enable F/D extension for it.
Note: QEMU for K210 don't support FPU now.
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2022-04-21 21:47:29 +03:00
chao.an
1c8e12406e
compile/opt: add config DEBUG_LINK_MAP
...
Selecting this option will pass "-Map=$(TOPDIR)$(DELIM)nuttx.map" to ld
when linking NuttX ELF. That file can be useful for verifying
and debugging magic section games, and for seeing which
pieces of code get eliminated with DEBUG_OPT_UNUSED_SECTIONS.
Signed-off-by: chao.an <anchao@xiaomi.com>
2022-04-22 01:37:23 +08:00
chao.an
64d7326ed5
compile/opt: add config DEBUG_OPT_UNUSED_SECTIONS
...
Enable this option to optimization the unused input sections with the
linker by compiling with " -ffunction-sections -fdata-sections ", and
linking with " --gc-sections ".
Signed-off-by: chao.an <anchao@xiaomi.com>
2022-04-22 01:37:23 +08:00
Abdelatif Guettouche
56ecd44f63
arch/xtensa: Color the other CPUs task when they are created.
...
Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2022-04-22 01:12:55 +08:00
Xiang Xiao
1320e5add4
arch/arm: Move the duplicated assembly code to common folder
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-04-21 12:56:34 +03:00
Xiang Xiao
ebf1093cff
arch/arm: Switch the context of save and restore from assembler to c
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-04-21 12:56:34 +03:00
Huang Qi
0332b78f99
arch/risc-v: Don't clear reserved bits in fcsr in riscv_fpuconfig
...
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2022-04-21 15:26:05 +08:00
chao.an
875c5dac75
arm/armv[7|8]m: compare of hardware fp registers should skip REG_FP_RESERVED
...
Fix fpu test break
Signed-off-by: chao.an <anchao@xiaomi.com>
2022-04-21 14:55:54 +09:00
Abdelatif Guettouche
64e4c9ca02
arch/xtensa: Move xtensa_save_context to up_saveusercontext for
...
consistency with other archs.
Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2022-04-21 01:59:34 +08:00
Abdelatif Guettouche
6db910a1aa
arch/xtensa: Use syscall interface for xtensa_save/restore_context.
...
Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2022-04-21 01:59:34 +08:00
chao.an
0315283c21
arch/clang: add support for Clang LTO
...
add support of Clang's Link Time Optimization (LTO) on NuttX build system
Reference:
https://gcc.gnu.org/onlinedocs/gccint/LTO-Overview.html
https://llvm.org/docs/LinkTimeOptimization.html
Signed-off-by: chao.an <anchao@xiaomi.com>
2022-04-21 01:21:54 +08:00
chao.an
67fbfda974
arch/armv6-m: add support of LLVM Clang
...
Signed-off-by: chao.an <anchao@xiaomi.com>
2022-04-21 01:21:54 +08:00
Huang Qi
48b81bda09
arch/risc-v: Change riscv_savefpu/riscv_loadfpu to macro
...
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2022-04-20 16:08:17 +03:00
Alin Jerpelea
dda675779a
arch: arm: mor1kx: remove empty files
...
during contribution empty files have been pushed.
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2022-04-20 21:05:45 +08:00
Alin Jerpelea
af98967439
arch: arm: stm32l4: remove empty files
...
during contribution empty files have been pushed.
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2022-04-20 21:05:45 +08:00
Alin Jerpelea
73cd86dad7
arch: arm: phy62xx: Add Apache license to files
...
In the initial contribution those files were missing the license
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2022-04-20 21:05:45 +08:00
Alin Jerpelea
22ceda26bb
arch: arm: lpc43xx: Add Apache license to files
...
In the initial contribution those files were missing the license
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2022-04-20 21:05:45 +08:00
Alin Jerpelea
4e19a97916
arch: arm: imxrt: Add Apache license to files
...
In the initial contribution those files were missing the license
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2022-04-20 21:05:45 +08:00
Alin Jerpelea
208b892efe
arch: arm: cxd56xx: Add Apache license to files
...
In the initial contribution those files were missing the license
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2022-04-20 21:05:45 +08:00
Huang Qi
95ab7b973b
arch/sparc,xtensa: Control output by $(Q) as other arch
...
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2022-04-20 12:04:17 +02:00
zhuyanlin
8d756a75a2
armv7/r:cp15_cache_all: fix error in LineSize 'r5' mask
...
r5 = r3 & r1
Signed-off-by: zhuyanlin <zhuyanlin1@xiaomi.com>
2022-04-20 08:06:58 +09:00
chao.an
fc3565e9eb
arch/z80: Unify the toolchain definition of SDCC for linux and windows
...
Signed-off-by: chao.an <anchao@xiaomi.com>
2022-04-19 23:17:27 +08:00
chao.an
0cf8088406
arch/misoc: Unify the toolchain definition of GNU for linux and windows
...
Signed-off-by: chao.an <anchao@xiaomi.com>
2022-04-19 23:17:27 +08:00
chao.an
e066d5d1e0
arch/risc-v: Unify the toolchain definition of RVG for linux and windows
...
Signed-off-by: chao.an <anchao@xiaomi.com>
2022-04-19 23:17:27 +08:00
chao.an
2df591b3bb
arch/armv7-a/r: Unify the toolchain definition of eabi for linux and windows
...
Signed-off-by: chao.an <anchao@xiaomi.com>
2022-04-19 23:17:27 +08:00
chao.an
4a085e1cdb
arch/arm/armv6-m: Unify the toolchain definition of eabi for linux and windows
...
Signed-off-by: chao.an <anchao@xiaomi.com>
2022-04-19 23:17:27 +08:00
chao.an
2246afcdd8
arch/armv7-m: Unify the toolchain definition of eabi/clang/iar for linux and windows
...
Signed-off-by: chao.an <anchao@xiaomi.com>
2022-04-19 23:17:27 +08:00
chao.an
a79bf8c9eb
arch/armv8-m: Unify the toolchain definition of eabi/clang for linux and windows
...
Signed-off-by: chao.an <anchao@xiaomi.com>
2022-04-19 23:17:27 +08:00
Ville Juven
5b6dd876b8
risc-v/riscv_assert.c Fix dumping of status from ISR
...
The status dump did not work if the first fault triggers before
the first context switch (during nx_start()).
2022-04-19 15:28:09 +03:00
Ville Juven
5c951d8c4a
arm/arm_assert.c Fix dumping of status from ISR
...
The status dump did not work if the first fault triggers before
the first context switch (during nx_start()).
2022-04-19 15:28:09 +03:00
chao.an
b110c984b1
arch/armv7-[a|r]: correct the handing of group env switch
...
This PR resolved 2 issues:
1. CURRENT_REGS is not set correctly on swint handling
2. group env is not changed properly
Signed-off-by: chao.an <anchao@xiaomi.com>
2022-04-19 12:10:25 +03:00
Xiang Xiao
96fa8be5f5
arch/armv[7|8]-m: Compare all FPU registers in up_fpucmp
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-04-19 11:09:36 +03:00
Xiang Xiao
d80c2d7419
arch/arm: Remove all lazy fpu related code
...
since it is broken and inefficient, and then removed by:
commit dc961baaea
Author: chao.an <anchao@xiaomi.com>
Date: Thu Apr 14 18:07:14 2022 +0800
arm/armv7-[a|r]: move fpu save/restore to assembly handler
Save/Restore FPU registers in C environment is dangerous practive,
which cannot guarantee the compiler won't generate the assembly code
with float point registers, especially in interrupt handling
Signed-off-by: chao.an <anchao@xiaomi.com>
commit 8d66dbc068
Author: chao.an <anchao@xiaomi.com>
Date: Thu Apr 7 13:48:04 2022 +0800
arm/armv[7|8]-m: skip the fpu save/restore if stack frame is integer-only
Signed-off-by: chao.an <anchao@xiaomi.com>
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-04-19 11:09:36 +03:00
Xiang Xiao
7c5b2e3305
arch/arm: Remove FAR and CODE from common/ and arm*/ folder
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-04-19 00:23:59 +03:00
Xiang Xiao
7a0fd8d10f
arch/risc-v: Remove FAR from chip and board folder
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-04-19 00:22:45 +03:00
Xiang Xiao
84b0453ef3
arch/arm: Remove unneeded group_addrenv call which handled by arm_doirq
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-04-18 22:18:32 +03:00
Xiang Xiao
2e7b10356f
arch/sparc: Remove unneeded group_addrenv call which handled by up_doirq
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-04-18 18:34:12 +03:00
Xiang Xiao
d28892e454
arch/xtensa: Remove unneeded group_addrenv call which handled by xtensa_irq_dispatch
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-04-18 18:34:12 +03:00
Xiang Xiao
ef62e1c970
arch/misoc: Remove unneeded group_addrenv call which handled by [lm32|minerva]_doirq
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-04-18 18:34:12 +03:00
Xiang Xiao
9fad9ed66b
arch/mips: Remove unneeded group_addrenv call which handled by mips_doirq
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-04-18 18:34:12 +03:00