Commit Graph

52197 Commits

Author SHA1 Message Date
chao an 52e99bc66b risc-v/toolchain: move zicsr/zifencei extension into Kconfig
Signed-off-by: chao an <anchao@lixiang.com>
2024-01-15 22:31:39 -08:00
chao an f95bbb2949 risc-v/toolchain: add "V" Standard Extension into command line
"V" Standard Extension for Vector Operations

Signed-off-by: chao an <anchao@lixiang.com>
2024-01-15 22:31:39 -08:00
chao an 0cb09ce0ab sim/usbdev: refresh defconfig to fix ci break
Signed-off-by: chao an <anchao@lixiang.com>
2024-01-15 22:31:39 -08:00
chao an 3ee4227668 risc-v/toolchain: add "Q" Standard Extension into command line
"Q" Standard Extension for Quad-Precision Floating-Point

Signed-off-by: chao an <anchao@lixiang.com>
2024-01-15 22:31:39 -08:00
chao an 90f24ec29d arch/risc-v: add ARCH_QPFPU for Quad-Precision Floating-Point
new options to enable toolchain support for quadruple precision
(128 bits or 16 bytes) floating point if both the toolchain and
the hardware support it.

Signed-off-by: chao an <anchao@lixiang.com>
2024-01-15 22:31:39 -08:00
Xiang Xiao d2c4de6167 board: Add CONFIG_LIBC_EXECFUNCS and CONFIG_PSEUDOTERM to adb config
required by https://github.com/apache/nuttx-apps/pull/2257

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2024-01-15 17:14:51 +08:00
chao an 45cca933f8 CMake: arm/armv8-r: init armv8-r cmake build
Test cmake build on aarch32 fvp:
$ cmake -B build -DBOARD_CONFIG=fvp-armv8r-aarch32/nsh -GNinja
$ cmake --build build

Signed-off-by: chao an <anchao@lixiang.com>
2024-01-15 00:46:52 -08:00
chao an 7c89f943c0 armv8-r/perf: enable perf count only ARCH_PERF_EVENTS is enabled
Signed-off-by: chao an <anchao@lixiang.com>
2024-01-15 00:46:52 -08:00
wangyongrong df147406db rptun_ping: decoupling rptun ping and rptun.
ping is not only rptun support, so move it to public part.

Signed-off-by: wangyongrong <wangyongrong@xiaomi.com>
2024-01-14 23:06:51 -08:00
wangyongrong 11cefd087a rptun ping: decoupling rptun ping and rptun virtio device
Signed-off-by: wangyongrong <wangyongrong@xiaomi.com>
2024-01-14 23:06:51 -08:00
Yanfeng Liu f280c33311 sched/logging: add task activation/exit logs
Task activation/exit logs are helpful for device bringup,
especially when user space nsh prompt doesn't show up.

Putting them here will allow cleaning of logs in multiple
up_exit() functions  later.

Signed-off-by: Yanfeng Liu <yfliu2008@qq.com>
2024-01-14 23:04:42 -08:00
Yanfeng Liu 3c327efd2f docs/comments: fix some typos
Signed-off-by: Yanfeng Liu <yfliu2008@qq.com>
2024-01-15 13:22:13 +08:00
Huang Qi fe5ca39a79 libc.csv: Fix qsort signature with unexpected quotation mark
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2024-01-14 02:17:22 -08:00
Lwazi Dube 2dac5e1b6a bluetooth: Prevent btsak from repeatedly showing the same error. 2024-01-14 02:16:48 -08:00
Takeyoshi Kikuchi f01e395b1c fs: partition: fs_mbr: fix for MBR block count calculation.
When the MBR partition size exceeds 2 GiB, a 32-bit wrap-around occurs,
causing an error in the block count calculation.

* wrong
 brw-rw-rw- 5150605312 mmcblk0
 brw-rw-rw-  629145600 mmcblk0p1
 brw-rw-rw-  225443840 mmcblk0p2 <--

* fixed
 brw-rw-rw- 5150605312 mmcblk0
 brw-rw-rw-  629145600 mmcblk0p1
 brw-rw-rw- 4520411136 mmcblk0p2 <--

Signed-off-by: Takeyoshi Kikuchi <kikuchi@centurysys.co.jp>
2024-01-14 01:29:24 -08:00
Yanfeng Liu 78e8c0dea5 risc-v/nuttsbi: add device specific initialization hook
Some devices have special preparations before entering S-mode, thus
a hook is needed from NUTTSBI to give them the chance.

