Xiang Xiao
c20ed58879
arch: Remove the inclusion of arch/irq.h from chip/irq.h
...
since arch/irq.h will include chip/irq.h
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-07-04 13:03:47 +03:00
Xiang Xiao
3d1ce144df
arch: Move up_getsp from arch.h to irq.h
...
since all other special register operation in irq.h
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-07-01 10:44:55 -03:00
Gustavo Henrique Nihei
5ce77fad1b
arch: Remove "0x" prefix preceding "%p" specifier on format string
...
The "p" format specifier already prepends the pointer address with "0x"
when printing.
Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
2022-06-30 22:08:58 +03:00
Nimish Telang
4afd25b567
this flag is meaningless for the linker
2022-06-27 20:03:03 -03:00
Xiang Xiao
11e1a8b28b
arch: Define WCHAR_[MIN|MAX] in arch/include/limits.h
...
follow up the below change:
commit 6357523892
Author: Xiang Xiao <xiaoxiang@xiaomi.com>
Date: Mon Nov 1 12:40:51 2021 +0800
arch: Add _wchar_t typedef like other basic types
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-06-03 22:25:49 +03:00
chao.an
3f65b562bb
arch: inline up_interrupt_context()
...
inline the up_interrupt_context() to avoid unnecessary stack pushes
Signed-off-by: chao.an <anchao@xiaomi.com>
2022-05-26 04:36:07 +08:00
Xiang Xiao
1f920e55d3
Move warning option from Make.defs to Toolchain.defs
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-05-15 15:40:35 +03:00
Xiang Xiao
1ba316b5c7
arch: Remove board/libboard$(LIBEXT) from the rerequest of export_startup
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-05-12 23:34:31 +03:00
Xiang Xiao
aeb9c5d822
boards: Move -fno-strict-aliasing from Make.defs to Toolchain.defs
...
and migrate MAXOPTIMIZATION into ARCHOPTIMIZATION
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-05-01 11:36:41 +03:00
Xiang Xiao
94cb0c6072
arch: Move -nostdinc++ to Tooolchain.defs
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-04-29 21:08:14 -03:00
Xiang Xiao
8f8ee25a9c
boards: Move -g from Make.defs to Toolchain.defs
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-04-25 16:23:03 +03: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
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
chao.an
5bdfae66ce
arch/arm: export arm_saveusercontext()
...
rename arm_saveusercontext() -> up_arm_saveusercontext()
Signed-off-by: chao.an <anchao@xiaomi.com>
2022-04-18 22:22:16 +08:00
Xiang Xiao
e923875c1b
arch/ceva: Remove FAR from chip folder
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-04-17 18:42:38 +03:00
chao.an
b3d47e246f
arch/stack_color: correct the stack top of running task
...
This PR to ensure the stack pointer is locate to the stack top
Signed-off-by: chao.an <anchao@xiaomi.com>
2022-04-14 16:48:19 +08:00
chao.an
ff210e1c2d
arch/stack_color: correct the end address of stack color
...
The different optimization of compilers will cause ambiguity in
obtaining sp through up_getsp() in arm_stack_color(), if compile
with clang and enable the optimization flag (-Ofast), up_getsp()
call will be earlier than push {r0-r9,lr}, the end address of color
stack will overlap with saved registers.
Compile line:
clang --target=arm-none-eabi -c "-Ofast" -fno-builtin -march=armv8.1-m.main+mve.fp+fp.dp \
-mtune=cortex-m55 -mthumb -mfpu=fpv5-d16 -mfloat-abi=hard -D__NuttX__ -common/arm_checkstack.c -o arm_checkstack.o
Assembler code:
llvm-objdump -aS arm_checkstack.o
------------------------------------
|00000000 <arm_stack_color>:
|; start = INT32_ALIGN_UP((uintptr_t)stackbase);
| 0: c2 1c adds r2, r0, #3
| 2: 22 f0 03 02 bic r2, r2, #3
|; end = nbytes ? INT32_ALIGN_DOWN((uintptr_t)stackbase + nbytes) :
| 6: 19 b1 cbz r1, 0x10 <arm_stack_color+0x10> @ imm = #6
| 8: 08 44 add r0, r1
| a: 20 f0 03 00 bic r0, r0, #3
| e: 00 e0 b 0x12 <arm_stack_color+0x12> @ imm = #0
|; __asm__
| 10: 68 46 mov r0, sp <--- fetch the sp before push {r7 lr}
| 12: 80 b5 push {r7, lr} <--- sp changed
|; nwords = (end - start) >> 2;
| 14: 80 1a subs r0, r0, r2
| 16: 80 08 lsrs r0, r0, #2
|; }
| 18: 08 bf it eq
| 1a: 80 bd popeq {r7, pc}
| 1c: 4b f6 ef 63 movw r3, #48879
| 20: cd f6 ad 63 movt r3, #57005
| 24: a0 ee 10 3b vdup.32 q0, r3
|; while (nwords-- > 0)
| 28: 20 f0 01 e0 dlstp.32 lr, r0
|; *ptr++ = STACK_COLOR; <--- overwrite
| 2c: a2 ec 04 1f vstrw.32 q0, [r2], #16
| 30: 1f f0 05 c0 letp lr, 0x2c <arm_stack_color+0x2c> @ imm = #-8
|; }
| 34: 80 bd pop {r7, pc}
------------------------------------
Signed-off-by: chao.an <anchao@xiaomi.com>
2022-04-13 09:37:54 +08:00
Petro Karashchenko
68902d8732
pid_t: unify usage of special task IDs
...
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2022-03-22 21:22:32 +08:00
Petro Karashchenko
3fff4508c7
netinitialize: call xxx_netinitialize unconditionally
...
The xxx_netinitialize is defined to a function only if
CONFIG_NET=y and CONFIG_NETDEV_LATEINIT=n. Otherwise it
is defined to an empty macro.
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2022-03-19 17:41:33 +08:00
Petro Karashchenko
20ac85860c
config: finalize transition from USER_ENTRYPOINT to INIT_ENTRYPOINT
...
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2022-03-19 11:32:47 +08:00
Xiang Xiao
b6bc460b2c
arch: Make the comment and definition of CONFIG_SYS_RESERVED correctly
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-03-14 22:51:00 +02:00
Xiang Xiao
54e630e14d
arch: Merge up_arch.h into up_internal.h
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-03-14 09:32:17 +02:00
Xiang Xiao
c96c96a399
drivers: Merge the common driver initialization into one place
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-03-13 11:24:48 -03:00
Xiang Xiao
f94093bc2e
arch/ceva: Move the idle stack initialization to up_initial_state
...
to follow other arch's implementation
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-03-13 00:28:05 +02:00
Xiang Xiao
872c570343
arch: Align the implementation of stack related functions
...
arm: Avoid call k[u]mm_memalign to save the code size
ceva: Correct stack_base_ptr usage(top of stack v.s. bottom of stack)
mips: Correct the stack alignment in up_use_stack
misoc: Correct the stack alignment in up_use_stack
or1k: Correct the stack alignment in up_use_stack
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-02-28 15:05:41 +08:00
Xiang Xiao
3bf416e8b8
arch: Move STACK_ALIGNMENT definition to up_internal.h
...
to avoid the same macro duplicate to many place
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-02-28 15:05:41 +08:00
Xiang Xiao
44bd3212d4
arch: Remove SYS_RESERVED from Kconfg
...
let's arch define the correct value instead
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-02-27 22:54:13 +08:00
Xiang Xiao
087b9e5ff3
arch: Move the content from svcall.h to syscall.h
...
and remove svcall.h
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-02-27 22:54:13 +08:00
Xiang Xiao
2f24d2c265
arch/ceva: Replace OUTDIR with TOPDIR
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-02-21 09:25:26 +01:00
Xiang Xiao
163fe4ff0b
boards: Replace CONFIG_CYGWIN_WINTOOL with CONVERT_PATH
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-02-20 21:15:36 +01:00
Xiang Xiao
69a6072946
arch/ceva: Replace adj_stack_ptr with stack_base_ptr
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-02-17 11:06:09 +09:00
Xiang Xiao
814cab1cd1
arch/ceva: Mark the allocated stack with TCB_FLAG_FREE_STACK
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-02-17 11:06:09 +09:00
Xiang Xiao
f8df491d5d
arch/ceva: Update tls handle to the latest mainline
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-02-17 11:06:09 +09:00
Xiang Xiao
4bc5b246ac
arch/ceva: Remove B2C and C2B
...
since TL420 doesn't support anymore, we
can safely remove the special hack for it
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-02-17 11:06:09 +09:00
Xiang Xiao
17a7d612df
arch: Replace nx_vsyslog with vsyslog
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-02-14 09:41:45 -03:00
Xiang Xiao
77792a1598
sched: Define CONFIG_SMP_NCPUS to 1 in no SMP case
...
to simplify the SMP related code logic
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-01-20 23:21:21 +08:00
Petro Karashchenko
8d3bf05fd2
include: fix double include pre-processor guards
...
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2022-01-16 11:11:14 -03:00
ligd
ee916bdb91
CEVA: add ceva platform xc5 xm6 support
...
Signed-off-by: ligd <liguiding1@xiaomi.com>
2022-01-07 09:31:59 -03:00