Commit Graph

39576 Commits

Author SHA1 Message Date
ligd d82e263654 select: fix asan report error
vfs/fs_select.c:116:25: runtime error: left shift of 1 by 31 places cannot be represented in type 'int'
vfs/fs_select.c:153:22: runtime error: left shift of 1 by 31 places cannot be represented in type 'int'

Change-Id: I2e32bb8a3db8ff5a5955b83b382ac2fa5756122c
Signed-off-by: ligd <liguiding1@xiaomi.com>
2021-03-15 21:27:12 +08:00
ligd 25f61c731d crypto: fix asan report error
random_pool.c:466:14: runtime error: left shift of 305919453 by 17 places cannot be represented in type 'long int'
random_pool.c:178:11: runtime error: shift exponent 32 is too large for 32-bit type 'unsigned int'

Change-Id: I714f42b68f4af43249946aed8537cd848e569194
Signed-off-by: ligd <liguiding1@xiaomi.com>
2021-03-15 21:26:09 +08:00
mage1 2053e3a596 mm: add heap policy and anta logic to support mm debug on sim platform
since atan tool will enhance memory debug operation.

Change-Id: Ic953755faff156832e84b6a764452751dc14f0e3
2021-03-12 23:30:59 +08:00
ligd b8acb6f4c3 boards/sim/rcS: hostfs mount to server if CONFIG_FS_HOSTFS_RPMSG=y
Change-Id: I90758f4e4fcf6ae4f802da80e4b17a287e74c7c0
Signed-off-by: ligd <liguiding1@xiaomi.com>
2021-03-12 22:39:43 +08:00
chao.an 001f549e2c net/if: remove the macro expansion of the public structure
This is a compatibility issue if different structures included
in the usrsock server/client scene, usrsock client has no habit
of actively choosing of config CONFIG_NETDEV_IFINDEX at most of the time

Change-Id: Ib18b0ee12c76de759f6e8a54375c3adcdc31353a
Signed-off-by: chao.an <anchao@xiaomi.com>
2021-03-12 18:19:30 +08:00
zhouliang3 e5281760f5 nuttx/wamr: Add the most basic configuration of WAMR to the sim
N/A

Signed-off-by: zhouliang3 <zhouliang3@xiaomi.com>
Change-Id: I4ff67816eaa6e15232d1b375c86e2b7559c789aa
2021-03-12 16:56:26 +08:00
chao.an 6e1e06de18 fs/epoll: correct the return value of epoll_ctl(2)
Change-Id: I6a5233ec641889540c951d6ff50fef952e47212f
Signed-off-by: chao.an <anchao@xiaomi.com>
2021-03-12 16:34:47 +08:00
chao.an 6ef7435082 net/tcp: correct the cache output
Change-Id: I30e9352ca9c032e707a86f327c902a976f0cb375
Signed-off-by: chao.an <anchao@xiaomi.com>
2021-03-12 16:34:06 +08:00
Peter Bee 9866f01908 net/local: fix sendmsg return length
MIRTOS-495
Return correct length now

Signed-off-by: Peter Bee <bijunda1@xiaomi.com>
Change-Id: I32e3bfc44d8aabd3c19963486cb43962a38f927f
2021-03-12 16:27:47 +08:00
丁欣童 e5eaa35553 vfs/epoll: Fix one bug of EPOLL_CTL_DEL.
N/A

Signed-off-by: 丁欣童 <dingxintong@xiaomi.com>
Change-Id: I91ec9fbf4b3884cb29bf30c4ff69a6c5df7f30ca
2021-03-12 11:40:05 +08:00
丁欣童 099385fff1 vfs: Fix epoll cannot work under 64-bit operating system
by switching to the real file handle

Change-Id: I79ac337d1f2646e38eb10f67a67505dc2f8e8298
Signed-off-by: 丁欣童 <dingxintong@xiaomi.com>
2021-03-11 19:32:05 +08:00
liuhaitao 0883499e39 Add dmalloc .gitignore file
Change-Id: I8d712d314c81bdb86c9aa74c8c5e7e21aa043f9d
Signed-off-by: liuhaitao <liuhaitao@xiaomi.com>
2021-03-11 16:32:49 +08:00
丁欣童 e23def2160 fakesensor: replace usleep with nxsig_usleep.
N/A

