Commit Graph

53100 Commits

Author SHA1 Message Date
Jani Paalijarvi
602bd685ec arm64/imx9: Add uSDHC driver
Signed-off-by: Jani Paalijarvi <jani.paalijarvi@unikie.com>
2024-05-08 08:48:12 +08:00
Yanfeng Liu
c9a2e4a6c5 risc-v/virt: enable gradeful shutdown in kernel build
This enables graceful shutdown via `poweroff` command in `knsh64`
and `knsh32` configs.

Signed-off-by: Yanfeng Liu <yfliu2008@qq.com>
2024-05-07 21:02:49 +08:00
Yanfeng Liu
c352b04155 risc-v/sbi: add SRST extenstion usage in S-mode
This adds SBI specfication v0.3 based `riscv_sbi_system_reset()` to
support SBI firmware based system reset in kernel mode.

Signed-off-by: Yanfeng Liu <yfliu2008@qq.com>
2024-05-07 21:02:49 +08:00
zhanghongyu
908814a575 libc/lib_bzero:Add bzero prototype.
Implement the bzero function as an alternative to macro expansion.

and support gcc FORTIFY_SOURCE features for nuttx libc

This function will use gcc's function
__builtin_dynamic_object_size and __builtin_object_size

Its function is to obtain the size of the object through compilation,
so as to judge whether there are out-of-bounds operations in commonly used functions.
It should be noted that the option -O2 and above is required to enable this function

Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2024-05-07 14:59:05 +02:00
dependabot[bot]
4ffad2656e build(deps): bump jinja2 from 3.1.3 to 3.1.4 in /Documentation
Bumps [jinja2](https://github.com/pallets/jinja) from 3.1.3 to 3.1.4.
- [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.3...3.1.4)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-05-07 15:49:59 +08:00
chenwen@espressif.com
3a9d163aae esp32_c3/pm: Fix assert issue in PM mode
1. Adjust code to avoid PM wakelock->count less than or equal to 0.
    2. Fix some document format issues.

Signed-off-by: chenwen@espressif.com <chenwen@espressif.com>
2024-05-07 15:45:32 +08:00
Ivan Palijan
6e941aed8b Added support in Nucleo-L476RG board for BMP280 sensor. 2024-05-07 02:14:15 +08:00
hujun5
32d3dc4a9f arch: armv7-a: Disable IRQ to make the A core
policy consistent with the M core for TEE

Signed-off-by: hujun5 <hujun5@xiaomi.com>
2024-05-06 15:05:07 -03:00
Inochi Amaoto
04e40182ad arch/risc-v: Make bl602 allocate idle stack after ebss
Although almost all board support allocating idle stack after ebss,
bl602 have a different memory layout for idle stack. To unify them,
make idle stack allocated from ebss for bl602.

Signed-off-by: Inochi Amaoto <inochiama@outlook.com>
2024-05-06 15:04:24 -03:00
hujun5
03895f1073 sched: sched: Simplify the scheduling logic in nxsched_add_readytorun() for SMP
test:
We can use qemu for testing.
compiling
make distclean -j20; ./tools/configure.sh -l qemu-armv8a:nsh_smp ;make -j20 running
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

We have also tested this patch on other ARM hardware platforms.
Signed-off-by: hujun5 <hujun5@xiaomi.com>
2024-05-07 01:15:55 +08:00
nuttxs
8d3d93e001 Add ESP32-S3 ADC driver 2024-05-07 01:12:05 +08:00
Yanfeng Liu
9d6e2b97fb video/fb: add munmap support
This adds support to user-space munmap() requests in kernel build.

Signed-off-by: Yanfeng Liu <yfliu2008@qq.com>
2024-05-05 22:01:26 +08:00
Yanfeng Liu
339da96469 risc-v/virt: update kfb64 config
This updates `rv-virt/kfb64` to support new S-mode in patch 12178

Signed-off-by: Yanfeng Liu <yfliu2008@qq.com>
2024-05-05 22:01:26 +08:00
Yanfeng Liu
03446fb4e3 riscv/rv-virt: fix kernel build booting issue
This patch can boot `rv-virt/knsh64` and `rv-virt/knsh32` reported in
issue #12275 with qemu 6.2 target and OpenSBI v1.0 firmware on Ubuntu
22.04 host.

Signed-off-by: Yanfeng Liu <yfliu2008@qq.com>
2024-05-04 22:46:32 +08:00
Yanfeng Liu
8ef723803b docs/implementation: fix minor typos
This fixes a few minor typos encountered.

Signed-off-by: Yanfeng Liu <yfliu2008@qq.com>
2024-05-04 13:24:32 +08:00
Inochi Amaoto
4b12062667 Documentation/rv-virt: add required minimal QEMU version information
Since SSTC is support by QEMU 7.2.9, kernel mode nuttx is no
longer worked for older QEMU.

Add necessary requirement information for rv-virt board.

Signed-off-by: Inochi Amaoto <inochiama@outlook.com>
2024-05-04 13:24:04 +08:00
simbit18
0e67a79b94 fix nxstyle
corrected comments in C89 style
2024-05-03 14:15:56 -03:00
Yanfeng Liu
041ef1d9ea video/fb: kernel build framebuffer support
This supports running fb demo app in kernel build with new
config `rv-virt/kfb64`. The demo shows colored rectangles
in graphic window with the following console logs:

```
nsh> cat /proc/version
NuttX version 12.4.0 1ea10ddacc-dirty May  3 2024 07:03:59 rv-virt/kfb64
nsh> fb
VideoInfo:
      fmt: 13
     xres: 640
     yres: 480
  nplanes: 1
PlaneInfo (plane 0):
    fbmem: 0x80218010
    fblen: 1228800
   stride: 2560
  display: 0
      bpp: 32
Mapped FB: 0xc2000010
 0: (  0,  0) (640,480)
 1: ( 58, 43) (524,394)
 2: (116, 86) (408,308)
 3: (174,129) (292,222)
 4: (232,172) (176,136)
 5: (290,215) ( 60, 50)
Test finished
```

Signed-off-by: Yanfeng Liu <yfliu2008@qq.com>
2024-05-03 23:58:39 +08:00
Yanfeng Liu
0f5ba00a50 mm/map: revise device mapping functions
This revises vm_map_region() by accepting unaligned paddr, which is
aligned-down before mapping and in-page offset is then added to vaddr
before returning. It also moves vm_map_region() and vm_unmap_region()
to vm_region.c.

Signed-off-by: Yanfeng Liu <yfliu2008@qq.com>
2024-05-03 23:58:39 +08:00
Ville Juven
0cd5689bcb riscv/pgmap: Fix bug in kernel page directory init
The L2 table was not connected -> results in random crashes. Also add
missing data sync barrier to the end.
2024-05-03 23:49:11 +08:00
Jukka Laitinen
cc9c3ed80b arch/arm64/src/imx9: Add Ethernet driver
This adds a driver for i.MX93 ENET1 MAC block

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2024-05-02 16:30:41 -03:00
Jukka Laitinen
9277be2503 Add configuration option for RTL8211F RGMII PHY
Also extend the "struct phy_desc_s" to support for 1GB PHY's, the speed
detection always needs more than one bit.

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2024-05-02 16:30:41 -03:00
Eren Terzioglu
d62dca0696 esp32[c3|c6]: Fix chipname on docs 2024-05-02 23:35:29 +08:00
Inochi Amaoto
bd895222eb arch/risc-v: implement sbi_ipi_send
And SBI ipi support.

Fixup: 4f63ca1418 ("arch/risc-v: unfiy IPI access)
Signed-off-by: Inochi Amaoto <inochiama@outlook.com>
2024-05-02 16:08:13 +08:00
Inochi Amaoto
b283b949b6 arch/risc-v: implement standard ecall interface for nuttsbi
NuttSBI have a simple ecall interface for the kernel, which make
it hard to add new SBI call for NuttSBI. So implement standard
ecall interface for NuttSBI and make life easier.

Signed-off-by: Inochi Amaoto <inochiama@outlook.com>
2024-05-02 16:08:13 +08:00
xuxin19
9eac74330a cmake:bugfix __KERNEL__ should not be defined in libc,mm.. in FLAT mode
Signed-off-by: xuxin19 <xuxin19@xiaomi.com>
2024-05-02 16:03:09 +08:00
Jorge Guzman
4f2f5e1c5e stm32l4/doc: fix b_l475e_iot01a documentation board
Signed-off-by: Jorge Guzman <jorge.gzm@gmail.com>
2024-05-02 16:01:36 +08:00
Jorge Guzman
b4d977715e stm32h7/linum-stm32h753bi: Add support to usbmsc with sdcard
Signed-off-by: Jorge Guzman <jorge.gzm@gmail.com>
2024-05-02 16:00:47 +08:00
YAMAMOTO Takashi
c4f199e929 esp32s3: add a variation with 32MB flash 2024-05-01 23:34:12 +08:00
hujun5
a4aad284eb sched: wqueue: Remove sched_[un]lock from kwork_inherit.c
purpose:
1 sched_lock is very time-consuming, and reducing its invocations can improve performance.
2 sched_lock is prone to misuse, and narrowing its scope of use is to prevent people from referencing incorrect code and using it

test:
We can use qemu for testing.
compiling
make distclean -j20; ./tools/configure.sh -l qemu-armv8a:nsh_smp ;make -j20
running
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

We have also tested this patch on other ARM hardware platforms.

Signed-off-by: hujun5 <hujun5@xiaomi.com>
2024-05-01 11:08:07 +08:00
David Sidrane
4482d7b882 imxrt:Add DMA preflight Support
With CONFIG_MMCSD_MULTIBLOCK_LIMIT not set. (No limit)
   The DMA driver would overwrite the internal buffer.

   By adding CONFIG_ARCH_HAVE_SDIO_PREFLIGHT and
   CONFIG_FAT_DMAMEMORY we can insure alignment and
   maximize performance using no CONFIG_MMCSD_MULTIBLOCK_LIMIT
2024-04-30 15:48:20 -03:00
Eren Terzioglu
622abe0230 arch/xtensa: Fix esp32s3 build warnings 2024-04-30 15:47:39 -03:00
hujun5
e4d0f404f1 driver: There is no need to use sched_[un]lock
purpose:
1 sched_lock is very time-consuming, and reducing its invocations can improve performance.
2 sched_lock is prone to misuse, and narrowing its scope of use is to prevent people from referencing incorrect code and using it

test:
We can use qemu for testing.
compiling
make distclean -j20; ./tools/configure.sh -l qemu-armv8a:nsh_smp ;make -j20
running
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

We have also tested this patch on other ARM hardware platforms.

Signed-off-by: hujun5 <hujun5@xiaomi.com>
2024-04-30 11:35:13 -03:00
hujun5
8a6aa5f5bf sched/sched: There is no need to use sched_[un]lock
purpose:
1 sched_lock is very time-consuming, and reducing its invocations can improve performance.
2 sched_lock is prone to misuse, and narrowing its scope of use is to prevent people from referencing incorrect code and using it

test:
We can use qemu for testing.
compiling
make distclean -j20; ./tools/configure.sh -l qemu-armv8a:nsh_smp ;make -j20
running
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

We have also tested this patch on other ARM hardware platforms.

Signed-off-by: hujun5 <hujun5@xiaomi.com>
2024-04-30 11:34:24 -03:00
Andre Heinemans
4f1ac5160c arch/mx8mp: add rptun/rpmsg client support
New target mx8mp:rpsmsg has been added which enables
a virtual tty and can be accessed from the A53 core
running linux-imx
2024-04-30 11:30:02 -03:00
yinshengkai
b87804c2ba libc/string: replace __builtin_ffsl with inline function
In the gcc-riscv compiler, __builtin_ffs will call ffs, and calling __builtin_ffs in ffs will cause recursion

Change ffs to an inline function, and compile ffs implemented by nuttx by default.
Only call the implementation of nuttx when the compiler cannot provide an ffs implementation.

Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2024-04-30 19:47:08 +08:00
Ville Juven
3b5b755d1e arch/imx9_lpspi: Use DMA safe buffers to do the DMA transfers
Using user allocated buffers for DMA transfers is not safe for two reasons:
- User space memory is virtual memory, DMA needs physical memory
- User memory buffer alignment cannot be guaranteed -> cache line ops
  are not safe
2024-04-30 19:46:58 +08:00
Ville Juven
3079caf2ce arm64/imx9: Add DMA memory allocator
Add a simple allocator for DMA safe memory. It will provide contiguous
blocks of memory with D-Cache line size alignment.

NOTE: The optimal granule size is the D-Cache line size (64), but due
to restrictions in the granule allocator this would result in a maximum
block size of 2K only, thus use 256B granules instead givin 8K max block
size.

Once the granule allocator is fixed this limitation can be removed.
2024-04-30 19:46:58 +08:00
chao an
8821a0396a arch/risc-v: correct minor issues regarding comments
The comment in riscv_vpu.S should be vector not floating

Signed-off-by: chao an <anchao@lixiang.com>
2024-04-30 17:26:57 +08:00
chao an
e4d4c67b78 serial/pl011: configurable clock frequency
move clock frequency into Kconfig

Signed-off-by: chao an <anchao@lixiang.com>
2024-04-30 17:26:39 +08:00
YAMAMOTO Takashi
2295fa818d esp32s3: give ESP32S3_APP_FORMAT_LEGACY a prompt
So that users can enable it.
This fixes a regression in "esp32s3: add simple boot support".
2024-04-30 17:26:12 +08:00
Eren Terzioglu
891d67bb5e esp32[c3|h2|c6]: Add support to TWAI/CANBus controller 2024-04-30 10:03:22 +08:00
simbit18
7e30d38558 drivers/sensors/Kconfig: Added if SENSORS_BME680 for common dependency
sensor BME680: Added if SENSORS_BME680
2024-04-30 01:48:53 +08:00
Xu Xingliang
0db7417dc0 esp32/lvgl: fix lvgl v9 configuration error
Signed-off-by: Xu Xingliang <xuxingliang@xiaomi.com>
2024-04-30 01:45:03 +08:00
Rodrigo Sim
6ad202ee4c board/stm32f401rc-rs485: Add support to Mass Storage
Signed-off-by: Rodrigo Sim rcsim10@gmail.com
2024-04-30 00:05:09 +08:00
xuxin19
94d8fba629 cmake:bugfix generate config.h contain ; characters will be handled incorrectly
`;` is treated as a list separator in CMake.
the file(STRING) function will read the wrong .config value
string(REGEX REPLACE) will also incorrectly handle lines containing `;`
so here we can only parse character by character.

Signed-off-by: xuxin19 <xuxin19@xiaomi.com>
2024-04-29 11:14:48 -03:00
Michal Lenc
8f23a2db01 samv7: build sam_qencoder.c only if at least one timer counter is enabled
Option CONFIG_SENSORS_QENCODER might be configured even if SAMv7 qencoder
over timer counter is not used (for example encoder over GPIO is selected
with CONFIG_SAMV7_GPIO_ENC). This can cause compile warnings, also build
of sam_qencoder.c file is unnecessary in that case.

New hidden option CONFIG_SAMV7_QENCODER is added and automatically
selected if at least one timer counter is enabled for qencoder. Build
is triggered on this option.

Signed-off-by: Michal Lenc <michallenc@seznam.cz>
2024-04-29 19:36:21 +08:00
zhanghongyu
45568229ef tcp: decouple TCP_NODELAY and NET_TCP_KEEPALIVE
TCP_NODELAY is an independent configuration and does not depend on TCP_KEEPALIVE

Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2024-04-29 17:45:14 +08:00
zhanghongyu
0cd893fb5a icmpv6_neighbor: Simply skip IPv6 conflict detection on L3 Nic
Otherwise, the IP address is always considered to conflict, and the ipv6
address cannot be effectively obtained.
Later we will look at how to perform conflict detection on L3 network cards

Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2024-04-29 17:44:40 +08:00
zhanghongyu
f739fd010d icmpv6_neighbor: skip neighbor solicitation on L3 Nic
Otherwise, sending will fail because the neighbor table cannot be found

Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2024-04-29 17:44:40 +08:00