Commit Graph

45444 Commits

Author SHA1 Message Date
Xiang Xiao
f311228f80 arm/efm32: Fix typo error: CONFIG_EFM32_I2C_DYNTIMEOUT to CONFIG_EFM32_I2C_DYNTIMEO
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-05-15 19:18:09 +03:00
Xiang Xiao
1f920e55d3 Move warning option from Make.defs to Toolchain.defs
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-05-15 15:40:35 +03:00
Xiang Xiao
8b7c5b039d arch: Move -fsanitize=kernel-address to ARCHOPTIMIZATION
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-05-15 15:40:35 +03:00
Xiang Xiao
4f090eb7fd arch/sparc: Move toolchain macro from board's Make.defs to Toolchain.defs
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-05-15 15:40:35 +03:00
Xiang Xiao
21188ce37e boards/nrf52: Remove toolchain macro which is already defined in Toolchain.defs
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-05-15 15:40:35 +03:00
Xiang Xiao
468007307c boards/nrf52: Remove ARCHCCVERSION/ARCHCCMAJOR which isn't used
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-05-15 15:40:35 +03:00
Xiang Xiao
51cf7ba05a Remove FAR from arm/risc-v/xtensa/sim/x86
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-05-15 13:55:58 +03:00
Xiang Xiao
f905563cc9 tools/nxstyle: Add kbps to the while suffix list
and correct offset by 1 error

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-05-15 13:55:58 +03:00
Xiang Xiao
2976accd9f arch: Remove the extra space before the function prototype
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-05-15 13:55:58 +03:00
Xiang Xiao
1fb8c13e5e Replace nxsem_timedwait_uninterruptible with nxsem_tickwait_uninterruptible
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-05-15 13:55:58 +03:00
Xiang Xiao
816ce73ab4 Replace nxsem_timedwait with nxsem_tickwait
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-05-15 13:55:58 +03:00
Xiang Xiao
22e4f1c59a sched: Remove start from nxsem_tickwait[_uninterruptible]
to simplify both caller and callee

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-05-15 13:55:58 +03:00
Xiang Xiao
08002a0a38 sched: Replace pthread_sem_take with nxsem_wait_uninterruptible
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-05-14 20:47:34 +03:00
Petro Karashchenko
0fee5a2b84 nuttx: fix typos in comments
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2022-05-14 23:45:52 +08:00
Gustavo Henrique Nihei
be9fc59b07 xtensa: Implement syscalls required for Protected Mode
Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
2022-05-14 21:38:12 +08:00
Xiang Xiao
9072eecc30 sched/wqueue: Change the return type of work_notifier_teardown to void
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-05-14 00:35:29 +03:00
Michael Jung
f208c4bbd4 Fix ENOENT errors when polling on Netlink socket
When a Netlink response is issued, which a task is currently polling for
on the corresponding AF_NETLINK socket, then the poll call will return
with a ENOENT error.  This is due to the fact that the Netlink response
notifier is automatically torn down after the notification.

Fixed by making netlink_notifier_teardown a best-effort function that
does not return a result code.

Signed-off-by: Michael Jung <michael.jung@secore.ly>
2022-05-14 00:35:29 +03:00
Eero Nurkkala
0178792a01 risc-v/mpfs: IHC: clarify semaphore usage
g_mpfs_ack_sig and g_mpfs_rx_sig are better used with
SEM_INITIALIZER(0) (signalling) rather than with
SEM_INITIALIZER(1) (mutual exclusion).

Co-authored-by: Petro Karashchenko <petro.karashchenko@gmail.com>
Signed-off-by: Eero Nurkkala <eero.nurkkala@offcode.fi>
2022-05-13 19:07:40 +03:00
Michal Lenc
6f6338cea0 imxrt/flexpwm: set number of modules based on configuration options
Number of channels are now set based on enabled modules (channels) in
configuration instead of the usage of static 4.

Signed-off-by: Michal Lenc <michallenc@seznam.cz>
2022-05-13 12:55:45 -03:00
Michal Lenc
bdcf8b2b66 samv7/pwm: set number of channels based on configuration options
Number of channels are now set based on enabled channels in configuration
instead of the usage of static 4.

