Commit Graph

41839 Commits

Author SHA1 Message Date
Xiang Xiao 8ae0e1759e arch: Colorize the idle thread stack in an unified way
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: Idae8da53e5a4799a8edc0e882f17fd515b70cb14
2021-06-11 11:37:32 +08:00
Xiang Xiao 35035f5c89 arch: Rename xxx_getsp to up_getsp
All modern desgin support stack pointer and it's also an
important information, so let's standardize this interface.

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-06-11 11:37:19 +08:00
chao.an 4926a50aea arch: adjust idle stack offset to reserve space of stack info
Change-Id: I41db7765b81796b3dfaa3db44a3f67bab57a6384
Signed-off-by: chao.an <anchao@xiaomi.com>
2021-06-09 23:22:02 +08:00
chao.an 0d960286a6 Revert "arch: adjust idle stack offset to reserve space of stack info"
This reverts commit 91dbb26153.
2021-06-09 23:21:56 +08:00
chao.an 28363bf9a8 net/accept: alloc the accept fd after accept success
Change-Id: Ib174b510e5be359197db575a9b7b5aceea97665d
Signed-off-by: chao.an <anchao@xiaomi.com>
2021-06-09 23:09:08 +08:00
chao.an 2152a35662 net: fix build break
Change-Id: I662580ded8d1c98ddcfbcfae961978eb3512e3b9
Signed-off-by: chao.an <anchao@xiaomi.com>
2021-06-09 22:07:45 +08:00
chao.an af44043ec0 net: add support of FIONREAD
Change-Id: Iebfdd960f4e9b184558e390f78ec7f8369753b5b
Signed-off-by: chao.an <anchao@xiaomi.com>
2021-06-09 09:47:59 +08:00
chao.an 600671fe86 netinet: move the byte ordering convert functions to "netinet/in.h"
Change-Id: Ida4916fe062f20258dbbcd794e59e686d4d5c35e
Signed-off-by: chao.an <anchao@xiaomi.com>
2021-06-08 22:21:58 +08:00
chao.an 2fd5872449 mm/iob: add iob_get_queue_size() helper
Change-Id: I117530f364cbef1e011638ff6d14087b7447bde7
Signed-off-by: chao.an <anchao@xiaomi.com>
2021-06-08 11:57:52 +08:00
Jiuzhu Dong f0ba04eb2b syslog/ramlog: write zero for the overwrite area
N/A

Change-Id: I8f8d8c53e77ee9d916cb97ea7cd3e988fbbe9ad2
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
(cherry picked from commit 4d8124a28048ea7ba7717d999553028e5384d631)
2021-06-07 10:09:52 +08:00
Jiuzhu Dong 47f09e2a18 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-06-04 13:46:45 +08:00
Xiang Xiao 3c33d253b4 drivers/syslog: Remove emergstream implementation and caller
since emergstream always call syslog_force, but syslog_force is designed
for the interrupt context, and then doesn't mean any emergency thing.
On the other hand, emergstream has other bad side effect:
1.Can't output to file or dev channel
2.Can't work well with the interrupt buffer

Change-Id: I1c7af74f82da93ffa4ebe0e6ac25634aeb73a890
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-06-04 13:46:41 +08:00
chao.an e223790148 serial/uart/h4: add bt h4 uart serial driver
Change-Id: I456622ce097006447cc8b050e4a44ee96865ddfe
Signed-off-by: chao.an <anchao@xiaomi.com>
2021-06-03 18:33:20 +08:00
chao.an 8f0cc709d4 wireless/bluetooth: decoupling bt_driver_s and bt_buf_s
Change-Id: I12879c364cf8ca63898da94621e94d8fc23a4f6f
Signed-off-by: chao.an <anchao@xiaomi.com>
2021-06-03 18:33:14 +08:00
chao.an e9954c80dd arch/sim: remove BT uart implement
Change-Id: Ic9ea51116ba46cb667eae0ea151f69079f9f05ab
Signed-off-by: chao.an <anchao@xiaomi.com>
2021-06-03 18:32:49 +08:00
chao.an 91dbb26153 arch: adjust idle stack offset to reserve space of stack info
Change-Id: I064b6dfcfa5152e58ad2dba98021b1aa37c98b7e
Signed-off-by: chao.an <anchao@xiaomi.com>
2021-06-03 17:31:05 +08:00
liuhaitao 622c4593f1 buildinfo.sh: update ro.build.version and ro.build.id macros
Change-Id: Iee74ba0ae3d5acf13867330ac076f44f5bb1ee31
Signed-off-by: liuhaitao <liuhaitao@xiaomi.com>
2021-06-02 15:12:22 +08:00
liuhaitao 78b51550c3 buildinfo.sh: add ro.build.id support
ro.build.id used by velaos build version since ro.build.version
used by miai version build.

