Commit Graph

53015 Commits

Author SHA1 Message Date
hujun5
5cee996588 up_putc: int up_putc, enter_critical_section may be called
before kernel has been iniitialized,we use spin_lock_irqsave to replace.

Signed-off-by: hujun5 <hujun5@xiaomi.com>
2024-05-09 13:45:02 +08:00
hujun5
90f9ffc2e8 sched/sched: CONFIG_SCHED_RESUMESCHEDULER macro define error
we removed "select SCHED_RESUMESCHEDULER",
As SCHED_RESUMESCHEDULER is not a necessary feature in SMP,
turning it on by default may affect performance.

Signed-off-by: hujun5 <hujun5@xiaomi.com>
2024-05-09 01:39:47 +08:00
hujun5
e187dbd663 chip/s698pm_cpustart.c: Fix compile error
chip/s698pm_cpustart.c: In function 's698pm_cpu_boot':
Error: chip/s698pm_cpustart.c:74:17: error: unused variable 'tcb' [-Werror=unused-variable]
   struct tcb_s *tcb = this_task();
                 ^~~
cc1: all warnings being treated as errors
make[1]: *** [Makefile:99: s698pm_cpustart.o] Error 1
make[1]: Target 'libarch.a' not remade because of errors.
make: *** [tools/LibTargets.mk:164: arch/sparc/src/libarch.a] Error 2
make: Target 'all' not remade because of errors.
/github/workspace/sources/nuttx/tools/testbuild.sh: line 370: /github/workspace/sources/nuttx/../nuttx/nuttx.manifest: No such file or directory
  Normalize s698pm-dkit/smp

Signed-off-by: hujun5 <hujun5@xiaomi.com>
2024-05-09 01:39:47 +08:00
Stuart Ianna
c4dbabb1bb drivers/devicetree: Add a set of commonly used FDT utilities. 2024-05-09 01:37:11 +08:00
Pressl, Štěpán
297b3b0209 arch/arm/src/samv7/sam_pwm.c: option to make channels synchronous
Make channels synchronous (i.e. share the same timebase) with the help
of SAMV7_PWMx_CHy_SYNC defines. All the channels share the same
timebase of channel 0, so this channel must be defined too.

Signed-off-by: Stepan Pressl <pressste@fel.cvut.cz>
2024-05-08 23:45:40 +08:00
YAMAMOTO Takashi
b049b490b8 esp32-devkitc/wamr_wasi_debug: fix image size in an example 2024-05-08 23:45:05 +08:00
YAMAMOTO Takashi
adcabeb6bf esp32-devkitc/wamr_wasi_debug: Remove a few things to reduce the size
* Remove a few things to fit the default partition size

* Tweak CONFIG_ESP32_STORAGE_MTD_SIZE to match flash 4MB
2024-05-08 23:45:05 +08:00
simbit18
8de8308bb4 Documentation/Documentation/platforms/arm/gd32f4/boards/gd32f470zk-eval: gd32f470z_eval.png Remove the execute permissions on the updated files. 2024-05-08 11:03:05 -03:00
Inochi Amaoto
f4a38c01df arch/risc-v: Make esp32 SoCs allocate idle stack after ebss
ESP32 SoC use a static allocated array as idle stack. To fit
the existed idle stack allocation, make idle stack allocated
from ebss for the whole esp32 series.

Signed-off-by: Inochi Amaoto <inochiama@outlook.com>
2024-05-08 15:43:41 +08:00
Yanfeng Liu
64e008f65b sched/task: minor polish on task_init()
This removes duplicated mask operation and revises comments.

Signed-off-by: Yanfeng Liu <yfliu2008@qq.com>
2024-05-08 15:43:25 +08:00
Yanfeng Liu
ce8cfde768 nuttx/sched.h: minor revision on comments
This is mainly to align them better.

Signed-off-by: Yanfeng Liu <yfliu2008@qq.com>
2024-05-08 15:41:28 +08:00
Yanfeng Liu
ef15b5296d riscv/virt: M-mode poweroff support
This adds poweroff support to `rv-virt/nsh` and `rv-virt/nsh64`.

Signed-off-by: Yanfeng Liu <yfliu2008@qq.com>
2024-05-08 15:39:26 +08:00
Jani Paalijarvi
5b3ef20629 arm64/imx9: Allocate 64B granules instead of 256B
Optimal size of granule is 64B (the dcache line size).
We can use it now as we don't have max. 32 granules limitation anymore.

Signed-off-by: Jani Paalijarvi <jani.paalijarvi@unikie.com>
2024-05-08 08:48:12 +08:00
Jani Paalijarvi
0d3a1bc617 arm64/imx9: Fix fat_dma_ macro issue.
Defining fat_dma_alloc(s) as imx9_dma_alloc(s) causes compiler errors.

Signed-off-by: Jani Paalijarvi <jani.paalijarvi@unikie.com>
2024-05-08 08:48:12 +08:00
Jani Paalijarvi
c11ffaa78f arm64/imx9: Add DMA preflight support for uSDHC
Signed-off-by: Jani Paalijarvi <jani.paalijarvi@unikie.com>
2024-05-08 08:48:12 +08:00
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