Commit Graph

42736 Commits

Author SHA1 Message Date
ligd 37c86a6510 socket_rpmsg: fix recv block when remote close early
MIRTOS-849

Change-Id: Id9ff88099bdc0efb27d64ffa8e407f5a9dd40e33
Signed-off-by: ligd <liguiding1@xiaomi.com>
(cherry picked from commit 85b917e20869f415c847c37731c5745c7942a9fd)
2021-07-16 11:40:37 +08:00
Xiang Xiao 5d9a22a0bb arch/sim: Initialize the idle thread stack info correctly
and change the default value of IDLETHREAD_STACKSIZE to 65536

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: Ia54efbbca4b69706150bc4178844b316688a104e
2021-07-16 11:19:56 +08:00
Xiang Xiao 31e4067eed sched/init: initialize all idle thread's tl_task
since this patch forget to initialize the idle tls info:
commit 50c08bf45b
Author: Huang Qi <huangqi3@xiaomi.com>
Date:   Tue Jun 29 16:01:02 2021 +0800

    libc: Move pthread_key_destructor to task_info_s

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: If7d0c0118323fa3dcf44081d675cd57b14eba75a
2021-07-16 11:19:25 +08:00
Xiang Xiao 0cfc7f6b4a sched/init: Remove the unnessary CONFIG_SMP check
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I2afaf310b411993e37140b3d7977968a7fda5c3b
2021-07-16 11:19:18 +08:00
Xiang Xiao 3f86e553f9 fs: Move umask to task_info_s
and implement the related semantic correctly

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I0587341e2c505e41b5e24e55dba039ed200d65f2
2021-07-16 11:16:10 +08:00
ligd ad829b749b socket_rpmsg: add lock to bind list, reject if list more than backlog
Change-Id: Ibdbe3d931d1b14601d9c5f3fb95cd87aacb4e5e1
Signed-off-by: ligd <liguiding1@xiaomi.com>
2021-07-15 23:54:14 +08:00
anjiahao b8eb7e36ed mq_msgqalloc:del check MQ_MAX_MSGS
N/A

Signed-off-by: anjiahao <anjiahao@xiaomi.com>
Change-Id: If43fdd937f23de24921f5a14072fa37d9d339c94
2021-07-15 20:32:03 +08:00
Jiuzhu Dong 57533c66c9 group/child_status: Dynamically expand group child_status
Change-Id: I4033e93b6adceb01eebe1c2a12ffe8737042b1a6
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-07-15 17:53:43 +08:00
丁欣童 793177639d sim:delete fakesensor init.
Because there are no csv file exit.

Signed-off-by: 丁欣童 <dingxintong@xiaomi.com>
Change-Id: Ia86c2a87a3553499715532f10796a8a328f2be50
2021-07-15 16:07:58 +08:00
haopengxiang 6de765342c delete small to big endian marco to avoid byte alignment
Change-Id: I24076bfeeae5b462756bcae9f166bce20ae4ad90
2021-07-15 15:33:59 +08:00
丁欣童 4bde7e277e Fakesensor: support gps by read nema csv.
N/A

Signed-off-by: 丁欣童 <dingxintong@xiaomi.com>
Change-Id: Ia0f32b7fcb433db8916699e87bf789fcb9e57196
2021-07-15 15:33:06 +08:00
anjiahao 8c057b46ab mq_open: add long file name check and parameter check
N/A

Signed-off-by: anjiahao <anjiahao@xiaomi.com>
Change-Id: Ie777cd38af86c3f25e818a1477996a5f0c1cc195
2021-07-15 14:29:47 +08:00
Jiuzhu Dong aba6f93b31 rptun: fix compile break when disable openamp
Change-Id: Ia7c96d10dc16c69ba973135080c71ab7b5f94395
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-07-15 13:43:13 +08:00
Xiang Xiao e47bf55ea1 sim/nsh: Enable the attributes and soflinks of pseduo file system
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I3cb610ab6325efae529b66d2168e6501aa20f25d
2021-07-14 23:33:43 +08:00
Xiang Xiao b7b96941b3 fs: Support the root file system attributes(mode, uid, gid and time)
Note: all attributes is guarded by PSEUDOFS_ATTRIBUTES to save the space

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I664d60382e356068fd920f08aca5b4a49d8d92a9
2021-07-14 23:33:43 +08:00
Virus.V 2859f5e972 risc-v/bl602: update wifi firmware and some fixup.
1. Added check for repeated connection wifi operations.
2. Invoke the carrier on/off operation in the wrong place.
3. The RTC initialization time is incorrect.
4. Reserve 32K I-Cache space in the linker script.
5. Increase the size of the wifi firmware receiving buffer.

