Commit Graph

6541 Commits

Author SHA1 Message Date
wangyongrong ad2e6fb2ba pci_ivshmem.c: ivshmem_support_irq API support
ivshmem based driver can use this api to judge weather current
ivshmem device support irq or not, and use polling mode or irq
mode to process the event.

Signed-off-by: wangyongrong <wangyongrong@xiaomi.com>
2024-10-12 12:13:23 +08:00
Bowen Wang 99b6c77c79 drivers/rptun: minor fix about rptun
1. follow the nxstyle, change formot of rptun_init();
2. remove used wqueue header file;

Signed-off-by: Bowen Wang <wangbowen6@xiaomi.com>
2024-10-12 12:12:00 +08:00
xuxingliang 62f0126b06 drivers/segger: add note vprint support
Print note log to sysview terminal.

See https://www.segger.com/products/development-tools/systemview/#logging-output

Signed-off-by: xuxingliang <xuxingliang@xiaomi.com>
2024-10-12 09:58:00 +08:00
buxiasen c4f82c1f66 drivers/timer: fix goldfish timer did not included in cmake
Signed-off-by: buxiasen <buxiasen@xiaomi.com>
2024-10-12 09:31:15 +08:00
buxiasen 9ea38368ad goldfish_timer: fix interrupt not cleared
will cause a loop interrupt handler, in some new version qemu

Signed-off-by: buxiasen <buxiasen@xiaomi.com>
2024-10-12 09:31:15 +08:00
ligd 3479622fec serial: use nxsig_tgkill instead of nxsig_kill
Caused nxsig_tgkill is for the one thread, nxsig_kill for the group

Signed-off-by: ligd <liguiding1@xiaomi.com>
2024-10-12 09:30:37 +08:00
Bowen Wang 313d6df787 include/nuttx.h: replace all the align macros to nuttx version
1. add IS_ALIGNED()  definitions for NuttX;
2. replace all the ALIGN_UP() and ALIGN_DOWN() to use common
   align implementation;

Signed-off-by: Bowen Wang <wangbowen6@xiaomi.com>
2024-10-11 16:55:43 +08:00
Yongrong Wang 976c4173f0 rpmsg_ping.c: fix msg data memset length
The range of memset exceeds the size of the buffer

Signed-off-by: Yongrong Wang <wangyongrong@xiaomi.com>
2024-10-11 14:59:26 +08:00
Yongrong Wang 4b77dd03db rpmsg_ping.c: change msg cmd type for more compatible
Use bit mask method to represent the command, because it's more
convenient to express multiple characteristics simultaneously.

Signed-off-by: Yongrong Wang <wangyongrong@xiaomi.com>
2024-10-11 14:59:26 +08:00
Yongrong Wang 1cf97ac4d0 rpmsg_ping.c: improve log level to LOG_EMERG
Usually rpmsg ping logs are needed during testing,
but too many other module logs can easily overwrite it,
so improve the rpmsg ping log level, later we can setlogmask to
a higher log level to mask other modules' logs.

Signed-off-by: Yongrong Wang <wangyongrong@xiaomi.com>
2024-10-11 14:59:26 +08:00
Yongrong Wang b96ad59d69 rpmsg_ping.c: change check data to fluctuation value
We can found the error happend packet more accurately based
on the data value.

Signed-off-by: Yongrong Wang <wangyongrong@xiaomi.com>
2024-10-11 14:59:26 +08:00
yinshengkai c83858bbb6 note: fix note_common unaligned access
Data in ARMV8-M may be aligned with less than 4 bytes, resulting in USAGE FAULT

Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2024-10-11 11:55:17 +08:00
yinshengkai 464d284587 drivers/note: simplify notesnap_dump logic
RTOSXMDPYX-969

Crash at startup, index is 0 will cause loop printing

Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2024-10-11 11:55:17 +08:00
yinshengkai a70175ea06 note: make sched_note_start depend on INSTRUMENTATION_SWITCH
In some cases, we only need to use INSTRUMENTATION_DUMP to record custom data,
and we don't want the thread start and end information

