Commit Graph

42768 Commits

Author SHA1 Message Date
ligd 5988732436 arm: add up_secure_irq support
Change-Id: Ibc9402dcef4045ca122da400940d57de6b508308
Signed-off-by: ligd <liguiding1@xiaomi.com>
2021-07-22 12:02:06 +08:00
ligd c4b1720b98 arch: add depends to trigger_irq
Change-Id: I334f625f8f1a6ebaa4fa5ea292de142a93120f51
Signed-off-by: ligd <liguiding1@xiaomi.com>
2021-07-22 12:02:06 +08:00
丁欣童 6805257488 fakesensor: transform ddmm.mmmm to dd.mmmmmm.
N/A

Signed-off-by: 丁欣童 <dingxintong@xiaomi.com>
Change-Id: I8c4b0e73ee20507721fe9bac13de1519fedf4807
2021-07-22 10:22:58 +08:00
Xiang Xiao cfee19f9a6 libc: Implement times function
https://pubs.opengroup.org/onlinepubs/009604599/functions/times.html

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: If2cccfedd532a77f86035d16d36d94ae38d8f09c
2021-07-21 19:50:54 +08:00
Xiang Xiao 84b11713be libc/sysconf: Implement the query of _SC_CLK_TCK
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I36a62d97b14ea06bbc2054ee96fd2319b2f6897c
2021-07-21 19:49:02 +08:00
Jiuzhu Dong 1c3fe27235 sensor: directly return -ENOTSUP without the set_interval or batch
implementation for lowerhalf driver.

Change-Id: I7b02e0331e5f8b89b39896049a9e24ce30116f8a
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-07-21 19:41:06 +08:00
chao.an f246c7e6ad net/socket: add SO_SNDBUF support
Change-Id: Ie7f82afd3a4c053112d15424499797eb046ed413
Signed-off-by: chao.an <anchao@xiaomi.com>
2021-07-21 11:43:00 +08:00
chao.an d58c9f1f47 net/wrb: add tcp/udp_inqueue_wrb_size() interface
Change-Id: Iccf2829e445d4842181cd6b8c0422cdfb35c498a
Signed-off-by: chao.an <anchao@xiaomi.com>
2021-07-21 11:42:11 +08:00
liuhaitao 332f2835a2 board/ctrl: correct BOARDIOC_USER command value
Change-Id: I3a8eb8c6c39516bbf24b1aee73312767c37158cd
Signed-off-by: liuhaitao <liuhaitao@xiaomi.com>
2021-07-20 22:26:17 +08:00
Jiuzhu Dong 8b4749f89f sim/rptun: optimize multi-core startup
Don't need to wait each other.

Change-Id: I6172823c84a96e4082fa5f33bdb05d7bd1d3b056
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-07-20 18:27:11 +08:00
Xiang Xiao a27f0defa8 sim/rptun: Trigger the callback only the sequnece number change
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I4fc8b876541ccb6ee12fa92145628eece0b90e3c
2021-07-20 17:59:53 +08:00
Xiang Xiao 6e5e9cf8a1 drivers/rptun: Start/stop remote processor in the background thread
to avoid blocking the main thread initialization process

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: Ib8ab2a661ee9540bb03d9d4d851a8d8ee212404e
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-07-20 17:55:28 +08:00
ligd 45f9a11b29 netdb: fix access within misaligned address error
netdb/lib_dnsquery.c:444:14: runtime error: member access within misaligned address 0xef2f5a1b for type 'struct dns_question_s', which requires 2 byte alignment
0xef2f5a1b: note: pointer points here
 63  6f 6d 00 00 01 00 01 c0  0c 00 05 00 01 00 00 00  1c 00 1a 05 6d 75 73 69  63 06 6e 74 65 73 35
              ^
netdb/lib_dnsquery.c:445:14: runtime error: member access within misaligned address 0xef2f5a1b for type 'struct dns_question_s', which requires 2 byte alignment
0xef2f5a1b: note: pointer points here
 63  6f 6d 00 00 01 00 01 c0  0c 00 05 00 01 00 00 00  1c 00 1a 05 6d 75 73 69  63 06 6e 74 65 73 35
              ^

