Commit Graph

20591 Commits

Author SHA1 Message Date
simbit18
999ac5d5bb arch/xtensa/src/esp32/kconfig: Fix indentation
Remove spaces from Kconfig
Add TABs
2023-05-08 12:42:54 -03:00
simbit18
94aff9f937 arch/risc-v/src/mpfs/kconfig: Fix indentation
Remove spaces from Kconfig
Add TABs
2023-05-08 12:42:54 -03:00
simbit18
8a0729ac18 arch/arm/src/stm32h7/kconfig
Remove spaces from Kconfig
2023-05-08 12:42:54 -03:00
simbit18
5ed2d90c31 arch/arm/src/sama5/kconfig: Fix indentation
Remove spaces from Kconfig
Add TABs
2023-05-08 12:42:54 -03:00
simbit18
4d48e4626d arch/arm/src/imxrt/Kconfig: Fix indentation
Remove spaces from Kconfig
2023-05-08 12:42:54 -03:00
Ville Juven
22d6f97843 mpfs/mpfs_spi.c: Fix some logic errors in the driver
- putreg32() is used the wrong way around (reg, val) instead of (val, reg)
- MPFS_SPI_FRAMESIZE is not a register, FSIZE is the name
- Clear all interrupts _before_ writing the FIFO, this prevents a race
  condition where a short transmission completes before the interrupt is
  enabled.
2023-05-08 11:49:30 -03:00
Filipe Cavalcanti
9355bd9d01 boards/arm/tiva: mpu6050 driver binding to TM4C1294
Fixed printf warning during compilation and added MPU6050 to bringup of tm4c.
2023-05-08 11:48:06 -03:00
simbit18
2b51111030 arch/z80/src/z180: Fix nxstyle errors
error: Long line found
2023-05-08 13:56:36 +02:00
Xiang Xiao
325f395300 Replace all strncpy with strlcpy
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-05-08 09:57:01 +02:00
Xiang Xiao
6f6fce95a2 Replace all sprintf with snprintf
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-05-08 09:57:01 +02:00
hujun5
0f243bde33 arch: fix the issue of asynchronous signal processing
in SMP, signal processing cannot be nested, we use xcp.sigdeliver to identify whether there is currently a signal being processed, but this state does not match the actual situation
One possible scenario is that signal processing has already been completed, but an interrupt occurs, resulting in xcp.sigdeliver not being correctly set to NULL,
At this point, a new signal arrives, which can only be placed in the queue and cannot be processed immediately
Our solution is that signal processing and signal complete status are set in the same critical section, which can ensure status synchronization

Signed-off-by: hujun5 <hujun5@xiaomi.com>
2023-05-08 09:11:14 +02:00
hujun5
6bf989159e system/signal: in interrupting the context, regs modify logic error
In the interrupt context, we should first save the interrupt context and modify the interrupt register
to execute the signal processing program immediately after exiting the current interrupt

Signed-off-by: hujun5 <hujun5@xiaomi.com>
2023-05-07 20:33:46 +08:00
Xiang Xiao
49fa611fad boards/sim: Enable more sanitizer check when enable
to catch more runtime usage error

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-05-06 09:09:36 +03:00
Alan Carvalho de Assis
276d1c8f48 esp32s3: Add support to RTC 2023-05-06 11:43:01 +08:00
Dong Heng
bd122915f0 xtensa/esp32s3: Support octal lines mode SPIRAM 2023-05-05 18:38:12 +08:00
zhangyuan21
91d34ffd09 arch/sim: add up_getusrsp for sim
Signed-off-by: zhangyuan21 <zhangyuan21@xiaomi.com>
2023-05-05 13:40:04 +08:00
zhangyuan21
841b178782 assert: show stacks with the sp from regs
1. Get the value of sp from dump regs when an exception occurs,
   to avoid getting the value of fp from up_getsp and causing
   incomplete stack printing.
2. Determine which stack the value belongs to based on the value
   of SP to avoid false reports of stack overflow

Signed-off-by: zhangyuan21 <zhangyuan21@xiaomi.com>
2023-05-05 13:40:04 +08:00
Stuart Ianna
dec80be431 arch/risc-v/litex: Fix emac driver compilation when only IPv6 is used. 2023-05-05 11:53:13 +08:00
Lucas Saavedra Vaz
58f59fe9dc arch/xtensa/esp32s2: Fix SPIRAM compilation warnings
This commit aims to fix compilation warnings that happens when enabling SPIRAM for ESP32-S2
2023-05-04 18:41:54 -03:00
Lucas Saavedra Vaz
a5a3b919a0 audio: Add i2s_getmclkfrequency function
Rename i2s_mclkfrequency to i2s_setmclkfrequency and add i2s_getmclkfrequency for getting the current MCLK frequency from the I2S interface
2023-05-04 18:41:54 -03:00
simbit18
fcba68513d arch: Fix nxstyle errors
error: Long line found
2023-05-04 23:21:51 +03:00
fangxinyong
06f8875c0c arch/sim: do not free memory of zero-length reallocation
Follow the change: https://github.com/apache/nuttx/pull/9151,
if MM_CUSTOMIZE_MANAGER is enabled, heap memory manager in host is used,
for example in sim:asan build.

