Commit Graph

991 Commits

Author SHA1 Message Date
Xiang Xiao
da954956e7 Simplify DEFAULT_SMALL usage in Kconfig
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-03-01 03:15:01 +08:00
Oki Minabe
fbf05db906 fix up_tls_info define for BUILD_KERNEL
Summary:
- In case of BUILD_KERNEL, NuttX uses USR mode sp and SVC mode sp.
- The kernel runs on SVC mode sp.
- While the kernel is running, up_getsp() cannot get the TLS address.
- The kernel requires tls_get_info() function.
- For the user land, up_getsp() can be used.
- tls_getinfo.c is always compiled and tls_get_info() function is
  filtered by macros in the tls_getinfo.c.

Impact:
BUILD_KERNEL

Testing:
test program on custom Cortex-A9 board (BUILD_KERNEL)
ostest on sabre-6quad:smp (QEMU, BUILD_FLAT)

Signed-off-by: Oki Minabe <minabe.oki@gmail.com>
2022-02-28 01:12:58 +08:00
Masayuki Ishikawa
de95a8550f arch, board: Add thumb support to i.MX6
Summary:
- This commit adds thumb support to i.MX6
- Also, applies the same coding style to arch_elf.c

Impact:
- i.MX6 only

Testing:
- Tested with sabre-6quad:smp (QEMU, Dev board)
- Tested with sabre-6quad:netnsh (QEMU)
- Tested with sabre-6quad:netknsh (QEMU, not merged yet)

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2022-02-25 10:51:12 +08:00
Masayuki Ishikawa
11731125ef libs: armv7-a: Add thumb support to arch_elf.c
Summary:
- This commit adds thumb support to arch_elf.c

Impact:
- None

Testing:
- Tested with sabre-6quad:netknsh (QEMU, not merged yet)

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2022-02-25 10:51:12 +08:00
zhuyanlin
1aedf30f38 libc:machine:xtensa: fix warning
Signed-off-by: zhuyanlin <zhuyanlin1@xiaomi.com>
2022-02-24 22:13:46 +08:00
Huang Qi
e516c6247e sched: Implement task local storage
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2022-02-23 22:05:02 +08:00
Huang Qi
18227cbeff libc/tls: Supports up to 64 elements
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2022-02-23 22:05:02 +08:00
Xiang Xiao
f1ed349dd9 sched/clock: Remove CLOCK_MONOTONIC option from Kconfig
here is the reason:
1.clock_systime_timespec(core function) always exist regardless the setting
2.CLOCK_MONOTONIC is a foundamental clock type required by many places

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-02-23 01:21:26 +08:00
Petro Karashchenko
9b02a91c72 libc/sched/task_setcanceltype: fix function name in comment
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2022-02-21 20:32:49 +08:00
Xiang Xiao
928d52f315 libc/machine: Implement ARM aeabi_xxx API called by clang
specified here:
https://developer.arm.com/documentation/ihi0043/latest

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-02-21 09:29:18 +01:00
Xiang Xiao
1d1bdd85a3 Remove the double blank line from source files
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-02-20 20:10:14 +01:00
Huang Qi
f452dd7ab4 sched: Mark pthread as non-cancelable to avoid additional calls to pthread_exit()
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2022-02-20 15:36:07 +01:00
raiden00pl
4e27f4a1d2 libdsp: port lib_observer.c to b16 2022-02-20 21:58:10 +08:00
raiden00pl
7126b829af libdsp/lib_observer.c: cosmetics 2022-02-20 21:58:10 +08:00
raiden00pl
1366e14192 libdsp: initialize flux_link in params, remove flux_link from pmsm_phy_params 2022-02-20 21:58:10 +08:00
raiden00pl
ca4790c429 libdsp: add one_by_p to motor_phy_params 2022-02-20 21:58:10 +08:00
chao.an
4824ea68a9 libs/libnx: handle the bad message correctly
Signed-off-by: chao.an <anchao@xiaomi.com>
2022-02-17 13:40:11 +01:00
Peter Kalbus
6abdf73535 sim: Initial support on MacOS M1 and Linux AARCH64 based hosts. 2022-02-17 09:35:09 +08:00
Oki Minabe
c1ea37742b fix arm FPSCR typos in comments. 2022-02-17 01:08:11 +08:00
YAMAMOTO Takashi
1d89d9ae4b libc.csv: Add pthread_setname_np and pthread_getname_np 2022-02-16 15:09:14 +08:00
Xiang Xiao
5f67662c63 libc/sim: Rename arch_setjmp[64].S to arch_setjmp_x86[_64].S
to follow other arch/x86 arch/x86_64 convention

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-02-16 12:23:16 +08:00
Mateusz Szafoni
5f50547ced libdsp: cosmetics changes from code review
Co-authored-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2022-02-16 03:20:20 +08:00
raiden00pl
31ffa6d576 libdsp/lib_observer.c: remove dir argument from speed observers
We can automatically detect the direction of movement from angle diff
2022-02-16 03:20:20 +08:00
raiden00pl
01cbe9133e libdsp/lib_observer.c: update some comments
The angle observer always refer to a motor electrical angle,
while the speed observer can be applied to a motor electrical speed or a motor mechanical speed.
2022-02-16 03:20:20 +08:00
raiden00pl
26f1be27dd libdsp/lib_observer.c: separate angle observer from speed observer
They can be used completely independently, so they should'n be coupled.
For example, a sensored motor controller in speed control mode doesn't need an angle estimator.
2022-02-16 03:20:20 +08:00
zouboan
2391e4bd71 Update libs/libdsp/lib_observer.c
Co-authored-by: Mateusz Szafoni <raiden00pl@gmail.com>
2022-02-14 10:47:15 -03:00
zouboan
132f27a91a lib_observer: add nolinear fluxlink observer 2022-02-14 10:47:15 -03:00
Xiang Xiao
47e38eb70f binfmt: Decouple builtin from binfs file system
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-02-14 09:35:35 -03:00
Xiang Xiao
34baf47307 libc: posix_openpty should use the absolute path("dev/ptmx")
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-02-14 08:43:05 +09:00
Zeng Zhaoxiu
5bf7c185af semphore: release all semphores' holder that the task held when exit
Add a list in TCB to track all semphores the task held, so we
can release all holders when exit, so nxsched_verify_tcb
is unnecessary.

