Commit Graph

51210 Commits

Author SHA1 Message Date
yangyalei 3017cc4402 Exec: Support run exec in current task
There is a problem when vfork() calls execv() (or execl()) to start a new application:
When the parent thread calls vfork() it receives and gets the pid of the vforked task,
and not the pid of the desired execv'ed application.
see issue #3334

Signed-off-by: yangyalei <yangyalei@xiaomi.com>
2023-09-20 16:53:30 +08:00
SPRESENSE 104dfb983d arch: cxd56xx: Return error for RTC alarm setting before initialization
Return EBUSY error for alarm setting before completion of RTC initialization.
2023-09-20 11:50:07 +03:00
zhanghongyu 13f59128fd iob: limit the iob bufsize is sufficient to fill all L2/L3/L4 headers
rndis header length is 36, L2 header is 14, IPv6 header is 40, tcp header is 56 when sack option count is 4(default max_ofosegs is 4). so the iob bufsize should greater than we need.

Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2023-09-20 14:35:22 +08:00
zhanghongyu 55d5006462 tcp_ofosegs: prepare iob to reset io_offset
The previous iob_trimhead added dev->iob->io_offset, so if the
input frame is not merged into the ofo segment, we need to reset
dev->iob->io_offset so that the subsequent tcp_send can properly
assemble packets.

Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2023-09-20 14:32:16 +08:00
zhanghongyu 398734500e wifi: parse channel from IE when ctl_ch is 0
Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2023-09-20 14:26:41 +08:00
chao an 6b070b2b00 libs/libc: currect usage of getpid/gettid in library
Signed-off-by: chao an <anchao@xiaomi.com>
2023-09-20 10:08:24 +08:00
zhanghongyu 537975656c wifi: Add handle type for disconnecting event
Some disconnected events will be missed

Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2023-09-20 10:07:40 +08:00
xiao 1487aa267e add Artery at32
check nxstyle

check nxstyle
2023-09-20 02:07:55 +08:00
hujun5 51a412c6b4 pthread_cleanup: rm sched_[un]lock
Since TLS is only used within a single thread and requires no additional protection.

Signed-off-by: hujun5 <hujun5@xiaomi.com>
2023-09-20 00:44:19 +08:00
wanggang26 fa744e24a3 mmcsd: update cid reg layout
refer spec: https://www.jedec.org/sites/default/files/docs/JESD84-B51.pdf

Signed-off-by: wanggang26 <wanggang26@xiaomi.com>
2023-09-20 00:42:30 +08:00
yintao f3c9a8643b nuttx: change RPTUNIOC_START and RPTUNIOC_STOP to synchronous
Support quit remote when server poweroff

Signed-off-by: yintao <yintao@xiaomi.com>
2023-09-20 00:42:02 +08:00
ligd 1f9fb5fce2 rptun: add rptun_update_rx() when device_created()
Signed-off-by: ligd <liguiding1@xiaomi.com>
2023-09-20 00:42:02 +08:00
ligd 378470f611 add remote poweroff support
Signed-off-by: yintao <yintao@xiaomi.com>
2023-09-20 00:42:02 +08:00
Shanmin Zhang e8550a02b9 arm64: support reboot / poweroff for qemu virt arm64
Signed-off-by: Shanmin Zhang <zhangshanmin@xiaomi.com>
2023-09-20 00:40:44 +08:00
xinbingnan 75e591ae4f tools/minidumpserver: don't stop while gdb client is stopping
VELAPLATFO-16411

Signed-off-by: xinbingnan <xinbingnan@xiaomi.com>
2023-09-20 00:40:14 +08:00
Roy Feng d98367693d esp32s3: fix build error 2023-09-20 00:35:28 +08:00
yangsen5 e0873c5a48 drivers/video: Fix crash caused by priv->capture_cb = null
When the upper layer calls goldfish_camera_data_uninit, priv->capture_cb=NULL, but when there is data transmission in goldfish_camera_thread, priv->capture_cb will be called, which will cause a crash.

Signed-off-by: yangsen5 <yangsen5@xiaomi.com>
2023-09-20 00:34:54 +08:00
Xiang Xiao f6681218f4 ci: Update aarch64 gcc toolchain to 12.3.rel1
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-09-19 22:37:54 +08:00
Huang Qi 7d3f11af1f cibuild.sh: Using GCC from xPack for riscv
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2023-09-19 12:59:48 +03:00
Xu Xingliang 3cd5e20f74 sched: return 0 from clock_systime_ticks if failed
Signed-off-by: Xu Xingliang <xuxingliang@xiaomi.com>
2023-09-19 16:17:08 +08:00
ligd 415fe60695 signal: use work_cancel_sync() to fix used after free
bug:

