Commit Graph

53801 Commits

Author SHA1 Message Date
xinbingnan 942081ec6c minidumpserver: fix parsing bug
stack dump add new region `show stacks`, but this script is not support
now this is fixed with adding check condition for all lines contains stack word

Signed-off-by: xinbingnan <xinbingnan@xiaomi.com>
2024-08-19 19:54:06 +08:00
Yanfeng Liu 3166c6d9c6 riscv/qemu-rv: add RPTUN cmake
This adds cmake support for RPTUN.
2024-08-19 19:53:03 +08:00
Windrow14 5c8adefc67 drivers/mmcsd/Kconfig|mmcsd_sdio.c: check ready without sleep
If per tick is set to 10ms, it will cause nxsig_usleep(1000) in the
sdio driver to sleep for 19ms, which is much longer than the
expected 1ms, resulting in very low write performance. Add option to
reduce CPU hogging by using sched_yield(), though it may also affect
write performance when the CPU is busy.

Signed-off-by: Yinzhe Wu <Yinzhe.Wu@sony.com>
Reviewed-by: Yuezhang Mo <Yuezhang.Mo@sony.com>
Reviewed-by: Jacky Cao <Jacky.Cao@sony.com>
Tested-by: Yinzhe Wu <Yinzhe.Wu@sony.com>
2024-08-19 19:52:39 +08:00
Windrow14 190c8787ff arch/xtensa/src/esp32s3/Kconfig|Make.defs|esp32s3_sdmmc.c,
arch/xtensa/src/esp32s3/hardware/esp32s3_sdmmc.h|esp32s3_soc.h,
boards/xtensa/esp32s3/common/include/esp32s3_board_sdmmc.h,
boards/xtensa/esp32s3/common/src/Make.defs|esp32s3_board_sdmmc.c,
boards/xtensa/esp32s3/esp32s3-devkit/src/esp32s3_bringup.c: add SD/mmc driver

Support 1-bit bus width and 4-bit bus width. Support eMMC high speed SDR mode.
Support transfer data with DMA. Support SD clock frequency up to 40MHZ.

Signed-off-by: Yinzhe Wu <Yinzhe.Wu@sony.com>
Reviewed-by: Yuezhang Mo <Yuezhang.Mo@sony.com>
Reviewed-by: Jacky Cao <Jacky.Cao@sony.com>
Tested-by: Yinzhe Wu <Yinzhe.Wu@sony.com>
2024-08-19 19:52:39 +08:00
Windrow14 c96a33a12f drivers/mmcsd/mmcsd_sdio.c: enable clock before issue CMD0
In mmcsd_cardidentify(), the clock is not enabled before issuing
CMD0, and the clock has been disabled in mmcsd_removed(). It makes
no sense to enable the clock after issuing CMD0, because when CMD0
is issued, it will exit with error due to the clock is not enabled.

Signed-off-by: Yinzhe Wu <Yinzhe.Wu@sony.com>
Reviewed-by: Yuezhang Mo <Yuezhang.Mo@sony.com>
Reviewed-by: Jacky Cao <Jacky.Cao@sony.com>
Tested-by: Yinzhe Wu <Yinzhe.Wu@sony.com>
2024-08-19 19:52:39 +08:00
Windrow14 d07e73e684 drivers/mmcsd/mmcsd_sdio.c: show eMMC information after initialization is completed
Prompts for capacity, speed mode and bus width after eMMC
initialization is completed.

Signed-off-by: Yinzhe Wu <Yinzhe.Wu@sony.com>
Reviewed-by: Yuezhang Mo <Yuezhang.Mo@sony.com>
Reviewed-by: Jacky Cao <Jacky.Cao@sony.com>
Tested-by: Yinzhe Wu <Yinzhe.Wu@sony.com>
2024-08-19 19:52:39 +08:00
Windrow14 49cbcfb5e6 drivers/mmcsd/mmcsd.h|mmcsd_sdio.c|mmcsd_sdio.h: support MMC high speed SDR mode
According to the eMMC specification, in Backwards Compatibility
with legacy MMC card mode, the frequency of the SD clock must be
0-26 MHZ; in high speed SDR mode, it must be 0-52MHZ. So we should
switch to high speed SDR mode if the clock frequency is higher than
26MHZ.

