Commit Graph

50750 Commits

Author SHA1 Message Date
Eero Nurkkala
5bd0140d9f risc-v/mpfs: mpfs_usb: fix tx fifo size setup
Currently TX_FIFO_SIZE is not altered in mpfs_ep_set_fifo_size(),
but all paths (RX and TX) change MPFS_USB_RX_FIFO_SIZE only.
Fix the TX_FIFO_SIZE setup.

Signed-off-by: Eero Nurkkala <eero.nurkkala@offcode.fi>
2023-08-22 20:26:45 +08:00
Masayuki Ishikawa
cc906e28e4 boards: Fix QEMU_VIRTIO_MMIO_NUM
Summary:
- I noticed that device discovery for virtio-mmio devices does not
  work without bus=virtio-mmio-bus.x option. Without this option,
  qemu assigns the virtio device into the virtio-mmio space
  in reverse order automatically.
- To fix this issue, we must specify the correct numbers for the
  target machines. (i.e. arm32/64->32, rv32/64->8)

Impact:
- None

Testing:
- Tested with qemu-7.2.4

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2023-08-22 20:26:10 +08:00
xiajizhong
1c860f38e7 cordic API add scale parameter
Signed-off-by: xiajizhong <xiajizhong@xiaomi.com>
2023-08-22 12:51:36 +02:00
Xiang Xiao
ece146a229 boards/bl602: Move c++ related setting from wifi to elf
it's more suitable to test c++ support with elf config

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-08-22 17:27:41 +08:00
Xiang Xiao
fdf7055d7b libc: Guard gettext function with CONFIG_LIBC_LOCALE_GETTEXT in libc.csv
since Makefile and source files doesn't use CONFIG_LIBC_LOCALE at all

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-08-22 17:27:41 +08:00
Zhe Weng
5597b8a9e2 drivers/virtio-net: Add support to offload small IOBs
TCP receive tested with different IOB_BUFSIZE:
|             | 256B vs 1534B | 512B vs 1534B | 768B vs 1534B |
| :---------: | :-----------: | :-----------: | :-----------: |
|     Non-SMP |     ~85%      |     ~93%      |     ~96%      |
|  armv8a-SMP |     ~66%      |     ~84%      |     ~92%      |
| rv32/64-SMP |     ~52%      |     ~72%      |     ~83%      |

It seems we still get performance penalty on smaller IOBs, and may be
affected more under SMP mode. It may be caused by critical sections in
IOB operations.

Signed-off-by: Zhe Weng <wengzhe@xiaomi.com>
2023-08-22 16:34:21 +09:00
Zhe Weng
318d136320 netdev/upper: Add netpkt_to_iov() interface
Some driver like virtio-net can offload fragmented IOBs, so an interface
to support this feature is needed.

Signed-off-by: Zhe Weng <wengzhe@xiaomi.com>
2023-08-22 16:34:21 +09:00
Zhe Weng
d44e19d115 mm/iob: Add support for increasing length in iob_update_pktlen
Signed-off-by: Zhe Weng <wengzhe@xiaomi.com>
2023-08-22 16:34:21 +09:00
Zhe Weng
2fa68fbddd drivers/virtio-net: Support different LL_GUARDSIZE
Previously, the CONFIG_NET_LL_GUARDSIZE is fixed to 32 (64-Bit) or
28 (32-Bit), it's a little bit tricky.
Now add support to any value greater than minimal size.

Signed-off-by: Zhe Weng <wengzhe@xiaomi.com>
2023-08-22 16:34:21 +09:00
Xiang Xiao
7b34583996 ci/Dockerfile: Update riscv toolchain to gcc13.2.0
and change the default toolchain to riscv32-unknown-elf-

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-08-22 15:14:44 +08:00
dongjiuzhu1
33446608b5 libc/gpsutils: merged into one target to fix the issue of parallel compilation
Because multiple dependencies behind the context are compiled in parallel,
if they have dependencies on each other, it will cause compilation errors

Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2023-08-22 13:55:55 +08:00
Zhe Weng
efc75de61e net/udp: Fix hybrid dual-stack IPv6/IPv4 socket
- Fix `ip6_map_ipv4addr` and `ip6_get_ipv4addr` macro to work under
  different endianness.
