Xiang Xiao
c8ea7a95a3
libc: Implement getrandom on top of "/dev/[u]random"
...
https://man7.org/linux/man-pages/man2/getrandom.2.html
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-03-25 13:48:33 +02:00
Masayuki Ishikawa
594ae1e7fc
boards: rv-virt: Fix stack corruption for rv64 configs
...
Summary:
- This commit fixes stack corruption for rv64 configs
Impact:
- None
Testing:
- Tested with qemu-6.2
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2022-03-25 12:26:12 +02:00
anjiahao
e597f3812d
tools:use dump log creat a gdbsever to debug
...
this is a tool,when crash help you to debug.
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2022-03-25 17:55:12 +08:00
Abdelatif Guettouche
914e9588bb
esp32/Make.defs: Organise common arch files and chip files
...
appropriately.
Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2022-03-25 11:31:24 +08:00
Michael Mogenson
97fa9b849c
defconfig: add Lua configs for sim and teensy-4.x
2022-03-24 14:02:32 +08:00
Gustavo Henrique Nihei
c92c4af304
xtensa/esp32s2: Initialize instruction cache on startup
...
Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
2022-03-23 20:05:40 -03:00
Gustavo Henrique Nihei
7cb8f02ecc
esp32s2-saola-1: Use cache-related definitions from Kconfig
...
Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
2022-03-23 19:38:28 -03:00
Gustavo Henrique Nihei
bc071ec243
xtensa/esp32s2: Use functions defined in xtensa_counter for TimerISR
...
Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
2022-03-23 19:38:28 -03:00
Gustavo Henrique Nihei
04b80cc8d2
xtensa/esp32s2: Remove unused and not unsupported configs from Kconfig
...
Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
2022-03-23 19:38:28 -03:00
Ville Juven
44bec4cf8e
RISC-V: Add missing code to dumpstate
...
Just add the kernel stack dumping for completeness
2022-03-24 00:15:28 +08:00
Ville Juven
77e90d9c87
RISC-V: Include support for kernel stack
...
Preparation for CONFIG_BUILD_KERNEL=y, which requires that a kernel
stack is allocated for each user process.
2022-03-24 00:15:28 +08:00
Huang Qi
9cffc105c8
arch: Show assigned cpu in dump task
...
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2022-03-23 22:18:15 +08:00
Huang Qi
f09ea317c1
risc-v/qemu-rv: Restore FPU context after context switch
...
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2022-03-23 19:30:04 +08:00
chao.an
7b73606300
arm/schedulesigaction: update the SP to signal context top
...
Signed-off-by: chao.an <anchao@xiaomi.com>
2022-03-23 19:08:37 +09:00
chao.an
a770ff2017
arm/vfork: update the SP to stack top
...
Signed-off-by: chao.an <anchao@xiaomi.com>
2022-03-23 19:08:37 +09:00
Xiang Xiao
9ae0dcd4a2
arch/arm: Remove the code copy register from xcpt to stack
...
since xcpt always point to the stack after the below change:
commit 7b9978883c
Author: chao.an <anchao@xiaomi.com>
Date: Tue Mar 1 01:06:24 2022 +0800
arch/arm: optimize context switch speed
The current context save implementation saves registers of each task
to xcp context, which is unnecessary because most of the arm registers are
already saved in the task stack, this commit replace the xcp context with
stack context to improve context switching performance and reduce the tcb
space occupation of tcb instance.
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-03-23 19:08:37 +09:00
Ville Juven
9288ed85e7
RISC-V: Add/fix implementation for arch_elf.c
...
The jump instruction relocation had an assert that tests for jumps with
an offset of 0. This makes it so that a while(1); statement causes an
assert because the jump instruction points to the same address, which
is perfectly legal.
Addend was not handled correctly in several reloc types.
Add ADD32/64 + SUB32/64 relocations, for some reason the compiler
I use likes to add them.
2022-03-23 17:56:54 +08:00
Xiang Xiao
3259b7d700
tools/jlink: Change the type of pid from uint16_t to uint32_t
...
follow up the bellow chnage:
commit 0f2f48f8ba
Author: Xiang Xiao <xiaoxiang@xiaomi.com>
Date: Sun Mar 20 18:12:26 2022 +0800
sys/type.h: Change pid_t from int16_t to int
to fix the following warning:
include/unistd.h:302:9: error: incompatible redeclaration of library function 'vfork' [-Werror,-Wincompatible-library-redeclaration]
pid_t vfork(void);
^
include/unistd.h:302:9: note: 'vfork' is a builtin with type 'int (void)'
and change 32768 to INT_MAX to match the type change
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-03-23 11:00:49 +02:00
Xiang Xiao
4d8c92603b
Fix rpmsgfs/rpmsgfs_client.c:774:3: warning: 'strcpy' writing 1 or more bytes into a region of size 0 overflows the destination
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-03-23 10:52:46 +02:00
Xiang Xiao
0fcb4575bb
sched/dumpstack: Print "backtrace:" only in the first iteration
...
to avoid the same label print multiple time in one dumpstack
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-03-23 07:26:19 +09:00
Gustavo Henrique Nihei
23cfded18f
esp32s3-devkit: Add support for BOOT button as user button
...
Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
2022-03-23 07:23:51 +09:00
Gustavo Henrique Nihei
024364ebbd
xtensa/esp32s3: Add support for GPIO pin interrupts
...
Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
2022-03-23 07:23:51 +09:00
Gustavo Henrique Nihei
0e67dc8637
xtensa/esp32s3: Add support for GPIO read/write operations
...
Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
2022-03-23 07:23:51 +09:00
Petro Karashchenko
68902d8732
pid_t: unify usage of special task IDs
...
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2022-03-22 21:22:32 +08:00
Harri Luhtala
2ee12b2c5d
arch/arm/src/stm32l4: peripheral voltage monitor support for vddio2
...
Signed-off-by: Harri Luhtala <harri.luhtala@haltian.com>
2022-03-22 21:08:29 +08:00
Petro Karashchenko
757d01d915
progmem: eliminate PROGMEM_ERASESTATE configuration option
...
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2022-03-22 10:01:41 -03:00
Xiang Xiao
2277c18673
Fix rptun/rptun.c:572:7: warning: 'strncpy' specified bound 32 equals destination size
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-03-22 08:37:33 +02:00
Xiang Xiao
cd516bd09d
Fix libelf/libelf_coredump.c:234:7: warning: 'strncpy' output may be truncated copying 16 bytes from a string of length 31
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-03-22 08:37:33 +02:00
Abdelatif Guettouche
10f8f6c9e3
xtensa/esp32(s2)_user.c: For EXCCAUSE values, use macros defined in xtensa_corebits.h
...
instead of those defined in core.h as they are deprecated.
Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2022-03-22 10:20:27 +08:00
Petro Karashchenko
b7c4746b0a
drivers/mtd/mtd_config: set different format versions for named and ID modes
...
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2022-03-22 10:19:21 +08:00
Ville Juven
3581668c6b
env_dup: Allocate memory from the correct memory pool
...
When the initial proxy task is duplicated into the first user task,
the environment exists in kernel memory and this must be copied to user
memory.
The memory allocated for the new task was allocated with the parent's
priority which is incorrect. Use the new task's priority instead.
Follow-up for: #5753
2022-03-22 10:15:29 +08:00
Petro Karashchenko
9a9a06dd7d
boards/arm/same70-qmtech: Remove dead code
...
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2022-03-22 10:01:09 +08:00
Abdelatif Guettouche
954ff496b4
esp32s3-devkit/spiflash: Use SmartFS instead of LittleFS.
...
Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2022-03-21 22:17:23 +08:00
Xiang Xiao
0f2f48f8ba
sys/type.h: Change pid_t from int16_t to int
...
to fix the following warning:
include/unistd.h:302:9: error: incompatible redeclaration of library function 'vfork' [-Werror,-Wincompatible-library-redeclaration]
pid_t vfork(void);
^
include/unistd.h:302:9: note: 'vfork' is a builtin with type 'int (void)'
and change 32768 to INT_MAX to match the type change
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-03-21 15:48:33 +02:00
Xiang Xiao
85550ee340
boards/sim: Enable uinput for rpproxy and rpserver
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-03-21 09:03:05 +02:00
Xiang Xiao
2ccf54961f
drivers: Call uinput_keyboard_initialize in drivers_initialize
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-03-21 09:03:05 +02:00
Xiang Xiao
7ea14aa8f8
input/keyboard: Make each instance could have a different buffer size
...
just like what is done for touch screen driver
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-03-21 09:03:05 +02:00
Xiang Xiao
7de9b879a1
input/touchscreen: Change the type of touch_upperhalf_s::nums from uint32_t to uint8_t
...
to align with the type of touch_register
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-03-21 09:03:05 +02:00
Xiang Xiao
9b2c89fc0e
input/uinput: Remove the argument from initialization function
...
since each type of uinput just need Instantiate one instance
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-03-21 09:03:05 +02:00
Xiang Xiao
d19aa5aca4
input: Move uinput initialization from boards/sim to drivers
...
since uinput can be used not only on simulator but also on real device
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-03-21 09:03:05 +02:00
Xiang Xiao
fd5fb26f51
input/uinput: Rename UINPUT_TOUCHSCREEN to UINPUT_TOUCH
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-03-21 09:03:05 +02:00
smartether
7fbadb5c16
fixed mpu9250 not work on i2c bus issue.
...
1,set rp2040 FIFO_MAX_SIZE to 16.ref: pico sdk ->
static inline size_t i2c_get_write_available(i2c_inst_t *i2c) {
const size_t IC_TX_BUFFER_DEPTH = 16;
return IC_TX_BUFFER_DEPTH - i2c_get_hw(i2c)->txflr;
}
2022-03-21 12:07:03 +08:00
Xiang Xiao
6b8274fbd8
libc: Change the return type of strerror from "const char *" to "char *"
...
to follow up the spec here:
https://pubs.opengroup.org/onlinepubs/9699919799/functions/strerror.html
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-03-20 23:02:50 +02:00
Xiang Xiao
fa42ebace4
tools/nxstyle: Order g_white_prefix by alphanum
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-03-20 20:35:08 +02:00
Michael Mogenson
2c450be9e8
nxstyle: ignore mixed-case identifiers for Lua types
2022-03-20 23:32:20 +08:00
Xiang Xiao
8391ad2721
syslog: Change g_syslog_default_sem to static function variable
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-03-20 12:37:09 +02:00
Gerson Fernando Budke
49b15e3577
boards/arm/samv7/samv71-xult: Fix mcuboot update example missing config
...
Signed-off-by: Gerson Fernando Budke <gerson.budke@ossystems.com.br>
2022-03-19 21:00:16 +02:00
Gerson Fernando Budke
6740ec3fee
boards/arm/samv7/samv71-xult: Add mcuboot update example configs
...
Add MCUboot Update Agent and Slot Confirm configurations. It uses
ethernet with dhcp client to perform download of new image into
internal flash memory.
Signed-off-by: Gerson Fernando Budke <gerson.budke@ossystems.com.br>
2022-03-19 16:09:49 +02:00
Gerson Fernando Budke
2965345e14
boards/arm/samv7: Fix mcuboot configs
...
MCUboot apps were moved to examples directory. This fix configs due to
recent changes.
Signed-off-by: Gerson Fernando Budke <gerson.budke@ossystems.com.br>
2022-03-19 16:09:49 +02:00
Gerson Fernando Budke
2d906bb28f
boards/xtensa/esp32: Fix mcuboot configs
...
MCUboot apps were moved to examples directory. This fix configs due to
recent changes.
Signed-off-by: Gerson Fernando Budke <gerson.budke@ossystems.com.br>
2022-03-19 16:09:49 +02:00