user thread:                             hpwork:
timer_create() with SIGEV_THREAD
timer_settime()
    irq -> work_queue()                  add nxsig_notification_worker to Q
timer_delete()
    nxsig_cancel_notification()
                                         call nxsig_notification_worker()
    work_cancel()
    timer_free()
                                         nxsig_notification_worker() used after free

root cause:
work_cancel() can't cancel work completely, the worker may alreay be running.

resolve:
use work_cancel_sync() API to cancel the work completely

Signed-off-by: ligd <liguiding1@xiaomi.com>
2023-09-19 15:52:48 +08:00
ligd 61ef7eb3dc wqueue: add work_cancel_sync() support
Signed-off-by: ligd <liguiding1@xiaomi.com>
2023-09-19 15:52:48 +08:00
zhangyuan21 978c8bd249 sim: enable usb board ctrl in adb
Signed-off-by: zhangyuan21 <zhangyuan21@xiaomi.com>
2023-09-19 07:51:49 +02:00
sunkun3 219677cdae rndis: Fixed rndis assert issue when calling composite_uninitlize
Signed-off-by: sunkun3 <sunkun3@xiaomi.com>
2023-09-19 07:51:49 +02:00
Huang Qi 89e409a194 tools: Switch riscv GCC to 12.3
GCC13 have compatibility issue with libcxx (need libcxx 17+).

Please refer to: https://github.com/llvm/llvm-project/issues/62396

Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2023-09-19 11:42:51 +08:00
yangguangcai fe30f0fa82 sched/wdog:change g_wdtickbase update situation.
In the 'wd_timer',the callback function executed by 'wd_expiration' could call wd_start,and g_wdtickbase might be updated.Subsequently, g_wdtickbase is incremented by the value of ticks, causing g_wdtickbase to be greater than the actual passage of time.

Signed-off-by: yangguangcai <yangguangcai@xiaomi.com>
2023-09-19 11:41:50 +08:00
Dong Heng 6ac28d5526 xtensa/esp32s3: LCD controller driver 2023-09-19 11:38:05 +08:00
liaoao 3a08c0a1e6 qemu:fdt:add device tree support for goldfish arm/arm64
Signed-off-by: liaoao <liaoao@xiaomi.com>
2023-09-19 11:34:26 +08:00
qinwei1 cb3e6667e3 arm64: add PSCI support for qemu platform
Summary
   Add ARM PCSI (Power State Coordination Interface) Support
for qemu. With the interface, Poweroff/PowerReset can be support

Signed-off-by: qinwei1 <qinwei1@xiaomi.com>
2023-09-19 11:34:26 +08:00
zhangyuan21 1e55ca43ef arm64: set cpuid according to mpidr
Signed-off-by: zhangyuan21 <zhangyuan21@xiaomi.com>
2023-09-19 11:34:26 +08:00
qinwei1 8eea6d2e2a arm64: GoldFish add miss arm64_netinitialize
Summary
    add miss arm64_netinitialize function for goldfish
platform

Signed-off-by: qinwei1 <qinwei1@xiaomi.com>
2023-09-19 11:34:26 +08:00
qinwei1 c7e70b6967 arm64: GoldFish Platform support
Summary:
   Adding virtual evaluate platform GoldFish. Which is based on
Android Goldfish Emulator, it's a ARM virt board but Android enhance
it with more featue
   The patch set goldfish as a chip

Signed-off-by: qinwei1 <qinwei1@xiaomi.com>
2023-09-19 11:34:26 +08:00
Xiang Xiao 635d578a73 drivers/sensor: Remove the selection of UORB from Kconfig
since the driver doesn't depend on userspace library(uORB) at all

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-09-19 11:27:47 +08:00
zhengshaobo1 6e6ba062fd clock flags add CLK_OPS_PARENT_ENABLE, parents need enable during gate/ungate, set rate and re-parent
Signed-off-by: zhengshaobo1 <zhengshaobo1@xiaomi.com>
2023-09-19 10:34:48 +08:00
zhengshaobo1 be767dde01 vela fs procfs add clock procfs entry
procfs enrty add clock feature procfs operations

