Commit Graph

5370 Commits

Author SHA1 Message Date
Xiang Xiao
fb92621962 drivers/mmcsd: Add RPMB ioctl
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-01-05 11:23:27 -03:00
raiden00pl
a8ca1ec026 SocketCAN: add CAN error definitions 2022-01-05 18:32:46 +08:00
raiden00pl
09ae15755e include/nuttx/can/can.h: fix typo 2022-01-05 18:32:46 +08:00
chao.an
cbe9352f41 net/usrsock: remove the connections limit
replace xid type to uint64_t to avoid connections limit

Signed-off-by: chao.an <anchao@xiaomi.com>
2022-01-05 12:38:42 +08:00
Jiuzhu Dong
6ec006ee02 socket: extend socket_storage for rpmsg_socket addrinfo
rexecd.c: In function 'rexecd_main':
rexecd.c:191:9: warning: array subscript 18 is outside array bounds of 'struct sockaddr_storage[1]' [-Warray-bounds]
  191 |         snprintf(((FAR struct sockaddr_rpmsg *)&addr)->rp_name,
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  192 |                  RPMSG_SOCKET_NAME_SIZE, "%d", REXECD_PORT);
      |                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
rexecd.c:142:27: note: while referencing 'addr'
  142 |   struct sockaddr_storage addr;

Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2022-01-05 02:05:49 +08:00
Xiang Xiao
828f04f0e5 sdio: Move sdio utils functions to drivers/mmcsd
so all sdio client driver can reuse them

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-01-04 17:44:24 +01:00
Petro Karashchenko
6c2b40f98a typos: fix typos in many files
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2022-01-03 22:10:07 +08:00
raiden00pl
43ddcd5277 include/nuttx/can.h: include nuttx/config.h 2022-01-03 08:52:49 -03:00
Xiang Xiao
902d2197b0 vnc: Decouple VNC server from NX graphic stack
since VNC server is very useful even without NX:
1.Replace nxgl_coord_t with fb_coord_t
2.Replace nxgl_rect_s with fb_area_s
3.Remove nxgl_xxx function call

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-01-03 11:19:32 +08:00
ligd
75aec04330 serial: add CONFIG_TTY_LAUNCH support
this allow user start new program from tty

Signed-off-by: ligd <liguiding1@xiaomi.com>
2022-01-01 20:38:26 +08:00
Huang Qi
3870b2ecc8 drivers/serial/uart16550: Support 64bit platform
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2021-12-31 11:09:25 +08:00
Matthew Trescott
2159315571 can: WIP: Cleanup usage of soft fifo semaphore 2021-12-30 17:39:26 +08:00
Norman Rasmussen
df956b08f2 Ensure that sethostname null terminates the hostname correctly
commit e1c306f2dd added sethostname using
strncpy. This replaces it with strlcpy and uses sizeof() instead of
re-calculating the buffer size.

Rename size argument for get/sethostname to match the implementation
2021-12-30 01:13:22 +08:00
Xiang Xiao
a698100de3 sched: Remove the condition guard from environ macro
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-12-29 08:11:08 -03:00
Xiang Xiao
965f7641fd sched: Remove the condition guard from getppid prototype
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-12-29 08:11:08 -03:00
Xiang Xiao
4262b09cbf libc: Implement terminal api regardless of CONFIG_SERIAL_TERMIOS setting
since many functions aren't related to termios directly

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-12-29 08:11:08 -03:00
Xiang Xiao
077a28eff6 Fix termios/lib_cfspeed.c:78:5: error: large integer implicitly truncated to unsigned type
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-12-29 08:11:08 -03:00
Xiang Xiao
86684105f9 serial: Move tcdrain implementation from drivers/serial to libc
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-12-29 08:11:08 -03:00
Xiang Xiao
a010cb1af1 serial: Make SIGINT and SIGTSTP work even without CONFIG_SERIAL_TERMIOS
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-12-29 08:11:08 -03:00
Xiang Xiao
dd942f0b04 sched/backtrace: Dump the complete stack regardless the depth
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-12-29 12:09:54 +08:00
Xiang Xiao
20bbdd0997 libc: Add backtrace_symbols[_fd] functions
specified here:
https://linux.die.net/man/3/backtrace_symbols

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-12-29 12:09:37 +08:00
Xiang Xiao
f061766801 video/fb: Fix typo error in include/nuttx/video/fb.h
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-12-28 17:21:18 -03:00
Norman Rasmussen
48311cc61f Fix unaligned memory access when creating ICMP Port Unreachable messages
commit 3b69d09c80 corrected the
unreachable handling for net/udp/icmp but introduced an unaligned store.
This splits the uint32_t data field into a two element uint16_t data
field to avoid the unaligned store.
2021-12-28 03:51:53 -06:00
zhuyanlin
1f87ded9c2 driver:clk: clk pending on semaphore waiting on IPC ready
Signed-off-by: zhuyanlin <zhuyanlin1@xiaomi.com>
2021-12-27 23:25:28 -06:00
zhuyanlin
a22dae19c1 regulator/rpmsg: pending in wait ept ready for regulator client
Signed-off-by: zhuyanlin <zhuyanlin1@xiaomi.com>
2021-12-27 23:25:28 -06:00
ligd
10ccba6671 init: move USERMAIN_XX out of INIT_ENTRYPOINT
Signed-off-by: ligd <liguiding1@xiaomi.com>
2021-12-24 08:23:30 -06:00
Xiang Xiao
cc1a1b5781 net: Implement getifaddrs and freeifaddrs
specify here:
https://man7.org/linux/man-pages/man3/getifaddrs.3.html

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-12-21 11:01:33 -03:00
Xiang Xiao
1cd935fece net: Add lifr_ifindex field to struct lifreq
to ensure union lifr_ifru start at the same offset of union ifr_ifru

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-12-21 11:01:33 -03:00
chao.an
1e83c83bf3 net/usrsock: increase the send/recv() length limit to UINT32_MAX
change request type to uint32_t to the impove the throughput