- Use `iob_reserve` instead of `iob_trimhead` in `udp_datahandler`.
  - Because we may set `sockaddr_in6` into IPv4 header, which causes
    `offset` become negative. `iob_reserve` can hold this case while
    `iob_trimhead` cannot.
- Select IPv4 domain in send case.

Signed-off-by: Zhe Weng <wengzhe@xiaomi.com>
2023-08-22 09:09:21 +08:00
Zhe Weng
e2c9aa6588 mm/iob: Fix IOB length in iob_reserve
If we apply `iob_reserve` on an IOB with `io_offset != 0`, the `head->io_pktlen` and `iob->io_len` will become wrong value, because we only need to trim `offset - iob->io_offset`.

Signed-off-by: Zhe Weng <wengzhe@xiaomi.com>
2023-08-22 09:09:21 +08:00
cuiziwei
1a8027d625 nuttx/arch:add -Wno-psabi to Toolchain.defs
Signed-off-by: cuiziwei <cuiziwei@xiaomi.com>
2023-08-22 01:33:30 +08:00
zhangyuan21
9bccd94fee rndis: Fixing erroneous macros
Signed-off-by: zhangyuan21 <zhangyuan21@xiaomi.com>
2023-08-22 01:31:19 +08:00
dongjiuzhu1
38c001a914 drivers/pipes: fix busyloop issue when circbuf is full
pipecommon_poll always reutrn POLLOUT when the circbuf is full.

Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2023-08-22 01:30:17 +08:00
nietingting
4405264008 add citest support for qemu-armv8a and fvp-armv8r
Signed-off-by: nietingting <nietingting@xiaomi.com>
2023-08-22 00:07:46 +08:00
dongjiuzhu1
edbeb5cdd9 libs/ctype/toupper_l: Implement function toupper_l instead of macro
toupper_l will be replaced by toupper, resulting in infinite recursion, so implement toupper_l

stack:
0  std::__1::ctype_byname<char>::do_toupper (this=0xf3888120, c=49 '1') at libcxx/src/locale.cpp:1231
1  0x005b8188 in std::__1::ctype<char>::toupper (__c=49 '1', this=0xf3888120) at nuttx/include/libcxx/__locale:667
2  std::__1::ctype_byname<char>::do_toupper (this=0xf3888120, c=49 '1') at libcxx/src/locale.cpp:1231
3  0x005b8188 in std::__1::ctype<char>::toupper (__c=49 '1', this=0xf3888120) at nuttx/include/libcxx/__locale:667
4  std::__1::ctype_byname<char>::do_toupper (this=0xf3888120, c=49 '1') at libcxx/src/locale.cpp:1231
5  0x0064cfc9 in std::__1::ctype<char>::toupper (__c=49 '1', this=0xf3888120) at nuttx/include/libcxx/__locale:667
6  std::__1::__scan_keyword<char*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >*, std::__1::ctype<char> > (__b=@0xf38871a0: 0xf3887220 "11:55:59 PM",
   __e=0xf388722b "", __kb=0xf2c03990, __ke=0xf2c03a38, __ct=..., __err=@0xf38871b0: 0, __case_sensitive=false) at nuttx/include/libcxx/locale:299
7  0x005cb0ed in std::__1::__time_get_storage<char>::__analyze (this=0xf2c0398c, fmt=114 'r', ct=...) at libcxx/src/locale.cpp:4998
8  0x005cf888 in std::__1::__time_get_storage<char>::init (this=0xf2c0398c, ct=...) at libcxx/src/locale.cpp:5295
9  0x005d4d0f in std::__1::__time_get_storage<char>::__time_get_storage (this=0xf2c0398c, __nm=...) at libcxx/src/locale.cpp:5399
10 0x005b15c8 in std::__1::time_get_byname<char, std::__1::istreambuf_iterator<char, std::__1::char_traits<char> > >::time_get_byname (__refs=0, __nm=..., this=0xf2c03980)
   at nuttx/include/libcxx/locale:2446
