Commit Graph

54064 Commits

Author SHA1 Message Date
Petro Karashchenko
b7cbe16fed arch/x86_64: remove redundant init
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2024-08-25 19:22:15 +08:00
Petro Karashchenko
ebddc8d8ee drivers/usbhost: remove unused function
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2024-08-25 19:22:15 +08:00
Petro Karashchenko
f40b09cbc9 style: remove redundant spaces
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2024-08-25 19:22:15 +08:00
Petro Karashchenko
d252b6229f nuttx: use sizeof instead of define or number in snprintf
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2024-08-25 19:22:15 +08:00
guoshichao
dd7ecd9aef greenhills: fix the ioexpander/gpio.h build warning
CC:  mm_heap/mm_brkaddr.c "/home/guoshichao/work_profile/vela_os/vela_car_4/nuttx/include/nuttx/ioexpander/gpio.h", line 159: warning #381-D:
          extra ";" ignored
    uint8_t gp_pintype;  /* See enum gpio_pintype_e */;
                                                      ^

Signed-off-by: guoshichao <guoshichao@xiaomi.com>
2024-08-24 20:43:53 +08:00
guoshichao
a06c97d599 greenhills: fix the netdev.h build warning
"/home/guoshichao/work_profile/vela_os/vela_car_4/nuttx/include/nuttx/net/netdev.h", line 493: warning #231-D:
          declaration is not visible outside of function
                                            FAR struct netdev_ifaddr6_s *addr,
                                                       ^

Signed-off-by: guoshichao <guoshichao@xiaomi.com>
2024-08-24 20:43:53 +08:00
guoshichao
b150722efb greenhills: fix enumerated type mixed using build warning
CC:  irq/irq_initialize.c "ioexpander/gpio.c", line 386: warning #188-D: enumerated type mixed with
          another type
            *ptr = dev->gp_pintype;
                 ^

Signed-off-by: guoshichao <guoshichao@xiaomi.com>
2024-08-24 20:43:53 +08:00
guoshichao
cd52edd6d7 greenhills: fix enumerated type mixed with another type warning
"net/netdev_upperhalf.c", line 133: warning #188-D: enumerated type mixed with
          another type
        total += netdev_lower_quota_load(lower, type);

CC:  dirent/lib_alphasort.c "spi/spi_transfer.c", line 83: warning #188-D: enumerated type mixed with
          another type
    SPI_SETMODE(spi, seq->mode);
    ^

Signed-off-by: guoshichao <guoshichao@xiaomi.com>
2024-08-24 20:43:53 +08:00
guoshichao
1174d223d4 greenhills: update .gitignore to exclude ghs build intermediate files
Signed-off-by: guoshichao <guoshichao@xiaomi.com>
2024-08-24 20:43:53 +08:00
guoshichao
e5835d6ce8 greenhills: fix the macro undefined warning
CC:  mount/fs_foreachmountpoint.c "/home/guoshichao/work_profile/vela_os/vela_car_6/nuttx/include/nuttx/mqueue.h", line 40: warning #193-D:
          zero used for undefined preprocessing identifier
          "CONFIG_MQ_MAXMSGSIZE"
  #if CONFIG_MQ_MAXMSGSIZE > 0
      ^

Signed-off-by: guoshichao <guoshichao@xiaomi.com>
2024-08-24 20:43:53 +08:00
guoshichao
cc79201c59 greenhills: fix the pointless compare warning
CC:  modlib/modlib_depend.c "modlib/modlib_bind.c", line 741: warning #186-D: pointless comparison of
          unsigned integer with zero
            if (rel->r_offset < 0)
                              ^

Signed-off-by: guoshichao <guoshichao@xiaomi.com>
2024-08-24 20:43:53 +08:00
guoshichao
04f5aaebfa greenhills: fix macro undefined warning
AS:  modlib/modlib_globals.S "modlib/modlib_globals.S", line 38: warning #193-D: zero used for undefined
          preprocessing identifier "__SIZEOF_POINTER__"
  #if __SIZEOF_POINTER__ == 8
      ^

Signed-off-by: guoshichao <guoshichao@xiaomi.com>
2024-08-24 20:43:53 +08:00
daichuan
a9e2942d8f support mutil thread with netdev upperhalf
Signed-off-by: daichuan <daichuan@xiaomi.com>
2024-08-24 20:41:40 +08:00
daichuan
fe01d7c462 modify for offload checksum and add macro with tcp/icmp/icmpv6/igmp checksum
Signed-off-by: daichuan <daichuan@xiaomi.com>
2024-08-24 20:41:40 +08:00
pengyinjie
77205b353f [fs][shmfs]:Avoid an integer overflow
[Desc]:We need to check the parameter passed to the kmm_zalloc(size_t) function.
If it exceeds the limit of size_t, we need to return an error directly to avoid further errors.

