Commit Graph

45825 Commits

Author SHA1 Message Date
ligd
79952163c1 rpmsg_socket: use sendto_nocopy() instead of send_nocopy().
only wait ept ready after ept_create, not after ept_destroy

Signed-off-by: ligd <liguiding1@xiaomi.com>
2022-07-23 08:16:48 +03:00
ligd
9c106c1bdc rpmsg_socket: defalut set POLLERR POLLHUP to events
Signed-off-by: ligd <liguiding1@xiaomi.com>
2022-07-23 08:16:48 +03:00
ligd
ba990619ed socket_rpmsg: set poll err instead return err
Signed-off-by: ligd <liguiding1@xiaomi.com>
2022-07-23 08:16:48 +03:00
ligd
630ca45a50 rpmsg_socket: connect addrlen can bigger then expect
Signed-off-by: ligd <liguiding1@xiaomi.com>
2022-07-23 08:16:48 +03:00
Jiuzhu Dong
fab2f6d3d8 net/rpmsg: fix minor issue on strncpy
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2022-07-23 08:16:48 +03:00
Fotis Panagiotopoulos
ad7f503cfa sim: Increased priority of loop task. 2022-07-23 00:22:35 +08:00
Karel Kočí
6c7f99189b libs/libc/string: add memmem
This function is the GNU extension.
2022-07-22 19:04:11 +03:00
Jouni Ukkonen
e268b23142 OpenSBI: Add configurable support for domain init
Initialize .domains_init function entry point in sbi_platform_operations when
CONFIG_OPENSBI_DOMAINS=y. In this case, the board specific code must provide
the "board_domains_init" function.

Signed-off-by: Jouni Ukkonen <jouni.ukkonen@unikie.com>
2022-07-22 19:00:33 +03:00
ligd
1e5568b030 rpmsgfs: fix nx_style
Signed-off-by: ligd <liguiding1@xiaomi.com>
2022-07-22 17:10:19 +03:00
ligd
572d865034 rpmsgfs: cache statfs result in case of deadlock
rptun: msg from other cpu
[ap] [ 5] [<0x2c353768>] arm_switchcontext+0xc/0x10
[ap] [ 5] [<0x2c322266>] sem_wait+0x5a/0xbc
[ap] [ 5] [<0x2c7400a8>] inode_semtake+0x24/0x5c
[ap] [ 5] [<0x2c74087a>] inode_release+0x6/0x60
[ap] [ 5] [<0x2c741284>] file_close+0x18/0x44
[ap] [ 5] [<0x2c74fb06>] rpmsgfs_close_handler+0x86/0xe4
[ap] [ 5] [<0x2c75b8de>] rpmsg_virtio_rx_callback+0xba/0x1b4
[ap] [ 5] [<0x2c75af70>] rproc_virtio_notified+0x44/0x5c
[ap] [ 5] [<0x2c75a93c>] remoteproc_get_notification+0x1c/0x2c
[ap] [ 5] [<0x2c335a08>] rptun_thread+0x74/0x208
[ap] [ 5] [<0x2c323e72>] nxtask_start+0x3a/0x60

nsh: send msg to other cpu with inode lock
[ap] [10] [<0x2c353768>] arm_switchcontext+0xc/0x10
[ap] [10] [<0x2c3221b2>] nxsem_wait_uninterruptible+0x6e/0xc8
[ap] [10] [<0x2c74e498>] rpmsgfs_send_recv.constprop.0+0x78/0xc0
[ap] [10] [<0x2c74ebc0>] rpmsgfs_client_statfs+0x50/0x80
[ap] [10] [<0x2c3221ca>] nxsem_wait_uninterruptible+0x86/0xc8
[ap] [10] [<0x2c74da78>] rpmsgfs_statfs+0x28/0x50
[ap] [10] [<0x2c74534e>] mountpoint_filter+0x66/0x90
[ap] [10] [<0x2c740016>] foreach_inodelevel+0x66/0x88
[ap] [10] [<0x2c73fffa>] foreach_inodelevel+0x4a/0x88
[ap] [10] [<0x2c740062>] foreach_inode+0x2a/0x48
[ap] [10] [<0x2c745388>] foreach_mountpoint+0x10/0x20
[ap] [10] [<0x2c745606>] mount_read+0x36/0x70
[ap] [10] [<0x2c742a34>] read+0x30/0x5c
[ap] [10] [<0x2c371096>] nsh_catfile+0x36/0x140
[ap] [10] [<0x2c36d01a>] nsh_parse_command+0x7fe/0xc54
[ap] [10] [<0x2c370f92>] nsh_session+0x66/0x134
[ap] [10] [<0x2c3721a4>] nsh_consolemain+0x2c/0x44
[ap] [10] [<0x2c374fde>] nsh_main+0x2a/0x4c
[ap] [10] [<0x2c33f7f8>] lib_cxx_initialize+0x24/0x48
[ap] [10] [<0x2c34274a>] nxtask_startup+0x12/0x24
[ap] [10] [<0x2c323e7e>] nxtask_start+0x46/0x60

