Commit Graph

44542 Commits

Author SHA1 Message Date
Janne Rosberg
49abe527ca risc-v/mpfs/icicle: add example config for ethernet 2022-03-18 17:22:27 +02:00
Janne Rosberg
d72a523c00 risc-v/mpfs: add support for ethernet 2022-03-18 17:22:27 +02:00
Janne Rosberg
07aeb12b30 risc-v/common: add call to riscv_netinitialize() 2022-03-18 17:22:27 +02:00
Janne Rosberg
8c755c9414 esp32c3-devkit/ble: add CONFIG_NETDEV_LATEINIT to defconfig 2022-03-18 17:22:27 +02:00
Janne Rosberg
cff7c760a5 bl602evb/wifi: add CONFIG_NETDEV_LATEINIT to defconfig 2022-03-18 17:22:27 +02:00
Eero Nurkkala
ec2352a4f9 risc-v/mpfs: usb: fix ep0 read done
USB EP0 reads data from the fifo but doesn't mark the read
done which adds significant delays. Fix this unnecessary
slowdown due to operation timeouts by finishing the read
properly.

Also add a missing function description to the function
mpfs_ep_set_fifo_size().

Signed-off-by: Eero Nurkkala <eero.nurkkala@offcode.fi>
2022-03-18 22:47:29 +08:00
Xiang Xiao
eea014efb7 Fix error: conflicting types for built-in function 'execl'; expected 'int(const char *, const char *, ...)
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-03-18 16:38:01 +02:00
Ville Juven
15960f25a5 MPFS: Add board_memorymap.h
Move the target specific memory map to a separate file so there is no
need to copy&paste the __xxram_start etc linker symbols to each file
that needs them.

Also add MMU flags for I/O and kernel areas, they will be needed
when the kernel runs with virtual addresses also.
2022-03-18 09:35:00 -03:00
wangbowen6
7de7ba1b7e phy62xx_exception: using armv6-m exception_common code.
Signed-off-by: wangbowen6 <wangbowen6@xiaomi.com>
2022-03-18 20:01:00 +08:00
Xiang Xiao
8f4421a79e Fix warning: 'argnumber' may be used uninitialized in this function
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-03-18 12:43:17 +02:00
Xiang Xiao
c1bde1a4d2 sched/Kconfig: Remove CPULOAD_ENTROPY depend on CPULOAD_ONESHOT
since it's also used by the period cpuload

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-03-18 12:43:06 +02:00
Ville Juven
ade848b60a MPFS: Use linker symbols for heap allocation 2022-03-18 18:20:12 +08:00
Ville Juven
13fd93ed2a MPFS: Add linker script for CONFIG_BUILD_KERNEL 2022-03-18 18:20:12 +08:00
Ville Juven
75afe491ad RISC-V: Prepare for CONFIG_BUILD_KERNEL
- Thread context prior to system call needs to be preserved
- Allocate a kernel heap
2022-03-18 18:20:12 +08:00
Ville Juven
195705d11f MPFS: Create centralized module for PLIC address handling
Reduce complexity and copy-paste amount by implementing a module
to handle calculating PLIC offsets.
2022-03-18 18:20:12 +08:00
Ville Juven
745f00e77d MPFS: Use riscv_mhartid to obtain hartid
Preparation for S-mode, read mhartid via function call instead of
directly from the machine mode register
2022-03-18 18:20:12 +08:00
Ville Juven
f8ffcbbf36 MPFS: Remove definition and reference to MPFS_PLIC_CTRL
The register does not exist. c906 implementation has it, but MPFS does not.
2022-03-18 18:20:12 +08:00
Ville Juven
0f91eab626 MPFS: Protected mode, fix MMU mapping
The mapped vaddr was wrong, don't want to map the page tables, but
the user space area (start of .text) instead.
2022-03-18 18:20:12 +08:00
Ville Juven
9269a86d00 RISC-V: Add common data memory and instruction barriers 2022-03-18 18:20:12 +08:00
zhuyanlin
5665b7a585 arch:lib_atomic: remove and fix gcc warning declaration-mismatch
Remove GCC ignored warning and fix