Signed-off-by: zhengshaobo1 <zhengshaobo1@xiaomi.com>
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-09-19 10:34:48 +08:00
Xiang Xiao 15e78470f8 arch/sim: Guard frame buffer related setting in SIM_X11FB
and remove SIM_VNCSERVER

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-09-19 10:33:52 +08:00
Xiang Xiao 4d2cc2ab4d supply/regulator: Refine rpmsg regulator
1.Change priv to client or server
2.Allocate memory for name in regulator_rpmsg_get
3.Lock/unlock regulator_list in regulator_rpmsg_server_s

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-09-19 10:33:09 +08:00
yinshengkai 1d8e69700f drivers/serial: add ram uart driver
It uses the memory block as the serial communication medium, which can communicate between different processes or different CPUs

Using the following configuration, the cross-core communication rate of 200MHz cortex-M55 is about 461KB/s
RAM_UART_BUFSIZE=1024
RAM_UART_POLLING_INTERVAL=100

Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2023-09-19 09:41:07 +08:00
yinshengkai 1d9097f1df drivers/serial: unmodify head and tail pointers
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2023-09-19 09:41:07 +08:00
qiaohaijiao1 31da767cfc sim/alsa: add AUDIO_FMT_PCM query handler
Signed-off-by: qiaohaijiao1 <qiaohaijiao1@xiaomi.com>
2023-09-19 09:39:44 +08:00
chao an ce6330bf29 arch/arm64: sync with mainline change
Signed-off-by: chao an <anchao@xiaomi.com>
2023-09-19 09:38:52 +08:00
qinwei1 a42448feb4 arch/arm64: fix link RWX warning for NuttX arm64
Summary
  when using new gcc verion like:
  GNU ld (Arm GNU Toolchain 12.2.Rel1 (Build arm-12.24)) 2.39.0.20221210)

  we will get link warning like:

  aarch64-none-elf-ld: warning: XXX/nuttx has a LOAD segment with RWX permissions

  The patch fix the warning through add link option --no-warn-rwx-segments

Signed-off-by: qinwei1 <qinwei1@xiaomi.com>
2023-09-19 09:38:52 +08:00
guoshichao 6683699c70 unistd: add _POSIX_SEMAPHORES definition
add _POSIX_SEMAPHORES definition can make the ltp testcase:
ltp_functional_semaphores_sem_conpro,
ltp_functional_semaphores_sem_philosopher,
ltp_functional_semaphores_sem_lock,
ltp_stress_semaphores_multi_con_pro,
ltp_functional_semaphores_sem_readerwriter,
ltp_functional_semaphores_sem_sleepingbarber
passed

Signed-off-by: guoshichao <guoshichao@xiaomi.com>
2023-09-19 09:37:49 +08:00
zhanghongyu 1389a686ba tcp: fix coverity warning for tcp_timer
use after free when the number of retransmissions reached the maximum.

Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2023-09-19 09:37:20 +08:00
wanggang26 c3ccc30f83 wireless: enable O_CLOEXEC explicit
Signed-off-by: wanggang26 <wanggang26@xiaomi.com>
2023-09-19 09:36:59 +08:00
qinwei1 cbf76e96c7 arm64: add mcpu option for all Cortex CPU
Summary
   add mcpu option for all Cortex CPU, from Spec of gcc

https://gcc.gnu.org/onlinedocs/gcc-12.3.0/gcc/AArch64-Options.html

testing with ostest for every option

Signed-off-by: qinwei1 <qinwei1@xiaomi.com>
2023-09-19 09:36:29 +08:00
chenxiaoyi 917764857a gdb/thread.py: fix typo
Signed-off-by: chenxiaoyi <chenxiaoyi@xiaomi.com>
2023-09-19 09:35:55 +08:00
guoshichao e0ec88e738 timer/timer_getoverrun: adjust the default errno from ENOSYS to EINVAL
modify the default errno from ENOSYS to EINVAL can pass the ltp
case: ltp_timer_getoverrun_speculative_6_1,
ltp_timer_getoverrun_speculative_6_2, ltp_timer_getoverrun_speculative_6_3

Signed-off-by: guoshichao <guoshichao@xiaomi.com>
2023-09-19 09:35:27 +08:00
chenrun1 4ce205cf08 lib_iconv.c:Fix possible out-of-bounds reads
Signed-off-by: chenrun1 <chenrun1@xiaomi.com>
2023-09-19 09:34:48 +08:00
ligd c9bc6b1ad5 rpmsg socket: add return value check.
Signed-off-by: ligd <liguiding1@xiaomi.com>
2023-09-19 09:33:30 +08:00