Signed-off-by: Zeng Zhaoxiu <walker.zeng@transtekcorp.com>
2022-02-13 03:20:51 +08:00
anjiahao
ce3c604f48 libc/chdir:"PWD" should save absolute path
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2022-02-11 13:05:20 +01:00
Huang Qi
8bf7f94d39 pthread: Call cleanup callback while asyncrhonous cancel
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2022-02-09 21:21:43 +08:00
Huang Qi
c0a0de97ce Revert "libc: Call pthread_exit in user-space by up_pthread_exit"
This reverts commit f4a0b7aedd.

Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2022-02-09 21:21:43 +08:00
Huang Qi
63aa11ca11 libc/spawn: Fix typo in comments
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2022-02-09 01:39:45 +08:00
Xiang Xiao
4ee5ff81dd pthread: Add len argument to pthread_getname_np
follow the spec:
https://man7.org/linux/man-pages/man3/pthread_setname_np.3.html

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-02-07 08:19:17 +01:00
Xiang Xiao
0ff29e8f10 libc/stdlib: Compile lib_openpty.c without checking CONFIG_SERIAL_TERMIOS
follow up the following change:
commit 4262b09cbf
Author: Xiang Xiao <xiaoxiang@xiaomi.com>
Date:   Fri Dec 17 02:58:49 2021 +0800

    libc: Implement terminal api regardless of CONFIG_SERIAL_TERMIOS setting

    since many functions aren't related to termios directly

    Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-02-03 22:51:28 +01:00
Xiang Xiao
57c3fce583 libc: Implement posix_openpt
specify here:
https://pubs.opengroup.org/onlinepubs/009695399/functions/posix_openpt.html

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-02-03 11:02:31 -03:00
YAMAMOTO Takashi
021b1a6bfb libs/libc/machine/sim/arch_elf64.c: Implement R_X86_64_PC64
This relocation type is often found in eh_frame with -mcmodel=large
2022-01-31 11:38:59 +08:00
YAMAMOTO Takashi
794df92fc9 libs/libc/libc.csv: Add feof 2022-01-29 01:04:23 +08:00
YAMAMOTO Takashi
82fdba5258 libs/libc/libc.csv: Add truncate 2022-01-29 01:04:23 +08:00
YAMAMOTO Takashi
182575d240 libs/libc/libc.csv: Add localtime and ctime 2022-01-29 01:04:23 +08:00
YAMAMOTO Takashi
0db6ac28d8 libs/libc/libc.csv: Add atoi and friends 2022-01-29 01:04:23 +08:00
YAMAMOTO Takashi
4b183b93cf libs/libc/libc.csv: Add mktemp and its friends 2022-01-29 01:04:23 +08:00
YAMAMOTO Takashi
113992c037 libs/libc/libc.csv: Add gettimeofday 2022-01-29 01:04:23 +08:00
YAMAMOTO Takashi
5ebfb70427 libs/libc/libc.csv: Add pthread_cond_timedwait 2022-01-29 01:04:23 +08:00
YAMAMOTO Takashi
741a1d2149 libs/libc/libc.csv: Add pthread_create 2022-01-29 01:04:23 +08:00
YAMAMOTO Takashi
bbfd0667fc libs/libc/libc.csv: Add uname 2022-01-29 01:04:23 +08:00
YAMAMOTO Takashi
ebbfa034c7 libs/libc/libc.csv: Add shutdown 2022-01-29 01:04:23 +08:00
YAMAMOTO Takashi
a06cf25ab6 libs/libc/libc.csv: Add getaddrinfo and friends 2022-01-29 01:04:23 +08:00
YAMAMOTO Takashi
1b7cb3ef63 libs/libc/libc.csv: Add dlfcn functions 2022-01-29 01:04:23 +08:00