Huang Qi
72e79aa0f1
arch/risc-v: Apply misaligned access handler for k210/bl602
...
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2022-04-13 01:10:49 +08:00
Ville Juven
48fa6c1280
arch/risc-v: Add missing DMB to mtimer / setmtimecmp
...
The memory mapped mtimecmp lives in I/O space so must add barrier
to make sure the value sticks. Otherwise a new IRQ might fire
at once.
2022-04-12 21:33:19 +08:00
chao.an
5ec4df2cc6
risc-v/c906: fix build break
...
chip/c906_timerisr.c: In function 'up_timer_initialize':
Error: chip/c906_timerisr.c:71:3: error: implicit declaration of function 'DEBUGASSERT' [-Werror=implicit-function-declaration]
DEBUGASSERT(lower);
^~~~~~~~~~~
cc1: all warnings being treated as errors
Signed-off-by: chao.an <anchao@xiaomi.com>
2022-04-12 15:49:52 +03:00
Huang Qi
1975878835
arch/risc-v: Apply common mtime driver to mtime based chps
...
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2022-04-12 12:14:40 +03:00
Lingao Meng
a56199c7dd
sim: bt: Add specific bluetooth HCI number id
...
Add option for attached the local bluetooth device use
specific bluetooth HCI number id.
Signed-off-by: Lingao Meng <menglingao@xiaomi.com>
2022-04-12 15:15:25 +08:00
SPRESENSE
39f7c4aea0
arch: cxd56xx: Fix critical section in scu driver
...
Add critical section to scu one-shot sequencer.
2022-04-12 07:55:00 +09:00
SPRESENSE
e725829547
cxd56xx/cxd56_emmc.c: Fix compile warning
...
Add necessary include header named debug.h for using ferr and
finfo.
2022-04-12 07:55:00 +09:00
SPRESENSE
5be940080b
arch: cxd56xx: update loader and gnssfw version
...
Update loader and gnssfw to version 2.2.20585
2022-04-12 07:55:00 +09:00
Ville Juven
2670f143b5
RISC-V: Add setintstack for k210 and qemu
...
This fixes CI issue, and I think the old implementation with SMP
shared 1 IRQ stack for multiple CPUs.
2022-04-12 01:59:35 +08:00
Ville Juven
b0a71ce3e7
RISC-V: Remove riscv_cpuindex.c from platforms that don't need it
...
riscv_mhartid is no longer called by exception_common, so can remove
this file from platforms that don't need it.
Also fixes make warning:
Makefile:123: target 'riscv_cpuindex.o' given more than once in the same rule
2022-04-12 01:59:35 +08:00
Ville Juven
d5ea259828
RISC-V: Combine 3 variables that depend on CPU amount into one
...
IRQ_NSTACKS, ARCH_CPU_COUNT, CONFIG_SMP_NCPUS all relate to each
other. However, a bit of clean up can be done and everything can
be merged into SMP_NCPUS.
The MPFS bootloader case works also as it requires only 1 IRQ stack
for the hart that executes as bootloader.
2022-04-12 01:59:35 +08:00
Xiang Xiao
a90bdda1ae
arch/riscv: Add mtimer driver
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-04-11 10:59:18 +03:00
Ville Juven
a132fa38f6
riscv/bl602/chip.h: Add assembly guards for standard includes.
2022-04-10 08:27:10 +08:00
Abdelatif Guettouche
779fc6461f
riscv/esp32c3: Use the common exception handler.
...
Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2022-04-10 08:27:10 +08:00
Abdelatif Guettouche
e8134a8b57
riscv/riscv_exception_common.S: Allow chips to define the exception
...
section.
Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2022-04-10 08:27:10 +08:00
Abdelatif Guettouche
875dd46207
riscv/riscv_exception_commin.S: Don't call riscv_hartid in single core
...
mode.
Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2022-04-10 08:27:10 +08:00
Huang Qi
9284770f75
arch/risc-v: Move epc adjustment to riscv_doirq
...
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2022-04-10 00:52:04 +08:00
Huang Qi
833211680a
arch/risc-v: Attach exception handler in common place
...
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2022-04-10 00:52:04 +08:00
Huang Qi
36bc8d2131
arch/risc-v: Align prototype of riscv_exception with xcpt_t
...
Thus we can attach it to irq handler without any cast.
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2022-04-10 00:52:04 +08:00
Xiang Xiao
c235c0fa43
boards/lx_cpu: Enable up_perf API
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-04-08 21:02:13 -03:00
Xiang Xiao
1f7b49d700
boards/nucleo-h743zi2: Enable up_perf API
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-04-08 21:02:13 -03:00
Huang Qi
c6942b68d5
arch/risc-v: Add handler for misaligned load/store
...
Some risc-v based chips don't support unaligned data access,
it will trigger a exception and then lead to crash.
In this patch, we handle the misaligned access by software to make
system run continue.
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2022-04-08 23:27:07 +08:00
chao.an
8d66dbc068
arm/armv[7|8]-m: skip the fpu save/restore if stack frame is integer-only
...
Signed-off-by: chao.an <anchao@xiaomi.com>
2022-04-08 14:28:41 +09:00
Huang Qi
b6cf1ac662
arch/riscv: Minor style change and text correction
...
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2022-04-08 01:07:06 +08:00
Huang Qi
4ebc581c73
esp32c3: Simplify irq dispatch logic
...
ESP32C3 use customized irq encoding so it's hard to share further code
with other risc-v based chips, in this patch, we keep the exception
number definition with risc-v spec.
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2022-04-07 18:16:35 +02:00
Ville Juven
d38b4965f8
MPFS: Prepare support for S-mode
...
- Access to PLIC via S-mode registers
- Access to IRQs via S-mode registers / definitions
- Initialize S-mode registers upon boot
- Initialize per CPU area before nx_start
NOTE: S-mode requires a companion SW (SBI) which is not yet implemented,
thus S-mode is not usable as is, yet.
2022-04-07 21:55:36 +08:00
Xiang Xiao
3a26cf6a02
arch/risc-v: Remove the unnecessary inclusion of board header files
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-04-07 11:25:12 +03:00
Jiuzhu Dong
d87cf8d4ca
fs/poll: change format for type pollevent_t
...
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2022-04-07 12:14:06 +08:00
Huang Qi
53fef8d9c4
arch/risc-v: Replace riscv_fault with riscv_exception
...
Remove riscv_fault since its code is duplicated with riscv_exception,
and there are textual excpetion reason in riscv_exception.
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2022-04-06 22:48:46 +08:00
yinshengkai
db012687f9
arch/sim: support simulator keyboard devices
2022-04-06 15:26:57 +03:00
Alan C. Assis
1090e1a8ea
xtensa/esp32: Add support to TWAI/CANBus controller
2022-04-06 15:09:46 +03:00
zhuyanlin
6a761ff087
arch:tcbinfo: update tcbinfo as xcpcontext update
...
Signed-off-by: zhuyanlin <zhuyanlin1@xiaomi.com>
2022-04-05 13:33:00 +02:00
Ville Juven
6c22e2894c
RISC-V: Fix usage of static_assert in riscv_percpu.c
...
There is no alias for struct riscv_percu_s
2022-04-04 22:44:25 +08:00
Ville Juven
7db356e720
RISC-V: Fix file name of riscv_dispatch_syscall
2022-04-04 22:44:18 +08:00
Petro Karashchenko
d08fbca679
nuttx: unify FAR attribute usage across the code
...
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2022-04-04 21:32:58 +08:00
Abdelatif Guettouche
f527abc324
arch/xtensa: Build the xtensa_tcbinfo.c file for S2 and S3.
...
Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2022-04-04 21:25:47 +08:00
Xiang Xiao
bf48c6d4a8
arch/riscv: Rename SCRATCH_HARTID_OFFSET to RISCV_PERCPU_HARTID_OFFSET
...
and fix the typo error
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-04-04 08:22:08 +03:00
Petro Karashchenko
9b7f9867aa
arch/risc-v: use STACK_FRAME_SIZE for in S-mode syscall asm
...
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2022-04-04 12:05:53 +08:00
Michael Jung
e3926ecb16
stm32u5: stm32_stdclockconfig fixes
...
Fix stm32_stdclockconfig for stm32u585xx to the extend that the
B-U585I-IOT02A board's clock tree can be configured. This board uses
the MSIS as PLL1's input clock and the LSE to autotrim the MSIS.
2022-04-03 23:20:03 +03:00
zhanghongyu
451c53daa4
usrsock: Move event field to usrsock_message_common_s
...
Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2022-04-03 11:38:50 +09:00
wangbowen6
bcb2530b18
arm/chip: add backtrace support for all chips that support thumb instruction set.
...
Signed-off-by: wangbowen6 <wangbowen6@xiaomi.com>
2022-04-03 00:22:57 +08:00
raiden00pl
b487101b87
stm32: add support for up_perf
2022-04-02 10:34:35 -03:00
Xiang Xiao
27c80f2586
arch/riscv: Rename g_scratch to g_percpu
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-04-02 14:08:37 +03:00
Xiang Xiao
e959775397
arch/riscv: Access [m|s]scratch through CSR_SCRATCH macro
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-04-02 14:08:37 +03:00
Xiang Xiao
be2fee7d6e
arch/riscv: Rename riscv_exception_macros.S to riscv_macros.S
...
since macro defined in this file is also used in the normal context
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-04-02 14:08:37 +03:00
Xiang Xiao
79aca28bd7
arch/riscv: Remove riscv_sbi.c since it doesn't exist
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-04-02 14:08:37 +03:00
Xiang Xiao
629d9969dd
arch/riscv: Rename riscv_syscall_dispatch to riscv_dispatch_syscall
...
follow other function naming(e.g. riscv_dispatch_irq)
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-04-02 14:08:37 +03:00
Xiang Xiao
7a209e6ee8
arch/riscv: Align the macro definition in csr.h
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-04-02 14:08:37 +03:00
Abdelatif Guettouche
11807abd4e
arch/xtensa: Add xtensa_tcbinfo struct that contains helpful offsets.
...
Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2022-04-02 10:39:14 +08:00
Ville Juven
71ced1f1a9
RISC-V: Implement skeleton for a per CPU structure
...
It might be useful to store things in memory per CPU. The tricky part
is that all CPUs run the same code and see the same memory, so some
kind of centralized access is required.
For now, the structure contains the hart id.
Access to the structure elements is provided via sscratch, which is
unique for every hart!
2022-04-01 16:19:42 -03:00