Change-Id: I317c50d130ef386fdfa3569fdd5552982ab0a62f
Signed-off-by: liuhaitao <liuhaitao@xiaomi.com>
(cherry picked from commit bbd72a9b4f51e065451cf5bfef3e0a2dcd0e16f6)
2021-06-02 15:11:31 +08:00
丁欣童 4d6c30465b Add config of kconfig to set cpp version.
N/A

Signed-off-by: 丁欣童 <dingxintong@xiaomi.com>
Change-Id: Ie6c6df4e94b42978b68b9aa29afcb8b8fa82c8ca
2021-06-01 20:13:15 +08:00
chao.an df71da9450 bluetooth/filter: add more OGF into ble blacklist
Change-Id: I4f1b98dc63ab2d9eeb523b8040aae88ea285bb9a
Signed-off-by: chao.an <anchao@xiaomi.com>
2021-05-31 21:00:01 +08:00
chao.an 438774a560 bluetooth: fix exclusive deadlock on high priority thread
Change-Id: I0653374507b4372dce1ec1274b38da72f3ac6f03
Signed-off-by: chao.an <anchao@xiaomi.com>
2021-05-31 21:00:01 +08:00
panran 4525cfde3d nuttx:Correct code comment errors
N/A

Signed-off-by: panran <panran@xiaomi.com>
Change-Id: I9c9fa0855ae7851b7268a7ace6b5a86d5562a6b1
2021-05-31 20:01:46 +08:00
liuhaitao 13f2aa3d35 build.sh: correct board for sdk since custom boards used now
Change-Id: Ib920048966ed1b17cd0ff4c5533ec4e915fb52a9
Signed-off-by: liuhaitao <liuhaitao@xiaomi.com>
2021-05-28 14:05:42 +08:00
chao.an caecd75b41 wirelss/bluetooth/bt_buf: add ISO buffer type
Change-Id: I9de3506e9c8f70bbcefafda3319be194dcb7cb0b
Signed-off-by: chao.an <anchao@xiaomi.com>
2021-05-25 21:56:12 +08:00
chao.an 1b4e9fc7da net/dev: link the net device as order of registration
Change-Id: Idd5cc1e1ab01cd0e77d4ca4b7c4ed08b52d668a2
Signed-off-by: chao.an <anchao@xiaomi.com>
2021-05-25 21:53:36 +08:00
Jiuzhu Dong 78f4220106 syslog: set default value for SYSLOG_DEFAULT based on the usage of other syslog channels.
N/A

Change-Id: I702a7e3d4fee2f17419a8b7e184b2646b871b64a
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-05-25 15:22:10 +08:00
liuhaitao 034fa07b2f Revert "tools/mkdeps: generate the full path dependencies"
Revert it to make distclean rightly.

This reverts commit b26784fc05.

Change-Id: Ib389830c026c6907f6b31d01e3129902e96699ed
2021-05-21 16:19:19 +08:00
Jiuzhu Dong 418923540d syslog/ramlog: initialize g_sysdev based on the current ramlog buffer
N/A
by ramlog_initbuf();
Algorithm: Scan the entire ramlog buffer, the position of the head
is the first byte is not empty and second byte is empty. The position
of the tail is the first byte is empty and second byte is not empty.

Change-Id: Ieb9161bd670481cd335e9a901287cd5e589f0849
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-05-20 22:28:11 +08:00
Jiuzhu Dong e318b040f8 syslog/syslog_channel: fix compile warning
N/A

syslog/syslog_channel.c: In function ‘syslog_default_putc’:
syslog/syslog_channel.c:139:10: warning: implicit declaration of function ‘up_putc’ [-Wimplicit-function-declaration]
  139 |   return up_putc(ch);
      |          ^~~~~~~

Change-Id: I30f607c000fefc6a1189397e6ae2320c562a67ec
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-05-20 22:04:25 +08:00
Jiuzhu Dong bd10e5716d syslog/ramlog: save ramlog to fixed section
N/A

we can reload ramlog after hot reboot.

Change-Id: Iee7c105a2358075302121d6bf0047bc54d07e9a6
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-05-20 20:06:38 +08:00
Jiuzhu Dong d2e9d1bf02 syslog: fix bug for support multi syslog channel
N/A

Change-Id: I6d8b5bce8071f11b1903fe1fa0fe8dbc34bf3a09
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-05-20 20:03:37 +08:00
Jiuzhu Dong 36a0dae82a syslog: support ramlog, up_putc, rpmsg_syslog coexist
N/A