11 std::__1::locale::__imp::__imp (this=0xf2803970, name=..., refs=0) at libcxx/src/locale.cpp:268
12 0x005b333e in std::__1::locale::locale (this=0xf3888f00, name=0x6ca340 "C") at libcxx/src/locale.cpp:562
13 0x0058313b in helloxx_main (argc=1, argv=0xf3878810) at helloxx_main.cxx:112
14 0x0048471a in nxtask_startup (entrypt=0x5830a0 <helloxx_main(int, char**)>, argc=1, argv=0xf3878810) at sched/task_startup.c:70
15 0x00431bcd in nxtask_start () at task/task_start.c:134
16 0x0048f643 in pre_start () at sim/sim_initialstate.c:52
17 0x00000000 in ?? ()

Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2023-08-22 00:07:16 +08:00
raiden00pl
d31402bf3c arch/{stm32|stm32f7}/stm32_mpuinit.h: cosmetics 2023-08-21 19:22:52 +08:00
anjiahao
6168bdf9e0 minidumpserver: Add usage documentation
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2023-08-21 18:27:05 +08:00
anjiahao
9241e4a2ca minidumpserver.py:support xtensa and esp32s3 arch
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2023-08-21 18:27:05 +08:00
anjiahao
ffb391f6aa minidumpserver.py:Print the line number of logfile when the format is wrong
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2023-08-21 18:27:05 +08:00
wangbowen6
8c56354dc8 minidumpserver: add arm-a thumb arch support
The frame pointer and r11 register is different in thumb mode and
arm mode.

Signed-off-by: wangbowen6 <wangbowen6@xiaomi.com>
2023-08-21 18:27:05 +08:00
renweibo
f3208c1def tools: add type information
Additional information here:
- no code logic change, just add type hint
- make the code easy to work with
- minor python3 requirement without any complex type feature

Signed-off-by: renweibo <renweibo@xiaomi.com>
2023-08-21 18:27:05 +08:00
liqinhui
0d39246b4e sim/posix: Add the host_system interface used to execute the host command
Encapsulate the host system/popen interface to host_system.

Signed-off-by: liqinhui <liqinhui@xiaomi.com>
2023-08-21 17:40:40 +08:00
liqinhui
0100e8338e net: Fix unreadable error when doing poll operation on tcp socket.
When do poll operation and the tcp connection state is TCP_ALLOCATED, eventset(POLLERR|POLLHUP) is return, causing the libuv poll_multiple_handles to fail.

Verification: Use the libuv test case ` uv_run_tests poll_multiple_handles`.
Signed-off-by: liqinhui <liqinhui@xiaomi.com>
2023-08-21 17:38:00 +08:00
raiden00pl
78c88b5e78 arch/nrf53: FLASH cache only for netcore, disable by default as it breaks rptun
After sevaral resets of the chip after programming, rptun stops working correctly.
Simple test with RPMSG UART causes a lock:

  on the netcore:
    nsh>cat /dev/ttyproxy

  on the appcore:
    nsh>echo xxx > /dev/ttyproxy

The problem doesn't occur with NRF53_FLASH_PREFETCH=n
2023-08-21 17:34:36 +08:00
raiden00pl
72a0b19141 boards/nrf5340-dk: enable rpmsg uart for rptun configurations 2023-08-21 17:34:36 +08:00
raiden00pl
187a067866 arch/nrf53/rptun: remove dependency on DEV_SIMPLE_ADDRENV 2023-08-21 17:34:36 +08:00
raiden00pl
45a542cb14 arch/nrf53: move SPU configuration to a separate file 2023-08-21 17:34:36 +08:00
raiden00pl
74cc036536 boards/nrf53: add missing shmem section 2023-08-21 17:34:36 +08:00
raiden00pl
8ebc0dc9e8 cmake: port 99b0bad94e arch/armv8-m: DSP extension is optional 2023-08-21 17:34:36 +08:00
liaoao
9231dbe716 cpuinfo:armv6: select ARCH_HAVE_CPUINFO by default
Signed-off-by: liaoao <liaoao@xiaomi.com>
2023-08-21 17:33:50 +08:00
xinhaiteng
dbefe37a3a sigqueue: add signal type judgment logic
To determine whether a signal is real-time signal or standard signal, the POSIX standard https://www.man7.org/linux/man-pages/man7/signal.7.html defines a real-time signal between SIGRTMIN  and SIGRTMAX , which can store multiple copies, otherwise only one can be retained.

Signed-off-by: xinhaiteng <xinhaiteng@xiaomi.com>
2023-08-21 15:35:45 +08:00
qinwei1
630b5f32a2 arm64: IMX8 MEK board support
Summary

   Support for imx8qm MEK evaluate board