Signed-off-by: Michal Lenc <michallenc@seznam.cz>
2022-05-13 12:55:45 -03:00
chao.an
701e56d4ae arm/cortex-[a|r]: add performance counter implement
Signed-off-by: chao.an <anchao@xiaomi.com>
2022-05-13 12:55:31 -03:00
chao.an
4da48c84ff arm/cortex-[a|r]: add more functions of Performance Monitors Unit
Reference:
https://developer.arm.com/documentation/ddi0433/a/performance-monitoring-unit/performance-monitoring-register-descriptions

Signed-off-by: chao.an <anchao@xiaomi.com>
2022-05-13 12:55:31 -03:00
chao.an
920e826a80 arm/cortex-r: rename PCMR_* to PMCR_*
It should be PMCR (Performance Monitors Control Register)

Signed-off-by: chao.an <anchao@xiaomi.com>
2022-05-13 12:55:31 -03:00
chao.an
34b124bc14 arm/cortex-r: add _pmu_* perfix for performance monitor functions
Signed-off-by: chao.an <anchao@xiaomi.com>
2022-05-13 12:55:31 -03:00
Petro Karashchenko
f095bf8f39 arch/arm/samv7/sam_afec: fix ADC pin for channel 9
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2022-05-13 11:17:37 -03:00
Xiang Xiao
317cc6c174 tools/nxstyle: Add the suffix white list
and initialize it to "kHz", "Mbps", and "us"

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-05-13 16:39:16 +03:00
zhuyanlin
ad57791fe0 arch:xtensa: remove struct xtensa_cpstate_s as no need used
Signed-off-by: zhuyanlin <zhuyanlin1@xiaomi.com>
2022-05-13 15:28:45 +02:00
zhuyanlin
f423f94d08 arch:xtensa: modify xtensa_context_save/restore function
with FPU registers in xcp context, use pointer instead of double
pointer

Signed-off-by: zhuyanlin <zhuyanlin1@xiaomi.com>
2022-05-13 15:28:45 +02:00
zhuyanlin
1dc39689ff xtensa: move fpu register to XCPTCONTEXT_REGS
1 move fpu register to XCP_REGS
2 move save & restore fpu register to context_save/restore

Consistency with other archs.

Signed-off-by: zhuyanlin <zhuyanlin1@xiaomi.com>
2022-05-13 15:28:45 +02:00
Xiang Xiao
323d8d9547 mmcsd: Add FAR to the pointer argument
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-05-13 15:41:27 +03:00
Xiang Xiao
679bc88cab drivers/sdio: Call SDIO_LOCK before and after the transaction
follow the same behaviour in drivers/mmcsd/mmcsd_sdio.c

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-05-13 15:41:27 +03:00
wangbowen6
f23ba7e761 arm/tlsr82: add hardware aes encrypt and decrypt support.
Signed-off-by: wangbowen6 <wangbowen6@xiaomi.com>
2022-05-13 20:24:46 +08:00
Fotis Panagiotopoulos
8ef20c230b icmp: Fixed replies to broadcasts. 2022-05-13 20:22:06 +08:00
Eero Nurkkala
0a75a9556d risc-v/mpfs: apply IHC review fixes
PR#6249 was already merged without the review fixes. Provide the
fixes here on a separate patch.

Co-authored-by: Petro Karashchenko <petro.karashchenko@gmail.com>
Signed-off-by: Eero Nurkkala <eero.nurkkala@offcode.fi>
2022-05-13 10:38:51 +03:00
Petro Karashchenko
89fe6b1d24 include/nuttx/crypto: include sys/types.h insted of stdint.h
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2022-05-13 10:48:42 +08:00
Gustavo Henrique Nihei
ba2829adb2 xtensa: Fix argument passing for sys_call5 and sys_call6 functions
Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
2022-05-13 10:43:00 +09:00
Xiang Xiao
f7f8a21486 libs: Move aeabi_atexit from libxx/ to libc/machine/arm/
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-05-13 00:13:03 +03:00
Xiang Xiao
1ba316b5c7 arch: Remove board/libboard$(LIBEXT) from the rerequest of export_startup
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-05-12 23:34:31 +03:00
Xiang Xiao
23200471df arch/riscv: Remove & ~1 before assign signal_handler to REG_EPC
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-05-12 23:31:50 +03:00
Masayuki Ishikawa
dc2a01e75a boards: rv-virt: Add knsh64 related files
Summary:
- This commit adds knsh64 related files

