Commit graph

7604 commits

Author SHA1 Message Date
fangpeina
3518c69e6c input/ff: extend ioctrl to support factory calibration
Signed-off-by: fangpeina <fangpeina@xiaomi.com>
2024-11-14 23:35:07 +08:00
fangpeina
a719db1b58 drivers/input: support RTP file simulation in RAMLOOP mode
For resource-constrained devices, simulate RTP
playback effects using preset custom RAMLOOP
combinations instead of using RTP files to play
custom vibration effects.

Signed-off-by: fangpeina <fangpeina@xiaomi.com>
2024-11-14 23:35:07 +08:00
hujun5
ea20ae588a pthread_cond_broadcast use wait_count for judement
This commit fixes the comment from https://github.com/apache/nuttx/pull/14581

Signed-off-by: hujun5 <hujun5@xiaomi.com>
2024-11-14 23:22:52 +08:00
Masayuki Ishikawa
bbf2bbf37d Revert "arch_atomic : Introduce CONFIG_LIBC_ARCH_ATOMIC"
This reverts commit 81e7b13a05.
2024-11-13 10:45:12 +09:00
hujun5
a72f1820af Fix typo errors in include/nuttx/clock.h
Signed-off-by: hujun5 <hujun5@xiaomi.com>
2024-11-12 17:24:23 +08:00
chenrun1
0bad7f814a rammtd:add rammtd_uninitialize
Summary:
  Added rammtd_uninitialize to manage rammtd

Signed-off-by: chenrun1 <chenrun1@xiaomi.com>
2024-11-12 14:58:01 +08:00
Takuya Miyasita
81e7b13a05 arch_atomic : Introduce CONFIG_LIBC_ARCH_ATOMIC
Some armv7-m-based SoCs do not work with atomic instructions,
even though armv7-m supports them.

To avoid using atomic instructions generated by gcc,
CONFIG_LIBC_ARCH_ATOMIC is newly introduced with which
arch_atomic.c is linked explicitly.

However, the function names need to be changed to avoid
build errors, since the functions described in stdatomic.h
are gcc built-in and inlined when the code is compiled.

Signed-off-by: Takuya Miyasita <Takuya.Miyashita@sony.com>
2024-11-12 14:27:42 +09:00
guoshichao
f94e092fad ghs: fix the naked_function attr cannot handle warning
with greenhills version older than 202354, the __attribute__((naked))
cannot handled by greenhills compiler, and will report warning:

"/home/guoshichao/work_profile/vela_os/vela_car_6/nuttx/arch/arm/src/armv7-m/arm_svcall.c", line 79: warning #1097-D:
          unknown attribute "naked"
  static void dispatch_syscall(void) naked_function;
                                     ^

Signed-off-by: guoshichao <guoshichao@xiaomi.com>
2024-11-11 22:32:26 +08:00
hujun5
55dbf37017 fix compiler error
reason:
when CONFIG_CLOCK_TIMEKEEPING=y, compiler error may report

In file included from /home/hujun5/downloads1/vela_sim/nuttx/include/nuttx/sched.h:42,
                 from /home/hujun5/downloads1/vela_sim/nuttx/include/nuttx/arch.h:89,
                 from boardctl.c:33:
/home/hujun5/downloads1/vela_sim/nuttx/include/nuttx/irq.h:261:12: error: conflicting types for 'enter_critical_section'; have 'irqstate_t(void)' {aka 'long unsigned int(void)'}
  261 | irqstate_t enter_critical_section(void) noinstrument_function;
      |            ^~~~~~~~~~~~~~~~~~~~~~
In file included from /home/hujun5/downloads1/vela_sim/nuttx/include/nuttx/wqueue.h:37,
                 from /home/hujun5/downloads1/vela_sim/nuttx/include/nuttx/addrenv.h:39,
                 from /home/hujun5/downloads1/vela_sim/nuttx/include/nuttx/sched.h:40:
/home/hujun5/downloads1/vela_sim/nuttx/include/nuttx/wdog.h:267:11: note: previous implicit declaration of 'enter_critical_section' with type 'int()'
  267 |   flags = enter_critical_section();
      |           ^~~~~~~~~~~~~~~~~~~~~~
hujun5@hujun5-OptiPlex-7070:~/downloads1/vela_sim/nuttx$ make -j12
sched/sched_processtimer.c: In function 'nxsched_process_timer':
sched/sched_processtimer.c:178:3: error: implicit declaration of function 'clock_update_wall_time' [-Werror=implicit-function-declaration]
  178 |   clock_update_wall_time();

Signed-off-by: hujun5 <hujun5@xiaomi.com>
2024-11-11 19:48:38 +08:00
robert
5e8f1eefb0 Bluetooth: improved pairing process and host layer now successfully receives ACL packets 2024-11-10 14:33:52 -03:00
hujun5
6611480904 isrthread: add configuring the stack of an isrthread as static
reason:
we configure the isr thread stack as static to allow for more flexible placement of the stack.

Signed-off-by: hujun5 <hujun5@xiaomi.com>
2024-11-08 01:49:14 +08:00
wanggang26
929bbf0be8 fs: add merge partitions support
Usage example for merging the factory partition and reserve
partition into the merge partition:
register_merge_blockdriver("/dev/merge", "/dev/factory", "/dev/reserve",
NULL)

Signed-off-by: wanggang26 <wanggang26@xiaomi.com>
2024-11-07 14:59:23 +08:00
wangjianyu3
c1553464bb nuttx/uorb.h: Add GNSS firmware version for struct sensor_gnss
Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2024-11-06 21:18:57 +08:00
Alin Jerpelea
cfda04089c include: migrate license to ASF
Augusto Fraga Giachero has sumitted the ICLA and the license can be
replaced by the ASF License

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2024-11-06 19:46:13 +08:00
hujun5
c498991ba4 smpcall: add nxsched_smp_call_async and nxsched_smp_call_single_async
reason:
The old implementation of the SMP call, even when using the "no wait" parameter,
could still result in waiting, if invoking it within a critical section
may lead to deadlocks. Therefore, in order to implement a truly asynchronous SMP
call strategy, we have added nxsched_smp_call_async.