Signed-off-by: Virus.V <virusv@live.com>
2021-07-14 19:51:01 +08:00
Virus.V ea236997ff risc-v/bl602: add boardctl support
Signed-off-by: Virus.V <virusv@live.com>
Change-Id: I74280f5cb801e923fb987009ae007aa02677b14d
2021-07-14 19:50:53 +08:00
Sara Souza 1ffe2e0ee7 risc-v/esp32-c3: Use systimer 0 to RTOS TICK 2021-07-14 19:50:39 +08:00
Dong Heng 685794b835 risc-v/esp32c3: Use onexit to free thread private semaphore 2021-07-14 19:50:32 +08:00
Xiang Xiao c556e62eba vfs: stat_recursive should return -ENOSYS if stat callback is NULL
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: Ic342b6fff112d24c7355ddc8aa0937dfc544f1b4
2021-07-14 19:45:15 +08:00
Xiang Xiao 51892dbf14 fs: fstat shouldn't follow the symbol link
since the decision is already done at open time(from path to fd)

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: Idc1df3c1d7fe60927b0643173f3f40895aaffd4c
2021-07-14 19:43:57 +08:00
Xiang Xiao 4e1f26700d wqueue: Fix unrefernce reference to `DEBUGASSERT'
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: Ia7450b93bfe8ed22d75efebcfb203b4b2e467da2
2021-07-13 21:40:46 +08:00
Xiang Xiao 35e0af812a Fix mmap compiler error when CONFIG_FS_RAMMAP equals y
fs_munmap.c:122:15: error: ‘struct fs_rammap_s’ has no member named ‘kernel’
fs_rammap.c:110:52: error: expected ‘:’ before ‘;’ token

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: Ia57b641d77fd296e6e75e8fd47c0f77b7b30157b
2021-07-13 21:40:15 +08:00
Xiang Xiao c4f3d2d296 Revert "[Boottime] add syslog info in system bootup stages"
This reverts commit b8423e9681.
2021-07-13 03:16:53 +08:00
Xiang Xiao fdf26974c2 Revert "print message with nwarn to avoid constantly printout."
This reverts commit 85d38b9348.

Change-Id: I49cb4b03d652430e3bc58cfa4ac6303701e417d1
2021-07-13 03:16:45 +08:00
Xiang Xiao 703a52475c boards/photon: Remove miot related config
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I7b5b402bfe1e1dd8a6998867c8a68dbf073548b1
2021-07-13 03:16:37 +08:00
Xiang Xiao a977ca1ca3 net/tcp: tcp_sendfile need restore the file location at the end
quote from https://man7.org/linux/man-pages/man2/sendfile.2.html:
If offset is not NULL, then it points to a variable holding the
file offset from which sendfile() will start reading data from
in_fd.  When sendfile() returns, this variable will be set to the
offset of the byte following the last byte that was read.  If
offset is not NULL, then sendfile() does not modify the file
offset of in_fd; otherwise the file offset is adjusted to reflect
the number of bytes read from in_fd.
If offset is NULL, then data will be read from in_fd starting at
the file offset, and the file offset will be updated by the call.

The change also align with the implementation at:
libs/libc/misc/lib_sendfile.c

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I607944f40b04f76731af7b205dcd319b0637fa04
2021-07-13 03:16:26 +08:00
Xiang Xiao c8f1eeed57 Merge commit '2e43815c929acb818b34a5ff8828494b0c6f6891' into dev
Change-Id: Idcbac12fec435abff01cfb4efd5a26a02eb08f93
2021-07-13 03:14:34 +08:00
yangjiukui eafc254e14 Fix: Sensor: Fix the use of ioexpander and delete redundant member of opt3006.
N/A

Add pull up when using SETDIRECTION; Using transformation replace pinset;
Delete i2c point in opt3006 device struct.

Signed-off-by: yangjiukui <yangjiukui@xiaomi.com>
Change-Id: I7e46d0cde878fbca325f89be47c57ff9b9456ff0
2021-07-12 15:30:37 +08:00
Xiang Xiao 2e43815c92 ea3131/pgnsh: Fix the follow linker error
ld: /github/workspace/sources/nuttx/nuttx section `.data' will not fit in region `locked'
ld: section .paged LMA [0000000011034000,0000000011040fa3] overlaps section .data LMA [0000000011033ff4,00000000110340e3]
ld: region `locked' overflowed by 228 bytes

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-07-11 19:42:30 -07:00
Jiuzhu Dong 9b1f554429 sched: Dynamically extend the pid hash table
Change-Id: I3a719bc575cd408cd530a39efa203f507b44fa9c
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-07-11 19:42:30 -07:00
Jiuzhu Dong bb867a38fc nx_start: Simplify and unify the partial initialization process
for both SMP and non-SMP

Change-Id: I0fea8b4f59fc27d253a2ef9b7503acbb7410cc14
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-07-11 19:42:30 -07:00
Jiuzhu Dong 85470176e7 sched/task: delete CONFIG_MAX_TASKS limit
Change-Id: I583015a95dbcebd352f81ecb3104ffdbd646a9ec
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-07-11 19:42:30 -07:00
SPRESENSE 2e80d5e38e libs/libc/math: Fix calculation error of log function
Fix a problem where the log function would loop infinitely by
calculation error when a specific value was passed. For example,
in the following case, the log function loops infinitely and
never returns. So, this commit fixes to return the right value.

  double a = 7883961.5;
  double b = log(a);
2021-07-10 12:28:34 -07:00
Xiang Xiao 5fe51b923a mm: Simplify the semaphore handling
1.Move all special process to mm_takesemaphore
2.Remove the support of recurive lock
3.Remove mm_trysemaphore function

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: Ie216a6294ab67c5d427f31b089beb15c532f08fe
2021-07-10 16:10:32 -03:00
ligd f5279f8583 sim: fix loop add delaylist when mm_free in IDLE thread
Change-Id: I1827c663275f47c9dc30d63e17e3d016b0000166
Signed-off-by: ligd <liguiding1@xiaomi.com>
2021-07-10 16:10:32 -03:00
danguanghua 92210cbdcb arch/sim: enable nxlooper
N/A

Change-Id: Ib8b98e90fa05b035e88dea000818f0f745af6b10
Signed-off-by: danguanghua <danguanghua@xiaomi.com>
2021-07-10 15:31:29 -03:00
Jiuzhu Dong 0c3cb0cb66 syslog: optimize init logic for early buffer initialize
N/A

Change-Id: I3295803977fa51e8ed8dedf7f0966b9604f8204d
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-07-10 11:10:13 -07:00
Jiuzhu Dong 4bb48892d0 ramlog: init head and tail when buffer is empty on boot
N/A

Change-Id: I6963ef6256c3a93ac7a63115c303033ceafa321f
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-07-10 11:10:13 -07:00
Jiuzhu Dong c8ce33c634 syslog/intbuf: output log when syslog interrupt buffer is full
N/A
instead of adding overrun memssage:"[truncated]\n" to the end.

Change-Id: Ie27cdf0ca902d9ba203619a95162f01222e371c5
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-07-10 11:08:59 -07:00
SPRESENSE 012158cce8 libc/math: Add fmax and fmin functions
Add fmax and fmin functions.
- fmax, fmaxf, fmaxl
- fmin, fminf, fminl
2021-07-10 11:00:07 -03:00
mage1 fc3920904e mm: Add dmalloc wrapper layer and enable dmalloc module.
Change-Id: I83fe5e275215946d5962379fc7aad882724741f2
2021-07-10 05:04:56 -07:00
Xiang Xiao 0961be771a mm: Simplify the semaphore handling
1.Move all special process to mm_takesemaphore
2.Remove the support of recurive lock
3.Remove mm_trysemaphore function

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: Ie216a6294ab67c5d427f31b089beb15c532f08fe
2021-07-10 05:02:33 -07:00
Xiang Xiao 49a4cfd8aa fs: Remove the inernal st_count field from struct stat
it's more simple to reuse the resolve argument as the recursive count

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I826b2fef3af8b12aae230e4766ab09f8de988f8a
2021-07-10 04:37:16 -07:00
Xiang Xiao 8692c316ff libc: Implement futimes on top of futimens
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: Ie54de66ca1bc26a68f2922861e1edd1fdabb8f33
2021-07-10 19:33:18 +08:00
Xiang Xiao b47cdeb910 libc: Implement utime on top of utimes
https://man7.org/linux/man-pages/man2/utime.2.html

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: Ia10574fdd0d07eabbc93aceeea5a0b953e30339a
2021-07-10 19:32:48 +08:00
Xiang Xiao a7c2343c32 libc: Move the declaration of futimens from sys/time.h to sys/stat.h
to follow the spec here:
https://pubs.opengroup.org/onlinepubs/9699919799/functions/futimens.html

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: Id8e418794bd43827c01af772ce704a8d3e7681c5
2021-07-10 19:22:58 +08:00
Xiang Xiao 5398821b6c fs: pseudorename should call inode_release in the error path
to avoid the memory leak

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I8f7e4c8fb89188614d03dcf383a1707f25c65174
2021-07-10 19:21:25 +08:00
Fotis Panagiotopoulos 61cb524fa2 lpc17_40: Fixed progmem driver. 2021-07-09 21:49:16 -07:00
Alexander Lunev 9e27888938 bcm43xxx: supported IW_AUTH_CIPHER_NONE mode 2021-07-09 21:34:05 -07:00