malloc and related allocation APIs will fall back to host_realloc,
do not free memory of zero-length reallocation. So memory allocations
return valid pointer when request zero size in all sim build.

call stack:
    malloc()         (mm/umm_heap/umm_malloc.c)
    mm_malloc()      (arch/sim/src/sim/sim_heap.c)
    mm_realloc()     (arch/sim/src/sim/sim_heap.c)
    host_realloc()   (arch/sim/src/sim/posix/sim_hostmemory.c)
    host_memalign()  (arch/sim/src/sim/posix/sim_hostmemory.c)

Signed-off-by: fangxinyong <fangxinyong@xiaomi.com>
2023-05-05 00:19:28 +08:00
chao an
1be95c3313 sim/lsan: disable fast-unwind by default
The fast-unwind implementation of leak-sanitizer will obtain the
current stack top/bottom and frame address(Stack Pointer) for
backtrace calculation:

https://github.com/gcc-mirror/gcc/blob/releases/gcc-13/libsanitizer/lsan/lsan.cpp#L39-L42

Since the scheduling mechanism of NuttX sim is coroutine
(setjmp/longjmp), if the Stack Pointer is switched, the fast-unwind
will unable to get the available address, so the memory leaks on the
system/application side that cannot be caught normally. This PR will
disable fast-unwind by default to avoid unwind failure.

Signed-off-by: chao an <anchao@xiaomi.com>
2023-05-04 18:05:22 +03:00
Tiago Medicci Serrano
28361a295d esp32/wifi: add support to WPA3 on Station Mode
Add support to select WPA3-SAE while connecting to an AP. Please
note that STA mode sets a security threshold, i.e, it was able to
connect to a WPA3-SAE network prior to this change because it
connects to an equally or more secure network than the set
threshold. Considering this patch, the device is now able to
ignore WPA2-PSK APs when WPA3 is set.
2023-05-03 23:23:31 +08:00
Tiago Medicci Serrano
9ede7d4650 esp32s3/wifi: add support to WPA3 on Station Mode
Add support to select WPA3-SAE while connecting to an AP. Please
note that STA mode sets a security threshold, i.e, it was able to
connect to a WPA3-SAE network prior to this change because it
connects to an equally or more secure network than the set
threshold. Considering this patch, the device is now able to
ignore WPA2-PSK APs when WPA3 is set.
2023-05-03 23:23:31 +08:00
zhangyuan21
884be2bdb9 assert: Distinguish between assert and exception
CURRENT_REGS may change during assert handling, so pass
in the 'regs' parameter at the entry point of _assert.

Signed-off-by: zhangyuan21 <zhangyuan21@xiaomi.com>
2023-05-03 14:49:32 +08:00
Lwazi Dube
e2083354f1 arch/arm/sama5: Use a recursive mutex to fix OHCI deadlock.
Unplugging a USB device from an OHCI root hub will cause
a deadlock if DRVR_EPFREE is called from sam_rhsc_bottomhalf. A
typical call chain looks like this: sam_rhsc_bottomhalf->
CLASS_DISCONNECTED->usbhost_destroy->DRVR_EPFREE. In this case
DRVR_EPFREE tries to lock a locked mutex. A recursive mutex
prevents this deadlock.
2023-05-03 12:53:30 +08:00
simbit18
79574c18d8 arch: Fix nxstyle errors
error: Long line found
2023-05-02 18:31:40 -06:00
Xiang Xiao
3c54e66683 mtd/nand: Fix the comment and remove the uneeded inclusion
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-05-01 22:47:00 +03:00
TimJTi
9c66f14e38 SAMA5D2 Class D 2023-04-29 13:46:04 +08:00
simbit18
eed360c0ad arch: Fix nxstyle errors
error: Long line found
2023-04-28 15:00:33 -03:00
zhangyuan21
f48693eaf5 arch: Return directly when arch not support interrupt context save
Signed-off-by: zhangyuan21 <zhangyuan21@xiaomi.com>
2023-04-27 23:21:05 +03:00
simbit18
20faf08930 arch/avr/include/avr/avr.h: Fix nxstyle errors
error: Long line found
2023-04-27 23:20:40 +03:00
Ville Juven
7184d1f5f9 arch/risc-v: Fix save/load FPU macros
The macros destroy t0, t1, t2 when used, make them explicitly restore them
so they are safe to use from where-ever
2023-04-28 00:54:39 +08:00
zhangyuan21
4a4386c822 Revert "arch/armv7ar: use robust code sequences for cache maintenance"
This reverts commit 69fd539886.