Signed-off-by: hujun5 <hujun5@xiaomi.com>
2024-11-06 09:53:28 +08:00
Peter van der Perk
faee89b966 net: fix inet #14634 regression
Define wasn't imported by netconfig.h move definitions
2024-11-05 18:36:02 +08:00
Peter van der Perk
c371afc7f4 net: inet.h match inet_sockif.c definition
Fixes psock_socket: ERROR: socket address family unsupported: 2
When using the minimal CONFIG_NET configuration typically used for
SocketCAN

Update net/inet/inet.h

Co-authored-by: Xiang Xiao <xiaoxiang781216@gmail.com>

Update net/inet/inet.h

Co-authored-by: Xiang Xiao <xiaoxiang781216@gmail.com>
2024-11-05 01:58:45 +08:00
zhanghongyu
082bc17ab0 netinet/if_ether.h: move #define ETH_XXX into if_ether.h
consistent with other operating systems

Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2024-11-04 21:14:31 +08:00
Xiang Xiao
a96a4de19a timers: Replace DEBUGASSERT with the error code
fix the issue report here:
https://lists.apache.org/thread/sys37yf63rq501fd1v8y3zyh6vk10v1d
when driver no support for ops, should not panic, prefer errno.

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Signed-off-by: buxiasen <buxiasen@xiaomi.com>
2024-11-04 10:05:52 +01:00
Xiang Xiao
9882e0e9c3 fs: Fix mtd/sector512.c:554:19: error: incomplete definition of type 'struct partition_info_s'
by moving geometry and partition_info_s to include/fs/ioctl.h

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2024-11-03 21:08:50 +08:00
hujun5
a1bb967941 remove nxsched_lock_irq/nxsched_unlock_irq
reason:
nxsched_lock_irq has the same functionality as sched_lock

Signed-off-by: hujun5 <hujun5@xiaomi.com>
2024-11-03 16:00:17 +08:00
Xiang Xiao
c5381c3eb2 Replace __attribute__((packed)) with [begin|end]_packed_struct
since the different compiler express the packed structure in the different way
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2024-11-03 10:20:38 +08:00
hujun5
2c0e5e872b pthread_cond remove csection
reason:
We decouple semcount from business logic by using an independent counting variable,
which allows us to remove critical sections in many cases.

Signed-off-by: hujun5 <hujun5@xiaomi.com>
2024-11-02 09:40:19 -03:00
nuttxs
3818ce8268 sys/socket: use __attribute__((packed)) to avoid changes in
the size of struct sockaddr_storage due to struct alignment
2024-11-01 11:15:54 -03:00
ouyangxiangzhen
17c51c0667 userspace: Exclude nuttx/arch.h
This patch fixed userspace headers conflict. Architecture-related definition and API should not be exposed to users.

Signed-off-by: ouyangxiangzhen <ouyangxiangzhen@xiaomi.com>
2024-11-01 16:59:37 +08:00
cuiziwei
d1e5b38b9b nuttx/semaphore: Move define CONFIG_SEM_PREALLOCHOLDERS to include/semaphore.h.
Move CONFIG_SEM_PREALLOCHOLDERS to include/semaphore.h to avoid undefined issues from occurring in other places as well.

Signed-off-by: cuiziwei <cuiziwei@xiaomi.com>
2024-10-31 18:37:53 +08:00
Karel Kočí
b851916d76 libs/libc/obstack: fix allocated chunk overrun due to invalid limit
This primarily fixes allocated memory overrun due to invalidly
calculated limit of the chunk. The function here allocates chunk of size
that includes required header. The error was that size of the chunk was
invalidly again added when limit was being calculated. This was causing
memory overrun and issues especially with object growing (reallocation).

The secondary fix here is to the algorithm that rounds the required size
to the multiple of chunk size. In short chunk size must be reduced by
one to get the correct mask. The condition that was generating the mask
was also invalid because it must perform shift with at most one less
than number of bits (not bytes).
2024-10-30 11:53:18 -03:00
chenrun1
759b77b975 nuttx/atomic.h:Add use condition for using stdatomic.h
Summary:
  add check !defined(__STDC_NO_ATOMICS__)
  If the macro constant __STDC_NO_ATOMICS__(C11) is defined by the compiler, the header <stdatomic.h>, the keyword _Atomic, and all of the names listed here are not provided.

  refer to:https://en.cppreference.com/w/c/atomic

Signed-off-by: chenrun1 <chenrun1@xiaomi.com>
2024-10-30 21:29:04 +08:00
zhanghongyu
c11752e59f arp.h: make struct arpreq four-byte aligned
avoid memory waste in 64-bit architectures.

Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2024-10-30 21:10:46 +08:00
YAMAMOTO Takashi
761ee81956 move readv/writev to the kernel
currently, nuttx implements readv/writev on the top of read/write.
while it might work for the simplest cases, it's broken by design.
for example, it's impossible to make it work correctly for files
which need to preserve data boundaries without allocating a single
contiguous buffer. (udp socket, some character devices, etc)

this change is a start of the migration to a better design.
that is, implement read/write on the top of readv/writev.

to avoid a single huge change, following things will NOT be done in
this commit:

* fix actual bugs caused by the original readv-based-on-read design.
  (cf. https://github.com/apache/nuttx/pull/12674)

* adapt filesystems/drivers to actually benefit from the new interface.
  (except a few trivial examples)

* eventually retire the old interface.

* retire read/write syscalls. implement them in libc instead.

* pread/pwrite/preadv/pwritev (except the introduction of struct uio,
  which is a preparation to back these variations with the new
  interface.)
2024-10-30 17:07:54 +08:00
ligd
4541132035 Revert "shced:sem: replace mutex with spinlock"
Cause we can't do sem_post/wait within spinlock

This reverts commit 23d65cb97f.

Signed-off-by: ligd <liguiding1@xiaomi.com>
2024-10-29 23:01:39 +08:00
zhanghongyu
c22b39d8d7 arp.h: make struct arpreq four-byte aligned
current sizeof(struct sockaddr_in) is 66

arp/arp_table.c:241:28: runtime error: member access within misaligned address 0xe5f134e6 for type 'struct sockaddr_in', which requires 4 byte alignment
0xe5f134e6: note: pointer points here
 00 00 00 00 00 00  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  00 00
             ^
    #0 0x543287c1 in arp_get_arpreq arp/arp_table.c:241
    #1 0x5432a11f in arp_snapshot arp/arp_table.c:574
    #2 0x5435f0be in netlink_fill_arptable netlink/netlink_route.c:547
    #3 0x5435ffca in netlink_get_neighbor netlink/netlink_route.c:715
    #4 0x54360116 in netlink_get_neighborlist netlink/netlink_route.c:743
    #5 0x54363b20 in netlink_route_sendto netlink/netlink_route.c:1382
    #6 0x542ef1b1 in netlink_sendmsg netlink/netlink_sockif.c:625
    #7 0x542be94d in psock_sendmsg socket/sendmsg.c:96
    #8 0x542bc94b in psock_sendto socket/sendto.c:134
    #9 0x542bcb28 in sendto socket/sendto.c:247
    #10 0x542bc5ea in send socket/send.c:163
    #11 0x542aa715 in netlib_get_arptable /home/mi/gaofengzhi/code/dev1025/apps/netutils/netlib/netlib_getarptab.c:152
    #12 0x54279109 in cmd_arp /home/mi/gaofengzhi/code/dev1025/apps/nshlib/nsh_netcmds.c:1197
    #13 0x54257faf in nsh_command /home/mi/gaofengzhi/code/dev1025/apps/nshlib/nsh_command.c:1263
    #14 0x54231982 in nsh_execute /home/mi/gaofengzhi/code/dev1025/apps/nshlib/nsh_parse.c:718
    #15 0x5423da42 in nsh_parse_command /home/mi/gaofengzhi/code/dev1025/apps/nshlib/nsh_parse.c:2619
    #16 0x5423e12a in nsh_parse /home/mi/gaofengzhi/code/dev1025/apps/nshlib/nsh_parse.c:2706
    #17 0x5424088f in nsh_session /home/mi/gaofengzhi/code/dev1025/apps/nshlib/nsh_session.c:245
    #18 0x5422efc9 in nsh_consolemain /home/mi/gaofengzhi/code/dev1025/apps/nshlib/nsh_consolemain.c:75
    #19 0x5419e89f in nsh_main /home/mi/gaofengzhi/code/dev1025/apps/system/nsh/nsh_main.c:74
    #20 0x54067ee1 in nxtask_startup sched/task_startup.c:70
    #21 0x53f366c6 in nxtask_start task/task_start.c:116
    #22 0x5409e1a4 in pre_start sim/sim_initialstate.c:52

Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2024-10-29 20:43:15 +08:00
zhanghongyu
306cb3301b include/netinet/if_ether.h: add ethhdr definition.
adapts to third-party code compilation. in the process of porting EtherCAT,
we encounter some situations where the structure is not defined, or the
returned data types do not match the expectations. Refer to the EtherCAT
implementation of other systems and add relevant definitions.

Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2024-10-29 18:13:35 +08:00
Xiang Xiao
32784b0898 libc: Refine the arc4random_buf implementation
fill the buffer with getrandom instead random pool
and move the implementation to from crypto to libc

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2024-10-26 18:04:21 -03:00
chao an
c6591c0f49 driver/serial: remove return value of up_putc()
modify the prototype of up_putc(): remove the return value

The architecture code does not care about the return value of up_putc(), so removing it saves two statements:

Before:                                                    After:
de4c: e52de004  push  {lr}    @ (str lr, [sp, #-4]!)    |  de4c: e52de004  push  {lr}    @ (str lr, [sp, #-4]!)
de50: e24dd014  sub sp, sp, #20                         |  de50: e24dd014  sub sp, sp, #20
de54: e58d0004  str r0, [sp, #4]                        |  de54: e58d0004  str r0, [sp, #4]
de58: e30030f8  movw  r3, #248  @ 0xf8                  |  de58: e30030f8  movw  r3, #248  @ 0xf8
de5c: e3423000  movt  r3, #8192 @ 0x2000                |  de5c: e3423000  movt  r3, #8192 @ 0x2000
de60: e58d300c  str r3, [sp, #12]                       |  de60: e58d300c  str r3, [sp, #12]
de64: e59d1004  ldr r1, [sp, #4]                        |  de64: e59d1004  ldr r1, [sp, #4]
de68: e59d000c  ldr r0, [sp, #12]                       |  de68: e59d000c  ldr r0, [sp, #12]
de6c: ebfffe66  bl  d80c <pl011_putc>                   |  de6c: ebfffe66  bl  d80c <pl011_putc>
de70: e59d3004  ldr r3, [sp, #4]                        |  de70: e28dd014  add sp, sp, #20
de74: e1a00003  mov r0, r3                              |  de74: e49df004  pop {pc}    @ (ldr pc, [sp], #4)
de78: e28dd014  add sp, sp, #20                         |
de7c: e49df004  pop {pc}    @ (ldr pc, [sp], #4)        |

Signed-off-by: chao an <anchao@lixiang.com>
2024-10-26 13:21:29 +08:00
chao an
052ea5b20d mm/kasan: extern kasan API only MM_KASAN is enabled
this PR will fix g_region_init is incorrectly linked to the image if MM_KASAN is not enabled.

Signed-off-by: chao an <anchao@lixiang.com>
2024-10-25 19:04:14 +08:00
anjiahao
b33226d76e coredump: coredump_add_memory_region need use flags
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2024-10-24 08:46:01 +08:00
ligd
e73c05718c tls.h: list.h should depends on CONFIG_PTHREAD_ATFORK
Signed-off-by: ligd <liguiding1@xiaomi.com>
2024-10-23 20:10:43 +08:00
buxiasen
cb720024b6 Revert "libc/lib_bzero:Add bzero prototype."
This reverts commit 908814a575.

In macos, memset will be automatic optmize to bzero, caused dead loop, as we not using bzero, macro re-define should ablt to cover the requirements.

Signed-off-by: buxiasen <buxiasen@gmail.com>
2024-10-23 10:08:23 +08:00
ligd
cdccce48ac libcxx: fix compile error
from ServiceManager.cpp:17:
/home/ligd/platform/dev/apps/external/android/frameworks/native/libs/binder/ndk/include_cpp/android/binder_to_string.h:71:24: error: expected nested-name-specifier before numeric constant
   71 |     template <typename _U>
      |                        ^~
/home/ligd/platform/dev/apps/external/android/frameworks/native/libs/binder/ndk/include_cpp/android/binder_to_string.h:71:24: error: expected ‘>’ before numeric constant
In file included from /home/ligd/platform/dev/apps/external/android/frameworks/native/libs/binder/aidl/android/os/ConnectionInfo.h:3,
                 from /home/ligd/platform/dev/apps/external/android/frameworks/native/libs/binder/aidl/android/os/IServiceManager.h:3,
                 from /home/ligd/platform/dev/apps/external/android/frameworks/native/libs/binder/aidl/android/os/BnServiceManager.h:4:
/home/ligd/platform/dev/apps/external/android/frameworks/native/libs/binder/ndk/include_cpp/android/binder_to_string.h:72:56: error: no matching function for call to ‘declval<1>()’
   72 |     static auto _test(int) -> decltype(std::declval<_U>().toString(), std::true_type());
      |                                        ~~~~~~~~~~~~~~~~^~
In file included from /home/ligd/platform/dev/nuttx/include/libcxx/__type_traits/is_convertible.h:18,

Signed-off-by: ligd <liguiding1@xiaomi.com>
2024-10-23 09:42:57 +08:00
Matteo Golin
bbc95d70db adc: Implement ADC driver interface for MCP3008 over SPI. Includes documentation page for the driver, and inclusion of driver registration code for RP2040-based boards. 2024-10-22 13:56:23 +08:00
Bowen Wang
d17cdbc656 rpmsg/rpmsg_virtio.h: include <openamp/remoteproc.h> to fix compile error
/data/project/code/apache/nuttx/include/nuttx/rpmsg/rpmsg_virtio.h:176:28: error: field ‘rsc_tbl_hdr’ has incomplete type
  176 |   struct resource_table    rsc_tbl_hdr;
      |                            ^~~~~~~~~~~
/data/project/code/apache/nuttx/include/nuttx/rpmsg/rpmsg_virtio.h:178:28: error: field ‘log_trace’ has incomplete type
  178 |   struct fw_rsc_trace      log_trace;
      |                            ^~~~~~~~~
/data/project/code/apache/nuttx/include/nuttx/rpmsg/rpmsg_virtio.h:179:28: error: field ‘rpmsg_vdev’ has incomplete type
  179 |   struct fw_rsc_vdev       rpmsg_vdev;
      |                            ^~~~~~~~~~
/data/project/code/apache/nuttx/include/nuttx/rpmsg/rpmsg_virtio.h:180:28: error: field ‘rpmsg_vring0’ has incomplete type
  180 |   struct fw_rsc_vdev_vring rpmsg_vring0;
      |                            ^~~~~~~~~~~~
/data/project/code/apache/nuttx/include/nuttx/rpmsg/rpmsg_virtio.h:181:28: error: field ‘rpmsg_vring1’ has incomplete type
  181 |   struct fw_rsc_vdev_vring rpmsg_vring1;
      |                            ^~~~~~~~~~~~
/data/project/code/apache/nuttx/include/nuttx/rpmsg/rpmsg_virtio.h:182:28: error: field ‘config’ has incomplete type
  182 |   struct fw_rsc_config     config;

Signed-off-by: Bowen Wang <wangbowen6@xiaomi.com>
2024-10-22 08:55:57 +08:00
chao an
d49db03e04 libs/misc/memoryregion: remove unused memory_region
memory region will no longer be used

Signed-off-by: chao an <anchao@lixiang.com>
2024-10-18 21:32:48 +08:00
Xiang Xiao
24cb8c25ab bluetooth: Fix the incompatibility made by https://github.com/apache/nuttx/pull/14224
that pr requires chip turn on CONFIG_DRIVERS_BLUETOOTH to use bluetooth,
but not all defconig enable this option, so let's map bt_driver_register
to bt_netdev_register in header file in this case, and revert the unnessary
change in the related chip and board folders.

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2024-10-18 09:05:54 +08:00
yangguangcai
66e0e1bb7f AVR:disable nosanitize_address.
Signed-off-by: yangguangcai <yangguangcai@xiaomi.com>
2024-10-17 22:52:42 +08:00
jihandong
d802912cba nuttx ai driver update
Signed-off-by: jihandong <jihandong@xiaomi.com>
2024-10-17 22:35:40 +08:00
chengkai
772807c50f bluetooth: add bt_driver_register interface
add bt_driver_register interface, which could handle
these cases:bth4 bth5 btbridge btslip and btuart_lowerhalf_s etc.

Signed-off-by: chengkai <chengkai@xiaomi.com>
2024-10-17 18:09:32 +08:00
chengkai
3144971704 bluetooth: extract btuart_register interface
add btuart_create interface, which would be more
flexible in complex cases. And extract btuart_register interface.

Signed-off-by: chengkai <chengkai@xiaomi.com>
2024-10-17 18:09:32 +08:00
chengkai
cc36c44824 bluetooth:add btslip driver
add btslip driver.

Signed-off-by: chengkai <chengkai@xiaomi.com>
2024-10-17 18:09:32 +08:00
chengkai
8e17e1657b bluetooth: fix bt bridge would not filter vendor hci cmd
when downloading rtk firmware with vendor hci cmd sending to
bt bridge, which would not filter that hci cmd.

Signed-off-by: chengkai <chengkai@xiaomi.com>
2024-10-17 18:09:32 +08:00
Ville Juven
2195b47655 smp: Implement empty macro for obtaining logical CPU index
This implements empty hooks to the arch/chip layer, which can implement
an optional translation between logical<->physical CPU/core id.

The default mapping is 1:1 i.e. logical=physical.
2024-10-17 13:43:06 +08:00
Petro Karashchenko
2048715134 serial: remove 'TIOCSLINID'
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2024-10-17 09:08:58 +08:00
yangsong8
8c13b8df1d syslog: convert \n to \r\n in syslog framework layer
Signed-off-by: yangsong8 <yangsong8@xiaomi.com>
2024-10-17 02:29:51 +08:00
anjiahao
a72e9e5621 modlib:if elf in romfs/tmpfs, try use xipbase
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2024-10-16 18:40:06 +08:00
anjiahao
112b6fd9a5 modlib:support modlib can load PIC elf
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2024-10-16 18:40:06 +08:00
gaohedong
cfc90ad1f3 nuttx/can: support to Send message priority sorting function.
Linked list-based priority sorting function for sending messages.

Signed-off-by: gaohedong <gaohedong@xiaomi.com>
2024-10-16 18:37:01 +08:00
dongjiuzhu1
2cf8c25292 drivers/power/battery: add charge/battery health interface support
Signed-off-by: liangdongdong<liangdongdong@xiaomi.com>
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2024-10-16 17:33:20 +08:00
zhaohaiyang1
9985b0551e nuttx/can.h: support timestamp for can frame
and update "can.rst" file for add struct timeval ch_ts info.

Signed-off-by: zhaohaiyang1 <zhaohaiyang1@xiaomi.com>
2024-10-16 17:04:31 +08:00
wurui3
42e416d054 nuttx/audio: increase bits of samplerate in struct audio_info_s.
Current 8 bits of uint8_t cannot represent sample rate bigger than
255,change uint8_t to uint32_t to expand sample rate range.

Signed-off-by: wurui3 <wurui3@xiaomi.com>
2024-10-16 15:40:35 +08:00
wanggang26
848b596a12 coredump: measure the system's running time in milliseconds unit
Signed-off-by: wanggang26 <wanggang26@xiaomi.com>
2024-10-16 15:35:21 +08:00
wangxiaoxin
2a99490ed6 add a flag of lin internal sleep/wakeup state
Signed-off-by: wangxiaoxin <wangxiaoxin@xiaomi.com>
2024-10-16 14:33:59 +08:00
renzhiyuan1
91ce3de250 AI engine driver
Add AI engine driver for heterogeneous NPU backends.

Signed-off-by: renzhiyuan1 <renzhiyuan1@xiaomi.com>
2024-10-16 13:57:23 +08:00
Lingao Meng
c2b89540d2 include: queue.h: Make flink clear after sq_rem
In the previous design, this member may be cleared or not cleared,
which results in the API's side effects not being a clear property.

Signed-off-by: Lingao Meng <menglingao@xiaomi.com>
2024-10-16 13:56:49 +08:00
xumin6
1d5f0245ab external/ffmpeg: add offloding audio recording with amr format.
Signed-off-by: xumin6 <xumin6@xiaomi.com>
2024-10-16 13:56:07 +08:00
zhangyuan29
080c22e944 atomic: include stddef.h in atomic.h
error info:
error: expected '=', ',', ';', 'asm' or '__attribute__' before 'atomic_wchar_t'

Signed-off-by: zhangyuan29 <zhangyuan29@xiaomi.com>
2024-10-16 12:24:18 +08:00
chenzhijia
d52074a9cb libs/libc/unistd: add getspnam function
Add getspnam function to pass tlpi example:
https://man7.org/tlpi/code/online/dist/users_groups/check_password.c.html

Signed-off-by: chenzhijia <chenzhijia@xiaomi.com>
2024-10-16 11:15:25 +08:00
chenzhijia
2a328279ca libs/libc/unistd: add crypt function
Add crypt function to pass tlpi example:
https://man7.org/tlpi/code/online/dist/users_groups/check_password.c.html

Signed-off-by: chenzhijia <chenzhijia@xiaomi.com>
2024-10-16 11:15:25 +08:00
chenzhijia
ad70ca33c8 libs/libc/unistd: add getpass function
Add getpass function to pass tlpi example:
https://man7.org/tlpi/code/online/dist/users_groups/check_password.c.html

Signed-off-by: chenzhijia <chenzhijia@xiaomi.com>
2024-10-16 11:15:25 +08:00
chenzhijia
c0039d6623 libs/libc/pwd: add new member to passwd struct
Add pw_passwd member to pass tlpi example:
https://man7.org/tlpi/code/online/dist/users_groups/check_password.c.html

Signed-off-by: chenzhijia <chenzhijia@xiaomi.com>
2024-10-16 11:15:25 +08:00
hanqiyuan
c7455e7e8e audio: add offload underflow msg state
Signed-off-by: hanqiyuan <hanqiyuan@xiaomi.com>
2024-10-16 08:11:04 +08:00
anjiahao
0bd9c8d7ae Kconfig:Add an option to disable compilation of floating point related files
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2024-10-16 07:58:00 +08:00
chenzhijia
65fbf4cf64 nuttx/include:Modify the CPU_SET series macro definition in sched.h
Modify the CPU_SET series macro definition to avoid an error when shifting 31 bits to the left.

Signed-off-by: chenzhijia <chenzhijia@xiaomi.com>
2024-10-15 21:05:36 +08:00
chenzhijia
aca7552d9c nuttx/include:add #define CPU_SETSIZE in sched.h
add #define CPU_SETSIZE in sched.h to pass tlpi example: https://man7.org/tlpi/code/online/dist/procpri/t_sched_getaffinity.c.html

Signed-off-by: chenzhijia <chenzhijia@xiaomi.com>
2024-10-15 21:05:36 +08:00
wangxiaoxin
366ede9530 add lin status changes the format of the reported frame and add the macros that lin needs
Signed-off-by: wangxiaoxin <wangxiaoxin@xiaomi.com>
2024-10-15 19:45:38 +08:00
wanggang26
d22ad37cd7 elf:fix a ci error
Configuration/Tool: teensy-2.0/nsh
In file included from
/github/workspace/sources/nuttx/include/nuttx/coredump.h:35:0,
                 from
/github/workspace/sources/nuttx/sched/misc/coredump.h:28,
                 from ./init/nx_bringup.c:54:
/github/workspace/sources/nuttx/include/nuttx/elf.h:31:22: fatal error:
arch/elf.h: No such file or directory

Signed-off-by: wanggang26 <wanggang26@xiaomi.com>
2024-10-15 19:41:26 +08:00
hujun5
a567148888 sched: add up_this_task and up_change_task macro stub
reason:
We can utilize percpu storage to hold information about the
current running task. If we intend to implement this feature, we would
need to define two macros that help us manage this percpu information
effectively.

up_this_task: This macro is designed to read the contents of the percpu
              register to retrieve information about the current
              running task.This allows us to quickly access
              task-specific data without having to disable interrupts,
              access global variables and obtain the current cpu index.

up_update_task: This macro is responsible for updating the contents of
                the percpu register.It is typically called during
                initialization or when a context switch occurs to ensure
                that the percpu register reflects the information of the
                newly running task.

Configuring NuttX and compile:
$ ./tools/configure.sh -l qemu-armv8a:nsh_smp
$ make
Running with qemu
$ qemu-system-aarch64 -cpu cortex-a53 -smp 4 -nographic \
   -machine virt,virtualization=on,gic-version=3 \
   -net none -chardev stdio,id=con,mux=on -serial chardev:con \
   -mon chardev=con,mode=readline -kernel ./nuttx

Signed-off-by: hujun5 <hujun5@xiaomi.com>
2024-10-15 15:25:55 +08:00
cuiziwei
8d7ee794f4 nuttx/elf.h: Fix build error with unknown type name 'bool'.
nuttx/include/nuttx/elf.h:118:1: error: unknown type name 'bool'
  118 | bool up_checkarch(FAR const Elf_Ehdr *hdr);
      | ^~~~
nuttx/include/nuttx/elf.h:30:1: note: 'bool' is defined in header '<stdbool.h>'; did you forget to '#include <stdbool.h>'?
   29 | #include <arch/elf.h>
  +++ |+#include <stdbool.h>
   30 |

Signed-off-by: cuiziwei <cuiziwei@xiaomi.com>
2024-10-15 12:35:10 +08:00
wanggang26
7e5fb8450f coredump: add architecture-specific registers dump, including NVIC and MPU
Signed-off-by: wanggang26 <wanggang26@xiaomi.com>
2024-10-15 11:40:05 +08:00
wanggang26
9b094e8f0d mmcsd:add postsleep fields for mmc_ioc_cmd
Signed-off-by: wanggang26 <wanggang26@xiaomi.com>
2024-10-15 02:06:00 +08:00
ligd
7d218f93fa libc: add nx_strdup() & nx_strndup() support
Signed-off-by: ligd <liguiding1@xiaomi.com>
2024-10-15 01:16:48 +08:00
chao an
2a65a34bee Revert "pthread: We should not directly include arch/spinlock.h as it may cause compilation errors in C++."
This reverts commit 444a9fbcd6.
2024-10-14 17:42:16 +08:00
chao an
ce42a9affc Revert "sched/spinlock: remove nesting spinlock support"
This reverts commit 5aa13bc490.
2024-10-14 17:42:16 +08:00
hujun5
b964eeee18 Reapply "sched/spinlock: remove nesting spinlock support"
This reverts commit 9e81f5efac.

Signed-off-by: hujun5 <hujun5@xiaomi.com>
2024-10-13 18:31:35 +08:00
zhangwenjian
7a3c50b3db noteram:support binary read mode
Signed-off-by: zhangwenjian <zhangwenjian@xiaomi.com>
2024-10-13 14:05:50 +08:00
wangmingrong
1b3f3d19e9 noteram: fix variable type
Signed-off-by: wangmingrong <wangmingrong@xiaomi.com>
2024-10-13 14:05:50 +08:00
zhangwenjian
149b1f186e drivers/note:add the api of sched_note_add
Signed-off-by: zhangwenjian <zhangwenjian@xiaomi.com>
2024-10-13 14:05:50 +08:00
zhangwenjian
7aa1871664 note:support filter for each note channel
Signed-off-by: zhangwenjian <zhangwenjian@xiaomi.com>
2024-10-13 14:05:50 +08:00
yinshengkai
c018be66bd note: merge nc_systime_nsec and sec
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2024-10-13 14:05:50 +08:00
yintao
d2fc3f21de net/rpmsg: use hash to handle rp_name
expand the user's rpname size
hash when exceed RPMSG_SOCKET_NAME_LEN due to the limitation of eptname

Signed-off-by: yintao <yintao@xiaomi.com>
2024-10-13 11:33:04 +08:00
YanXiaowei
356ddee5b8 support trace_beginex and trace_endex
Signed-off-by: YanXiaowei <yanxiaowei@xiaomi.com>
2024-10-13 10:23:44 +08:00
chenrun1
9e81f5efac Revert "sched/spinlock: remove nesting spinlock support"
This reverts commit 5aa13bc490.
2024-10-13 09:41:59 +08:00
chenzhijia
505adfa277 nuttx:move "#define STRINGIFY(x)" to nuttx/macro.h
Franklin requirement, "#define STRINGIFY(x)" conflicts with https://github.com/mborgerding/kissfft define

Signed-off-by: chenzhijia <chenzhijia@xiaomi.com>
Signed-off-by: lipengfei28 <lipengfei28@xiaomi.com>
2024-10-13 03:16:25 +08:00
yinshengkai
38e474b0c5 libc: add CRC-8-ROHC support
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2024-10-13 03:09:26 +08:00
yangshuyong
c1eee1cc29 Changed the i3c_priv_xfer's member to flags from rnw
Signed-off-by: yangshuyong <yangshuyong@xiaomi.com>
Signed-off-by: lipengfei28 <lipengfei28@xiaomi.com>
2024-10-13 02:49:05 +08:00
Bowen Wang
143466baed drivers/pci: fix pci framework warning in 32bit chip
In file included from pci/pci.c:30:
pci/pci.c: In function 'pci_setup_device':
pci/pci.c:449:66: warning: right shift count >= width of type [-Wshift-count-overflow]
  449 |           pci_write_config_dword(dev, base_address_1, res->start >> 32);
      |                                                                  ^~
pci/pci.c: In function 'pci_presetup_bridge':
pci/pci.c:541:51: warning: right shift count >= width of type [-Wshift-count-overflow]
  541 |                              ctrl->mem_pref.start >> 32);
      |                                                   ^~
pci/pci.c: In function 'pci_postsetup_bridge':
pci/pci.c:604:57: warning: right shift count >= width of type [-Wshift-count-overflow]
  604 |                              (ctrl->mem_pref.start - 1) >> 32);
      |                                                         ^~
CC:  pthread/pthread_release.c pci/pci_ecam.c:71:12: warning: initialization of 'int (*)(struct pci_bus_s *, unsigned int,  int,  int,  uint32_t *)' {aka 'int (*)(struct pci_bus_s *, unsigned int,  int,  int,  long unsigned int *)'} from incompatible pointer type 'int (*)(struct pci_bus_s *, uint32_t,  int,  int,  uint32_t *)' {aka 'int (*)(struct pci_bus_s *, long unsigned int,  int,  int,  long unsigned int *)'} [-Wincompatible-pointer-types]
   71 |   .read  = pci_ecam_read_config,
      |            ^~~~~~~~~~~~~~~~~~~~
pci/pci_ecam.c:71:12: note: (near initialization for 'g_pci_ecam_ops.read')
pci/pci_ecam.c:72:12: warning: initialization of 'int (*)(struct pci_bus_s *, unsigned int,  int,  int,  uint32_t)' {aka 'int (*)(struct pci_bus_s *, unsigned int,  int,  int,  long unsigned int)'} from incompatible pointer type 'int (*)(struct pci_bus_s *, uint32_t,  int,  int,  uint32_t)' {aka 'int (*)(struct pci_bus_s *, long unsigned int,  int,  int,  long unsigned int)'} [-Wincompatible-pointer-types]
   72 |   .write = pci_ecam_write_config,

Signed-off-by: Bowen Wang <wangbowen6@xiaomi.com>
2024-10-13 02:28:32 +08:00
hujun5
444a9fbcd6 pthread: We should not directly include arch/spinlock.h as it may cause compilation errors in C++.
Instead, we should use nuttx/spinlock.h.

Signed-off-by: hujun5 <hujun5@xiaomi.com>
2024-10-13 02:27:58 +08:00
Bowen Wang
bc97e73aee include/.gitignore: add openlibm to gitignore
avoid git add incorrect files

Signed-off-by: Bowen Wang <wangbowen6@xiaomi.com>
2024-10-13 02:27:28 +08:00
yinshengkai
c23878e442 sched: modify CONFIG_DUMP_ON_EXIT to CONFIG_SCHED_DUMP_ON_EXIT
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2024-10-13 02:06:38 +08:00
Bowen Wang
b5b0430c39 net/vsock: add AF_VSOCK address family
Add AF_VSOCK address family support, This is the vsock framework
preparation patch.

Signed-off-by: Bowen Wang <wangbowen6@xiaomi.com>
2024-10-13 02:02:03 +08:00
p-szafonimateusz
4e69a3d2db include/nuttx/arch.h: MSI alloc API should be always available
MSI-like interrupts delivery can be used also for other devices than PCI, e.g HPET

Signed-off-by: p-szafonimateusz <p-szafonimateusz@xiaomi.com>
2024-10-13 00:33:29 +08:00
anjiahao
434442d707 modlib:move modlib_findsection to common headfile
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2024-10-12 12:29:06 +08:00
anjiahao
2be58054bb modlib_bind:add new args export and nexport to modlib_bind
if modp is NULL, we can use export and nexport load externl symbol

Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2024-10-12 12:29:06 +08:00
anjiahao
1fc2cd7816 binfmt:use modlib api inside of elf api [1/2]
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2024-10-12 12:29:06 +08:00
anjiahao
9c191e93b7 modilib:add new args to modp record init arry
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2024-10-12 12:29:06 +08:00
anjiahao
e9550783d3 modlib:add new api to uninitialize modp
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2024-10-12 12:29:06 +08:00
anjiahao
dfc5e4dd55 modlib:Move addrenv logic to modlib
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2024-10-12 12:29:06 +08:00
anjiahao
52126aede1 coredump:Move coredump to sched/misc
1. move coredump form libelf to sched/misc
2. rename core_dump to coredump

Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2024-10-12 12:29:06 +08:00
anjiahao
9e868cadfb coredump:Move private functions to internal header files
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2024-10-12 12:29:06 +08:00
anjiahao
489223f0d5 modlib:move get file info logic to modlib
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2024-10-12 12:29:06 +08:00
wangyongrong
24b0fa0072 pci.h: add pci_write/read_mmio_qword support
1. optimize the macro, add () for the marco arguments;
2. add pci_write_mmio_qword() and pci_read_mmio_qword() api;

Signed-off-by: wangyongrong <wangyongrong@xiaomi.com>
2024-10-12 12:16:25 +08:00
wangxiaoxin
1b8c17ff15 add lin error flags to lin.h
Signed-off-by: wangxiaoxin <wangxiaoxin@xiaomi.com>
2024-10-12 12:15:58 +08:00
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
chao an
5aa13bc490 sched/spinlock: remove nesting spinlock support
developers must be careful to hold spinlocks and ensure all
of protected code is under control, so remove support for nested
spinlocks to improve performance.

Signed-off-by: chao an <anchao@lixiang.com>
2024-10-12 11:18:10 +08:00
makejian
e8a890ef42 nuttx/syscall: export nxsem_getprioceiling and nxsem_setprioceiling via syscall
Signed-off-by: makejian <makejian@xiaomi.com>
2024-10-12 09:50:54 +08:00
ligd
5c29c18199 mm.h: remove depends on addrenv.h
Signed-off-by: ligd <liguiding1@xiaomi.com>
2024-10-12 09:29:37 +08:00
ligd
76e77ff184 assert: add header files to resolve compile failed
error: 'NULL' undecleard

Signed-off-by: ligd <liguiding1@xiaomi.com>
2024-10-12 09:29:37 +08:00
liaoao
82ef95b6e2 rpmsg_port_spi_slave: fix compile error when enable RPMSG_PORT_SPI_SLAVE only
Signed-off-by: liaoao <liaoao@xiaomi.com>
2024-10-11 21:20:45 +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
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
cuiziwei
6ad06ba004 note:unified note filtering at runtime.
Signed-off-by: cuiziwei <cuiziwei@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
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
yinshengkai
2fe33f551c assert: change the do-while of assert to a conditional expression
According to the standard definition, assert should return a void expression
https://pubs.opengroup.org/onlinepubs/007904875/basedefs/assert.h.html

This patch involves two changes:

If you define the NDEBUG macro, assert does not use any parameters and directly returns a void expression.
assert should return a void expression and cannot use do-while statements.
If the following code , a compilation error will occur.

Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2024-10-11 00:51:20 +08:00
yinshengkai
ba2865f20a sched: support backtrace record
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2024-10-11 00:37:27 +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
Neo Xu
d598da80e4 Rename group_argvstr to nxtask_argvstr
Now argument vector is stored to TLS, task_argvstr fits better.

Signed-off-by: Neo Xu <neo.xu1990@gmail.com>
2024-10-10 23:13:37 +08:00
yinshengkai
d375a09c0a libs: add gprof arm64 support
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2024-10-10 18:46:51 +08:00
yinshengkai
eb8449cb0c sched/gprof: add gprof support
gprof can analyze code hot spots based on scheduled sampling.
After adding the "-pg" parameter when compiling, you can view the code call graph.

Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2024-10-10 18:46:51 +08:00
Xiang Xiao
4944bfd56c sched: Implement profil function
which is very useful for performance analysis:
https://man7.org/linux/man-pages/man3/profil.3.html

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2024-10-10 18:46:51 +08:00
anjiahao
f955eda358 uart_16550:fix bug, regincr is used multiple times
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2024-10-10 17:49:18 +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
Bowen Wang
39449c6069 sched/sched.h: add nxsched_lock/unlock_irq() function
These two macros can be called in interrupt context and:
1. Do nothing when called in interrupt;
2. Same behavior as sched_lock/unlock when called in thread;

Signed-off-by: Bowen Wang <wangbowen6@xiaomi.com>
2024-10-10 02:38:12 +08:00
ligd
80079f35e4 signal: add sig_tgkill() kenrnel version support
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
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
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
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
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
fangzhenwei
a6f8730c51 local_sock: fix accept use-after-free
we should get next waiter before acceptor released

Signed-off-by: fangzhenwei <fangzhenwei@xiaomi.com>
2024-10-09 18:16:01 +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
fangxinyong
76508d42a9 sched: export sched_getcpu API in AMP mode
Some app with same code runs on different cores in AMP mode,
need known physical core id on which the function is called.

Signed-off-by: fangxinyong <fangxinyong@xiaomi.com>
2024-10-09 15:21:25 +08:00
ligd
fc73dfd368 sleep: optimize sleep logic, to reduce the disable IRQ time
Signed-off-by: ligd <liguiding1@xiaomi.com>
2024-10-09 13:54:29 +08:00
Bowen Wang
acbe19d744 pci_drivers: move qemu edu and test device header content to pci_drivers.h
Signed-off-by: Bowen Wang <wangbowen6@xiaomi.com>
2024-10-09 13:52:01 +08:00