Signed-off-by: Yinzhe Wu <Yinzhe.Wu@sony.com>
Reviewed-by: Yuezhang Mo <Yuezhang.Mo@sony.com>
Reviewed-by: Jacky Cao <Jacky.Cao@sony.com>
Tested-by: Yinzhe Wu <Yinzhe.Wu@sony.com>
2024-08-19 19:52:39 +08:00
Windrow14 08ce36d292 drivers/mmcsd/mmcsd_sdio.c|h: optimize macros for setting EXT_CSD
CMD6 can use these macros to set any writable EXT_CSD field, not
just the bus width, so optimize these macro definitions to make
them general.

Signed-off-by: Yinzhe Wu <Yinzhe.Wu@sony.com>
Reviewed-by: Yuezhang Mo <Yuezhang.Mo@sony.com>
Reviewed-by: Jacky Cao <Jacky.Cao@sony.com>
Tested-by: Yinzhe Wu <Yinzhe.Wu@sony.com>
2024-08-19 19:52:39 +08:00
Windrow14 4f7f751d2a drivers/mmcsd/mmcsd_sdio.c: fix unable to switch eMMC device to 4-bit bus width mode
All eMMC devices support 4-bit bus width, so we should mark the
device as supporting 4-bit bus width after detecting that the
device type is eMMC.

Signed-off-by: Yinzhe Wu <Yinzhe.Wu@sony.com>
Reviewed-by: Yuezhang Mo <Yuezhang.Mo@sony.com>
Reviewed-by: Jacky Cao <Jacky.Cao@sony.com>
Tested-by: Yinzhe Wu <Yinzhe.Wu@sony.com>
2024-08-19 19:52:39 +08:00
zhanghongyu ce0599f46c net/icmpv6/icmpv6_input.c: fix undefined build error
When CONFIG_NETDB_RESOLVCONF is enabled, CONFIG_NETDB_DNSSERVER_NAMESERVERS
will undefined, could cause net/icmpv6/icmpv6_input.c build error.
just add one nameserver to avoid overwrite ipv4 nameserver.

Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2024-08-19 19:50:44 +08:00
zhanghongyu 986ddc83ce netinet/in.h: add macro definitions to resolve compilation errors
solve the compiling problem of the third-party library,
add IN6_IS_ADDR_MC_LINKLOCAL and IN6_IS_ADDR_SITELOCAL definitions.

Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2024-08-19 19:49:42 +08:00
cuiziwei e21885b84a nuttx/boards:Uniform initialization format for init_array.
(1) Keep the `.init_array` and `.ctors` symbols and sort them according to their initialization priority.
(2) Exclude symbols ending with crtend.* and crtbegin.* to support c++
application.if we not exclude crtend.* crtbegin.* frame_dummy will be
added when enable any c++ application with global variables, this symbol
execution is problematic, removing it does not affect the application.

Signed-off-by: cuiziwei <cuiziwei@xiaomi.com>
2024-08-19 19:48:32 +08:00
zhanghongyu 87ebdb850c net/pkt: fix issue that set nonblock by fcntl does not take effect
pkt_sockcaps returns SOCKCAP_NONBLOCKING to indicate that pkt supports
nonblock configuration.

Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2024-08-19 16:45:15 +08:00
halyssonJr b832638b15 add support to LTDC for Linum board 2024-08-19 16:44:53 +08:00
cuiziwei 17a06ce2cd fs/mmap: Fix build warning with [-Wmaybe-uninitialized].
Signed-off-by: cuiziwei <cuiziwei@xiaomi.com>
2024-08-19 16:40:58 +08:00
cuiziwei 6071102c90 nuttx/note:fix missing the last character when printing custom labels.
Signed-off-by: cuiziwei <cuiziwei@xiaomi.com>
2024-08-19 14:04:50 +08:00
jianglianfang db78cc9c0f input: fix goldfish input and lvgl input device name mismatch problem
Signed-off-by: jianglianfang <jianglianfang@xiaomi.com>
2024-08-19 14:03:32 +08:00
chenrun1 12318bd947 xtensa_cache:add up_get_cachesize api
Summary:
  Added up_get_dcache_size and up_get_icache_size common APIs

Signed-off-by: chenrun1 <chenrun1@xiaomi.com>
2024-08-19 13:54:53 +08:00
halyssonJr 3c1d52ac19 add configuration to use the gpio example and update interrupt gpio according to the pinout description. 2024-08-19 13:54:11 +08:00
cuiziwei 4c70918888 tools/parsetrace.py:fix parsetrace script error.
Traceback (most recent call last):
  File nuttx/tools/parsetrace.py, line 29, in <module>
    from pycstruct import pycstruct