Signed-off-by: 丁欣童 <dingxintong@xiaomi.com>
Change-Id: I636e1ccc5463cf247eb9c8e363d5c746d6c5afe5
2021-03-11 10:18:06 +08:00
Xiang Xiao 777a99ea00 mm: Integrate TLSF manager
can be enabled by CONFIG_MM_TLSF_MANAGER=y

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: Id3cb6549b6dd881a9549f3202ab4b3ebdceb3ca4
2021-03-10 21:14:34 +08:00
Xiang Xiao 05abfac89b mm/heap: Move semaphore related declaration to private header
since other subsystem doesn't need call these function anymore

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: Idfb217c412db62d9f17f427310b75bb78785dc50
2021-03-10 21:13:56 +08:00
Xiang Xiao cbeb35c646 mm/heap: Replace _SEM_GETERROR with _SEM_ERRVAL
and change nxsem_init to _SEM_INIT

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I84ad710c3ebe92d31d6c8dc1ddf6b63c10494ce2
2021-03-10 21:13:56 +08:00
Xiang Xiao 35b12f7cfe arch/sim: Don't remove OPOST in the raw mode
to ensure '\n' from host library output correctly(translate to '\r\n')

Change-Id: I9ce81adb04ca01cfd8a0ec8e8dc85c7fad848601
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-03-10 21:13:56 +08:00
ligd f6e505c252 fs/procfs: add memory nfree to procfs
Change-Id: I63af304aec627498589a6899411484c56d298d54
Signed-off-by: ligd <liguiding1@xiaomi.com>
2021-03-10 20:45:41 +08:00
huangjian 271aad4995 buildinfo.sh:add ro.build.channel
N/A

Change-Id: I382784a2358e367b6bf56aff5a73bd84e6b6d334
Signed-off-by: huangjian <huangjian@xiaomi.com>
(cherry picked from commit 8ee043c505c7625b23b92344be533dc3d4b35bb7)
2021-03-09 20:32:31 +08:00
Jiuzhu Dong d96aa75a20 fs/aio: unify socket into fs operate
N/A

Change-Id: I3aa88a47d88feaa7fd156caea9e0425b20554eee
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-03-09 12:03:49 +08:00
Fotis Panagiotopoulos d02b63d6ed Re-arranged syslog fields. 2021-03-09 00:53:28 +08:00
chao.an 413405fb6e drivers/syslog: Prepend Process ID to syslog message
Signed-off-by: chao.an <anchao@xiaomi.com>
2021-03-09 00:53:22 +08:00
Fotis Panagiotopoulos fb8b50c300 Added color output to syslog. 2021-03-09 00:53:16 +08:00
Fotis Panagiotopoulos 0acea9c4a4 Added printing of log priority in syslog. 2021-03-09 00:53:07 +08:00
Fotis Panagiotopoulos 5c4ee27398 Added formatted timestamps in syslog. 2021-03-09 00:52:59 +08:00
chao.an 4b5f6b138e Revert "drivers/syslog: Prepend Process ID to syslog message"
This reverts commit 0cd3389459.
2021-03-09 00:52:51 +08:00
丁欣童 c52a65890b drivers/sensor: fakesensor support batch.
N/A

Change-Id: I8377e359ceb111519c4da7d84c2e0dc3b7234ad3
Signed-off-by: 丁欣童 <dingxintong@xiaomi.com>
2021-03-08 16:02:19 +08:00
chao.an b8a4d9c043 tools/Makefile: increase the incremental compile speed
Change-Id: I7ec2df10dee6b6f713cca7b51358e90cf3eb74c9
Signed-off-by: chao.an <anchao@xiaomi.com>
2021-03-08 14:04:16 +08:00
chao.an 92b0b1d0f2 mm/iob: iob_get_queue_count() should return the iob count
Change-Id: Ief7b98589613c59754f1a4d265aaa4760ad3d209
Signed-off-by: chao.an <anchao@xiaomi.com>
2021-03-08 13:59:12 +08:00
chao.an c52fc22af1 Revert "net/tcp: return ENOTCONN if the connect migrate to the closed state"
This reverts commit 3d0775e79a.
2021-03-08 11:53:30 +08:00
Huang Qi 7a44b007c7 libc/machine: introduce memchr/memmove/memset/strlen from newlib for armv8-m
N/A

Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
Change-Id: Ie63c8f23126d9ca415609b4ab935d0a5dcc6f376
2021-03-08 09:43:55 +08:00
chao.an 3d0775e79a net/tcp: return ENOTCONN if the connect migrate to the closed state
Change-Id: I15ee2a7ccbdc792c2c910ee9632714622bc5e0fd
Signed-off-by: chao.an <anchao@xiaomi.com>
2021-03-06 18:37:15 +08:00
ligd 8d1ec7b2d0 serial/serial_dma.c: fix warnnings
serial/serial_dma.c: In function ‘uart_recvchars_done’:
serial/serial_dma.c:407:7: warning: implicit declaration of function ‘nxsig_kill’ [-Wimplicit-function-declaration]
  407 |       nxsig_kill(dev->pid, signo);
      |       ^~~~~~~~~~

