Commit Graph

54917 Commits

Author SHA1 Message Date
Huang Qi 2cf92a75d3 boards/qemu-rv: Correct tmpfs mount path to use CONFIG_LIBC_TMPDIR
Follow other boards, use CONFIG_LIBC_TMPDIR from Kconfig instead
of hardcode it here.

Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2024-09-27 13:35:00 +08:00
Jinliang Li 19230e3a2b arm/armv8-r: fix armv8 build error without neon
Fix the build error:
armv8-r/arm_vectors.S:205:Error: VFP single precision
register expected -- `vstmdb.64 sp!,{d16-d31}'
armv8-r/arm_vectors.S:242:Error: VFP single precision
register expected -- `vldmia.64 r0!,{d16-d31}'

Signed-off-by: Jinliang Li <lijinliang1@lixiang.com>
2024-09-27 11:23:05 +08:00
lipengfei28 0bf2c9c514 pci_epf_driver_s use FAR const struct pci_epf_ops_s *ops
Signed-off-by: lipengfei28 <lipengfei28@xiaomi.com>
2024-09-27 10:37:31 +08:00
lipengfei28 8e3c024bdb msi_set:Message Control Register for MSI:bit3:bit1 used for
Multiple Message Capable

Signed-off-by: lipengfei28 <lipengfei28@xiaomi.com>
2024-09-27 10:37:31 +08:00
lipengfei28 9d425eb521 pci epc mem use virtual mem
Signed-off-by: lipengfei28 <lipengfei28@xiaomi.com>
2024-09-27 10:37:31 +08:00
lipengfei28 aa3568f353 pci epf use epc_node link to epc
Signed-off-by: lipengfei28 <lipengfei28@xiaomi.com>
2024-09-27 10:37:31 +08:00
lipengfei28 06a5103838 pci_epf_device_s and pci_epc_ctrl_s add priv data
Signed-off-by: lipengfei28 <lipengfei28@xiaomi.com>
2024-09-27 10:37:31 +08:00
chenrun1 4581cbdb7e libc.h:Fixed the problem of multiple define appearing in arch_xxx.S after opening kasan
The reason is that libc.h needs to check whether CONFIG is enabled before the corresponding macro is enabled

Error scene:
arm-none-eabi-ld: /home/crafcat7/SSD/xxx/xxx-dev/nuttx/staging/libc.a(arch_libc.o): in function `memmove':
/home/crafcat7/SSD/xxx/xxx-dev/nuttx/libs/libc/machine/arch_libc.c:146: multiple definition of `memmove'; /home/crafcat7/SSD/xxx/xxx-dev/nuttx/staging/libc.a(arch_memmove.o):/home/crafcat7/SSD/xxx/xxx-dev/nuttx/libs/libc/machine/arm/armv8-m/gnu/arch_memmove.S:56: first defined here

Signed-off-by: chenrun1 <chenrun1@xiaomi.com>
2024-09-27 10:32:09 +08:00
likun17 65264051aa stdio/va_format: move non-standard structure va_format to nuttx/streams.h
Signed-off-by: likun17 <likun17@xiaomi.com>
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2024-09-27 10:29:22 +08:00
Michal Lenc 8639b1ca66 smartfs: add support for FIOC_FILEPATH ioctl
The FIOC_FILEPATH ioctl call is required if smartfs is to be used
together with inotify monitoring system. This implements the
call support to smartfs file system. The path to the file has to
be stored in smartfs_ofile_s structure during file open (and is freed
during close) as smartfs currently is not able to obtain the path
knowing only the file node. The full path is concatenated with the file
name and creates the full path needed for inotify to detect whether
the file is on the watchlist.

Signed-off-by: Michal Lenc <michallenc@seznam.cz>
2024-09-27 10:28:37 +08:00
wanggang26 ce1d047845 mmcsd: fix cmd6 timeout error when repeat calling
If CMD6 is sent again before last transmission is complete, a timeout
error will be encountered.

Signed-off-by: wanggang26 <wanggang26@xiaomi.com>
2024-09-27 10:25:51 +08:00
Ville Juven 9ef76e3735 riscv_fork.c: Fix race condition when handling parent integer registers
We need to record the parent's integer register context upon exception
entry to a separate non-volatile area. Why?

