Commit Graph

49573 Commits

Author SHA1 Message Date
SPRESENSE
54112ac070 drivers/modem/alt1250: Update alt1250 driver
Updated alt1250 driver with regarding to the following changes.
- Add LTE hibernation feature
- Split source code per module
- Some refactoring
- Some bug fixes
2023-06-08 07:48:17 +02:00
Fotis Panagiotopoulos
b89215a11f Fixed Kconfig options for the obsolete GD32F4_TICKLESS_SYSTICK & STM32WB_TICKLESS_SYSTICK options. 2023-06-07 11:10:34 -06:00
SunJ
ad4e2f0922 arch/riscv: Fixed FPU context save/restore error
Always save/restore FPU context if the current thread use FPU

Signed-off-by: SunJ <jsun@bouffalolab.com>
2023-06-07 16:39:51 +03:00
Ville Juven
159a4f83d6 mpfs/icicle: Enable KMM_MAP for knsh
This also removes kconfig warning:

  Normalize icicle/knsh
.config:248:warning: symbol value '' invalid for ARCH_KMAP_VBASE
.config:248:warning: symbol value '' invalid for ARCH_KMAP_VBASE
2023-06-07 21:04:57 +08:00
Fotis Panagiotopoulos
a57cd563d5 stm32: Removed unused Kconfig option.
The option STM32_TICKLESS_SYSTICK is not used anywhere and the
stm32 arch does not have the capability to use systick as a
tickless timer.
2023-06-07 09:40:55 -03:00
xucheng5
f4e3f23945 driver/mtd : mtd_config name len max changed to NAME_MAX
Signed-off-by: xucheng5 <xucheng5@xiaomi.com>
2023-06-07 09:40:02 -03:00
chenwen@espressif.com
617927f27c xtensa/esp32: Support multiple PHY init data bin
Signed-off-by: chenwen@espressif.com <chenwen@espressif.com>
2023-06-07 16:44:26 +08:00
GD32-MCU
fdfc25cf56 add sdio driver for GD32F4 2023-06-07 16:43:55 +08:00
Ville Juven
0a9279f672 MPFS: Use NuttX SBI for Kernel mode 2023-06-07 01:48:15 +08:00
Ville Juven
2525c10729 RISC-V: bind NuttX native SBI to SBI glue logic 2023-06-07 01:48:15 +08:00
Ville Juven
ae64f28344 RISC-V: Implement simple and native NuttX SBI
This is a minimalistic SBI implementation for NuttX.

Provides a single service for now:
- Access to machine timer

Provides a start trampoline to start NuttX in S-mode:
- Exceptions / faults are delegated to S-mode.
- External interrupts are delegated to S-mode.

Machine mode timer is used as follows:
- The timer compare match register reload happens in M-mode, via
  call gate "riscv_sbi_set_timer"
- The compare match event is dispatched to S-mode ISR, which will
  notify the kernel to advance time
- Clearing the STIP interrupt does not work from S-mode,
  so the call gate does this from M-mode

The only supported (tested) target for now is MPFS.
2023-06-07 01:48:15 +08:00
chao an
76e5204a80 risc-v/backtrace: correct stack pointer if enable ARCH_KERNEL_STACK
Signed-off-by: chao an <anchao@xiaomi.com>
2023-06-07 01:44:28 +08:00
chao an
b7b3c3c550 arm/backtrace: validate PC register before process unwind
Signed-off-by: chao an <anchao@xiaomi.com>
2023-06-07 01:40:30 +08:00
paolovolpi
90a34422ed include/nuttx/spi.h Fix SPIDEVID_TYPE macro definition
Remove space between macro name and parentheses
2023-06-06 10:32:34 -03:00
Zhe Weng
f71fb738c5 net/icmp: Save poll device in icmp_poll_s
ICMP's conn->dev is changing in icmp_sendmsg, when sending to different
address, or when error occurs (like NETDEV_DOWN). Then the poll callback
cannot be dropped from previous dev in free, because the dev is wrong.