Change-Id: I9e1c0341ecce3033889d11fff9ec2b9e3dfe303b
Signed-off-by: ligd <liguiding1@xiaomi.com>
2021-03-06 17:35:56 +08:00
ligd 28a667f3f8 drivers/serial/Kconfig: fix configure warnning
warning: (TTY_SIGINT) selects SIG_SIGKILL_ACTION which has unmet direct dependencies (SIG_DEFAULT)

Change-Id: Ied9899d18156742ce4998b40d53a481262dcd84a
Signed-off-by: ligd <liguiding1@xiaomi.com>
2021-03-06 17:35:56 +08:00
chao.an 19947e0414 net/tcp: correct the port byte order
1. correct the port byte order
2. Do not re-select the port if the local port has been bind()

Change-Id: Ia83f7d1aab5c2c0007eb4141fcdaa9ccaea3d319
Signed-off-by: chao.an <anchao@xiaomi.com>
2021-03-06 15:57:41 +08:00
chao.an c2707b2886 libc: fix compile warning
Makefile: 131: target 'bin/lib_strcpy.o' given more than once in the same rule
Makefile: 131: target 'bin/lib_strlen.o' given more than once in the same rule

Change-Id: I45b7640f7986895e4d406a1494616aba65a92453
Signed-off-by: chao.an <anchao@xiaomi.com>
2021-03-06 13:27:14 +08:00
chao.an 92baf97625 sim: add fluoride config into etc
Change-Id: I08958d352b0e2f85524fac5599e6bb8be7acd240
Signed-off-by: chao.an <anchao@xiaomi.com>
2021-03-05 22:35:38 +08:00
Huang Qi ab81410372 libc/machine: introduce memchr/memmove/memset/strlen from newlib for armv7-m
N/A

Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
Change-Id: If901402e3dc4e6776521ac18fcd2c61e06e6493b
2021-03-05 18:34:49 +08:00
Jiuzhu Dong 817bf3b28b sched/wqueue: don't distinguish between primary thread and other thread.
N/A

Change-Id: Ibcdf0738a330d352200b97aa38b04d943af369e2
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-03-05 16:01:23 +08:00
Jiuzhu Dong 46a3d95047 telent: fix crash about telnet client connect
N/A

Change-Id: I9afa15a3d8848e77a70f33f5429b6942e6cf8773
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-03-05 10:33:18 +08:00
Huang Qi 7bb419dae1 libc/machine: Use strcmp from newlib for better performance
N/A

Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
Change-Id: Idbdea04f748243fb9baf7b39d0ed997f7e9a8e3c
2021-03-04 16:44:13 +08:00
Xiang Xiao 5aa9333731 mtd/progmem: Add up_progmem_read callback guarded by ARCH_HAVE_PROGMEM_READ
since sometime platform code need do some special action during memcpy

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: Id108ef4232376feab3e37e9b3aee9a7927a03bd4
2021-03-04 11:54:59 +08:00
Xiang Xiao af81097850 mtd/progmem: Let MTD_PROGMEM depend on ARCH_HAVE_PROGMEM
and remove the reference of CONFIG_ARCH_HAVE_PROGMEM from code

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I89a73f138d54718ee8bc9345958675d7a2a34ba8
2021-03-04 11:51:25 +08:00
Huang Qi 9fce262860 libc/machine: Use memcpy from newlib for better performance
N/A

Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
Change-Id: Icf49b938e582e46c68a03852a3364c62e7f83976
2021-03-04 10:15:11 +08:00
dongjiuzhu1 4438681a51 mm/umm_heap: move memory-related api from libc/stdlib to umm
N/A

Change-Id: I4cf7f2586c8b476336e7d32e518b2c774e6ce746
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-03-03 22:24:49 +08:00
dongjiuzhu1 3615d34665 net/socket: delete config CONFIG_NSOCKET_DESCRIPTORS
N/A

Change-Id: I85c3fdb651fbe5e36540747be92ee75d652f984d
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-03-03 22:24:42 +08:00
dongjiuzhu1 bb65de6cae net: unify socket info file descriptor
MIRTOS-255

Change-Id: Iee680c8ac07fe87fb6e7900b4f792e0f1ff5036d
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-03-03 22:23:44 +08:00
ligd 49389e2695 mm/net/sched: fix warnings
Change-Id: I92db0e2cb7ff9e63eef8086a7cc084f67045d69c
Signed-off-by: ligd <liguiding1@xiaomi.com>
2021-03-03 19:26:43 +08:00
mage1 15fc1cb23f mm: add kconfig option to control the memory manger strategy choice.
since will will porvide more the one  strategy in future.

Change-Id: I73b900c6571f9b71b8239dd72006bdd0a68ee64d
2021-03-03 15:04:27 +08:00
chao.an 60f7f71e6c net/tcp: fix invaild application preload
Change-Id: Ifebe4c2715ccfc0e11d8b45792d51912f110d92e
Signed-off-by: chao.an <anchao@xiaomi.com>
2021-03-03 00:25:35 +08:00