Signed-off-by: pengyinjie <pengyinjie@xiaomi.com>
2024-08-24 20:33:59 +08:00
guoshichao
634159a5e6 greenhills: fix the no-lto link warning
ccarm: Warning: Unknown option "-fno-lto" passed to linker
CC:  assert/lib_stackchk.c ccarm: Warning: Unknown option "-fno-lto" passed to linker

Signed-off-by: guoshichao <guoshichao@xiaomi.com>
2024-08-24 18:57:40 +08:00
Saurav Pal
4a4725386d docs/fs/mnemofs: Update new design and NAND flash structure
Add documentation about the new mnemofs design and the NAND flash structure.

Signed-off-by: Saurav <resyfer.dev@gmail.com>
2024-08-24 18:24:58 +08:00
meijian
099ced4c83 [wireless] add pmksa get IOCTL id
Signed-off-by: meijian <meijian@xiaomi.com>
2024-08-24 18:09:07 +08:00
meijian
7cebfd0059 [wireless][header] Normalize IOCTL id
Signed-off-by: meijian <meijian@xiaomi.com>
2024-08-24 18:09:07 +08:00
guoshichao
7f6fb9ce1c greenhills: add the "__sync_synchronize" func impl
we add ghs header file support using to fix the following link error:
[elxr] (error #412) unresolved symbols: 1
 __sync_synchronize 	from libopenamp.a(io.o)

Signed-off-by: guoshichao <guoshichao@xiaomi.com>
2024-08-24 18:07:12 +08:00
meijian
c0eef6c137 net/tcp_timer: fix tcp_timer idle loop and retransmission bug
1. Tcp will idle loop by tcp_timer when have no packet to send. This will cause low-power devices to be frequently woken up.
2. We should add tcp_timer when timer has been canceled and have packet to send.

Signed-off-by: meijian <meijian@xiaomi.com>
2024-08-24 18:07:03 +08:00
guohao15
fb72fe6364 include/fcntl.h: add O_LARGEFILE flags
Signed-off-by: guohao15 <guohao15@xiaomi.com>
2024-08-24 18:06:14 +08:00
guohao15
99c6f2e568 sys/shm.h: add macro define for posix
Signed-off-by: guohao15 <guohao15@xiaomi.com>
2024-08-24 18:04:22 +08:00
Kevin Zhou
bf57047429 xtensa/esp32s3: Separate address and command flag for QSPI DMA transfer 2024-08-24 11:31:35 +08:00
yinshengkai
6e02f3a31d sched: modify dump_stack log level
Keep the log level consistent with assert

Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2024-08-24 11:20:59 +08:00
yinshengkai
a72c9a41e1 include/debug.h: fix _alert log level error
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2024-08-24 11:20:59 +08:00
makejian
10168903cc crypto/bn: add method to calculate inv mod and gcd
Signed-off-by: makejian <makejian@xiaomi.com>
2024-08-24 11:20:17 +08:00
makejian
21514e266a crypto/bn: bignum supports negative number operations
1.Add sign to indicate negative and positive
2.Fix case where there are negative numbers in the operation
3.expand to 512 bytes to support rsa2048

Signed-off-by: makejian <makejian@xiaomi.com>
2024-08-24 11:20:17 +08:00
nuttxs
fbb2e5f781 boards/esp32s3_lan9250: deinitialize the ethernet device lan9250 for esp32s3. 2024-08-24 11:19:00 +08:00
zhangkai25
9e388d1d00 Capture adds the function of edges counting
Description: Add the function of counting cap edges

Signed-off-by: zhangkai25 <zhangkai25@xiaomi.com>
2024-08-24 11:18:05 +08:00
Felipe Moura
25a6c0d6d8 esp32c6 - add mfrc522 rfid support
Improved debug output msgs

Fix code style issues

Fix code style issue
2024-08-24 11:16:49 +08:00
Yanfeng Liu
634ee5b1f6 board/maix-bit: add cmake support
This adds initial CMake support for `maix-bit` device.

Signed-off-by: Yanfeng Liu <yfliu2008@qq.com>
2024-08-24 11:08:25 +08:00
Saurav Pal
9d8b92c481 fs/mnemofs: Autoformat
Mnemofs autoformat feature

Signed-off-by: Saurav Pal <resyfer.dev@gmail.com>
2024-08-23 18:31:04 -03:00
wangchen
2195270ed5 localsocket:add net_lock to protect connection
Signed-off-by: wangchen <wangchen41@xiaomi.com>
2024-08-23 16:14:39 -03:00
wangchen
eb0055fd4a local_sendto:move lc_sendlock position to protect file system interface
Signed-off-by: wangchen <wangchen41@xiaomi.com>
2024-08-23 16:14:39 -03:00
wangchen
622302fe02 local_recvmsg.c:setting "EAGAIN" not as a warning level
Signed-off-by: wangchen <wangchen41@xiaomi.com>
2024-08-23 16:14:39 -03:00
wangchen
931029b9cb local_sendpacket.c:setting "EAGAIN" not as a error level
Signed-off-by: wangchen <wangchen41@xiaomi.com>
2024-08-23 16:14:39 -03:00
wangchen
7050c312df pipes:fix the issue of the circbuf cannot be incorrectly initialized due to PIPE_POLICY_0
if dev->d_flags is POLICY_1, the circbuf cannot be initialized incorrectly.
We determine whether the circbuf should be initialized based on first reference on device and d_buffer is NULL

Signed-off-by: wangchen <wangchen41@xiaomi.com>
2024-08-23 16:14:39 -03:00
wangchen
9147c955dc local:local socket sendto with adding binding path info
For udp localsocket current implementation,the sent information only carries the packet info.
The receiver receives the information,it don't know who the information comes from.
Thus the receiver doesn't know who to send the response message to.

We add sender's binding path info in the information,the receiver knows who sent the information
based on the parsed information.
The receiver knows who to send the response message to.

Signed-off-by: wangchen <wangchen41@xiaomi.com>
2024-08-23 16:14:39 -03:00
Zhe Weng
a591adc6d5 drivers/pipes: Add offset support for PIPEIOC_PEEK
Signed-off-by: Zhe Weng <wengzhe@xiaomi.com>
2024-08-23 16:14:39 -03:00
wangchen
6a267fe019 drivers/pipes:add PIPEPOLICY_0 check in pipecommon_read & pipecommon_write.
From the current implementation,udp localsoket receiver's pipe is closed, the sender write failed in the pipe;
we change the implementation to check if buffer is free(PIPE_IS_POLICY_0),if not free,the sender could write in the pipe;

From the current implementation,udp localsoket sender's pipe is empty,the recevier directly return end of file;
we change the implementation to check if buffer is free(PIPE_IS_POLICY_0),if not free,the receiver wait for data

Signed-off-by: wangchen <wangchen41@xiaomi.com>
2024-08-23 16:14:39 -03:00
ligd
1a21445877 pipes: use priv refs instead of inode to resolve memleak
thread1                 thread2
open pipe               open pipe
close()
-> pipecommon_close()
  -> check inode refs
  -> do NOT free dev    close()
                        -> pipecommon_close()
                          -> check inode refs
                          -> do NOT free dev
-> inode_release
   inode refs--
                        -> inode_release
                           inode refs--

Then, you will see the pipe hasn't free its resource, memleak

Resolve:
replace the inode refs with priv refs

Signed-off-by: ligd <liguiding1@xiaomi.com>
2024-08-23 16:14:39 -03:00
wangchen
f811b78d8c local:add check to the localsocket binding the path
Signed-off-by: wangchen <wangchen41@xiaomi.com>
2024-08-23 16:14:39 -03:00
yinshengkai
624fc5a9b8 sched: support dumping all file information during assert
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2024-08-23 16:12:31 -03:00
yinshengkai
20b357abde assert: pause all other CPUs when assert
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2024-08-23 16:12:31 -03:00
yinshengkai
b3794c8af7 assert: Avoid recursive calls of Assert
After the structure of the kernel core is wrong, dump_stack, dumpstack is easy to appear crash

Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2024-08-23 16:12:31 -03:00
Felipe Moura
75f81e6e24 stm32f4discovery - add mfrc522 rfid support 2024-08-23 16:11:46 -03:00
makejian
9769816385 crypto: fix wrong implementation in crypto module
(1) RSA_PKCS15_VERIFY Misspell
(2) if iv not provided during decryption, iv should get from data.
It was not discovered before because all symmetric decryption comes with iv.
Signed-off-by: makejian <makejian@xiaomi.com>
2024-08-23 12:57:37 -03:00
makejian
7c763f67a6 crypto/poly1305: Fix false positive '-Wstringop-overflow' warning in poly1305.c
poly1305.c:241:40: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
  241 |           st->buffer[st->leftover + i] = m[i];
      |           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~
Signed-off-by: makejian <makejian@xiaomi.com>
2024-08-23 12:57:37 -03:00
guohao15
c812007f8c mtd:use part->name as partition name when CONFIG_MTD_PARTITION_NAMES set
Signed-off-by: guohao15 <guohao15@xiaomi.com>
2024-08-23 11:27:39 -03:00