So add dev to struct icmp_poll_s just like struct udp_poll_s.

Signed-off-by: Zhe Weng <wengzhe@xiaomi.com>
2023-06-06 19:33:21 +08:00
chao an
c1bcf59a85 libs/libc: fix build break on kernel mode
Signed-off-by: chao an <anchao@xiaomi.com>
2023-06-06 13:30:07 +08:00
chao an
7c5d2a8bdd usrsock/dns: add sanity check before send dns event
Signed-off-by: chao an <anchao@xiaomi.com>
2023-06-06 13:29:23 +08:00
Lwazi Dube
a720984eb7 wireless/bluetooth: Add a generic access service.
Make NuttX peripheral visible to BLE apps.
2023-06-05 15:00:23 -03:00
Ville Juven
a41f752ecc kmm/kmm_map: Add missing FAR qualifiers 2023-06-05 12:03:37 +03:00
Xiang Xiao
add569d0e5 arch/sim: Replace uart_[xmit|recv]chars_dma with uart_dma[txavail|rxfree]
to follow the original dma design

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-06-05 09:25:31 +02:00
Xiang Xiao
694c0f0b7f usbhost/cdcacm: Fix the compiler warning when serial dma is enabled
CP:  nuttx/nuttx/include/nuttx/config.h
CC:  mqueue/mq_sndinternal.c usbhost/usbhost_cdcacm.c:435:3: warning: initialization of ‘void (*)(struct uart_dev_s *)’ from incompatible pointer type ‘void (*)(struct uart_dev_s *, _Bool)’ [-Wincompatible-pointer-types]
  435 |   usbhost_txint,         /* txinit */
      |   ^~~~~~~~~~~~~
usbhost/usbhost_cdcacm.c:435:3: note: (near initialization for ‘g_uart_ops.dmareceive’)
usbhost/usbhost_cdcacm.c:436:3: warning: initialization of ‘void (*)(struct uart_dev_s *)’ from incompatible pointer type ‘_Bool (*)(struct uart_dev_s *)’ [-Wincompatible-pointer-types]
  436 |   usbhost_txready,       /* txready */
      |   ^~~~~~~~~~~~~~~
usbhost/usbhost_cdcacm.c:436:3: note: (near initialization for ‘g_uart_ops.dmarxfree’)
usbhost/usbhost_cdcacm.c:437:3: warning: initialization of ‘void (*)(struct uart_dev_s *)’ from incompatible pointer type ‘_Bool (*)(struct uart_dev_s *)’ [-Wincompatible-pointer-types]
  437 |   usbhost_txempty        /* txempty */
      |   ^~~~~~~~~~~~~~~