Because xcp.regs can move due to a context switch within the fork() system
call, be it either via interrupt or a synchronization point.

Fix this by adding a "sregs" area where the saved user context is placed.
The critical section within fork() is also unnecessary.
2024-09-27 10:22:43 +08:00
Ville Juven 172d2a8491 riscv_fork.c: Fix vfork() for kernel mode + SMP
There was an error in the fork() routine when system calls are in use:
the child context is saved on the child's user stack, which is incorrect,
the context must be saved on the kernel stack instead.

The result is a full system crash if (when) the child executes on a
different CPU which does not have the same MMU mappings active.
2024-09-27 10:22:43 +08:00
xucheng5 887c6c8716 syslogstream : init value for lib_syslograwstream_s.last_ch
Signed-off-by: xucheng5 <xucheng5@xiaomi.com>
2024-09-27 09:59:45 +08:00
xuxin19 45277dac3e cmake:refactor CMake add_romfs module to support ABS path
Add support for etc files with absolute paths
usages:
```
 add_board_rcsrcs(${CMAKE_CURRENT_SOURCE_DIR}/etc/build.prop)
``
Signed-off-by: xuxin19 <xuxin19@xiaomi.com>
2024-09-27 09:55:50 +08:00
xuxin19 49bdd62aa3 cmake:bugfix fix cmake CPP options get NULL in add_romfs
CMake Error at cmake/nuttx_add_romfs.cmake:60 (string):
  string sub-command REPLACE requires at least four arguments.
Call Stack (most recent call first):
  boards/sim/sim/sim/src/CMakeLists.txt:68 (nuttx_add_romfs)

Signed-off-by: xuxin19 <xuxin19@xiaomi.com>
2024-09-27 09:55:50 +08:00
ligd 35c8c80a00 arch: change nxsched_suspend/resume_scheduler() called position
for the citimon stats:

thread 0:                     thread 1:
enter_critical (t0)
up_switch_context
note suspend thread0 (t1)

                              thread running
                              IRQ happen, in ISR:
                                post thread0
                                up_switch_context
                                note resume thread0 (t2)
                                ISR continue f1
                                ISR continue f2
                                ...
                                ISR continue fn

leave_critical (t3)

You will see, the thread 0, critical_section time is:
(t1 - t0) + (t3 - t2)

BUT, this result contains f1 f2 .. fn time spent, it is wrong
to tell user thead0 hold the critical lots of time but actually
not belong to it.

Resolve:
change the nxsched_suspend/resume_scheduler to real hanppends

Signed-off-by: ligd <liguiding1@xiaomi.com>
2024-09-27 09:53:33 +08:00
Xiang Xiao e105773f7e can: Merge cd_error and rx_overflow into rx_error
so the error could dispath to each client without interference

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2024-09-27 09:01:06 +08:00
lipengfei28 c552d39d41 qemu epc add misx support
Signed-off-by: lipengfei28 <lipengfei28@xiaomi.com>
2024-09-27 08:52:59 +08:00
lipengfei28 57d736b149 add epf test drv
Signed-off-by: lipengfei28 <lipengfei28@xiaomi.com>
2024-09-27 08:52:59 +08:00
lipengfei28 c4e1c7334f get_msi:should return Message Control Register:bit6:bit4
Signed-off-by: lipengfei28 <lipengfei28@xiaomi.com>
2024-09-27 08:52:59 +08:00
lipengfei28 2a7cf549a1 pci: add qemu epc
Signed-off-by: lipengfei28 <lipengfei28@xiaomi.com>
2024-09-27 08:52:59 +08:00
guoshichao 203944b724 fs_fcntl: fix the ret value not check error
add ret value check on file_seek function to compat with misra rule

Signed-off-by: guoshichao <guoshichao@xiaomi.com>
2024-09-27 00:20:53 +08:00
guoshichao 78e5fe3473 hcreate: fix using the uninit value misra issue
Signed-off-by: guoshichao <guoshichao@xiaomi.com>
2024-09-27 00:20:53 +08:00
guoshichao 3e66184f23 pthread_mutexattr_setprotocol: remove the unreached dead code
Signed-off-by: guoshichao <guoshichao@xiaomi.com>
2024-09-27 00:20:53 +08:00
guoshichao c9223469d4 moblib_bind: fix the variable uninit misra issue
Signed-off-by: guoshichao <guoshichao@xiaomi.com>
2024-09-27 00:20:53 +08:00
guoshichao dbe09c1505 greenhills: add -Osize build option to reduce the size
Signed-off-by: guoshichao <guoshichao@xiaomi.com>
2024-09-27 00:17:58 +08:00
guoshichao 8c651d3d05 greenhills: add support for cortex-m4 platform
Signed-off-by: guoshichao <guoshichao@xiaomi.com>
2024-09-27 00:17:58 +08:00
qinwei1 8ae35754e5 arm64: add arm64_current_el to obtain current EL
Summary
  Add a macro to obtain current execute level

Signed-off-by: qinwei1 <qinwei1@xiaomi.com>
2024-09-27 00:16:41 +08:00
qinwei1 c535fb1438 arm64: refine the fatal handler
Summary
  The original implement for exception handler is very simple and
haven't framework for breakpoint/watchpoint routine or brk instruction.
  I refine the fatal handler and add framework for debug handler to
register or unregister. this is a prepare for watchpoint/breakpoint
implement

Signed-off-by: qinwei1 <qinwei1@xiaomi.com>
2024-09-27 00:16:41 +08:00
ligd 551e6ce3ab compile: add DEBUG_SYMBOLS_LEVEL allow custom the level
Signed-off-by: ligd <liguiding1@xiaomi.com>
2024-09-27 00:13:07 +08:00
anjiahao c76e83beaa Debug option:change -g to -g3, add macro information to elf
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2024-09-27 00:13:07 +08:00
wangjianyu3 521b3bb500 drivers/bch: ioctl() - BIOC_FLUSH: Add calling ioctl() of block driver
Passing `BIOC_FLUSH` to block driver to ensure that changes transfers ("flushes") to the block device

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2024-09-27 00:12:43 +08:00
YAMAMOTO Takashi 08dcef4de0 xtensa_macros.S: fix tab/space mismatches 2024-09-27 00:10:42 +08:00
lipengfei28 56f57e5f9b add pci irq interface
Signed-off-by: lipengfei28 <lipengfei28@xiaomi.com>
2024-09-27 00:10:19 +08:00
ouyangxiangzhen f3973c7e46 imx8qm-mek: Fix early print
Function `arm64_lowputc` corrupted the x1 register which is used in function `boot_stage_puts`.

Signed-off-by: ouyangxiangzhen <ouyangxiangzhen@xiaomi.com>
2024-09-27 00:09:50 +08:00
YAMAMOTO Takashi 1bf778020a tools/btdecode.sh: make grep overridable
This script seems to assume GNU grep, which is not commonly
available as "grep" on some platforms.  For examples, it's
more common to have it named "ggrep" on BSD-based systems
including macOS.

Ideally, I suppose we should avoid GNU dependencies like this
in general.  But I'm not motivated enough to rewrite this script
in a portable way today.

cf. https://www.gnu.org/software/grep/manual/grep.html#grep-Programs-1
2024-09-26 23:59:50 +08:00
nuttxs 1dfea8798b arch/xtensa/esp32s3: Adding an ioctl interface ota_invalidate_bootseq()
to the ESP32-S3 partitions, by deleting the corresponding otadata, makes
the boot sequence (ota_0/1) invalid.
2024-09-26 23:52:17 +08:00
guoshichao 74d627f5f0 greenhills: fix the arm_signal_handler.S build error
[asarm] (error #2067) /home/guoshichao/work_profile/vela_os/vela_car_6/nuttx/arch/arm/src/common/gnu/arm_signal_handler.S 35: unknown instruction
  .syntax unified
--^

[asarm] (error #2067) /home/guoshichao/work_profile/vela_os/vela_car_6/nuttx/arch/arm/src/common/gnu/arm_signal_handler.S 70: unknown instruction
  .thumb_func
--^

[asarm] (error #2230) /home/guoshichao/work_profile/vela_os/vela_car_6/nuttx/arch/arm/src/common/gnu/arm_signal_handler.S 72: bad directive
  .type up_signal_handler , function
----------------------------^

Signed-off-by: guoshichao <guoshichao@xiaomi.com>
2024-09-26 23:15:07 +08:00
guoshichao 956830170d greenhills: fix the data type align build error
"/home/guoshichao/work_profile/vela_os/vela_car_5/nuttx/include/nuttx/crypto/blake2s.h", line 91: error #2118-D:
          this attribute reduces the alignment of the typedef, and while that
          will be respected for struct/field layout, the compiler will not
          generate code to handle misaligned accesses for objects of this type
  typedef uint32_t uint32_alias_t __attribute__((may_alias)) aligned_data(1);
                                                             ^

Signed-off-by: guoshichao <guoshichao@xiaomi.com>
2024-09-26 23:00:21 +08:00
xucheng5 23ddfdfb1d sched : add prompt for workerqueue
modify Kconfig

Signed-off-by: xucheng5 <xucheng5@xiaomi.com>
2024-09-26 22:53:13 +08:00
guoshichao 0da40c5d65 greenhills: fix the arc4random_buf implicit declaration build error
"/home/guoshichao/work_profile/vela_os/vela_car_5/nuttx/include/crypto/curve25519.h", line 44: error #223-D:
          function arc4random_buf declared implicitly
      arc4random_buf(secret, CURVE25519_KEY_SIZE);
      ^

Signed-off-by: guoshichao <guoshichao@xiaomi.com>
2024-09-26 22:52:28 +08:00
simbit18 2fbe02afec ci/platforms/darwin.sh: switch Wget to cURL tool
Switch wget to cURL tool for:

arm_gcc_toolchain()
arm64_gcc_toolchain()
gperf()
riscv_gcc_toolchain()
sparc_gcc_toolchain()
xtensa_esp32_gcc_toolchain()
wasi_sdk()

Used git clone --depth 1 a shallow clone with a history truncated to reduce the clone size for:

kconfig_frontends()

added ninja installation
2024-09-26 10:54:16 -03:00
simbit18 715a3d8446 ci/platforms: linux.sh ubuntu.sh switch Wget to cURL tool
Switch wget to cURL tool for:
arm_gcc_toolchain()
arm64_gcc_toolchain()
riscv_gcc_toolchain()
sparc_gcc_toolchain()
xtensa_esp32_gcc_toolchain()
xtensa_esp32s2_gcc_toolchain()
xtensa_esp32s3_gcc_toolchain()
wasi_sdk()

Used git clone --depth 1 a shallow clone with a history truncated to reduce the clone size for:
kconfig_frontends()
2024-09-26 10:53:58 -03:00
Masayuki Ishikawa 44e8772ee9 audio: Fix caps initialization in pcm_enqueuebuffer()
Summary:
- I noticed that caps is not correctly initialized.
- This commit fixes this issue.

Impact:
- None

Testing:
- Tested with spresense:wifi_smp + nxplayer

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2024-09-26 13:57:53 +02:00
Huang Qi d9b95c5ca0 riscv: Remove some unnecessary macro guards
If CONFIG_SMP is not enabled, riscv_cpuindex.c will not be compiled
anyway.

And for CONFIG_ARCH_FPU, if it's not enabled, riscv_fpucmp.c will not
be compiled.

So we can remove the unnecessary macro guard for up_cpu_index() and
up_fpucmp().

Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2024-09-26 16:23:48 +08:00
lipengfei28 1eb151bef6 add pci_bus_map_region and pci_map_region macro
Signed-off-by: lipengfei28 <lipengfei28@xiaomi.com>
2024-09-26 16:23:18 +08:00
wangyongrong 3b09de844f pci.h: add pci_map_bar_region support
Signed-off-by: wangyongrong <wangyongrong@xiaomi.com>
2024-09-26 16:23:18 +08:00
chenrun1 e86be98d14 fs_rammap:Check last fileseek restore fpos
Summary:
  When restoring rammap fpos, we check the return value to avoid potential problems caused by no error return if the restore fails.

Signed-off-by: chenrun1 <chenrun1@xiaomi.com>
2024-09-26 16:15:17 +08:00
chao an a04e44ea75 syslog/channel: move syslog channel map into rodata
add SYSLOG_REGISTER to support disable syslog channel register

Signed-off-by: chao an <anchao@lixiang.com>
2024-09-26 16:10:29 +08:00