Drop to user-space in kernel/protected build with up_pthread_exit,
now all pthread_cleanup functions executed in user mode.
* A new syscall SYS_pthread_exit added
* A new tcb flag TCB_FLAG_CANCEL_DOING added
* up_pthread_exit implemented for riscv/arm arch
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
The RISC-V Integer Calling Convention states that the stack pointer
shall always be aligned to a 128-bit boundary upon procedure entry, both
for RV32* and RV64* ISAs (exception to the RV32E ISA, which must follow a
specific convention)
Summary:
- The CONFIG_SMP_IDLETHREAD_STACKSIZE was introduced to optimize
the idle stack size for other than CPU0
- However, there are no big differences between the idle stacks.
- This commit removes the config to simplify the kernel code
Impact:
- All SMP configurations
Testing:
- Tested with ostest with the following configs
- spresense:smp, spresense:rndis_smp
- esp32-devkitc:smp (QEMU), maix-bit:smp (QEMU)
- sabre-6quad:smp (QEMU), sabre-6quad:netnsh_smp (QEMU)
- raspberrypi-pico:smp, sim:smp (x86_64)
Signed-off-by: Masayuki Ishikawa <asayuki.Ishikawa@jp.sony.com>
Summary:
- This commit adds coloration for the idle stacks
Impact:
- k210 only
Testing:
- Tested with smp and nsh configs with QEMU and dev board
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
Summary:
- This commit adds coloration for the idle stack
- Also, apply la pseudo-instruction instead of lui and addi
Impact:
- fe310 only
Testing:
- Tested with nsh with QEMU and dev board
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
arch: Allocate the space from the beginning in up_stack_frame
and modify the affected portion:
1.Correct the stack dump and check
2.Allocate tls_info_s by up_stack_frame too
3.Move the stack fork allocation from arch to sched
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Summary:
- I noticed that stack corruption happens due to recent refactoring
- This commit fixes this issue
Impact:
- SMP only
Testing:
- Tested with maix-bit:smp (QMU and dev board)
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
All supported arch uses a push-down stack:
The stack grows toward lower addresses in memory. The stack pointer
register points to the lowest, valid working address (the "top" of
the stack). Items on the stack are referenced as positive(include zero)
word offsets from sp.
Which means that for stack in the [begin, begin + size):
1.The initial SP point to begin + size
2.push equals sub and then store
3.pop equals load and then add
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Ken Pettit has submitted the ICLA and we can migrate the licenses
to Apache.
Sebastien Lorquet has submitted the ICLA and we can migrate the licenses
to Apache.
Gregory Nutt has submitted the SGA and we can migrate the licenses
to Apache.
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
tcpip ok
update wifi demo configuration
fix tcpip input cause misalign fault
change some api definetions in nuttx
fix wifi manager strlen copy without suffix null character
fix 602 network buf allocation issue
wifi scan works
[ble] Add controller code
[BLE] Add nuttx adapt code for blecontroller .
[BLE] modified include file path, to fix cflag is too long.
[ble]Test ble peripheral pass, save code.
[ble] Organize the code
[BLE] Add blecontroller config for nuttx
[BLE] Add config for ble example
fix tcp lost packet when rx
support wpa3.
Copy default config from wifi default config. Create ble for local test and ble tester for autopts.
Add config for local test.
Add pts teset config for host test
Add config for mesh test
Create task to init blecontroller
Delete blecontroller rx thread.
using idle task to receive hci command from host
Set ble device name to /dev/ble, and fix code.
1.fix a ke schedule risk 2. CFG_HOST is enabled only in the case that CONFIG_BLE_HOST_DISABLE is not enabled, by lanlan
rm _sp_main stack.
change h/l workq_stack_size 6K
change l workq_stack_size 3K.
[ble] delete file_detach
color idle stack.
clear bl602 netdev code
SCAN is sorted according to RSSI
enlarge nsh command line buffer
fixup stack overflow check checkfail when startup
arch/risc-v/BL602:fix reboot cause crash
reboot default use romapi.
riscv/bl602:netdev support defered input, remove wifi_tx function
risc-v/bl602:fix sem_timedwait usage error in bl_cmds
risc-v/bl602:fix memory access out of bounds when copy ssid
remove ble and wifi source, download when build
add bl602 blob gitignore
risc-v/bl602:remove ble-pts defconfig
Fix some typos in NuttX style naming
Fix the replacement of tab to space
fix wlan interface down still receive packet
fix wapi crash, rx when ifdown,and ble_hci_rx_do
change system reset to rom dirver
change ble hci interval to 50ms
NuttX support wifi enable/disable log via KConfig
support country code configuration in Kconfig
fix ap tx not work
since other subsystem doesn't need call these function anymore
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: Idfb217c412db62d9f17f427310b75bb78785dc50