Commit Graph

49995 Commits

Author SHA1 Message Date
zhangyuan21
601202ee4a arm64: Use the correct aff in up_affinity_irq function
Signed-off-by: zhangyuan21 <zhangyuan21@xiaomi.com>
2023-07-14 01:13:01 +08:00
wangyingdong
57bf3e1fea net: Add msg_peek support for udp and tcp
Signed-off-by: wangyingdong <wangyingdong@xiaomi.com>
2023-07-13 19:40:04 +08:00
guoshichao
79af1cdfe6 libs/libc/getpgid: add getpgid implementation
1. the getpgid function can help to pass the
ltp/open_posix_testsuite/killpg related testcases
2. NuttX do not support process group, so we use the process id as
process group id
3. the implementation are referred to: https://pubs.opengroup.org/onlinepubs/9699919799/functions/getpgid.html

Signed-off-by: guoshichao <guoshichao@xiaomi.com>
2023-07-13 19:37:35 +08:00
simbit18
1b1ac6f3b7 Fix nuttx coding style
Remove TABs
Fix indentation
Fix Multi-line comments
Fix Comments to the Right of Statements.

Fix nuttx coding style

Fix Comments to the Right of Statements.
2023-07-13 19:30:56 +08:00
Xiang Xiao
0ee304954a boards/tiva: Enable LTO for lm3s6432-s2e/nsh
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-07-13 10:13:21 +08:00
Neale Ferguson
878384fef0 Fix and improve dynamic loader
This patch fixes some issues found by Mark Stevens and
improve the dynamic loader.
2023-07-13 10:11:58 +08:00
chenrun1
4d285cb14d xtensa_saveusercontext:Leave the context information empty
In the current implementation of other architectures, it is not really implemented to preserve the context, so it is emulated from other architectures to clear the context.
If this behavior is not implemented, it will cause the xtensa architecture processor to loop assert in the active assert case

Signed-off-by: chenrun1 <chenrun1@xiaomi.com>
2023-07-13 09:48:46 +08:00
raiden00pl
a59f82b8d2 cmake: support pre-processor for linker script 2023-07-13 03:05:39 +08:00
chenrun1
3bdba79851 armv8m/arm_hardfault.c:fix code style.
Signed-off-by: chenrun1 <chenrun1@xiaomi.com>
2023-07-13 03:05:28 +08:00
chenrun1
842adf888f armv8m/arm_hardfault:add arm_gen_nonsecurefault information
Signed-off-by: chenrun1 <chenrun1@xiaomi.com>
2023-07-13 03:05:28 +08:00
yinshengkai
043d5922e4 drivers: add ascii drvier, returns a printable string of 0x21-0x7f
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2023-07-12 11:13:37 -06:00
dulibo1
13c7138c8d add refcnt using epoll_create to fix bug when use popen which dup the fd and close at end after epoll_create
Signed-off-by: dulibo1 <dulibo1@xiaomi.com>
2023-07-13 01:06:53 +08:00
yinshengkai
ce98f186c0 syslog: add syslog channel filtering function
support to control the opening or closing of the specified channel through the syslogmask command at runtime

Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2023-07-13 01:04:07 +08:00
rongyichang
6902ed9516 drivers/lcd: add area alignment ioctl for lcd driver
Signed-off-by: rongyichang <rongyichang@xiaomi.com>
2023-07-13 01:03:18 +08:00
raiden00pl
f43c7e99be boards/stm32h7: Add stm32h745i-disco board 2023-07-12 11:30:57 -03:00
raiden00pl
f7905512be stm32h7: add LTDC support 2023-07-12 11:30:57 -03:00
raiden00pl
8ceff0dc5a arm/stm32h7: Add STM32H745 family 2023-07-12 11:30:57 -03:00
dulibo1
062e08ea3a serial:fix driver/serial/serial.c logic error
Signed-off-by: dulibo1 <dulibo1@xiaomi.com>
2023-07-12 11:28:54 -03:00
dulibo1
7ccdb2cfa8 battery:fix poll return type
Signed-off-by: dulibo1 <dulibo1@xiaomi.com>
2023-07-12 11:06:47 -03:00
fangxinyong
ffa084f3d2 signal: SIGKILL or SIGSTOP cannot be caught
pass ltp signal test cases, for posix spec, SIGKILL and SIGSTOP cannot be caught.

https://pubs.opengroup.org/onlinepubs/9699919799/functions/signal.html
https://pubs.opengroup.org/onlinepubs/007904875/functions/sigset.html

Signed-off-by: fangxinyong <fangxinyong@xiaomi.com>
2023-07-12 21:27:06 +08:00
fangxinyong
7462b199bb signal: SIGCONT can be caught
pass ltp sigaction case 19-5.c, 23-5,c and 28-5.c.
When SIGCONT is dispatched, resume all members of the task group.
So there is nothing do in default action.