Signed-off-by: Yanfeng Liu <yfliu2008@qq.com>
2024-01-14 01:28:10 -08:00
Tiago Medicci Serrano 8fb05d44bc esp32s3/wifi: Fix Wi-Fi connection to WPA3-SAE APs.
This commit fix the connection issues while trying to connect to
WPA3-SAE-secured Access Points (APs).
2024-01-12 16:57:49 +01:00
Yanfeng Liu f221878204 risc-v/nuttsbi: use ARCH_RV_MMIO_BITS for mtimer access selection
Chips like K230 has ARCH_RV64 but only supports 32-bit MMIO. So using
ARCH_RV_MMIO_BITS is more proper here.

Signed-off-by: Yanfeng Liu <yfliu2008@qq.com>
2024-01-11 21:48:44 -08:00
chenwen@espressif.com b739b2b18a xtensa/esp32s3: Support WPA3 on softap mode
Signed-off-by: chenwen@espressif.com <chenwen@espressif.com>
2024-01-12 13:41:58 +08:00
Lwazi Dube d13065468e boards/sama5d3-xplained: Add USB mouse initialization. 2024-01-11 18:29:30 -08:00
dependabot[bot] 86638b6a0e build(deps): bump jinja2 from 3.1.2 to 3.1.3 in /Documentation
Bumps [jinja2](https://github.com/pallets/jinja) from 3.1.2 to 3.1.3.
- [Release notes](https://github.com/pallets/jinja/releases)
- [Changelog](https://github.com/pallets/jinja/blob/main/CHANGES.rst)
- [Commits](https://github.com/pallets/jinja/compare/3.1.2...3.1.3)

---
updated-dependencies:
- dependency-name: jinja2
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-11 21:38:34 -03:00
Ville Juven 983387e6dd mpfs_mpucfg.c: Add mpfs_mpu_lock()
Add method to lock an MPUCFG entry. Locking means the value of the register
cannot be changed until the SoC is reset.
2024-01-11 06:57:16 -08:00
Ville Juven a0901ec142 mpfs_usb.c: Remove PMPCFG configuration from the driver
This is not the right place to modify DMA memory protection values.

Why not? These are designed to protect other AMP mode instances. Opening
the entire SoC's memory for the USB DMA kind of defeats this purpose.

Also, the driver cannot know how to configure these registers correctly,
only opening up the whole SoC "works".
2024-01-11 06:50:51 -08:00
chao an c04f1e7789 drivers/serial/pl011: add FAR specifier
Signed-off-by: chao an <anchao@lixiang.com>
2024-01-11 13:39:06 +01:00
chao an 1dd9f64287 drivers/serial/pl011: add support of uart0/2/3 port
Signed-off-by: chao an <anchao@lixiang.com>
2024-01-11 13:39:06 +01:00
chao an 5f51aba1be serial/pl011: rename serial_pl011 to uart_pl011
The lower half driver should be prefixed with "uart_"

Signed-off-by: chao an <anchao@lixiang.com>
2024-01-11 13:39:06 +01:00
chao an 181a31801d arm/armv8r: remove unused serial_pl011.h
Signed-off-by: chao an <anchao@lixiang.com>
2024-01-11 13:39:06 +01:00
chao an b7bd2e33b1 arm/armv8-r: wfi secondary cores if SMP is disabled
Check cpu affinity in single core mode to avoid secondary cores bootup

Signed-off-by: chao an <anchao@lixiang.com>
2024-01-11 12:29:59 +01:00
chao an 6e940b74f5 arm/fvp-v8r: fix arm_earlyserialinit() is not called correctly
USE_EARLYSERIALINIT will depends on the definition in arm_internal.h

Signed-off-by: chao an <anchao@lixiang.com>
2024-01-11 00:52:17 -08:00
wangyongrong 976aa5552f rptun: remove rptun work queue related unused code
Signed-off-by: wangyongrong <wangyongrong@xiaomi.com>
2024-01-11 00:51:57 -08:00
chao an 5eef09b4a1 arm/armv8-r: fix compile warning
armv8-r/arm_gicv3.c: In function 'gic_validate_dist_version':
armv8-r/arm_gicv3.c:730:9: warning: format '%x' expects argument of type 'unsigned int', but argument 3 has type 'uint32_t' {aka 'long unsigned int'} [-Wformat=]
  730 |   sinfo("GICD_TYPER = 0x%x\n", typer);
      |         ^~~~~~~~~~~~~~~~~~~~~  ~~~~~
      |                                |
      |                                uint32_t {aka long unsigned int}
armv8-r/arm_gicv3.c:730:26: note: format string is defined here
  730 |   sinfo("GICD_TYPER = 0x%x\n", typer);
      |                         ~^
      |                          |
      |                          unsigned int
      |                         %lx

Signed-off-by: chao an <anchao@lixiang.com>
2024-01-11 00:51:28 -08:00
Yanfeng Liu a9372627d8 risc-v/rv-virt: use fully linked apps for kernel build
Fully linked apps take less storage and are efficient to load. This
is to enable them for rv-vrit configurations in KERNEL build.

Changes:

- arch/risc-v/Kconfig       select BINFMT_ELF_EXECUTABLE for QEMU-RV
- boards/risc-v/qemu-rv/rv-virt/configs
  - knsh32/defconfig        enable ELF_EXECUTABLE, LIBM, OSTEST
  - knsh64/defconfig        enable ELF_EXECUTABLE, LIBM, OSTEST
  - ksmp64/defconfig        enable ELF_EXECUTABLE, LIBM, OSTEST
  - knetnsh64/defconfig     enable ELF_EXECUTABLE, LIBM, OSTEST
  - knetnsh64_smp/defconfig enable ELF_EXECUTABLE, LIBM, OSTEST

Additions:
- boards/risc-v/qemu-rv/rv-virt/scripts/
  - gnu-elf.ld              apps linker script

The ARCH_TEXT_VBASE of knsh32 is set to same as that of 64bit to reuse
the apps linker script.

Signed-off-by: Yanfeng Liu <yfliu2008@qq.com>
2024-01-11 00:51:07 -08:00
wangyongrong 5a39935d4f rpmsgmtd: use fixed length struct to transfer between two cpus
Signed-off-by: wangyongrong <wangyongrong@xiaomi.com>
2024-01-11 08:33:15 +01:00
Yanfeng Liu da365c1cb0 risc-v/canmv230: enable fully linked apps for kernel build
Previously apps in kernel build are partially linked, thus are
big and inefficient. This enables full link for kernel mode apps
to reduce size and speed up loading.

Changes:

- arch/risc-v/Kconfig          select HAVE_ELF_EXECUTABLE for K230
- boards/../scripts/Make.defs  adjust LDELFLAGS
- boards/../knsh/defconfig     enable BINFMT_ELF_EXECUTABLE

Additions:
- boards/../scripts/gnu-elf.ld apps linker script

Signed-off-by: Yanfeng Liu <yfliu2008@qq.com>
2024-01-10 23:27:46 -03:00
chenwen@espressif.com a774587088 esp32s3/rt_timer: Adjust spinlock position to avoid deadlock 2024-01-11 09:22:52 +09:00
Tiago Medicci Serrano f4485a58e3 esp32s3_devkit/sta_softap: Reenable SMP on `defconfig`.
This reverts commit e25fcb3bd5.
The issue - related to a deadlock in the RT-Timer - was properly
solved.
2024-01-11 09:22:52 +09:00
Tiago Medicci Serrano 823a183c17 esp32s3/rt_timer: Fix deadlock on RT-Timer thread.
The RT-Timer thread may call the `start_rt_timer` function. This
function gets the spinlock with interrupts disabled to ensure
exclusive access. However, this was already being performed in the
RT-Timer thread, causing a deadlock.
2024-01-11 09:22:52 +09:00
Roy Feng 4761af7069 esp32[s2|s3] Following up update interrupt type constants.
Following up the 'Espressif HAL fullly integration for ESP32s2/s3'
changes in https://github.com/apache/nuttx/pull/11428
There are few missing interrupt type constants need update. So
update them to avoid the build error.
2024-01-10 09:54:55 -08:00
zhanghongyu b3dcebce07 linux/Dockerfile: Add the python3 coloredlogs package for the matter build
Depend on this package when we compile using the build_examples.py script that comes with matter.

Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2024-01-10 09:47:54 -08:00
fangxinyong f2bcb0d2d8 tools/ci: revert tmp change
for apache/nuttx#11498 to pass ci, need revert after all commits are merged

Signed-off-by: fangxinyong <fangxinyong@xiaomi.com>
2024-01-10 01:58:53 -08:00
fangxinyong c479ccb8aa sched: move etc romfs mount from nsh to sched/init
Usually the startup script is placed under /etc. The contents of the etc directory
are compiled and linked with Nuttx binary in the form of romfs. After startup,
it will be  mounted by Nsh.

etc is generated by the different boards, that use genromfs and xxd tools to generate
and compile it into the Nuttx, for example: boards/arm/at32/at32f437-mini/tool/mkromfs.sh
The more common method is etc image generated from the content in the corresponding
board/arch/board/board/src/etc directory, and added by Makefile for example:
boards/sim/sim/sim/src/etc.

But in kernel/protected mode, Nuttx kernel and apps are run in different privileged/
non-privileged mode or the isolated binarys, so as that nsh should use syscall to
access Nuttx kernel by exported API. In this scenario, nsh can not mount the etc image
content, because that is generated in board and as a part of Nuttx kernel.

changes:

- move etc romfs mount from nsh to Nuttx, but keep the script to parse and execute.
- move and rename the related CONFIG, move customized nsh_romfsimg.h to etc_romfs.c
  in boards, and no need declaration for romfs_img/romfs_img_len.

This commit changes and updates all configurations in Nuttx arch/board as much as possible,
but if any missing, please refer to the following simple guide:

- rename CONFIG_NSH_ROMFSETC to CONFIG_ETC_ROMFS, and delete CONFIG_NSH_ARCHROMFS in defconfig
- rename the etc romfs mount configs, for example CONFIG_NSH_FATDEVNO to CONFIG_ETC_FATDEVNO
- move customized nsh_romfsimg.h to etc_romfs.c in board/arch/board/board/src and no need
  declaration for romfs_img/romfs_img_len.
- delete default nsh_romfsimg.h, if ROMFSETC is enabled, should generate and compile etc_romfs.c
  in board/arch/board/board/src.

Signed-off-by: fangxinyong <fangxinyong@xiaomi.com>
2024-01-09 21:29:46 -03:00
wangyongrong 62698051c7 rptun ping: fix data format warning
Signed-off-by: wangyongrong <wangyongrong@xiaomi.com>
2024-01-09 06:06:40 -08:00
wangyongrong 661171661f rptun ping: fix code format in rptun ping
Signed-off-by: wangyongrong <wangyongrong@xiaomi.com>
2024-01-09 06:06:40 -08:00
wyr8899 df09e40e3a rptun ping: support data checksum and data transfer rate calculation
Signed-off-by: wangyongrong <wangyongrong@xiaomi.com>
2024-01-09 06:06:40 -08:00
Zhe Weng 3b74cfecc2 net/route: Support longest prefix match for routing
Support longest prefix match routing described as "Longest Match" in
RFC 1812, Section 5.2.4.3, Page 75.

Introduced `prefixlen` to indicate the prefix length of currently
founded route, and only looks up for longer prefix in all later steps.

Signed-off-by: Zhe Weng <wengzhe@xiaomi.com>
2024-01-09 05:58:10 -08:00
Zhe Weng 54f3452293 net/route: Fix null pointer access when ramroute is full
Signed-off-by: Zhe Weng <wengzhe@xiaomi.com>
2024-01-09 05:58:10 -08:00
Zhe Weng 688f0e9117 net: Only call arp_send for PF_INET and icmpv6_neighbor for PF_INET6
If we only enable one of `CONFIG_NET_ARP_SEND` and
`CONFIG_NET_ICMPv6_NEIGHBOR`, both IPv4 and IPv6 traffic will send
ARP or NDP, which causes problem.

Example:
`CONFIG_NET_ARP_SEND=n`
`CONFIG_NET_ICMPv6_NEIGHBOR=y`

Wrong:
IPv4 traffic (`PF_INET`) goes into `icmpv6_neighbor`, which
definitely causes problem.

Correct:
IPv4 traffic doesn't call anything, IPv6 traffic calls `icmpv6_neighbor`

Signed-off-by: Zhe Weng <wengzhe@xiaomi.com>
2024-01-09 05:56:28 -08:00
simbit18 eaf1d07809 tools/ci: add initial support for MSYS2
removed uname from msys2 job
2024-01-09 05:50:09 -08:00
wangyongrong 540e7f475f rpmsgfs: synchronous message transfer format
Signed-off-by: wangyongrong <wangyongrong@xiaomi.com>
2024-01-09 05:49:03 -08:00
Philippe Leduc e59c95bc9b Fix mx8mp ecspi interruption management. 2024-01-09 05:48:12 -08:00