Commit Graph

42112 Commits

Author SHA1 Message Date
Xiang Xiao 82c17fd6fa 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 10:35:15 -03:00
Xiang Xiao a0f2f6c362 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-14 10:35:15 -03:00
Xiang Xiao 0148e1d501 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 10:35:15 -03:00
YAMAMOTO Takashi 09f3a1ec8e tcp_send_buffered: throttle IOB allocations for send
Consider a bi-directional TCP connection:

1. we use all IOBs for tx queue
2. we advertize zero recv window because we have no free IOBs
3. if the peer tcp does the same thing,
   both sides advertize zero window and can not drain the tx queue.

For a similar stall to happen, the peer doesn't need to be
a naive tcp implementation like nuttx. A naive application blocking
on send() without draining its read buffer is enough.
(Probably such an application should be fixed to drain rx even
when tx is full. However, it's another story.)

This commit avoids the situation by prevent tx from grabbing
the all IOBs in the first place. (assuming CONFIG_IOB_THROTTLE > 0)
2021-07-14 15:08:18 +08:00
ligd 136662f5f9 serial: add ctrl+@ to force crash system for debugging
Change-Id: Iee65ac6c94ff298cfadf4429936b3744c16b8698
Signed-off-by: ligd <liguiding1@xiaomi.com>
2021-07-13 14:45:09 -03:00
Xiang Xiao c1250dcbd1 sim/nsh: Enable CONFIG_FS_RAMMAP
to catch the ram map related build issue

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-07-13 14:39:14 -03:00
Xiang Xiao 1f3a8b5adf 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>
2021-07-13 14:39:14 -03:00
Abdelatif Guettouche e2705cd86c boards/xtensa/esp32: Add license headers to the linker script files and
correct some old names.

Signed-off-by: Abdelatif Guettouche <abdelatif.guettouch@espressif.com>
2021-07-13 10:24:42 -07:00
Fotis Panagiotopoulos 7f361daf60 lpc17_40: style fix in WDT definitions. 2021-07-13 08:32:42 -07:00
Xiang Xiao 30135b5f18 vfs: stat_recursive should return -ENOSYS if stat callback is NULL
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: Ic342b6fff112d24c7355ddc8aa0937dfc544f1b4
2021-07-13 11:32:52 -03:00
Xiang Xiao d539998446 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-13 10:05:50 -03:00
Michal Lenc 3d26c3efb6 fix nxstyle errors and warnings
Signed-off-by: Michal Lenc <michallenc@seznam.cz>
2021-07-13 09:55:29 -03:00
Michal Lenc cafcb0508f Documentation/platforms/arm/imxrt: added information regarding tickless mode support
Signed-off-by: Michal Lenc <michallenc@seznam.cz>
2021-07-13 09:55:29 -03:00
Michal Lenc 28ad7b6376 boards/arm/imxrt/teensy-4.x: update pikron-bb configuration to use tickless mode
Signed-off-by: Michal Lenc <michallenc@seznam.cz>
2021-07-13 09:55:29 -03:00
Michal Lenc b2a9f853e8 arch/arm/src/imxrt: added support for Tickless OS
Signed-off-by: Michal Lenc <michallenc@seznam.cz>
2021-07-13 09:55:29 -03:00
chao.an 83f7c08f65 net/tcp: only print the error when disable the TCP_NODELAY
Since we do not have the Nagle's algorithm,
the TCP_NODELAY socket option is enabled by default.

Change-Id: I0c8619bb06cf418f7eded5bd72ac512b349cacc5
Signed-off-by: chao.an <anchao@xiaomi.com>
2021-07-13 09:44:19 -03:00
chao.an 80bfe13b54 drivers/rptun: replace the notification mech from signal to semaphore
Change-Id: Ic06b945effa876f5aff2f8ddc1fe5775c75f77b1
Signed-off-by: chao.an <anchao@xiaomi.com>
(cherry picked from commit 8df58e5675cab032da16e371c4686929a19ee897)
2021-07-13 09:44:00 -03:00
Huang Qi 73a0c1d095 libc/string: Skip compile the c version when the optimization is enabled
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
Change-Id: Idbdea04f748243fb9baf7b39d0ed997f7e9a8e3c
2021-07-13 09:42:23 -03:00
Masayuki Ishikawa fec3bb2a0c boards: esp32-devkitc: Update wapi_smp/defconfig
Summary:
- This commit adds several configs to test Wi-Fi networking

Impact:
- wapi_smp only

Testing:
- Tested with nfsmount, telnet, ping, webserver
- telnet + ping, nfsmount + ping work
- NOTE: nfs + telnet stress test might stop

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2021-07-13 05:12:40 -07:00
Virus.V 063e1d6b74 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-13 05:12:12 -07:00
Virus.V 4e950c3e30 risc-v/bl602: add boardctl support
Signed-off-by: Virus.V <virusv@live.com>
Change-Id: I74280f5cb801e923fb987009ae007aa02677b14d
2021-07-13 02:50:40 -07:00
Sara Souza 48f2b10ee3 risc-v/esp32-c3: Use systimer 0 to RTOS TICK 2021-07-12 21:03:27 -07:00
Sara Souza c7bf5c7a1d xtensa/esp32: Make UART TX DMA depends on EXPERIMENTAL and adds caveats regarding its use 2021-07-12 21:03:06 -07:00
Sara Souza 2abeba041d xtensa/esp32: Fixes termios issue. 2021-07-12 21:02:26 -07:00
zhouliang3 f230ba7b34 Increase the function of crc8 to use custom polynomials
N/A

Signed-off-by: zhouliang3 <zhouliang3@xiaomi.com>
Change-Id: I3c53bf25541c1811a05d025b39dfe24cb0613b72
(cherry picked from commit 07b2bd769e)
2021-07-12 20:33:21 -07:00
Xiang Xiao c3c4053263 fs/profs: Add ordblks in meminfo_progmem
forget in commit:
Author: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
Date:   Wed Apr 28 11:05:20 2021 +0800

    cmd/free: add nused/nfree field in command free

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-07-12 16:49:56 -03:00
Xiang Xiao 7ef29ecce6 profs: Print StackAlloc by procfs_snprintf
since snprintf return the wrong number in case of insufficient buffer

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-07-12 16:49:56 -03:00
Huang Qi e5c278981a net: Rename IP_TTL to IP_TTL_DEFAULT
Since a SOL option IP_TTL exist, we should rename this IP_TTL
in netconfig.h to avoid confusion.

Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
Change-Id: Ib04c36553f23bce8d362e97294a8b83eaa050cf3
2021-07-12 16:30:37 -03:00
Huang Qi c303a12f26 include/netinet: Add missing IP_TTL definition
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
Change-Id: Ic0c4bcb840952a4ccf7f262306ba0c3d43e01811
2021-07-12 16:30:37 -03:00
chao.an 80b7394a95 sys/poll: add POLLRDHUP definition
Change-Id: I1117279d9a620138789256d699ae32d47eab3a90
Signed-off-by: chao.an <anchao@xiaomi.com>
2021-07-12 16:13:40 -03:00
chao.an a018a3a26b bluetooth/filter: add more OGF definition
Change-Id: I4f1b98dc63ab2d9eeb523b8040aae88ea285bb9a
Signed-off-by: chao.an <anchao@xiaomi.com>
2021-07-12 16:13:15 -03:00
Peter Bee 695935217b libc/sysconf: Add MONOTONIC_CLOCK for consistency
MIRTOS-107

Add _SC_MONOTONIC_CLOCK to sysconf when CONFIG_CLOCK_MONOTONIC is set

Change-Id: I0ae57798ebe89247a10ccb517e128866d1f907de
Signed-off-by: Peter Bee <bijunda1@xiaomi.com>
2021-07-12 16:07:25 -03:00
zhanghu 36db69af96 nuttx net warning:cancel the conflict between weak and inline in unwind_arch_adjustment 2021-07-12 11:27:50 -03:00
zhanghu 7b0347c66c nuttx net warning:add initialization of pointer *aiocbp in lio_listio
Change-Id: I0ac7571ca27191b69acdc31f5bc07943c4d87e58
2021-07-12 11:27:50 -03:00
hujie1 025bddfc6c nuttx: littlefs_close should return value bugfix
N/A

Change-Id: I5fea016fe01ac0e87ddeabdae67d36ab4125ea55
2021-07-12 10:05:49 -03:00
Dong Heng f5eaf82c93 risc-v/esp32c3: Use onexit to free thread private semaphore 2021-07-12 09:38:21 -03:00
Xiang Xiao 906cb8b0f4 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-12 05:20:45 -07: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
Fotis Panagiotopoulos 61cb524fa2 lpc17_40: Fixed progmem driver. 2021-07-09 21:49:16 -07:00