Impact:
- None

Testing:
- Tested with qemu-6.2

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2022-05-13 04:14:01 +08:00
Masayuki Ishikawa
3193aa3c97 arch: risc-v: Add MMU support for qemu-rv
Summary:
- This commit adds MMU support for qemu-rv
- Please note that mtimer is disabled for S-mode because
  the mtimer needs to be accessed in M-mode

Impact:
- qemu-rv only

Testing:
- Tested with rv-virt:knsh64 (will be pushed later)

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2022-05-13 04:14:01 +08:00
Eero Nurkkala
77e36d1acc risc-v/mpfs: introduce IHC driver
This provides an example of Asymmetric Multiprocessing (AMP). The
master from Linux sends pings that this NuttX echoes back. The system
uses RPMsg from OpenAMP.

The Inter-Hart Communication module is present in the vendor's software
stack with the tag "2021.11". The software is present on github at the
polarfire-soc project. The following conditions must be met:

 1. FPGA programmed with 2021.11 software
 2. HSS (Vendor bootloader) with 2021.11 software
 3. U-boot and Linux kernel from 2011.11 software

Currently the IHC works as a slave only on the hart number 4.

On the NuttX side, this patch uses rptun that incorporates rpmsg and
virtio. If it used only rpmsg and virtio, the future maintenance would
likely be much heavier. Using rptun also simplifies many things.

Upon success, the master side from Linux may issue an example test:

root@icicle-kit-es-amp:/opt/microchip/amp/rpmsg-pingpong# ./rpmsg-pingpong

However, the rpmsg-pingpong.c (compiled on target with gcc), may need to
be modified as seen below to match the device id:
 - char *rpmsg_dev="virtio0.rpmsg-amp-demo-channel.-1.0";
 + char *rpmsg_dev="virtio0.rpmsg-amp-demo-channel.-1.1024";

This work uses a separate linker script. Due to a bug yet unknown to date,
a small NuttX, when loaded by the vendor HSS bootloader, will cause the
Linux kernel to hang at boot. Thus, the binary size is increased with
a section 'filler_area' whose only purpose is to increase the image size
so that the Linux kernel will boot up.

Signed-off-by: Eero Nurkkala <eero.nurkkala@offcode.fi>
2022-05-12 22:56:12 +08:00
wangbowen6
bc61e71b94 crypto: change type uint32_t to size_t in aes_cypher() arguments.
Signed-off-by: wangbowen6 <wangbowen6@xiaomi.com>
2022-05-12 22:28:54 +08:00
wangbowen6
568621fbcf crypto: fix compile error.
In file included from drivers_initialize.c:25:0:
/home/wangbowen/project/community/wbw_nuttx/nuttx/include/nuttx/crypto/crypto.h:74:20: error: expected ')' before 'void'

Signed-off-by: wangbowen6 <wangbowen6@xiaomi.com>
2022-05-12 22:28:54 +08:00
Ville Juven
47e85b68fe arch/addrenv: Change text write enable/disable to generic mprot
Implement a generic access rights modification procedure instead
of the procedures that only do one thing (enable/disable write)
to one section (text).
2022-05-12 22:28:31 +08:00
YAMAMOTO Takashi
072c28fe8e Revert "tools/mkallsyms.sh: Disable the mismatch warning of builtin declaration"
This reverts commit 848d1ef0b7.

It doesn't make sense because the generated file just have names of
symbols as strings. Nothing to worry about builtins.
2022-05-12 22:19:52 +08:00
Ville Juven
5bcd1dbb64 sched: Remove task_restart in case of CONFIG_BUILD_KERNEL
Same treatment as task_delete, this is not usable in kernel build
either.
2022-05-12 22:08:19 +08:00
Ville Juven
fb1c1bfe6c libc: Rename lib_Exit lib__Exit
Naming collision with lib_exit on some systems
2022-05-12 14:24:18 +03:00
YAMAMOTO Takashi
30a1b4e359 tools/mkallsyms.sh: Make it work with llvm
The llvm version of c++filt doesn't have -p option.
Use sed instead.
2022-05-12 14:56:07 +08:00
Matthew Trescott
f6f826c09a Fix broken tiva_gpioirqclear 2022-05-12 14:49:35 +08:00