Signed-off-by: ligd <liguiding1@xiaomi.com>
2022-07-22 17:10:19 +03:00
ligd
5f60b7dc12 rpmsgfs: hande count <=0 when rpmsgfs_read&write
Signed-off-by: ligd <liguiding1@xiaomi.com>
2022-07-22 17:10:19 +03:00
ligd
837c15dcb6 rpmsgfs: improve file read & write performance
Signed-off-by: ligd <liguiding1@xiaomi.com>
2022-07-22 17:10:19 +03:00
Xiang Xiao
344a9bc838 fs/hostfs: Change nuttx_dev_t from uint16_t to uint32_t
Follow up the following change:
commit 008cb0d31a
Author: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
Date:   Thu Jul 14 02:27:34 2022 +0000

    sys/sysmacros.h: support sysmacros header

    Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-07-22 17:08:50 +03:00
Masayuki Ishikawa
79e5579837 boards: sabre-6quad: Enable to test C++ static object in ELF
Summary:
- This commit enables to test C++ static object in ELF (hello++3)

Impact:
- elf defconfig only

Testing:
- Tested with QEMU and sabre-6quad board

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2022-07-22 21:38:17 +08:00
Masayuki Ishikawa
d35b39b25a boards: spresense: Enable to test C++ static object in ELF
Summary:
- This commit enables to test C++ static object in ELF (hello++3)

Impact:
- elf defconfig only

Testing:
- Tested with spresense

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2022-07-22 21:38:17 +08:00
Masayuki Ishikawa
50ad3d62aa boards: esp32-devkitc: Enable to test C++ static object in ELF
Summary:
- This commit enables to test C++ static object in ELF (hello++3)

Impact:
- elf defconfig only

Testing:
- Tested with both QEMU and esp32-devkitc board

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2022-07-22 21:38:17 +08:00
ligd
5b9a953381 local: fix nx_style
Signed-off-by: ligd <liguiding1@xiaomi.com>
2022-07-22 14:07:12 +03:00
ligd
390de249a0 local: connect operation should jump self's connection
Signed-off-by: ligd <liguiding1@xiaomi.com>
2022-07-22 14:07:12 +03:00
ligd
cd5ab80f2f local: server accept should wait client connect done
server:
at accept last nxsem_post(&client->lc_waitsem);

client:
connect wait(&client->lc_waitsem) then local_open_client_rx();

But if the server priority is higher then client,
and after server accept return, immediately call send().
At this time the client has no way do local_open_client_rx().
Then server send() return error.

Fix:
add lc_done sem to client

Signed-off-by: ligd <liguiding1@xiaomi.com>
2022-07-22 14:07:12 +03:00
ligd
e489a308c8 local_socket: remove error log when use nonblock mode
Signed-off-by: ligd <liguiding1@xiaomi.com>
2022-07-22 14:07:12 +03:00
Xiang Xiao
4e92e32d7b libc/impure: Fix the inconsistence from the different toolchain
some toolchain provider remove const qualifier from global_impure_ptr
(e.g. Espressif) but other provider keep it(e.g. ARM or Cadence), so
let's define const to empty macro to pass the compile and more safety.

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-07-22 11:02:48 +03:00
ligd
fe723f0715 sched_critmonitor: remove check zero in sched_critmonitor
Cause of up_perf_gettime() may return 0

Signed-off-by: ligd <liguiding1@xiaomi.com>
2022-07-22 10:15:06 +03:00
Jiuzhu Dong
40e86501f1 driver/ioe_rpmsg: split server and client ept_cb to simplify code
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2022-07-22 14:44:44 +08:00
Jiuzhu Dong
978530f5f6 fs/ioctl: add BLKSSZGET cmd to get block sector size
refer to:
https://sites.uclouvain.be/SystInfo/usr/include/sys/mount.h.html

Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2022-07-22 09:07:57 +03:00
Jiuzhu Dong
b385c48a30 fs/fs_fsync: add file sync operation by ioctl
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2022-07-22 09:07:57 +03:00
ligd
8f54f9e1c3 sim: idle pm should do PM_RESOTRE in critical section
Signed-off-by: ligd <liguiding1@xiaomi.com>
2022-07-22 09:06:38 +03:00
Jiuzhu Dong
008cb0d31a sys/sysmacros.h: support sysmacros header
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2022-07-22 11:10:08 +08:00
Karel Kočí
3693d38763 drivers/lcd/st7789: update implementation of driver for ST7789
'putarea' function now has to select the appropriate values from the
whole frame buffer instead of the previous expectation of having just
specified rectangle passed to it.