Signed-off-by: chao.an <anchao@xiaomi.com>
2021-12-21 03:14:25 -06:00
Simon Filgis
6cc48ff6ff arch/arm/samv7: initial support for LIN bus communication
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
Co-authored-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2021-12-20 18:23:05 -03:00
chao.an
ce1c8413a2 libc/lzfcompress: add lzf compress stream
compress stream based on lzf algorithm:

  struct lib_rawoutstream_s rawstream;
  struct lib_lzfoutstream_s lzfstream;

  lib_rawoutstream(&rawstream, fd);
  lib_lzfoutstream(&lzfstream, &rawstream);

Signed-off-by: chao.an <anchao@xiaomi.com>
2021-12-20 08:39:33 -06:00
Petro Karashchenko
d445282566 fs/vfs: Add file descriptor based timers support
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2021-12-20 04:00:20 -06:00
Xiang Xiao
187d9e58c9 Remove the unnecessary inclusion of assert.h and string.h from public header files
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-12-20 10:30:08 +01:00
Xiang Xiao
c562263205 net: Move if_nametoindex and if_indextoname to libc
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-12-19 10:08:57 -06:00
Xiang Xiao
882bc8639c net: Add NET_SOCK_[FAMILY|TYPE|PROTOCOL] defintion to netconfig.h
to help create a general sock for ioctl operation

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-12-19 10:08:57 -06:00
Xiang Xiao
54e1c27e43 eventfd: Typedef eventfd_t to uint64_t on the supported platform
to compliant with Linux implementation as much as possible

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-12-19 01:41:11 -06:00
Xiang Xiao
f9c1117c88 eventfd: Remove the unused and private eventfd_get_minor
since it isn't defined by Linux kernel too

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-12-19 01:41:11 -06:00
zhanghu6
f56aefaa41 sched_note: change uint32_t nbi_module into uint8_t array, because variables keep the same style that use uint8_t array
sched_note: add note dump module tag definitions

NOTE_MODULE(a, b, c, d)

example:
define TEST_MODULE NOTE_MODULE('t', 'e', 's', 't')
sched_note_dump(TEST_MODULE, event, data, len);

define AUDIO_MODULE NOTE_MODULE('a', 'u', 'd', 'i')
sched_note_dump(AUDIO_MODULE, event, data, len);
2021-12-16 04:18:17 -06:00
zhuyanlin
e43e1423d6 driver/ioexpander: add ioe_rpmsg server and client
N/A

Signed-off-by: zhuyanlin <zhuyanlin1@xiaomi.com>
2021-12-16 01:29:24 -06:00
Xiang Xiao
ed1e4ddfa7 libc: Add getprogname function
defined here:
https://www.freebsd.org/cgi/man.cgi?query=getprogname&sektion=3

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-12-15 10:47:56 -06:00
zhanghu6
d05b9a9c79 note dump: add CONFIG_SCHED_INSTRUMENTATION_SWITCH
1. If CONFIG_SCHED_INSTRUMENTATION_SWITCH is enabled, then these additional interfaces are expected:
        sched_note_suspend
        sched_note_resume
at the same time,If CONFIG_SMP is enabled,then expected:
        sched_note_cpu_pause
        sched_note_cpu_paused
        sched_note_cpu_resume
        sched_note_cpu_resumed
2. other board if enable SCHED_INSTRUMENTATION,SCHED_INSTRUMENTATION_SWITCH to defconfig.
2021-12-15 07:07:00 -06:00
Petro Karashchenko
6c255f2d07 drivers/analog: add mcp48xx dac support
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2021-12-15 07:02:56 -06:00
Petro Karashchenko
3b3cebdd3e typo: fix type for word "instance"
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2021-12-14 06:39:34 -06:00
Xiang Xiao
69468b700d libc: Move syslog_stream from nuttx/streams.h to drivers/syslog/syslog.h
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-12-14 00:51:59 -06:00
zhanghu6
a32d14cb9c sched note trace: and note dump
note_type NOTE_DUMP_STRING API:
sched_note_string
sched_note_vprintf
sched_note_printf

note_type NOTE_DUMP_BINARY API:
sched_note_dump
sched_note_vbprintf
sched_note_bprintf
2021-12-13 21:21:22 -06:00
ligd
166a9210ca wqueue: update wqueue to support using wqueue before wqueue start
Signed-off-by: ligd <liguiding1@xiaomi.com>
2021-12-13 21:16:25 -06:00
Petro Karashchenko
af614ac77d tls: restore C89 compatibility for TLS
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2021-12-13 21:14:53 -06:00
ligd
5b369c5cec libs/lbc: remove CHAR_BIT = 16 support
For CEVA platform CHAR_BIT is 16, and will do lots of extra work
when use IPC.
We will not support this platform anymore, so remove all the b2c operations.

Signed-off-by: ligd <liguiding1@xiaomi.com>
2021-12-13 11:08:28 -06:00
chao.an
d20bd62e08 libc/allsyms: Load all symbols for debugging
let the nuttx print out symbolic crash information and
symbolic stack backtraces. This increases the size of the nuttx
somewhat, as all symbols have to be loaded into the nuttx image.

Signed-off-by: chao.an <anchao@xiaomi.com>
2021-12-13 08:31:13 -06:00
Xiang Xiao
1af8cd4de8 sched: Move argv from tcb_s to task_info_s
argv is allocated from stack and then belong to userspace,
so task_info_s is a best location to hold this information.

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-12-11 10:08:53 -06:00