Signed-off-by: fangxinyong <fangxinyong@xiaomi.com>
2023-07-12 21:27:06 +08:00
Zhe Weng
3d5eae2497 arch/arm64: Enable FPU for qemu-armv8a:netnsh_smp and netnsh_smp_hv
When reading https://github.com/apache/nuttx-apps/pull/1793, I found a previous problem https://github.com/apache/nuttx-apps/pull/1454#discussion_r1045718067 now still exists on current master (inf in iperf bandwidth).

By step-by-step debugging, I found a value of 1000000.0 stored in register d8 is overwritten as 0 after context switch, then fdiv results in inf because of divided by 0. Finally I found that ARCH_FPU is not enabled while compiler is using FPU, and may lose values in floating-point registers.

Signed-off-by: Zhe Weng <wengzhe@xiaomi.com>
2023-07-12 10:04:13 -03:00
raiden00pl
ad6361f0cc cmake: fix build after c33d1c9c97 (vfork -> fork) 2023-07-12 09:47:54 -03:00
Zhe Weng
4ffd2cc84c net/nat: Fix compiler warning
We found warning of "%x" mismatch with "in_addr_t" on some platforms.

Signed-off-by: Zhe Weng <wengzhe@xiaomi.com>
2023-07-12 19:29:14 +08:00
yinshengkai
9c6f48e57b drivers/segger: add RTT serial support
usage:
  1. Connect Jlink, start JLinkGDBServer
     JLinkGDBServer -if SWD -device stm32h743zi -speed 16000
  2. Listen to the RTT port data and forward it to the virtual serial port
     sudo socat -d -d PTY,link=/dev/ttyRTT0,raw,ignoreeof TCP:127.0.0.1:19021,reuseaddr
  3. Read serial data
     minicom -D /dev/ttyRTT0

Performance:(STM32H743, 400MHZ)
time "dd if=/dev/zero of=/dev/console bs=512 count=2048"
6.67 sec  157KB/s

Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2023-07-12 09:54:50 +08:00
yinshengkai
e1553e8407 drivers/rtt: check whether Jlink is connected
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2023-07-12 09:54:50 +08:00
yanghuatao
980462bf27 set CONFIG_PTHREAD_STACK_MIN as DEFAULT_MM_PGSIZE`s default value and
sysconf add param _SC_THREAD_STACK_MIN deal

make the pthread_exit pass the ltp/open_posix_testsuite/pthread_exit/1-2.c testcase
(1) in pthread_exit/1-2.c testcase, if sysconf(_SC_THREAD_STACK_MIN) % sysconf(_SC_PAGESIZE) is not zero, will report error and test failed, so set CONFIG_PTHREAD_STACK_MIN as DEFAULT_MM_PGSIZE`s default value.
(2) in function sysconf add param _SC_THREAD_STACK_MIN deal.

Signed-off-by: yanghuatao <yanghuatao@xiaomi.com>
2023-07-12 03:32:26 +08:00
Zhe Weng
c253bb91a2 drivers/net: Add wireless ops in upper-half driver
Take the idea from Linux's iw_handler array and esp32c3_wlan's wlan_ops_s, and make it a common logic of upper-half driver.

Signed-off-by: Zhe Weng <wengzhe@xiaomi.com>
2023-07-12 03:32:02 +08:00
liqinhui
a7a47621fa net/local: Support the socketpair interface of local udp socket.
Add the proccessing logic of udp socketpair, and modify the
logic of sending and receiving for udp socketpair.

Verification:
 - Use the socketpair interface to create a pair of local udp sockets,
   and perform read and write operations.

Signed-off-by: liqinhui <liqinhui@xiaomi.com>
2023-07-12 03:31:43 +08:00
raiden00pl
92040a2bdf cmake: convert some stm32 boards 2023-07-11 15:52:56 -03:00
raiden00pl
6dcfe61b0e cmake: add support for stm32h7 2023-07-11 15:52:56 -03:00
raiden00pl
ab6fd2e6c8 cmake: add support for stm32f7 2023-07-11 15:52:56 -03:00
raiden00pl
ca3d213402 cmake: sync arch/stm32/CMakeLists.txt with Make.defs 2023-07-11 15:52:56 -03:00
lile7
a3db142fbf drivers/video: use kmm_free(buff) to free memory instead of realloc(buff, 0) which is abandoned
ref: 89d61f4eb4