Signed-off-by: qinwei1 <qinwei1@xiaomi.com>
2023-08-21 14:23:05 +08:00
qinwei1
30354e5767 arm64: IMX8 platform (Cortex-A53) support
Summary

   Support for imx8 platform, this is a very initialize version

Signed-off-by: qinwei1 <qinwei1@xiaomi.com>
2023-08-21 14:23:05 +08:00
yintao
4b5910efc1 nuttx/sim: simlulator rptun powerdown
Signed-off-by: yintao <yintao@xiaomi.com>
2023-08-21 13:21:50 +08:00
zhangyuan21
7737efd995 SMP: fix repeat entry timer_start
If we are running on a single CPU architecture, then we know interrupts
are disabled and there is no need to explicitly call enter_critical_section().
However, in the SMP case, enter_critical_section() is required prevent
multiple cpu to enter timer_start.

Signed-off-by: zhangyuan21 <zhangyuan21@xiaomi.com>
2023-08-21 13:20:56 +08:00
xucheng5
9d3abe8b71 socket can : support ioctl cmd SIOCCANRECOVERY
send CMD to restart controller in state bus-off

Signed-off-by: xucheng5 <xucheng5@xiaomi.com>
2023-08-21 13:18:51 +08:00
makejian
afbe6239ae crypto: update aes algorithm process
(1)update iv in each encryption process
(2)support aes-ofb/aes-cfb128/aes-cfb8
Signed-off-by: makejian <makejian@xiaomi.com>
2023-08-21 13:05:19 +08:00
xucheng5
e8a2df4f80 devif/devif_poll : d_len must positive before invoke callback
Signed-off-by: xucheng5 <xucheng5@xiaomi.com>
2023-08-21 13:04:15 +08:00
yangshuyong
0b8b5da851 fixed the unused variable caused warnning in lib_gethostbyaddrr
lib_gethostbyaddrr.c: warning: label 'out_copyname' defined but not used [-Wunused-label] 204 | out_copyname:

Signed-off-by: yangshuyong <yangshuyong@xiaomi.com>
2023-08-21 13:01:41 +08:00
fangxinyong
6c8b0ba9f3 libc/netdb: add dependence to net ip config
avoid to invalid enabled if no net ip config

Signed-off-by: fangxinyong <fangxinyong@xiaomi.com>
2023-08-21 13:01:04 +08:00
zhangyuan21
fb12e7530d sched/smp: flush dcache before start other cpus
core0 may write the data used by other cpu, this will cause cache inconsistency.
so need fulsh dcache before start other cpus.

Signed-off-by: zhangyuan21 <zhangyuan21@xiaomi.com>
2023-08-21 12:02:45 +08:00
qinwei1
5b7267bf66 arm64: remove unnecessary trace interface
Summary
    this is a old implement for Arm64 trace but will failed
compile when enable CONFIG_SCHED_INSTRUMENTATION_SWITCH
    remove it since it will never use for trace framework

Signed-off-by: qinwei1 <qinwei1@xiaomi.com>
2023-08-21 09:49:02 +08:00
wangyingdong
2ce31c442f net/tcp:Added tcp zero window probe timer support
https://www.rfc-editor.org/rfc/rfc1122#page-92

Signed-off-by: wangyingdong <wangyingdong@xiaomi.com>
2023-08-20 19:47:11 -03:00
hanqiyuan
1a832eb554 xtensa: enable -Oz for xtensa to reduce codesize 2023-08-21 02:58:25 +08:00
wangyingdong
adf9e685ab Fix the bug that localsocket fails to send in CONFIG_NET_LOCAL_DGRAM mode because fs adds pipe check (commit 9e06c3e)
Signed-off-by: wangyingdong <wangyingdong@xiaomi.com>
2023-08-20 19:18:18 +03:00
hujun5
f1b6cf78da arch/arm: add CONFIG_ARCH_TRUSTZONE_SECURE to some code
Signed-off-by: hujun5 <hujun5@xiaomi.com>
2023-08-21 00:06:25 +08:00
hujun5
a96c6f1abf arch/arm: Add the secure handling to gic
Signed-off-by: hujun5 <hujun5@xiaomi.com>
2023-08-21 00:06:25 +08:00