This fixes stack pointer restore logic to avoid parent stack corruption
by forked child in PROTECTED build.
Signed-off-by: Yanfeng Liu <yfliu2008@qq.com>
This fixes `tp` value of forked child in PROTECTED build to support
vfork. Why? the optimized `dispatch_syscall` requires `tp` to hold
the task TCB since commit e6973c764c.
Signed-off-by: Yanfeng Liu <yfliu2008@qq.com>
This adds out-of-tree usage guide of CMake for FLAT, PROTECTED and KERNEL
configs so that more kernel developers can enjoy cmake for their daily
work.
Signed-off-by: Yanfeng Liu <yfliu2008@qq.com>
tc3xx/tc3xx_timerisr.c: In function ‘up_timer_initialize’:
tc3xx/tc3xx_timerisr.c:58:39: warning: passing argument 1 of ‘tricore_systimer_initialize’ discards ‘volatile’ qualifier from pointer target type [-Wdiscarded-qualifiers]
58 | lower = tricore_systimer_initialize(&MODULE_STM0, 192, SCU_FREQUENCY);
In file included from tc3xx/tc3xx_timerisr.c:31:
nuttx/arch/tricore/src/common/tricore_internal.h:252:35: note: expected ‘void *’ but argument is of type ‘volatile Ifx_STM *’ {aka ‘volatile struct _Ifx_STM *’}
252 | tricore_systimer_initialize(void *tbase, int irq, uint64_t freq);
| ~~~~~~^~~~~
tc3xx/tc3xx_serial.c:177:16: warning: initialization discards ‘volatile’ qualifier from pointer target type [-Wdiscarded-qualifiers]
177 | .uartbase = &MODULE_ASCLIN0,
| ^
tc3xx/tc3xx_serial.c:178:16: warning: initialization discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
178 | .pins = &g_uart0_pins,
| ^
common/tricore_trapcall.c: In function ‘tricore_trapcall’:
common/tricore_trapcall.c:66:3: warning: passing argument 4 of ‘_assert’ discards ‘volatile’ qualifier from pointer target type [-Wdiscarded-qualifiers]
66 | PANIC_WITH_REGS("Trap", CURRENT_REGS);
| ^~~~~~~~~~~~~~~
In file included from common/tricore_trapcall.c:29:
nuttx/include/assert.h:189:45: note: expected ‘void *’ but argument is of type ‘volatile uintptr_t *’ {aka ‘volatile long unsigned int *’}
189 | FAR const char *msg, FAR void *regs);
Signed-off-by: chao an <anchao@lixiang.com>
Fix https://github.com/apache/nuttx/issues/12712
If run nsh over usb based serial port, the default stack size is too small,
for example simple `ps` command will use more than 2208 bytes stack.
Then the stack overflow will happen and the system will hang here.
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
Original documentation link for riscv is broken,
so update to the correct link for all architectures.
Put the link around `reg_off` to avoid the long line warning
from nxstyle.
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
- use 'lan9250_ioctl' to set and get the value of lan9250 phy register
- use `lan9250_uninitialize` to un-initialize the ethernet driver
Signed-off-by: chenwen@espressif.com <chenwen@espressif.com>
This fixes the following issue when configuring canmv230:master
with Ubuntu stock toolchain and cmake 3.22:
```
CMake Error at .../arch/risc-v/src/cmake/Toolchain.cmake:218 (if):
if given arguments:
"STREQUAL" "GNU_RVG"
Unknown arguments specified
```
Signed-off-by: Yanfeng Liu <yfliu2008@qq.com>
This definition was added in order to solve some compilation problems
encountered when porting tripartite libraries
Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
This definition was added in order to solve some compilation problems
encountered when porting third-party libraries
Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
To solve some compilation issues encountered during the porting of
third-party libraries, this function has been added.
Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>