usbhost/usbhost_cdcacm.c:437:3: note: (near initialization for ‘g_uart_ops.dmatxavail’)

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-06-05 09:25:31 +02:00
Alexander Merkle
961a68b4cf arch/arm: initial FPU support for armv8r aarch32
CortexR52 can have a optional FPU.
- VFPv3 with FP16
- Option 1: 16 x double-prevision registers - -mfpu=vfpv3-d16-fp16
- Option 1: 32 x double-prevision registers - -mfpu=vfpv3-fp16
2023-06-04 16:49:34 -03:00
Alexander Merkle
2b6209147e arch/arm: cleanup arm_head.S for armv8-r aarch32 2023-06-04 16:49:34 -03:00
Xiang Xiao
e98a153cb2 mm/mempool: Remove nexpend and totalsize from mempool_s
forget in the commit(https://github.com/apache/nuttx/pull/9052):
commit 781a34da94
Author: anjiahao <anjiahao@xiaomi.com>
Date:   Tue Apr 18 11:18:43 2023 +0800

    memepool:fix memory consumption double counting issue

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-06-04 11:47:51 -03:00
Xiang Xiao
87aa067ab3 serial/16550: Include nuttx/clk/clk.h
to avoid the build break when CONFIG_CLK is enabled

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-06-04 11:37:59 +03:00
Masayuki Ishikawa
ee364e115a drivers: virtio: Remove unused code and fix comments in virtio-mmio-net.c
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2023-06-04 01:14:08 +08:00
Lucas Saavedra Vaz
81cfd73770 board/xtensa/esp32-devkitc: Add nxdiag config
Adds defconfig that enables nxdiag with relevant options for the ESP32-DevKitC. Also updates the board documentation.
2023-06-03 13:20:01 +08:00
Lucas Saavedra Vaz
0b64f8d54e Documentation: Add nxdiag application
Basic description of the nxdiag, its options and configurations.
2023-06-03 13:20:01 +08:00
Petro Karashchenko
cddc558bb5 sim/ostest: enable priority inheritance testing
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2023-06-02 20:08:33 -03:00
wanggang26
01348b70a9 mtd: fix a typo 2023-06-02 19:57:15 +03:00
Ville Juven
61a46ad39e mm/kmm_map: Fix code style error
As pointed out in https://github.com/apache/nuttx/pull/9368
2023-06-02 22:40:23 +08:00
Ville Juven
d193c50947 mpfs_corespi: Change default motorola mode to MODE3 2023-06-02 11:13:02 -03:00
Ville Juven
4d49f80e16 mpfs_corespi: Fix DEBUGASSERT() for clk divider
Valid range is 0...255, not 2...512
2023-06-02 11:13:02 -03:00
Huang Qi
4c9e11d559 tools: Support string upper/lower case in make
Implement UPPER_CASE/LOWER_CASE function in pure make, usage:
```
UPPER = $(call UPPER_CASE,$(xxx))
```

Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2023-06-02 11:12:12 -03:00
Peter Bee
59450bf9a9 arch/arm64: use adrp instead adr in bss init code
To support address offset larger than 1MB

Signed-off-by: Peter Bee <bijunda1@xiaomi.com>
2023-06-02 11:02:14 -03:00
Lucas Saavedra Vaz
6a220a08ba tools: Add way to get current defconfig name on runtime
This commit aims to provide a way to get the current applied defconfig on runtime by providing CONFIG_BASE_DEFCONFIG that is updated when the configure and build scripts are run.
2023-06-02 09:17:58 -03:00
Masayuki Ishikawa
766e0a3b05 boards: Enable NFS to test virtio-mmio-net
Summary:
- This commit enables NFS to test virtio-mmio-net

Impact:
- None

Testing:
- Tested with qemu-7.1

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2023-06-02 16:28:34 +08:00
Masayuki Ishikawa
e149a1278b dirivers: virtio: Fix virtnet_virtnet_txpoll() in virtio-mmio-net.c
Summary:
- I noticed that nfsmount always timed out.
- This commit fixes this issue.

Impact:
- None

Testing:
- Tested wih qemu-7.1
- NOTE: defconfigs will be updated later.

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2023-06-02 16:28:34 +08:00
Masayuki Ishikawa
ec788d9398 arch: fvp-v8r: Fix warning when configuring fvp-armv8r:nsh_smp
Summary:
- I noticed that ./tools/configure.sh fvp-armv8r:nsh_smp shows
  warning: (ARCH_CHIP_FVP_R52 && ARCH_CHIP_FVP_R82) selects ARMV8R_HAVE_GICv3 which has unmet direct dependencies (ARCH_ARM && ARCH_ARMV8R)
- I think ARMV8R_HAVE_GICv3 is only used for aarch32.
- This commit fixes this issue.

Impact:
- None

Testing:
- Tested with nsh_smp on FVP

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2023-06-02 12:08:27 +08:00
Ville Juven
f28ac98de0 arch/risc-v: Add riscv_addrenv_pgmap
This is the counterpart for the kernel mapping functionality, i.e. it
implements the up_addrenv_xx functions needed by kmm_map
2023-06-02 10:50:26 +08:00
Ville Juven
1387c35213 arch/risc-v: Add method to extract PPN from SATP value
This makes it possible to get the physical page number (PPN) from any
SATP value, not only the currently active SATP register.
2023-06-02 10:50:26 +08:00
Ville Juven
376874d88b arch/risc-v: Add maximum user addrenv size and end boundary
Also in riscv_uservaddr() check the end boundary
2023-06-02 10:50:26 +08:00
Ville Juven
783f3f4c92 arch/risc-v: Move ARCH_ADDRENV_VBASE to addrenv.h
Move the user address environment base address to a public header and
add riscv_uservaddr query
2023-06-02 10:50:26 +08:00
Ville Juven
0476e30a6d mm/kmm_map: Add support to dynamically map pages into kernel virtual memory
This adds functionality to map pages dynamically into kernel virtual
memory. This allows implementing I/O remap for example, which is a useful
(future) feature.

Now, the first target is to support mapping user pages for the kernel.

Why? There are some userspace structures that might be needed when the
userspace process is not running. Semaphores are one such example. Signals
and the WDT timeout both need access to the user semaphore to work
properly. Even though for this only obtaining the kernel addressable
page pool virtual address is needed, for completeness a procedure is
provided to map several pages.
2023-06-02 10:50:26 +08:00
Tiago Medicci Serrano
223c5a3722 xtensa/esp32_esp32s2_esp32s3: enable syslog bufferring
By enabling the syslog buffering on xtensa-based devices, it's
possible to ensure concurrent tasks will not mess with the syslog
messages.
2023-06-02 10:17:54 +08:00
Tiago Medicci Serrano
118a127771 esp32_start: use up_putc instead up_puts in showprogress define
During initialization it isn't possible to use up_puts once it's
protected against concurrent access through a mutex lock. Instead,
using up_putc makes it similar to ESP32S2 and ESP32S3 and perfectly
fits for showprogress usage.
2023-06-02 10:17:54 +08:00
Tiago Medicci Serrano
71c8265e2d drivers/syslog: add mutex to syslog_default_write
This commit reverts 19f269e54b and
substitutes the semaphore to a mutex, used as a locking mechanism
to avoid syslog messages being messed.

Considering SMP, threads running on different CPUs could call
syslog_default_write simultaneously. It then calls `up_nputs` that,
in most of the implementations, calls `up_putc` multiple times to
write to the serial. So, calling it at the same would cause syslog
messages to interfere with each other.

`up_nputs` and `up_putc` are low-level functions that could be used
during initialization and by the interrupt handler. Hence, it isn't
advisable to implement any locking mechanism on them. On the other
hand, syslog can also be used from the interrupt: if the interrupt
buffer is selected (`CONFIG_SYSLOG_INTBUFFER=y`), the syslog
messages will be flushed when we aren't serving an interrupt.
On the contrary, if it isn't set, it would call the registered
`sc_force` callback, which calls `syslog_default_putc` instead of
the lock-protected `syslog_default_write`.
2023-06-02 10:17:54 +08:00
guoshichao
441b51b706 libc/regex: provide a separate kconfig for regex
in the initial impl, the regex is depends on ALLOW_MIT_COMPONENTS, and
if other modules want to use regex, also needs to depends on
ALLOW_MIT_COMPONENTS, which is ambiguity, so we provide a seperate
kconfig option for regex: LIBC_REGEX, which is depends on
ALLOW_MIT_COMPONENTS, but is enabled by default. Thus if
ALLOW_MIT_COMPONENTS is enabled, then the LIBC_REGEX is also enabled
either automatically, and this is more clear than controlled by
ALLOW_MIT_COMPONENTS option only.

Signed-off-by: guoshichao <guoshichao@xiaomi.com>
2023-06-02 02:50:23 +08:00
simbit18
7f551aa33f Fix Kconfig style
Remove TABs from Kconfig files
2023-06-01 23:45:42 +08:00
raiden00pl
4089e35805 drivers/sensors: add bh1749nuc color sensor support
Add support for the BH1749NUC I2C color sensor.
Currently, the interrupt pin is not supported.
2023-06-01 23:45:30 +08:00