Signed-off-by: lile7 <lile7@xiaomi.com>
2023-07-12 02:33:17 +08:00
guoshichao
c33d1c9c97 sched/task/fork: add fork implementation
1. as we can use fork to implement vfork, so we rename the vfork to
fork, and use the fork method as the base to implement vfork method
2. create the vfork function as a libc function based on fork
function

Signed-off-by: guoshichao <guoshichao@xiaomi.com>
2023-07-12 02:27:37 +08:00
rongyichang
5d7864fbcb drivers/spi: add support for qspi hwfeatures
add QSPI_BITORDER and QSPI_WORD_REVERSE hwfeatures

Signed-off-by: rongyichang <rongyichang@xiaomi.com>
2023-07-12 01:42:25 +08:00
raiden00pl
1f641fd63b cmake: fix NUTTX_COMMON_DIR definition 2023-07-12 01:01:19 +08:00
simbit18
9681c52517 Fix nuttx coding style
Remove TABs
Fix indentation
2023-07-11 23:32:17 +08:00
yanghuatao
2529f371ee change clockid_t type from uint8_t to int
make the clock_getres pass the ltp/open_posix_testsuite/clock_getres testcases, posix has no explain about clockid_t type, referrence linux: 858fd168a9/include/linux/types.h (L27) and 858fd168a9/include/uapi/asm-generic/posix_types.h (L96)

Signed-off-by: yanghuatao <yanghuatao@xiaomi.com>
2023-07-11 22:36:23 +08:00
yinshengkai
81553deb53 time: add up_perf_init weak_function
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2023-07-11 10:09:25 -03:00
yanghuatao
e9d7210d02 sim/posix_test: fix shm_open() return file descriptor associated with FD_CLOEXEC
Make the pthread_setspecific pass the shm_open/11-1.c testcases. Function shm_open() should return a file descriptor for the shared memory object associated with FD_CLOEXEC. Reference to https://pubs.opengroup.org/onlinepubs/9699919799/functions/shm_open.html and https://github.com/lattera/glibc/blob/master/sysdeps/posix/shm_open.c#LL38C1-L38C1

Signed-off-by: yanghuatao <yanghuatao@xiaomi.com>
2023-07-11 13:30:34 +08:00
yanghuatao
24e3cdf0c0 libc/pthread: remove unsed compare code in pthread_rwlock_init()
In nuttx function pthread_rwlock_init param attr is useless, so remove it to make rwlock_init pass rwlock_init/1-1.c and rwlock_init/3-1.c testcases.

Signed-off-by: yanghuatao <yanghuatao@xiaomi.com>
2023-07-11 13:29:37 +08:00
Fotis Panagiotopoulos
8d0b271ab6 Added missing semicolon to dead-lock detection. 2023-07-11 11:18:46 +08:00
Xiang Xiao
9dc59e9109 Fix error: Mixed case identifier found
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-07-10 23:03:17 +03:00
Xiang Xiao
ebcb03dce9 libc/symtab: Don't include symtab.h in the header files
to unify the inclusion of symtab.h only from the source files

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-07-10 23:03:17 +03:00
Xiang Xiao
229293f9f8 binfmt: Move [elf|nxflat]_[un]initialize to private header file
like what builtin binary format do

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-07-10 23:03:17 +03:00
liuzhao
899471c6bd add support for YT8512 phy 2023-07-11 03:40:53 +08:00
simbit18
af247276d5 Fix nuttx coding style
Remove TABs
Fix indentation
2023-07-11 02:33:45 +08:00
yanghuatao
4d9f67940c nuttx/toolchain: Add macro _LDBL_EQ_DBL to nuttx/arch/arm64/src/Toolchain.defs
Fix goldfish build toolchain math library error:
/mnt/yang/vela_Goldfish/nuttx/include/libcxx/cmath:454:9: error: 'nexttowardf' has not been declared in '::'
  454 | using ::nexttowardf;
      |         ^~~~~~~~~~~
/mnt/yang/vela_Goldfish/nuttx/include/libcxx/cmath:472:9: error: 'acosl' has not been declared in '::'
  472 | using ::acosl;
      |         ^~~~~
/mnt/yang/vela_Goldfish/nuttx/include/libcxx/cmath:473:9: error: 'asinl' has not been declared in '::'
  473 | using ::asinl;
      |         ^~~~~

Signed-off-by: yanghuatao <yanghuatao@xiaomi.com>
2023-07-11 00:44:45 +08:00
yanghuatao
cd5e1169df libm/libmcs: Fix undefined symbol `fesetround'
Fix build error:apps/interpreters/quickjs/quickjs/quickjs.c:11852:(.text.js_ecvt1.constprop.0+0xfc): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol `fesetround'

Signed-off-by: yanghuatao <yanghuatao@xiaomi.com>
2023-07-11 00:25:16 +08:00