Move this part to INSTRUMENTATION_SWTICH for recording

Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2024-10-11 11:55:17 +08:00
yinshengkai 453cde945f note: add note stream drivers
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2024-10-11 11:55:17 +08:00
yinshengkai 43d96a5d9e note: Increase crash dump buffer
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2024-10-11 11:55:17 +08:00
zhangwenjian aec44de921 ICANON mode need echo every bytes
Signed-off-by: zhangwenjian <zhangwenjian@xiaomi.com>
2024-10-11 03:11:26 +08:00
zhangwenjian 7532a0e833 serial:need check old config before setting tty
Signed-off-by: zhangwenjian <zhangwenjian@xiaomi.com>
2024-10-11 03:11:26 +08:00
zhangwenjian df5c876932 libc:getline support backspace
Signed-off-by: zhangwenjian <zhangwenjian@xiaomi.com>
2024-10-11 03:11:26 +08:00
yinshengkai ec691cc5e4 tools: prasetrace.py supports parsing syslog
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2024-10-11 01:30:11 +08:00
yinshengkai 211a56910a syslog: support syslog redirection to sched_note
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2024-10-11 01:30:11 +08:00
ligd e608d5522d syslogmask: add default value Kconfig to syslogmask
Signed-off-by: ligd <liguiding1@xiaomi.com>
2024-10-11 01:30:11 +08:00
yinshengkai 02eb280302 arch/perf: modify the return value of up_perf_gettime to clock_t
When using alarm_arch implementation, 64-bit time can be returned. Using unsign long will cause precision loss.

Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2024-10-10 23:17:14 +08:00
yintao 37a30023f5 nuttx/drivers: add ept_release_cb for destroy server resource
use ept_release_cb to destory rpmsg services server dile resource
to avoid the used-after-free issue

Signed-off-by: yintao <yintao@xiaomi.com>
2024-10-10 08:44:29 +08:00
hujun5 e249dd2672 arch: support customized up_cpu_index() in AMP mode
Some app with same code runs on different cores in AMP mode,
need the physical core on which the function is called.

Signed-off-by: hujun5 <hujun5@xiaomi.com>
Signed-off-by: fangxinyong <fangxinyong@xiaomi.com>
2024-10-10 02:38:40 +08:00
Bowen Wang 092bdec20b drivers/serial: support force panic only when repeat the panic char
We can increase the panic repeat count to avoid abnormal crashes
caused by serial port interference.

Signed-off-by: Bowen Wang <wangbowen6@xiaomi.com>
2024-10-10 02:38:12 +08:00
Bowen Wang bbb7f436d4 serial.c: should protect the fds when calling poll_notify
1. Use critical_section to protect the fds array;
2. Use critical_section and sched lock to protect the poll notify, because
   poll notify may cause context switch, delay the context swtich to
   sched_unlock();

Signed-off-by: Bowen Wang <wangbowen6@xiaomi.com>
2024-10-10 02:38:12 +08:00
ligd 0a70235b0c serial/pl011: fix can't up_putc() after setup
Signed-off-by: ligd <liguiding1@xiaomi.com>
2024-10-10 02:38:12 +08:00
ligd 94cc99d01b serial: fix cu ctrl+c crash
__assert
/home/work/ssd1/workspace/MiRTOS-N62-Rel-4.0-Pre-Build/nuttx/libs/libc/assert/lib_assert.c:36
nxsem_recover
/home/work/ssd1/workspace/MiRTOS-N62-Rel-4.0-Pre-Build/nuttx/sched/semaphore/sem_recover.c:86 (discriminator 3)
nxtask_recover
/home/work/ssd1/workspace/MiRTOS-N62-Rel-4.0-Pre-Build/nuttx/sched/task/task_recover.c:79
nxtask_exithook
/home/work/ssd1/workspace/MiRTOS-N62-Rel-4.0-Pre-Build/nuttx/sched/task/task_exithook.c:448
nxtask_terminate
/home/work/ssd1/workspace/MiRTOS-N62-Rel-4.0-Pre-Build/nuttx/sched/task/task_terminate.c:110
pthread_cancel
/home/work/ssd1/workspace/MiRTOS-N62-Rel-4.0-Pre-Build/nuttx/sched/pthread/pthread_cancel.c:110
cu_main
/home/work/ssd1/workspace/MiRTOS-N62-Rel-4.0-Pre-Build/apps/system/cu/cu_main.c:485
nxtask_startup
/home/work/ssd1/workspace/MiRTOS-N62-Rel-4.0-Pre-Build/nuttx/libs/libc/sched/task_startup.c:70 (discriminator 2)
nxtask_start
/home/work/ssd1/workspace/MiRTOS-N62-Rel-4.0-Pre-Build/nuttx/sched/task/task_start.c:134

Signed-off-by: ligd <liguiding1@xiaomi.com>
2024-10-10 02:38:12 +08:00
sunjikun ee306d47fd drivers/serial: Add 16550_DLF_SIZE option for DesignWare UART.
Signed-off-by: sunjikun <sunjikun@xiaomi.com>
2024-10-10 02:38:12 +08:00
Bowen Wang 89c49c53a7 virtio-mmio/pci: add alloc_buf/free_buf for mmio and pci transport layer
And remove the virtio_alloc/free_buf implementation in virtio.c, because
these two apis has been moved to the OpenAMP

Signed-off-by: Bowen Wang <wangbowen6@xiaomi.com>
2024-10-09 23:32:58 +08:00
wangyongrong 0b1f45d600 rptun: rptun implements notify_wait through rvdev->notify_wait_cb
notify_wait has been remove in remoteproc ops and virtio_dispatch and
has been moved to the struct rpmsg_virtio_device in new OpenAMP,
so change the rptun too,