Change-Id: Ia58c7e195da7ad48f3018a131a78b2f01f94e741
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-05-20 11:04:39 +08:00
Xiang Xiao 191e010c5f include/spawn.h: Add POSIX_SPAWN_SETSID definition
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I7ad654a1cb9b74a9f27f52c88fffa8b487a48f33
2021-05-17 20:03:49 +08:00
Xiang Xiao 88326eac8d libc/pwd: Add NSS_BUFLEN_PASSWD macro
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I739679038b2004cc45d78f540831ba81b088a586
2021-05-17 19:58:28 +08:00
Xiang Xiao 6bb3366fe2 libc: Implement openpty function
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I36e02af0145cd6e740766e7484cc9d5ce410e5e4
2021-05-17 19:58:06 +08:00
Xiang Xiao 874e564c89 drivers/serial: Change the default value of SERIAL_NPOLLWAITERS to 4
since the console is normally opened three time as stdin, stdout and
stderr and remove the dependence on STANDARD_SERIAL because other type
of serial drivers also support the poll through the same codebase.

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: Ie68322c4647cc838b295491329969869d6ba310b
2021-05-17 19:55:40 +08:00
chao.an 9b94919996 sim/bringup: enable uart bridge
Change-Id: Ib843db54ef0d82e9e808663f5f415123c59b0755
Signed-off-by: chao.an <anchao@xiaomi.com>
2021-05-14 11:54:40 +08:00
Jiuzhu Dong 3c58f96ddb group/group_signal: cancel dispatch signal when the number
MIRTOS-647

of members in the group is zero.

Repetition step:
If using waitpid() to wait a task has exited, the waitpid will use
nxsing_kill with signal number 0 to determine if that task is still
alive, and will call group_signal to dispatch signal for each member
of the group and perform signal handing checks, it will assert at
sched/group/group_signal.c:261.

Change-Id: I75ef015a261101277436d742897ce68fed44b5da
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
(cherry picked from commit 73008471e4e4a5b1e3aa6cc0d25b5295aec32bb1)
2021-05-12 17:50:38 +08:00
liuhaitao cc2966faa6 net/arp: fix merge error in upgrade nuttx-10.1
Change-Id: I397ef438b7bef1f6fa1d30d2edb5713cc2bf0d34
Signed-off-by: liuhaitao <liuhaitao@xiaomi.com>
2021-05-12 16:37:40 +08:00
Jiuzhu Dong 639c2c5cb2 syslog/Kconfig: support config multi syslog channel
N/A

delete choice for select syslog log device

Change-Id: Ifc02e687526506afac46febec375062949869356
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
(cherry picked from commit 795f2d56dad1f30fd23ae1868226ee8379fd4f93)
2021-05-12 13:08:40 +08:00
Jiuzhu Dong 9b4b8cb0ee sched/init: don't check remain stack for idle task
N/A

Change-Id: I0bd5808efabd395157d2530f2423b18f0c1eeabd
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-05-11 21:51:15 +08:00
zhanghu cfcef34ad6 nuttx net warning:add initialization of pointer *aiocbp in lio_listio
nuttx net warning:cancel the conflict between weak and inline in unwind_arch_adjustment

Change-Id: I0ac7571ca27191b69acdc31f5bc07943c4d87e58
2021-05-11 15:21:43 +08:00
Dong Heng 2af7861b31 riscv/esp32c3: Fix SPI Flash driver internal chip data address error
"g_rom_flashchip" is not in fixed address between all ESP32-C3's different versions.
2021-05-10 19:23:33 +08:00
Gustavo Henrique Nihei 16dd2260f1 risc-v/esp32c3: Uniformize alignment for assembly instructions 2021-05-10 19:23:33 +08:00
Gustavo Henrique Nihei 6b5fe76506 risc-v/esp32c3: Improve interrupt handler documentation 2021-05-10 19:23:33 +08:00
Gustavo Henrique Nihei f948f9fa8d risc-v/esp32c3: Reorder register restoration on interrupt handler epiloque 2021-05-10 19:23:33 +08:00
Gustavo Henrique Nihei 401a1bf751 risc-v/esp32c3: Fix wrong references to ESP32 2021-05-10 19:23:33 +08:00
Gustavo Henrique Nihei a4b24762ea boards/esp32: Allocate .noinit in a dedicated section 2021-05-10 19:23:33 +08:00
Gustavo Henrique Nihei 2bb2d2bc0d boards/esp32c3-devkit: Allocate .noinit in a dedicated section
Previously it was being allocated into .bss section after the _ebss
address. Although functional, this is not intuitive.
2021-05-10 19:23:33 +08:00
Gustavo Henrique Nihei 5a76c52ae2 arch/risc-v: Fix stack alignment according to calling convention
The RISC-V Integer Calling Convention states that the stack pointer
shall always be aligned to a 128-bit boundary upon procedure entry, both
for RV32* and RV64* ISAs (exception to the RV32E ISA, which must follow a
specific convention)
2021-05-10 19:23:33 +08:00