Change-Id: Id20d1f2eed5aa5e78a42233de0f5f2b51876dd44
Signed-off-by: ligd <liguiding1@xiaomi.com>
2021-07-20 15:32:58 +08:00
YAMAMOTO Takashi 3bc0c152c5 iob_trimhead: fix an integer truncation
I guess this fixes https://github.com/apache/incubator-nuttx/issues/4181
2021-07-20 15:29:27 +08:00
ligd af8530f3fa socket_rpmsg: fix typepo
Change-Id: I7d75efd4f4b3c3ff1b0ecc020e81ac5a972eadb5
Signed-off-by: ligd <liguiding1@xiaomi.com>
2021-07-19 23:17:05 +08:00
Xiang Xiao 40661849d6 fs: mkdir return EEXIST if the path already exist
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: Ie1808697b860974367c17e0ba614ca5cae79f324
2021-07-19 21:13:49 +08:00
Xiang Xiao 681069bdcf fs/tmpfs: Handle the tail '/' correctly
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: Ia2beeaced2de9c38afefd92a2ddc13dfb4919c45
2021-07-19 21:13:49 +08:00
ligd 36ecaa87d1 ARM: fix CPSR corruption after exception handling
It seems to be caused by the corrupted or wrong CPSR restored on return
from exception. NuttX restores the context using code like this:

    msr spsr, r1

GCC translates this to:

    msr spsr_fc, r1

As a result, not all SPSR fields are updated on exception return. This
should be:

    msr spsr_fsxc, r1

This bug has been fixed by Heesub Shin in:
343243c7c0

Change-Id: Ibc64db7bceecd0fb6ef39284fb5bc467f5603e2e
2021-07-19 20:48:00 +08:00
Jiuzhu Dong dc1c7a644a wqueue: delete sem_wait to avoid race condition
when work_cancel was called, we need to check work.timer whether is active
by WDOG_ISACTIVE for work_queue with delay.

The wdog cb has not been executed when the flag:active is cleared
and if we check flag:active at this moment, WDOG_ISACTIVE will return false.
so the work_cancel will sem_wait until post a semaphore, but all free hpwork_thread
also wait this semphore and their priority are high than caller, this will be a race
condition causing thread/task of calling work_cancel block.

Change-Id: Id86289da60bf967d1062c1cdaaf6959b4f6dd054
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-07-19 20:20:47 +08:00
丁欣童 932926d0d7 Delete miwear soft link.
N/A

Move miwear boards file to vendor/xiaomi/miwear/boards,so this link is
not needed.

Signed-off-by: 丁欣童 <dingxintong@xiaomi.com>
Change-Id: I39754ca6399dec8e87137fd4304347545988b0af
2021-07-19 17:50:34 +08:00
Huang Qi 6cd0fad4ae sched: Move tls_ndxset_t & tls_dtor_t to tls.h
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2021-07-19 13:55:30 +08:00
Jiuzhu Dong eb6dd4fdc7 userspace/wqueue: move exclusive access lock to mqueue inside
Change-Id: I885d5641bc81fedf698c241d4719cb3561700f17
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-07-19 11:40:44 +08:00
Huang Qi 09630961b3 sched: Remove unused TLS member from task_group_s
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2021-07-19 09:53:09 +08:00
Xiang Xiao e5c60da2f5 fs: Simplify sendfile implementation
and avoid call nx_ file API in the kernel space

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: Id951ca161df2c2ee267dc4b5a0d7dfa67df4c1e6
2021-07-17 04:58:40 -07:00
Xiang Xiao be0b910f86 net: Add file_socket function
and move the socket special process from fstat/nx_vfcntl/ to file_fstat/file_vfcntl

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: Ia10341538488ba3a8444df8e73fb5257b2a1f512
2021-07-17 04:58:40 -07:00
Jiuzhu Dong bd1a7259fa sim/cmdline: save boot cmdline
Change-Id: I989850a09528e3868957284c9f419d0992ae8d1f
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-07-17 14:02:07 +08:00
Xiang Xiao e6d9be25b4 arch/sim: The second CPU shouldn't call up_irqinitialize
since the signal handler the process concept

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-07-17 13:34:06 +08:00
Xiang Xiao 5589ad406a arch: Fix rtcb can't found error
use the same condition check in declaration and reference

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I7b05316e914708fceeddac394d784ee3720a3c1b
2021-07-17 13:33:20 +08:00
Xiang Xiao 91518c7bf9 fs: should only apply umask to the userspace caller
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I608e3107aaf3d85045958163a742a1ef1107de91
2021-07-17 13:32:53 +08:00
Xiang Xiao e194867de4 arch/sim: Remove the unused sim_host_timer_handler
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: Icacbe74308580b7fc2449cdf9e41f85fce43d5a4
2021-07-16 23:17:10 +08:00
ligd 055079e948 sched: fix build break on spin_lock_irqsave()
Change-Id: Ibfa95021964f44a714cf504fbd0f491b9d8a18c3
Signed-off-by: ligd <liguiding1@xiaomi.com>
2021-07-16 16:19:11 +08:00
ligd 9b6665b9e9 sched/signal: add spinlock to g_sigfreeaction
To avoid nxsig_alloc_action() & nxsig_release_action() competition

MIRTOS-800

Change-Id: I6091ed9d6425a382e8c41351817b6d5ea06638f1
Signed-off-by: ligd <liguiding1@xiaomi.com>
2021-07-16 11:54:06 +08:00
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