Signed-off-by: zhangyuan21 <zhangyuan21@xiaomi.com>
2023-04-27 20:21:57 +08:00
zhangyuan21
89ae45be18 arch/risc-v: change up_saveusercontext to assembly code
minidump will backtrace failure when use C code to save user context,
because the stack push operation in C code can disrupt the stack information.

Signed-off-by: zhangyuan21 <zhangyuan21@xiaomi.com>
2023-04-27 17:34:30 +08:00
Radek Pesina
a0e2f29bdf Add option for selecting coherent DMA. 2023-04-27 16:41:00 +08:00
chao an
60d188353c arm/unwind: EABI unwind needs frame pointer support
Signed-off-by: chao an <anchao@xiaomi.com>
2023-04-27 16:38:40 +08:00
zouboan
4b5c18b9b2 arm/Toolchain.defs: fix error sed:-e expression #1,character 1:unknown command:' in Windows native build
arm/Toolchain.defs: fix error sed:-e expression #1,character 1:unknown command:' in Windows native build
2023-04-27 00:32:15 +08:00
chao an
8687fe1b9f sim/usbdev: fix unpaired critical_section() 2023-04-27 00:31:31 +08:00
Radek Pesina
50a8ec62c4 Add eMMC driver support
- Fix DMA addressing issues within litex_sendsetup/litex_recvsetup
- Extend with handling specific to eMMC commands during init & use.
- Cleanup of 4-bit BUS handling for SD and eMMC
- For eMMC, Send CMD0 during init as per JEDEC v4.41 for pre-idle
2023-04-26 00:34:36 -04:00
zhangyuan21
eb0e05be0d arch/armv7-r: add armv7-r smp support
Signed-off-by: zhangyuan21 <zhangyuan21@xiaomi.com>
2023-04-26 10:54:30 +08:00
jturnsek
bcc8801480 Initial FlexIO support 2023-04-26 10:16:18 +08:00
Michal Lenc
40d07760f6 samv7: add support for adjtime() interface
This commit adds deifiniton of get_timer_period() and adj_timer_period()
functions used by adjtime() interface.

Signed-off-by: Michal Lenc <michallenc@seznam.cz>
2023-04-25 14:37:50 -03:00
Fotis Panagiotopoulos
70e42f5bfe stm32_f7/h7_eth: Added error handling for abnormal interrupts. 2023-04-25 15:20:09 +02:00
Robert-Ionut Alexa
f2530c53a5 esp32: port support for I2C_M_NOSTART and I2C_M_NOSTOP
Signed-off-by: Robert-Ionut Alexa <robertalexa2000@gmail.com>
2023-04-25 20:35:55 +08:00
Ville Juven
d48114a4b7 sched/addrenv.c: Implement re-entrancy for addrenv_select()
Store the old environment in a local context so another temporary address
environment can be selected. This can happen especially when a process
is being loaded (the new process's mappings are temporarily instantiated)
and and interrupt occurs.
2023-04-25 14:33:19 +02:00
Ville Juven
20623d7369 sem/sem_init: Change sem_xxx -> nxsem_xxx in kernel modules
Use the kernel space api nxsem_xxx when inside the kernel.
2023-04-25 13:41:51 +02:00
zhangyuan21
6605f95133 l2cc: Do not repeat disabling the cache when the cache is already disabled
When l2cc is already in disable state, performing a disable operation
again will flush incorrect cache data to memory

Signed-off-by: zhangyuan21 <zhangyuan21@xiaomi.com>
2023-04-25 15:36:10 +08:00
zhangyuan21
69fd539886 arch/armv7ar: use robust code sequences for cache maintenance
Invalidate operations at DDI0246H_l2c310_r3p3_trm:
If there is a stale entry in the L2 cache, the system enables the invalidation of
the L1 cache. But before the controller invalidates the L2 cache, it allocates a
line from the L2 cache to an L1 cache.

The robust code sequence for invalidation with a non-exclusive cache arrangement is:
1. InvalLevel2 Address ; forces the address out past level 2
2. CACHE SYNC ; Ensures completion of the L2 inval
3. InvalLevel1 Address ; This is broadcast within the cluster
4. DSB ; Ensure completion of the inval as far as Level 2.

This sequence ensures that, if there is an allocation to L1 after the L1 invalidation, the data
picked up is the new data and not stale data from the L2

Signed-off-by: zhangyuan21 <zhangyuan21@xiaomi.com>
2023-04-25 15:35:37 +08:00