Signed-off-by: wangyongrong <wangyongrong@xiaomi.com>
2024-10-09 23:32:58 +08:00
Yongrong Wang 1b24139020 virtio-pci/mmio: Features change to 64 bit in all virtio_dispatch and fix compile warning
virtio/virtio-pci-legacy.c:399:48: warning: passing argument 2 of ‘pci_bus_write_io_dword’ makes integer from pointer without a cast [-Wint-con>
  399 |   pci_write_io_dword(vpdev->dev, vpdev->ioaddr + VIRTIO_PCI_GUEST_FEATURES,
      |                                                ^
      |                                                |
      |                                                void *
/home/wyr/work/code/project/vela/nuttx/include/nuttx/pci/pci.h:559:65: note: expected ‘uintptr_t’ {aka ‘long unsigned int’} but argument is of >
  559 | int pci_bus_write_io_dword(FAR struct pci_bus_s *bus, uintptr_t where,
      |                                                       ~~~~~~~~~~^~~~~

Signed-off-by: Yongrong Wang <wangyongrong@xiaomi.com>
2024-10-09 23:32:58 +08:00
wangyongrong 5aeb644bc5 virtio: adapt to the new OpenAMP
Sync all the virtio api usage to sync with new OpenAMP

Signed-off-by: wangyongrong <wangyongrong@xiaomi.com>
2024-10-09 23:32:58 +08:00
wangyongrong 8e799ff823 rpmsg: upgrade API passing on parameters with the upgrade of OpenAMP
All the rpmsg transport layer and rpmsg services sync the API
with new OpenAMP

Signed-off-by: wangyongrong <wangyongrong@xiaomi.com>
2024-10-09 23:32:58 +08:00
buxiasen 264252497c pm: fix pm_wakelock_uninit api block, wd api need irq not disabled
Signed-off-by: buxiasen <buxiasen@xiaomi.com>
2024-10-09 23:31:49 +08:00
dongjiuzhu1 a005f4bff1 drivers/power: using baterr/batinfo to avoid frequency log output
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2024-10-09 23:31:49 +08:00
zhangshengchao e26a01d9a6 regulator:add bypass logic when registering
do not control regulators when set bypass flag

Signed-off-by: zhangshengchao <zhangshengchao@xiaomi.com>
2024-10-09 23:31:49 +08:00
wanggang26 955a3838f7 mmcsd: refine emmc capacity calculate
Signed-off-by: wanggang26 <wanggang26@xiaomi.com>
2024-10-09 22:24:18 +08:00
yinshengkai 3271142b87 note: print without relying on format strings
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2024-10-09 22:23:29 +08:00
yinshengkai b5cf4310cb gote: implement asynchronous printf formatting
Do not format immediately when calling sched_note_printf, but delay formatting until dump trace.
After turning on SYSTEM_NOTE, similar asynchronous syslog functions can be achieved.

Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2024-10-09 22:23:29 +08:00
liwenxiang1 fa48d9e972 drivers/timers:Arch_alarm and arch_timer add up_ndelay interface
Signed-off-by: liwenxiang1 <liwenxiang1@xiaomi.com>
2024-10-09 22:11:03 +08:00
Bowen Wang 6ea3dcace4 misc/rpmsgdev: fix block mode read/write bug in rpmsgdev
Rpmsg dev server always open the real char device with nonblock mode,
so let client try to read/wrtie the read device every read/write
operation.

Signed-off-by: Bowen Wang <wangbowen6@xiaomi.com>
2024-10-09 19:53:28 +08:00
liwenxiang1 0647b49990 drivers/battery: Fix Goldfish Battery x64 unresponsive interrupt issue
Signed-off-by: liwenxiang1 <liwenxiang1@xiaomi.com>
2024-10-09 18:32:29 +08:00
anjiahao fa59adde40 Simplify BOARD_MEMORY_RANGE initialization logic
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2024-10-09 15:41:48 +08:00
yangsong8 81d704cd82 gdbstub: support the use of recvbuf and sendbuf
Signed-off-by: yangsong8 <yangsong8@xiaomi.com>
2024-10-09 15:41:48 +08:00
anjiahao e007ace00d gdbstub:support only use gdbstub when panic
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2024-10-09 15:41:48 +08:00
lipengfei28 15126945cd qemu_epc_get_msi: flag should use msi enable flag
Signed-off-by: lipengfei28 <lipengfei28@xiaomi.com>
2024-10-09 15:07:37 +08:00
yangsong8 954e84c82a usb: If usb3.0, set the ep0 sssize to cfgdescsize
Signed-off-by: yangsong8 <yangsong8@xiaomi.com>
2024-10-09 14:19:16 +08:00
wanggang26 ecc2d473e3 mmcsd: add multi partitions prototype implementation
Signed-off-by: wanggang26 <wanggang26@xiaomi.com>
2024-10-09 13:57:07 +08:00