ModuleNotFoundError: No module named 'pycstruct'

Signed-off-by: cuiziwei <cuiziwei@xiaomi.com>
2024-08-19 13:53:30 +08:00
Alan Carvalho de Assis df612b9e10 doc: Fix documentation typo and missing git package 2024-08-19 13:53:15 +08:00
cuiziwei 71d10bd8cf nuttx/fs:Rename node with inode.
Signed-off-by: cuiziwei <cuiziwei@xiaomi.com>
2024-08-19 13:35:56 +08:00
guoshichao 29e50ebed8 greenhills: add dummy implementation for unused function
add dummy implementation to avoid the link error

Signed-off-by: guoshichao <guoshichao@xiaomi.com>
2024-08-19 10:37:54 +08:00
guoshichao c95a9fc304 greenhills: add empty "__extension__" definition to fix build error
"libcxxmini/libxx_cxa_guard.cxx", line 47: error #77-D: this declaration has
          no storage class or type specifier
  __extension__ typedef int __guard __attribute__((mode(__DI__)));
  ^

"libcxxmini/libxx_cxa_guard.cxx", line 47: error #65: expected a ";"
  __extension__ typedef int __guard __attribute__((mode(__DI__)));
                ^

"libcxxmini/libxx_cxa_guard.cxx", line 64: error #20: identifier "__guard" is
          undefined
    int __cxa_guard_acquire(FAR __guard *g)
                                ^

"libcxxmini/libxx_cxa_guard.cxx", line 64: error #20: identifier "g" is
          undefined
    int __cxa_guard_acquire(FAR __guard *g)
                                         ^

"libcxxmini/libxx_cxa_guard.cxx", line 65: error #65: expected a ";"
    {
    ^

"libcxxmini/libxx_cxa_guard.cxx", line 93: warning #12-D: parsing restarts
          here after previous syntax error
  }

Signed-off-by: guoshichao <guoshichao@xiaomi.com>
2024-08-19 10:37:54 +08:00
yanghuatao b3627bb8c6 toolchain/ghs: Fix zero used for undefined preprocessing identifier "NR_IRQS" warnings
CC:  unistd/lib_setregid.c "/mnt/yang/qixinwei_vela_warnings_04_23/nuttx/include/nuttx/irq.h", line 53: warning #193-D:
          zero used for undefined preprocessing identifier "NR_IRQS"
  #  if NR_IRQS <= 256
        ^
"/mnt/yang/qixinwei_vela_warnings_04_23/nuttx/include/nuttx/irq.h", line 82: warning #193-D:
          zero used for undefined preprocessing identifier "NR_IRQS"
  #if NR_IRQS <= 256
CC:  mount/fs_umount2.c "/mnt/yang/qixinwei_vela_warnings_04_23/nuttx/include/nuttx/irq.h", line 72: warning #193-D:
          zero used for undefined preprocessing identifier "NR_IRQS"
  #if NR_IRQS <= 256

Signed-off-by: yanghuatao <yanghuatao@xiaomi.com>
2024-08-19 10:37:54 +08:00
guoshichao b2a739a67a greenhills: fix the can.h build error
CC:  src/algslib_sha256.c "comlin.c", line 189: error #1982-D: target stack alignment is insufficient to
          guarantee alignment of this variable
      struct can_frame lin_err_frame = comlin_rx_frame[chlId];
                       ^

"comlin.c", line 282: error #1982-D: target stack alignment is insufficient to
          guarantee alignment of this variable
      struct can_frame frame;
                       ^

"comlin.c", line 321: error #1982-D: target stack alignment is insufficient to
          guarantee alignment of this variable
      struct can_frame frame;

"DiagServer_IsoTp.c", line 220: error #1982-D: target stack alignment is
          insufficient to guarantee alignment of this variable
      struct canfd_frame frame = {0};
                         ^

Signed-off-by: guoshichao <guoshichao@xiaomi.com>
2024-08-19 10:37:54 +08:00
guoshichao 0cf0bece2e arch/strarg: provide the stdarg implementation for greenhills compiler
the greenhills compiler provide its own implementation of va_start,
va_end, va_arg, va_copy. so if we are build vela with greenhills
compiler, we should using the stdarg implementation provided by
greenhills, not our own

Signed-off-by: guoshichao <guoshichao@xiaomi.com>
2024-08-19 10:37:54 +08:00
yanghuatao 681122bc23 toolchain/ghs: Fix green hills toolchain build Vela MIN_MANT error
"stdio/lib_dtoa_engine.c", line 102: error #166: invalid floating constant
        if (x < MIN_MANT)
                ^

