Commit Graph

49906 Commits

Author SHA1 Message Date
Xiang Xiao
e62c915972 syslog: Remove syslog_force and related stuff
syslog_force is used to force the syslog output to the
console in interrupt context, but we can use syslog_write
to do the same(and more) thing.

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-06-23 09:55:19 -03:00
Stuart Ianna
2db6ea9984 litex/gpio: Fix incorrect declaration name. 2023-06-23 12:29:59 +08:00
Xiang Xiao
309f89d6c3 segger: Change the default value of SEGGER_RTT_MAX_NUM_DOWN_BUFFERS to SEGGER_RTT_MAX_NUM_UP_BUFFERS
since the number of down buffers should be equal to the number of up buffers in most cases.

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-06-23 00:36:36 +03:00
Xiang Xiao
04e44d7d20 build: Replace "$(shell $(DEFINE) $(CC) ...)" with $(DEFINE_PREFIX)
to unify the way to define macros in Makefile

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-06-23 00:11:25 +03:00
Xiang Xiao
0eeca0f375 build: Replace "$(shell $(INCDIR) $(CC) ...)" with $(INCDIR_PREFIX)
to unify the way to get include directories

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-06-23 00:11:25 +03:00
Xiang Xiao
620d61bd4b sched/assert: Change show_xxx to dump_xxx
align with other function in assert.c

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-06-22 23:26:56 +03:00
Nicolas Caramelli
f763cb118d stm32f429i-disco: Register the BUTTON driver 2023-06-22 15:10:55 -03:00
anjiahao
d5981375a6 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: anjiahao <1090959677@qq.com>
2023-06-22 20:38:45 +08:00
Fotis Panagiotopoulos
880d78f903 sendfile: Fixed behavior of sendfile when count is set to zero.
If sendfile() is called with a zero count, it will nevertheless
try to send the data. This is mostly meaningless, it causes
waste of resources, and in some cases delays.

This commit adds special handling for this case, allowing
sendfile to return immediately zero. The new behavior is
in line with the Linux variant of sendfile.
2023-06-22 16:10:58 +08:00
anjiahao
4ae17a6f7b sched:Automatically find deadlocks when assert
When asserting, automatically analyze whether
there is a deadlock in the thread, and if there
is a deadlock, print out the deadlocked thread.

The principle is to analyze whether there is
a lock ring through the tcb holder.

Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2023-06-22 16:08:03 +08:00
anjiahao
1711a298a8 libc/semaphore:Set the flag need AND SEM_PRIO_MASK
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2023-06-22 16:08:03 +08:00
Stuart Ianna
42abf22eef socket/recvfrom: Fix buffer copy direction when using BUILD_KERNEL.
When using recvfrom, the data should be copied back to the user provided buffer after psock_recvfrom, not before.
2023-06-22 11:56:01 +08:00
simbit18
f0a74eb492 Fix Kconfig style
Remove spaces from Kconfig files
2023-06-22 11:46:09 +09:00
Masayuki Ishikawa
5e7ce13b3e drivers: virtio: Use one dscriptor for RX in virtio-mmio-net.c
Summary:
- In this implementation, only one descriptor is used for RX.
- NOTE: we still use two descriptors for TX

Impact:
- None

Testing:
- Tested with qemu-7.1

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2023-06-21 16:38:04 +08:00
wangchen
dd0f967798 usrsock_server:fix incomplete received data error
if number of bytes available for reading more than zero,set USRSOCK_EVENT_RECVFROM_AVAIL flag into the event

Signed-off-by: wangchen <wangchen41@xiaomi.com>
2023-06-21 07:40:52 +03:00
Alan Carvalho de Assis
9b8eedd218 lib_strftime: Also fix %l to avoid printing 0:xx AM/PM 2023-06-21 12:18:00 +08:00
Alan Carvalho de Assis
95f131c3c2 lib_strftime: Fix %I to avoid printing 00:xx AM/PM
Currently strftime is printing 00:00 AM and 00:00 PM instead of
12:00 AM and 12:00 PM when using %I.

This commit fixes this issue!
2023-06-21 12:18:00 +08:00
Xiang Xiao
1a06f7a2c9 libc: memfd_create should create /tmp/memfd/ before creating file
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-06-20 20:14:20 +03:00
Xiang Xiao
43f9abf84f libc: Prefer to implement memfd on top of shm
since shm can work in protected and kernel mode too

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-06-20 20:14:20 +03:00
simbit18
f930b4f6f5 Fix Kconfig style
Remove TABs from Kconfig files
Replace help => ---help---
Add comments
2023-06-20 12:54:50 -03:00
Alan Carvalho de Assis
c9f610f44f stm32f777zit6-meadow: Fix external RAM pinout and add board profile
This patch will fix an issue that was preventing the stm32f7 board
from working with external SDRAM memory.
2023-06-20 10:04:33 +08:00
Masayuki Ishikawa
c5641b0252 Revert "riscv/swint: Give the full tcb to the context switch routine"
This reverts commit 040eb3c990.
2023-06-20 06:17:11 +09:00
Masayuki Ishikawa
2c6ad5c2bf Revert "riscv/fpu: Restore correct lazy-FPU functionality"
This reverts commit 35c27b5a9a.
2023-06-20 06:17:11 +09:00
Masayuki Ishikawa
9d84d79b29 Revert "riscv/saveusercontext: Fix FPU state save"
This reverts commit 669196910c.
2023-06-20 06:17:11 +09:00
Masayuki Ishikawa
103b7097b6 Revert "sched/assert: Store table for all registers instead of buffer"
This reverts commit 5ce169f047.
2023-06-20 06:17:11 +09:00
Masayuki Ishikawa
0124533cc3 Revert "riscv/addrenv: Move addrenv_switch() to correct place after FPU change"
This reverts commit da319bbd85.
2023-06-20 06:17:11 +09:00
Masayuki Ishikawa
7410f4a6b8 Revert "riscv/lazyfpu: Add option to disable lazy FPU"
This reverts commit 425cc89989.
2023-06-20 06:17:11 +09:00
simbit18
3f4151525d Fix Kconfig style
Remove TABs from Kconfig files
Add comments
2023-06-19 20:05:57 +03:00
Lucas Saavedra Vaz
bc4266fa48 tools: Fix CONFIG_BASE_DEFCONFIG generation
Modify sed command to avoid appending multiple "-dirty" at the end of the configuration name
2023-06-19 23:07:42 +08:00
simbit18
a4398b50c8 drivers/lcd/Kconfig: Fix Kconfig style
Remove TABs from Kconfig file
Add comments
2023-06-19 23:06:48 +08:00
Michal Lenc
5b90ae9c72 boards/samv7: add lower level IOCTL handler to sam_gpio_enc driver
SAMv7 encoder driver with GPIO pins was written without IOCTL support.
While this driver does not require any lower level IOCTLs for its
functionality the upper layer fails on assertion when unknown command
can not be send to lower layer. This commit adds IOCTL handler that
always returns -ENOTTY as no commands are supported.