This required extension of WRRAM handling function as we now are not
writing simply buffer but we want to skip some values and do that
multiple times. Having two implementation in this case is worst as this
function is actually called only twice in the whole code (thus making
dedicated function for every call if we would have two variants).
Calling `st7789_wrram` multiple times is not an option as command
ST7789_RAMWR resets the position and thus calling it multiple times just
overwrites the previous values.
2022-07-22 11:08:00 +08:00
Karel Kočí
fb0fdea4d4 include/nuttx/lcd: change meaning of buffer argument for putarea
The putarea documentation originally suggested that provided buffer
contains just the rectangle to be updated.
The commit 664d45dcba changed the expected
behavior for lcd_framebuffer but failed to propagate this change to the
driver's documentation. Now the expected behavior is that the whole
frame is passed in buffer and it is driver's responsibility to pick the
correct pixels according to the provided rectangle coordinates.

This change requires update of the LCD drivers if they implement this
function.
2022-07-22 11:08:00 +08:00
Alan Carvalho de Assis
a9d3e1bd08 lcd/apa102: Fix APA102 RGB LED Matrix interleaving issue
I found an issue in the APA102 framebuffer that wasn't spot
before by fb test because this application draw symetric squares

Normally in a display each line starts at left and increase to the
right, however for this APA102 matrix the next line starts at the
end of previous line and move the opposite direction, forming a
zig-zag pattern.
2022-07-22 11:05:32 +08:00
ligd
cda9cfbc80 unlink: don't do unlink with inode_semtake
Signed-off-by: ligd <liguiding1@xiaomi.com>
2022-07-22 11:00:26 +08:00
Fotis Panagiotopoulos
30f8d33bca Fixed path calculation in BBS RAM. 2022-07-22 10:59:57 +08:00
ligd
db08f3a723 sched: handle nxtask_setup_arguments return values
Signed-off-by: ligd <liguiding1@xiaomi.com>
2022-07-22 10:54:07 +08:00
ligd
1f854486c3 procfs: procfs_opendir should return fail if can't match
Signed-off-by: ligd <liguiding1@xiaomi.com>
2022-07-22 10:53:44 +08:00
ligd
3bc2131918 irq_procfs: fix divide 0 error
Signed-off-by: ligd <liguiding1@xiaomi.com>
2022-07-22 10:53:44 +08:00
ligd
df365008b2 arm_secure_irq: fix NVIC_IRQ_DBGMONITOR un-secure set failed
NVIC_DEMCR.SDME is a read-only bit

Signed-off-by: ligd <liguiding1@xiaomi.com>
2022-07-22 01:48:55 +03:00
ligd
3db8c2b6a6 stdio: need also flush stdio when flushall
Signed-off-by: ligd <liguiding1@xiaomi.com>
2022-07-22 01:46:21 +03:00
Xiang Xiao
d04ed9587b drivers/syslog: Call up_nputs in syslog_default_write
since the buffer may not be terminated by null

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-07-21 21:26:10 +03:00
Fotis Panagiotopoulos
66f49c1f3c mm: Fixed the usage of CONFIG_MM_BACKTRACE & CONFIG_DEBUG_MM. 2022-07-22 00:53:02 +08:00
Jiuzhu Dong
e7b8af7a35 driver/ramlog: set CONFIG_SYSLOG_DEVPATH to /dev/kmsg when enbale ramglog
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2022-07-21 23:40:56 +08:00
Jiuzhu Dong
af62e6cbfa driver/syslog: support syslog rpmsg server chardev
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2022-07-21 23:40:56 +08:00
Jiuzhu Dong
eedb774d68 driver/syslog: remove TRANSFER_DONE and sem wait when buffer is full
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2022-07-21 23:40:56 +08:00
Jiuzhu Dong
059114557f driver/syslog: support syslog output when buffer remaining space over 75%
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2022-07-21 23:40:56 +08:00
Jiuzhu Dong
664fcb2698 driver/syslog: support syslog rpmsg character buffer
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2022-07-21 23:40:56 +08:00
ligd
5c33db4220 syslog_rpmsg: head must bigger then tail when syslog_rpmsg_init
Signed-off-by: ligd <liguiding1@xiaomi.com>
2022-07-21 23:40:56 +08:00
Petro Karashchenko
2291f601ee arch/arm/samv7: fix SPI 16-bit transactions in DMA mode
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2022-07-21 23:26:20 +08:00
Xiang Xiao
1d43b4a4eb libc/stdio: Enable LIBC_FLOATINGPOINT by default if ARCH_FPU is enabled
and DEFAULT_SMALL is false

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-07-21 09:53:09 -04:00
anjiahao
2b65b46946 boardctl:add reset subreason restore factory
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2022-07-21 20:48:56 +08:00
anjiahao
0b3fd3b0b5 serial:fix a compile bug
serial_io.c use pid,but the headfile Inconsistent macro definitions
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2022-07-21 10:01:44 +03:00
Abdelatif Guettouche
ae1cbc47ef esp32&c3/Kconfig: CONFIG_ESP32(C3)_WIRELESS doesn't need to be user
selectable.

Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2022-07-20 22:02:28 +03:00