"stdio/lib_dtoa_engine.c", line 102: warning #1626-D: concatenation with "("
          in macro "PASTE" does not create a valid token
        if (x < MIN_MANT)
                ^

"stdio/lib_dtoa_engine.c", line 102: error #109: expression preceding
          parentheses of apparent call must have (pointer-to-) function type
        if (x < MIN_MANT)
                ^

"stdio/lib_dtoa_engine.c", line 107: error #166: invalid floating constant
                if (y < MAX_MANT)
                        ^

"stdio/lib_dtoa_engine.c", line 107: warning #1626-D: concatenation with "("
          in macro "PASTE" does not create a valid token
                if (y < MAX_MANT)
                        ^

"stdio/lib_dtoa_engine.c", line 107: error #109: expression preceding
          parentheses of apparent call must have (pointer-to-) function type
                if (y < MAX_MANT)
                        ^

"stdio/lib_dtoa_engine.c", line 119: error #166: invalid floating constant
                if (y >= MIN_MANT)
                         ^

"stdio/lib_dtoa_engine.c", line 119: warning #1626-D: concatenation with "("
          in macro "PASTE" does not create a valid token
                if (y >= MIN_MANT)
                         ^

"stdio/lib_dtoa_engine.c", line 119: error #109: expression preceding
          parentheses of apparent call must have (pointer-to-) function type
                if (y >= MIN_MANT)
                         ^

"stdio/lib_dtoa_engine.c", line 144: error #166: invalid floating constant
        if (x >= MAX_MANT)
                 ^

"stdio/lib_dtoa_engine.c", line 144: warning #1626-D: concatenation with "("
          in macro "PASTE" does not create a valid token
        if (x >= MAX_MANT)
                 ^

"stdio/lib_dtoa_engine.c", line 144: error #109: expression preceding
          parentheses of apparent call must have (pointer-to-) function type
        if (x >= MAX_MANT)
                 ^

"stdio/lib_dtoa_engine.c", line 153: error #166: invalid floating constant
        uint64_t decimal = MIN_MANT_INT;
                           ^

"stdio/lib_dtoa_engine.c", line 153: warning #1626-D: concatenation with "("
          in macro "PASTE" does not create a valid token
        uint64_t decimal = MIN_MANT_INT;
                           ^

"stdio/lib_dtoa_engine.c", line 153: error #109: expression preceding
          parentheses of apparent call must have (pointer-to-) function type
        uint64_t decimal = MIN_MANT_INT;