Signed-off-by: Michal Lenc <michallenc@seznam.cz>
2023-06-19 23:06:20 +08:00
Ville Juven
425cc89989 riscv/lazyfpu: Add option to disable lazy FPU
Adds option to use the old implementation where FPU is stored into
the process stack.
2023-06-19 19:28:07 +08:00
Ville Juven
da319bbd85 riscv/addrenv: Move addrenv_switch() to correct place after FPU change
The new address environment must be instantiated prior to restoring FPU
state as the CPU status register is in tcb->regs, which is user stack.
2023-06-19 19:28:07 +08:00
Ville Juven
5ce169f047 sched/assert: Store table for all registers instead of buffer
This way the registers can be read easily
2023-06-19 19:28:07 +08:00
Ville Juven
669196910c riscv/saveusercontext: Fix FPU state save 2023-06-19 19:28:07 +08:00
Ville Juven
35c27b5a9a riscv/fpu: Restore correct lazy-FPU functionality
- Save the FPU registers into the tcb so they don't get lost if the stack
  frame for xcp.regs moves (as it does)
- Handle interger and FPU register save/load separately
- Integer registers are saved/loaded always, like before
- FPU registers are only saved during a context switch:
  - Save ONLY if FPU is dirty
  - Restore always if FPU has been used (not in FSTATE_OFF, FSTATE_INIT)
- Remove all lazy-FPU related logic from the macros, it is not needed
2023-06-19 19:28:07 +08:00
Ville Juven
040eb3c990 riscv/swint: Give the full tcb to the context switch routine
Why? The tcb can contain info that is needed by the context switch
routine. One example is lazy-FPU handling; the integer registers can
be stored into the stack, because they are always stored & restored.

Lazy-FPU however needs a non-volatile location to store the FPU registers
as the save feature will skip saving a clean FPU, but the restore must
always restore the FPU registers if the thread uses FPU.
2023-06-19 19:28:07 +08:00
Eero Nurkkala
4494e75e87 risc-v/mpfs: add CoreMMC support
This adds support for the CoreMMC v3.1 FPGA driver as described
in Microchip Handbook HB0510. The driver doesn't support DMA.

Signed-off-by: Eero Nurkkala <eero.nurkkala@offcode.fi>
2023-06-19 19:24:51 +08:00
tjwu1217
f141a6480c sched/sched/sched_idletask: fix typo 2023-06-19 10:51:23 +02:00
Xiang Xiao
a8e0a5faa4 sched: Remove the unnecessary cast from pid_t to int
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-06-19 11:37:34 +03:00
Xiang Xiao
07b0cd1cba mm: Simplify memdump_handler logic a little bit
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-06-19 11:37:34 +03:00
Xiang Xiao
590e968c5f mm/tlfs: Count the backtrace overhead in mm_mallinfo_task
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-06-19 11:37:34 +03:00
Xiang Xiao
313f79d55e mm/mempool: Count the expend block overhead in mempool_info
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-06-19 11:37:34 +03:00
Xiang Xiao
0572bc4d03 mm/mempool: Count the backtrace overhead in mempool_[dump|info[_task]]
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-06-19 11:37:34 +03:00
YAMAMOTO Takashi
e9738cd906 esp32-devkitc/wamr_wasi_debug: Bump WAMR version 2023-06-19 07:20:47 +03:00
Alan Carvalho de Assis
bb84b08735 esp32s3-meadow: Add NSH terminal over USB Device (not USB-JTAG-Serial) 2023-06-19 11:02:08 +08:00
Alan Carvalho de Assis
82bc515ede esp32s3-eye: Add NSH terminal over USB Device (not USB-JTAG-Serial) 2023-06-19 11:02:08 +08:00
Alan Carvalho de Assis
985e2beae0 esp32s3-devkit: Add NSH terminal over USB Device (not USB-JTAG-Serial) 2023-06-19 11:02:08 +08:00
wangbowen6
b3fead9d28 openamp: add OPENAMP_DEBUG config to enable/disable openamp debug
Signed-off-by: wangbowen6 <wangbowen6@xiaomi.com>
2023-06-18 16:17:44 +03:00
wangbowen6
fa94317447 openamp/Kconfig: add config to enable/disable the cache feature
Signed-off-by: wangbowen6 <wangbowen6@xiaomi.com>
2023-06-18 16:17:44 +03:00