Signed-off-by: zhuyanlin <zhuyanlin1@xiaomi.com>
2022-03-18 13:35:42 +08:00
chao.an
19119a9c43 arch/arm: set the SP to stack top
fix the stack imbalance

Signed-off-by: chao.an <anchao@xiaomi.com>
2022-03-18 07:56:51 +09:00
yinshengkai
bfe29c8d1f driver/uinput: add uinput keyboard support
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2022-03-17 19:44:17 +02:00
yinshengkai
a0fa07c275 driver/keyboard: add keyboard upperhalf driver
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2022-03-17 19:44:17 +02:00
yinshengkai
20c6d50eae input/keyboard: export keyboard related macros
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2022-03-17 19:44:17 +02:00
yinshengkai
c3c6b64cc3 driver/uinput: Add cross core control function
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2022-03-17 19:44:17 +02:00
yinshengkai
eebd736891 board/sim: update uinput init & Kconfig
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2022-03-17 19:44:17 +02:00
yinshengkai
0c2f86f74d driver/touchscreen: Add multithreaded read support
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2022-03-17 19:44:17 +02:00
Abdelatif Guettouche
5085f854d0 esp32(s3)_start.c: In SMP mode, don't disable APP CPU at startup. It starts in a
disabled state and if OpenOCD is used this will clear OpenOCD configuration.

Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2022-03-17 14:33:32 -03:00
Abdelatif Guettouche
b98676f8be esp32(s3)_cpustart.c: Don't reset app CPU if it was already configured by
OpenOCD.

Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2022-03-17 14:33:32 -03:00
Abdelatif Guettouche
b10c8955cf arch/Kconfig: Don't depend on Xtensa for the SUPPRESS_CLOCK_CONFIG
option.  This config was probably added in the early bring up of the
ESP32 chip. At that point the clock config was suppressed and we relied
on the bootloader.  Now we can configure the clock from NuttX.

The option itself is still useful and can be used for any other
architecture or chip.

Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2022-03-17 14:33:12 -03:00
Xiang Xiao
c2a1d0f5ae procfs: Remove mallinfo from struct procfs_meminfo_entry_s
let's call mm_mallinfo directly

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-03-17 13:59:03 -03:00
chao.an
660b80b329 net/sockopt: bypass the SO_RCVBUF/SO_SNDBUF to usrsock
SO_RCVBUF/SO_SNDBUF tightly coupled with stack

Signed-off-by: chao.an <anchao@xiaomi.com>
2022-03-18 00:19:31 +08:00
Gustavo Henrique Nihei
baa09aa999 risc-v/esp32c3: Remove deprecated option for disabling atomics support
Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
2022-03-17 23:40:29 +08:00
chao.an
b0d553a068 net/local: correct the socket flags from client socket
socket flags from connect() should used from client

Signed-off-by: chao.an <anchao@xiaomi.com>
2022-03-17 23:15:40 +08:00
Huang Qi
807304f283 arch/risc-v: Rework riscv_get_newintctx
Some fields of mstatus were marked as Reserved Writes Preserve Values, Reads Ignore Values (WPRI),
so we must keep its origin value with addition flags.

Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2022-03-17 15:43:30 +08:00
Petro Karashchenko
c3bae60c57 drivers/can: optimize can driver reader side
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2022-03-17 15:43:15 +08:00
songlinzhang
e2114378b9 Add dn resolution function
Signed-off-by: songlinzhang <songlinzhang@xiaomi.com>
2022-03-17 09:37:15 +02:00
Masayuki Ishikawa
2cbad5d92e boards: sabre-6quad: Enable environ and path in knsh/defconfig
Summary:
- This commit enables environ and path in knsh/defconfig

Impact:
- None