Signed-off-by: yanghuatao <yanghuatao@xiaomi.com>
2024-08-19 10:37:54 +08:00
yanghuatao 2ae4ea3f99 toolchain/ghs: Fix green hills toolchain build Vela link error
[elxr] (error #412) unresolved symbols:
 __builtin_signbit     from libc.a(lib_dtoa_engine.o)

Signed-off-by: yanghuatao <yanghuatao@xiaomi.com>
2024-08-19 10:37:54 +08:00
xuxin19 9fdd299d32 cmake:split the archive process to avoid parameter problems
refer to:https://cmake.org/cmake/help/latest/variable/CMAKE_LANG_ARCHIVE_APPEND.html

this will solve the problem of too long parameters
when executing ar in cygwin environment such as msys.

Signed-off-by: xuxin19 <xuxin19@xiaomi.com>
2024-08-18 23:26:01 +08:00
rongyichang 1676206651 drivers/input: enable touch/kbd/mouse for goldfish event
Signed-off-by: rongyichang <rongyichang@xiaomi.com>
2024-08-18 10:54:22 -03:00
liuhongchao 0b541be56a drivers/input: Fix build goldfish events warning
Signed-off-by: liuhongchao <liuhongchao@xiaomi.com>
2024-08-18 10:54:22 -03:00
liuhongchao 7495014b17 drivers/input: Add goldfish events driver
Signed-off-by: liuhongchao <liuhongchao@xiaomi.com>
2024-08-18 10:54:22 -03:00
hujun5 14d94ddd76 arch: inline this_task to improve performence
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-08-18 10:53:51 -03:00
hujun5 08e6f56176 fdcheck: fix race condition in fdcheck
reason: ioctl will use the fl_lock file lock, causing context switching,
further leading to the failure of g_fdcheck_lock protection

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-08-18 10:27:03 -03:00
chenrun1 d65f8bd4c1 filelock:Move filelock call to ioctl
Forward the implementation originally placed in fcntl to ioctl. in order
to achieve cross-core.

Signed-off-by: chenrun1 <chenrun1@xiaomi.com>
2024-08-18 19:56:49 +08:00
chenrun1 a1e3444df0 rpmsgfs:Support cross-core access using file locks on the same file
Signed-off-by: chenrun1 <chenrun1@xiaomi.com>
2024-08-18 19:56:49 +08:00
Yanfeng Liu b9fde453ce riscv/qemu-rv: add RPTUN support
This adds initial RPTUN support for qemu-rv and rv-virt device.

Signed-off-by: Yanfeng Liu <yfliu2008@qq.com>
2024-08-18 19:55:27 +08:00
Yanfeng Liu 2af5ad174f riscv/qemu-rv: add RPTUN Kconfig
This add RPTUN related Kconfigs for qemu-rv chip.

Signed-off-by: Yanfeng Liu <yfliu2008@qq.com>
2024-08-18 19:55:27 +08:00
guoshichao 61cd8c379e mm/mempool: rename the mempool_alloc and mempool_free function
the mempool_alloc and mempool_free function are duplicate with the
mempool method that provided in optee_os, in order to port optee_os, so
we rename the mempool related functions in nuttx

Signed-off-by: guoshichao <guoshichao@xiaomi.com>
2024-08-18 19:46:54 +08:00
fangxinyong a6fa9db91e libs: fix the default value of process-shared attribute
pass ltp case: open_posix_testsuite/conformance/interfaces/pthread_condattr_getpshared/2-1.c

Reference:
https://pubs.opengroup.org/onlinepubs/009696899/functions/pthread_mutexattr_getpshared.html

Signed-off-by: fangxinyong <fangxinyong@xiaomi.com>
2024-08-18 19:44:56 +08:00
wanggang26 67f5fc19eb build: untracked these two types of files
Signed-off-by: wanggang26 <wanggang26@xiaomi.com>
2024-08-18 19:38:44 +08:00
wanggang26 c58bd521a3 coredump: refine coredump info analyse
Signed-off-by: wanggang26 <wanggang26@xiaomi.com>
2024-08-18 19:34:36 +08:00
chenrun1 f7adb52c8b hostfs_ioctl:Fixed the error:expected expression caused by not adding parentheses in switch
hostfs/hostfs.c:612:17: error: expected expression
    FAR char *path = (FAR char *)(uintptr_t)arg;

Signed-off-by: chenrun1 <chenrun1@xiaomi.com>
2024-08-18 10:17:48 +08:00
chenrun1 def05ebabb hostfs:ioctl should return -ENOTTY when the instruction is incompatible
When sending FIOC_XXXLK to hostfs, hostfs will return -1 by default. For ioctl statements, incompatible instructions should be processed as -ENOTTY by default

Signed-off-by: chenrun1 <chenrun1@xiaomi.com>
2024-08-18 10:17:48 +08:00
chenrun1 6e9a43c504 hostfs:add get_path
To perform kvdb related type testing in the simulator, ioctl support is required to obtain relpath

Signed-off-by: chenrun1 <chenrun1@xiaomi.com>
2024-08-18 10:17:48 +08:00
chenrun1 e9ac1a2317 rpmsgfs_client:Fix error return exception
When handling errors through ioctl, the error returned by the server is always 0 on the client, because cookie.result is not assigned, the error returned should be in msg->result

Signed-off-by: chenrun1 <chenrun1@xiaomi.com>
2024-08-18 10:15:18 +08:00
rongyichang 8c3872b919 drivers/video: add goldfish gpu fb
In order to better use the Android goldfish emulator,
a GPU FB driver has been added. This allows the goldfish
emulator  side to achieve more flexible display effects,
such as UI skins.

Signed-off-by: rongyichang <rongyichang@xiaomi.com>
2024-08-18 10:15:00 +08:00
Saurav Pal daa3168cfb fs/mnemofs: Fix journal log rw issue, read size issue
Fixes the journal log read and write size and overlap issues, along with read return value issue.

Signed-off-by: Saurav Pal <resyfer.dev@gmail.com>
2024-08-17 09:10:04 -03:00
buxiasen 9d396bf89e pm: add debug_assert for cb register/unregister api
avoid the register/unregister API access wrong memory

Signed-off-by: buxiasen <buxiasen@xiaomi.com>
2024-08-17 14:30:49 +08:00