Testing:
- Tested with QEMU

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2022-03-17 13:41:01 +08:00
YAMAMOTO Takashi
26a08908cf boards/esp32-devkitc/index.rst: Mention efuse config 2022-03-17 13:40:51 +08:00
YAMAMOTO Takashi
439e5d0030 Add an esp32 config with efuse (esp32-devkitc:efuse)
esp32-devkitc:wapi + efuse enabled.
2022-03-17 13:40:51 +08:00
YAMAMOTO Takashi
cab24374b5 esp32: fix build errors with efuse
```
board/esp32_bringup.c: In function 'esp32_bringup':
board/esp32_bringup.c:171:9: error: implicit declaration of function 'esp32_efuse_initialize'; did you mean 'esp32_mmcsd_initialize'? [-Werror=implicit-function-declaration]
   ret = esp32_efuse_initialize("/dev/efuse");
         ^~~~~~~~~~~~~~~~~~~~~~
         esp32_mmcsd_initialize
```
2022-03-17 13:40:51 +08:00
Gustavo Henrique Nihei
39e9a17e60 xtensa/esp32s3: Apply style fixes throughout serial driver
Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
2022-03-16 19:06:39 -03:00
Gustavo Henrique Nihei
0dc2930403 xtensa/esp32s3: Remove code for not yet supported USB-Serial Driver
Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
2022-03-16 19:06:39 -03:00
Gustavo Henrique Nihei
57273ad994 xtensa/esp32s3: Fix IRQ setup hardcoded to CPU 0
Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
2022-03-16 19:06:39 -03:00
Petro Karashchenko
b302173f31 Revert "zig-build added"
This reverts commit 4880613b26.
2022-03-16 22:17:16 +02:00
Matheus Catarino França
4880613b26 zig-build added
zig install added on CI - fixed

Docker - zig install

parent 5d2e3573c25b48ba7c3d697de11e64896e818aea
author Matheus Catarino França <matheus-catarino@hotmail.com> 1647344723 -0300
committer Matheus Catarino França <matheus-catarino@hotmail.com> 1647344723 -0300

zig-build added

zig install added on CI - fixed

Docker - zig install

CI - replace wget2curl

rm bloat curl command & zig latest version

ZIG_ENV - rm bin folder

ident format

Apply suggestions from code review

Co-authored-by: Petro Karashchenko <petro.karashchenko@gmail.com>

rm arch-zigoptimization

rm arch-zigoptimization ref
2022-03-17 02:09:36 +08:00
Meco Man
6ad06b0c2b [docs] eliminate potential misunderstandings 2022-03-17 02:04:05 +08:00
Petro Karashchenko
18dd5f1216 drivers/mtd/filemtd: fix compilation warnings
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2022-03-16 22:58:46 +08:00
chao.an
7a27b58ca1 sim: Enable garbage collection of unused input sections
LDFLAGS += -Wl,--gc-sections

GC should be enabled on arch/sim/src/Makefile:

326   $(if $(CONFIG_HAVE_CXX),\
327   $(Q) "$(CXX)" $(CFLAGS) $(LDFLAGS) -o $(TOPDIR)/$@ $(HEADOBJ) nuttx.rel $(HOSTOBJS) $(STDLIBS),\
328   $(Q) "$(CC)" $(CFLAGS) $(LDFLAGS) -o $(TOPDIR)/$@ $(HEADOBJ) nuttx.rel $(HOSTOBJS) $(STDLIBS))

Signed-off-by: chao.an <anchao@xiaomi.com>
2022-03-16 15:40:06 +02:00
Ville Juven
50578dc501 Fix the initial idle tasks environment
- User mode allocator was used for setting up the environment. This
  works in flat mode and probably in protected mode as well, as there
  is always a a single user allocator present
- This does not work in kernel mode, where each user task has its own
  heap allocator. Also, when the idle tasks environment is being set,
  no allocator is ready and the system crashes at once.

Fix this by using the group allocators instead:
- Idle task is a kernel task, so its group is privileged
- Add group_realloc
- Use the group_malloc/realloc functions instead of kumm_malloc
2022-03-16 20:21:19 +08:00