Masayuki Ishikawa
dc454765fb
Revert "add holder for mutex"
...
This reverts commit fc176addeb
.
2023-01-19 06:04:48 +09:00
lilei19
fc176addeb
add holder for mutex
...
Signed-off-by: lilei19 <lilei19@xiaomi.com>
2023-01-18 17:40:58 +08:00
chao an
64dd7e6376
net/tcp: add Selective-ACK support
...
Reference:
https://datatracker.ietf.org/doc/html/rfc2018
Iperf2 client/server test on esp32c3:
Drop(1/50):
CONFIG_NET_TCP_DEBUG_DROP_SEND=y
CONFIG_NET_TCP_DEBUG_DROP_SEND_PROBABILITY=50 // Drop probability: 1/50
CONFIG_NET_TCP_DEBUG_DROP_RECV=y
CONFIG_NET_TCP_DEBUG_DROP_RECV_PROBABILITY=50 // Drop probability: 1/50
Drop(1/50) + OFO/SACK:
CONFIG_NET_TCP_DEBUG_DROP_SEND=y
CONFIG_NET_TCP_DEBUG_DROP_SEND_PROBABILITY=50 // Drop probability: 1/50
CONFIG_NET_TCP_DEBUG_DROP_RECV=y
CONFIG_NET_TCP_DEBUG_DROP_RECV_PROBABILITY=50 // Drop probability: 1/50
CONFIG_NET_TCP_OUT_OF_ORDER=y
CONFIG_NET_TCP_SELECTIVE_ACK=y
---------------------------------------------------------
| TCP Config | Server | Client | |
|-------------------------------------------------------|
| Original | 12 | 9 | Mbits/sec |
| Drop(1/50) | 0.6 | 0.3 | Mbits/sec |
| Drop(1/50) + OFO/SACK | 8 | 8 | Mbits/sec |
---------------------------------------------------------
Signed-off-by: chao an <anchao@xiaomi.com>
2023-01-18 16:24:09 +08:00
anjiahao
b362f18d6a
mempool:Calibration total memory statistics
...
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2023-01-18 09:02:33 +01:00
anjiahao
d846004533
mempool:use two-dimensional array avoid competition
...
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2023-01-18 09:02:33 +01:00
wangbowen6
01c96a211f
touchscreen.h: move the #ifdef CONFIG_INPUT position
...
the application can access the remote cpu touch driver by
rpmsgdev, so the defines and struct will be used even if not
enable the CONFIG_INPUT/CONFIG_INPUT_TOUCHSCREEN.
Signed-off-by: wangbowen6 <wangbowen6@xiaomi.com>
2023-01-18 09:02:08 +01:00
Zhe Weng
1cf3147626
net/netdev: Avoid hardcoded guardsize when using d_iob
...
Signed-off-by: Zhe Weng <wengzhe@xiaomi.com>
2023-01-18 14:41:07 +08:00
anjiahao
632ed0d3a4
Optimize multipe mempool memory space usage
...
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2023-01-18 14:12:45 +08:00
anjiahao
6b530fceae
mempool:change mempool_multiple way of initialization
...
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2023-01-18 14:12:45 +08:00
anjiahao
49ffd99eaf
mempool:use single queue insdie of list
...
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2023-01-18 14:12:45 +08:00
anjiahao
f24fb2b10a
mempool:add a private pointer to stroe private data
...
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2023-01-18 14:12:45 +08:00
anjiahao
e7d02ffac2
mempool:remove multiple fixed api
...
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2023-01-18 14:12:45 +08:00
anjiahao
f00d56337f
mempool:remove unnecessary alignment
...
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2023-01-18 14:12:45 +08:00
Jukka Laitinen
b09581f736
Add shm_open and shm_unlink to syscalls
...
Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2023-01-18 11:01:20 +08:00
anjiahao
bc30b294aa
mm:add heap args to mm_malloc_size
...
use malloc_size inside of where used mm_malloc_size
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2023-01-17 21:57:37 +08:00
dongjiuzhu1
c386a1a2d9
mm/mempool: support backtrace function for mempool
...
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2023-01-17 16:48:30 +08:00
anjiahao
af3978c1fa
adjust the contents of memdump and meminfo
...
memdump:just dump info
meminfo:statistics mem information
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2023-01-17 16:48:30 +08:00
Xiang Xiao
0a95c7721b
vfs/poll: Remove POLLFILE and POLLSOCK NuttX specific extension
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-01-17 14:02:59 +08:00
luojun1234
ff3733b5b5
Support fragmentation and reassembly
...
Signed-off-by: luojun1 <luojun1@xiaomi.com>
2023-01-17 14:01:37 +08:00
Xiang Xiao
b1899ffbfd
fs: Support O_NOFOLLOW flag
...
https://pubs.opengroup.org/onlinepubs/9699919799.2013edition/functions/open.html :
O_NOFOLLOW
If path names a symbolic link, fail and set errno to [ELOOP].
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-01-17 12:02:48 +08:00
Gustavo Henrique Nihei
a3e253b4a3
mm: Enable a dedicated kernel heap on BUILD_FLAT via MM_KERNEL_HEAP
...
Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
2023-01-17 10:30:00 +08:00
Xiang Xiao
a70a9f5ae6
net: Move s_flags to last to avoid the padding added by compiler
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-01-16 23:29:26 -03:00
anjiahao
43d2c595b1
crypto:support crypto can handle streaming data
...
in user space
Use the flag (COP_FLAG_UPDATE)structure member to mark
whether it is just input data.
like this:
can do manys times,just input data
....
cryp.ses = session.ses;
cryp.op = COP_ENCRYPT;
cryp.src = (caddr_t) s;
cryp.len = len;
cryp.flags = COP_FLAG_UPDATE;
cryp.dst = 0;
cryp.mac = (caddr_t) out;
cryp.iv = 0;
if (ioctl(cryptodev_fd, CIOCCRYPT, &cryp) == -1)
{
warn("CIOCCRYPT");
goto err;
}
can do manys times like frist...
then,the last time
Don't use any flay structure member to mark
this is last time,need get final result
....
cryp.ses = session.ses;
cryp.op = COP_ENCRYPT;
cryp.src = (caddr_t) s;
cryp.len = len;
cryp.flags = 0;
cryp.dst = 0;
cryp.mac = (caddr_t) out;
cryp.iv = 0;
if (ioctl(cryptodev_fd, CIOCCRYPT, &cryp) == -1)
{
warn("CIOCCRYPT");
goto err;
}
....
that will get last result.
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2023-01-17 01:19:38 +08:00
Lee Lup Yuen
c07bd5d644
arm64/pinephone: Add driver for PinePhone Touch Panel
...
This PR adds the existing Goodix GT9XX Touch Panel Driver to the Bringup Function for PINE64 PinePhone.
With this PR, LVGL Touchscreen Apps will respond to Touch Input on PinePhone.
### Modified Files
`boards/arm64/a64/pinephone/src/pinephone_bringup.c`: Added GT9XX Touch Panel Driver to PinePhone Bringup Function
`boards/arm64/a64/pinephone/src/Makefile`: Added `pinephone_touch.c` to the Makefile
`include/nuttx/input/gt9xx.h`: Fixed a comment in GT9XX Touch Panel Driver
### New Files
`boards/arm64/a64/pinephone/src/pinephone_touch.c`, `pinephone_touch.h`: Register GT9XX Touch Panel Driver on PinePhone
`boards/arm64/a64/pinephone/configs/lvgl/defconfig`: Added PinePhone Board Config `lvgl` to support LVGL Touchscreen Apps
### Updated Documentation
`Documentation/platforms/arm/a64/boards/pinephone/index.rst`: Added PinePhone Board Config `lvgl` for LVGL Touchscreen Apps
2023-01-16 13:45:17 +08:00
Xiang Xiao
a851ad84c3
net: consistent the net sem wait naming conversion
...
to prepare the new mutex wait function
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-01-15 12:31:30 -03:00
Xiang Xiao
32d0c2ce9d
libc: Add sys/endian.h to improve the compatiblity with bionic libc
...
and move the definition from endian.h to sys/endian.h
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-01-15 12:26:15 -03:00
dongjiuzhu1
5c0a5a6627
mm/mempool: support memalign about mempool and mulitple mempool
...
The memalign is special to multiple mempool because multiple mempool
doesn't support split and shrink chunk operate. So When you alloc a
memory block and find an aligned address in this block, you need to
occupy 8 bytes before the address to save the address of the padding
size and pool to ensure correct use in realloc and free operations.
So we will use bit1 in the previous address of the address to represent
that it is applied by memalign.
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2023-01-15 20:05:55 +08:00
dongjiuzhu1
e5394be881
mempool/multiple_mempool: add private member delta in multiple-mempool
...
This delta describes the relationship between the block size of each
mempool in multiple mempool by user initialized. It is automatically
detected by the mempool_multiple_init function. If the delta is not
equal to 0, the block size of the pool in the multiple mempool is an
arithmetic progressions, otherwise it is an increasing progressions.
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2023-01-15 20:05:55 +08:00
dongjiuzhu1
cd97134c7c
mm/mempool: update nexpand/ninitial/ninterrupt to xxxsize
...
Let's specify size instead of number, so that we can unify the size of
expansion memory in the multiple mempool.
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2023-01-15 20:05:55 +08:00
dongjiuzhu1
adaca6a5ce
mm/mempool: using inline list instead of queue to avoid kasan report
...
the crash backtrace:
kasan_report (addr=0xf3d02fd4, size=4, is_write=false) at
kasan/kasan.c:106
0x5658518d in __asan_loadN_noabort (addr=0xf3d02fd4, size=4) at
kasan/kasan.c:300
0x565851ee in __asan_load4_noabort (addr=0xf3d02fd4) at
kasan/kasan.c:334
0x56580b02 in sq_remfirst (queue=0xf3d02b08) at
queue/sq_remfirst.c:45
0x565e0e0b in mempool_alloc (pool=0xf3d02aec) at
mempool/mempool.c:161
0x566033d2 in mempool_multiple_alloc (mpool=0xf3d02a30, size=16) at
mempool/mempool_multiple.c:147
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2023-01-15 20:05:55 +08:00
dongjiuzhu1
28027d0bee
libc/versionsort: support versionsort and strverscmp
...
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2023-01-15 11:24:40 +08:00
TimJTi
f5e8c30808
Add ACT8945A power driver
...
Update act8945a.c
Update Kconfig
Update act8945a.c
Corrections (xiaoxiang781216)
2023-01-14 18:49:25 +08:00
liushuai25
6b729487fb
feat: add mipidsi support
...
add mipi dsi subsystem support.
reference links:
https://github.com/torvalds/linux/blob/master/drivers/gpu/drm/drm_mipi_dsi.c
https://github.com/torvalds/linux/blob/master/include/video/mipi_display.h
Signed-off-by: liushuai25 <liushuai25@xiaomi.com>
2023-01-13 23:10:56 +08:00
Xiang Xiao
695f42f8d2
net: Move accept to libc after https://github.com/apache/nuttx/pull/8083
...
since accept can simply forward to kernel accept4 function
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-01-13 11:23:42 +02:00
Lee Lup Yuen
6de5a862cd
drivers/input: Add driver for Goodix GT9XX Touch Panel
...
This PR adds the driver for Goodix GT9XX I2C Touch Panel, which will be called by PINE64 PinePhone.
Our driver follows the design of the NuttX Driver for [Cypress MBR3108](https://github.com/apache/nuttx/blob/master/drivers/input/cypress_mbr3108.c ).
We have documented our driver here: ["NuttX Touch Panel Driver for PinePhone"](https://lupyuen.github.io/articles/touch2#appendix-nuttx-touch-panel-driver-for-pinephone )
`drivers/input/Kconfig`: Added option `INPUT_GT9XX` to select GT9XX Driver
`drivers/input/Make.defs`: Added GT9XX Driver to Makefile
`drivers/input/gt9xx.c`, `gt9xx.h`: I2C Driver for GT9XX Touch Panel
2023-01-13 12:19:53 +08:00
Jukka Laitinen
a2a10c87e3
mm/shm: Switch to use process' common virtual memory region allocator
...
- Also remove the nuttx private shm.h file nuttx/mm/shm.h, which became redundant
- Also remove the gran allocator initialization/release in binfmt since common
vpage allocator is initialized in group_create/group_leave
Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2023-01-13 02:20:13 +08:00
Jukka Laitinen
2236facca9
mm/map: Add a common virtual memory region allocator
...
Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2023-01-13 02:20:13 +08:00
Jukka Laitinen
70de321de3
arch/Kconfig: remove virtual memory allocator dependency from MM_SHM
...
The dependency should be vice versa; the MM_SHM should depend on the
existence of the virtual memory range allocator.
Create a new CONFIG flag CONFIG_ARCH_VMA_MAPPING, which will define that
there is a virtual memory range allocator. Make MM_SHM select that flag
Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2023-01-13 02:20:13 +08:00
Xiang Xiao
9ae3f4cf17
fs: Map syncfs to fsync
...
https://linux.die.net/man/2/syncfs
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-01-12 09:28:04 -03:00
Xuxingliang
431e31b6b2
libc/math: add simple implementation for sincos API
...
Signed-off-by: Xuxingliang <xuxingliang@xiaomi.com>
2023-01-12 00:07:44 +08:00
Xiang Xiao
ef65d443ad
sem: Remove PRIOINHERIT_FLAGS_ENABLE and use SEM_PRIO_INHERIT instead
...
and refine the code to prepare the support of new flags
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-01-11 17:35:28 +02:00
zhanghongyu
48c9d10336
net_socket: add accept4 function
...
Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2023-01-11 23:28:08 +08:00
梁超众
aca1a065a8
move usrsock to kernel space
...
Signed-off-by: 梁超众 <liangchaozhong@xiaomi.com>
2023-01-11 15:14:03 +08:00
Jukka Laitinen
0a885da434
syscall: Always add munmap into syscalls
...
Munmap interface is always enabled just like mmap is
Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2023-01-11 03:11:11 +08:00
Jukka Laitinen
3ea7a6fb77
mm/shm: Clean up the System-V shm driver
...
Move shmdt functionality into shm_unmap, and use shm_unmap as the common
detach function.
Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2023-01-10 23:24:50 +08:00
Jukka Laitinen
5150979488
mm/shm: Remove gs_vaddr from task group and use dynamic vm_map instead
...
Replace static gs_vaddr with a new dynamic mapping list. Collecting all
this kind of virtual memory mappings into a single structure makes
things more consistent.
This still leaves the task group specific granule alloocator, gs_handle,
in the task group
Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2023-01-10 18:34:25 +08:00
Jukka Laitinen
7f8bec7070
Add mm/mm_map virtual memory mapping list
...
The task_group specific list can be used to store information about
mmappings.
For a driver or filesystem performing mmap can also enable munmap by
adding an item to this list using mm_map_add(). The item is then
returned in the corresponding munmap call.
Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2023-01-10 18:34:25 +08:00
Jukka Laitinen
6e4ddf78bb
include/nuttx/mm/map.h: Change mm_map_entry "priv" into union type
...
To be able to directly store also other than pointer types
Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2023-01-10 18:34:25 +08:00
chengkai
f864e5f657
wireless/bluetooth: add interrupt_context hander for netsnoop
...
Signed-off-by: chengkai <chengkai@xiaomi.com>
2023-01-10 18:08:22 +08:00
田昕
587305723e
drivers/pipe:add PIPEIOC_POLLTHRES to set POLLIN/POLLOUT threshold
...
Signed-off-by: 田昕 <tianxin7@xiaomi.com>
2023-01-10 13:33:13 +08:00
zhanghongyu
ec28082e5d
arp.h: add some ARPHRD definition
...
Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2023-01-06 22:20:19 +08:00
zhanghongyu
725a1f1e20
netlink: add RTA_MAX definition
...
Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2023-01-06 22:20:19 +08:00
zhanghongyu
b978ff245e
netlink: add struct nlmsgerr definition
...
Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2023-01-06 22:20:19 +08:00
anjiahao
9a32cf7a1a
assert:add a last type to call notifier
...
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2023-01-05 22:58:00 +08:00
Xiang Xiao
1a59f4ed00
mm/map: Remove the unnessary map.h inclusion in various drivers
...
and Fix include/nuttx/mm/map.h:55:28: error: 'struct task_group_s' declared inside parameter list will not be visible outside of this definition or declaration
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-01-05 16:06:53 +02:00
yinshengkai
8f823ce320
sergger: add note_ prefix to sysview
...
change 1: rename sysview.c to note_sysview.c
change 2: add note_ prefix to sysview's public function
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2023-01-05 22:04:52 +08:00
yinshengkai
77466742c7
drivers/segger: register sysview to note drivers list
...
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2023-01-05 22:04:52 +08:00
yinshengkai
4ba7624804
Revert "Sysview add prefix kconfig to add an option to decouple sched_note calls"
...
This reverts commit f72f7ebee0
.
2023-01-05 22:04:52 +08:00
Xiang Xiao
b0a0ba3ad7
fs: Move mmap callback before truncate in [file|mountpt]_operations
...
since mmap may exist in block_operations, but truncate may not,
moving mmap beforee truncate could make three struct more compatible
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-01-04 17:43:59 +02:00
Jiuzhu Dong
c623ee20f1
stdlib: generate uniformly distributed pseudo-random numbers
...
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2023-01-04 20:53:05 +08:00
liucheng5
abf5ea24b4
fix: sensor: new member into ECG sensor type
...
ECG sensors usually output some status info besides ECG data, such as lead and fast-recovery status. Thus a new member "status" is added into sensor_ecg struct.
Signed-off-by: liucheng5 <liucheng5@xiaomi.com>
2023-01-03 19:23:30 +08:00
Xiang Xiao
b7febf4e19
libc: Move tree.h from include/nuttx to include/sys
...
to match freebsd layout
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-01-03 10:34:57 +02:00
yinshengkai
81448b5021
sched/irq: add spin_unlock_irqsave/irqrestore_wo_note
...
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2023-01-02 22:29:01 +08:00
Jukka Laitinen
f33dc4df3f
Change FIOC_MMAP into file operation call
...
- Add mmap into file_operations and remove it from ioctl definitions.
- Add mm_map structure definitions to support future unmapping
- Modify all drivers to initialize the operations struct accordingly
Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2023-01-02 11:23:20 -03:00
Jukka Laitinen
41e9df2f3e
Add ftruncate into file operation calls
...
- Add truncate into file_operations
- Move truncate to be common for mountpt_operations and file_operations
- Modify all drivers to initialize the operations struct accordingly
Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2023-01-02 11:23:20 -03:00
Jukka Laitinen
36528eed64
Revert "fs/vfs/fs_truncate.c: Use ioctl to truncate on non-mountpoint inode"
...
This reverts commit dbc163f1b0
.
2023-01-02 11:23:20 -03:00
yinshengkai
275b2e70a4
syslog: fix extra line breaks in syslog when SYSLOG_COLOR_OUTPUT is enabled
...
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2023-01-02 21:22:46 +08:00
dongjiuzhu1
6e0d76f528
signal: add sigisemptyset, sigandset, sigorset api
...
refs:https://man7.org/linux/man-pages/man3/sigorset.3.html
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2022-12-31 00:59:28 +08:00
dongjiuzhu1
191d453063
string/strdupa: support strdupa strndupa
...
refs:https://sites.uclouvain.be/SystInfo/manpages/man3/strdup.3.html
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2022-12-31 00:59:28 +08:00
yinshengkai
64b6df42a4
drivers/note: register notelog device
...
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2022-12-30 22:21:12 +08:00
yinshengkai
a86684574f
syscall: export UP_WRAPSYM/UP_REALSYM macro
...
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2022-12-30 22:13:34 +08:00
dongjiuzhu1
5826e8eeb1
libc/passwd: add pw_gecos field(userinfo)
...
The pw_gecos field is not specified in POSIX, but is
present on most implementations.
passwd file format:
name:uid:gid:gecos:dir:shell
ex: gdm❌ 127:133:Gnome Display Manager:/var/lib/gdm3:/bin/false
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2022-12-30 00:21:15 +08:00
dongjiuzhu1
8f05661a53
syslog: A trailing newline is added if none is present.
...
refs:
https://www.manpagez.com/man/3/syslog/
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2022-12-30 00:20:33 +08:00
yinshengkai
bc7c520eca
drivers/note: add note_syscall_enter parameter list
...
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2022-12-29 09:25:54 -03:00
田昕
96a45e2c75
sched/misc:add linux-like reboot notifier list
...
Signed-off-by: 田昕 <tianxin7@xiaomi.com>
2022-12-29 19:18:42 +08:00
dongjiuzhu1
5d643b3bef
sys/socket/scm: return NULL when cmsg_len is zero
...
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2022-12-29 13:25:24 +08:00
dongjiuzhu1
f85d9a9332
fs/signalfd: using file descriptor to accept signal
...
Reference here:
https://man7.org/linux/man-pages/man2/signalfd.2.html
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2022-12-28 23:05:58 +08:00
dongjiuzhu1
9244b5a737
signal: Support sigaction:sa_user, siginfo_t:si_user with user info
...
When the signal sent by the sender is blocked in the target task,
if the target task has an action registered with sa_flags SA_KENELHAND,
it will directly respond to the action in the context of the sender.
When the action is executed, it will have the parameters set by the
target task with sigaction:sa_user.
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2022-12-28 23:05:58 +08:00
dongjiuzhu1
3927d878e4
signal/nxsig_pengingset: move nxsig_pendingset to common header
...
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2022-12-28 23:05:58 +08:00
Zhe Weng
cbe4cb2056
net: Add set/getsockopt options compatible with iptables.
...
Signed-off-by: Zhe Weng <wengzhe@xiaomi.com>
2022-12-28 22:40:53 +08:00
Zhe Weng
5a0d8fdf49
net: Add netfilter compatible headers.
...
Signed-off-by: Zhe Weng <wengzhe@xiaomi.com>
2022-12-26 22:41:16 +08:00
yinshengkai
dd32eccfc3
drivers/note: Move taskname related functions to note_driver.c
...
so all note drivers can retrieve the task name even after the task exit
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2022-12-26 15:03:57 +08:00
Xiang Xiao
b9d7d00943
arch: Remove the unused arch color function variant
...
up_check_tcbstack_remain, up_check_stack, up_check_stack_remain and up_check_intstack_remain
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-12-24 22:40:52 +02:00
zhangyuan21
45394eb6dc
arch: save user context in assert common code
...
This is the work continue with #7875
Signed-off-by: zhangyuan21 <zhangyuan21@xiaomi.com>
2022-12-24 13:02:56 +08:00
Ville Juven
172b209f2d
sched/assert: Re-implement assert() into user space
...
_assert is a kernel procedure, entered via system call to make the core
dump in privileged mode.
Running exit() from this context is not OK as it runs the registered
exit functions and flushes streams, which must not be done
from privileged mode as it is a security hole.
Thus, implement assert() into user space (again) and remove the exit()
call from the kernel procedure.
2022-12-22 21:07:47 +08:00
wangbowen6
069fac1c67
power/relay: add relay driver framework for NuttX
...
Signed-off-by: wangbowen6 <wangbowen6@xiaomi.com>
2022-12-22 20:30:49 +08:00
Zhe Weng
573c79fd56
hashtable.h: Added a hashtable implementation
...
Signed-off-by: Zhe Weng <wengzhe@xiaomi.com>
2022-12-22 20:20:12 +08:00
Ville Juven
2ed51d026c
fs/streams: Move the file streams from the group structure into TLS
...
This is preparation for flushing streams from user space, like it should
be done.
- Move tg_streamlist (group, kernel space) ->
ta_streamlist (TLS, user space)
- Access stream list via tg_info in kernel
- Access stream list via TLS in user space
- Remove / rename nxsched_get_streams -> lib_getstreams
- Remove system call for nxsched_get_streams
2022-12-22 20:16:11 +08:00
TimJTi
5f7bf743c5
Add LP503x RGB LED driver
...
style corrections
Update lp503x.h
Update lp503x.h
Update lp503x.c
Update lp503x.h
post review changes
2022-12-22 13:39:05 +08:00
Petro Karashchenko
3e36f40130
compiler.h: rename printflike to printf_like
...
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2022-12-21 10:56:45 +08:00
Petro Karashchenko
7f564e0d86
nuttx: add some missing FAR
...
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2022-12-21 10:56:45 +08:00
Xiang Xiao
fd0d6a9bf5
compiler.h: Add _ between format|printf|syslog|scanf|strftime and like
...
align with other macro naming style
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-12-21 01:05:19 +02:00
chao an
e6b37f2b2d
mm/iob: revert "modify iob to support header padding and alignment features"
...
we don't need to implement l2 isolation through io_head, iob offload will use io_offset
-------------------------------------------------------------
Layout of different NICs implementation:
iob_data (aligned by CONFIG_IOB_ALIGNMENT)
|
| io_offset(CONFIG_NET_LL_GUARDSIZE)
| |
-------------------------------------------------
Ethernet | Reserved | ETH_HDRLEN | io_len |
---------------------------------|---------------
8021Q | Reserved | ETH_8021Q_HDRLEN | io_len |
---------------------------------|---------------
ipforward | Reserved | io_len |
-------------------------------------------------
--------------------------------------------------------------------
Signed-off-by: chao an <anchao@xiaomi.com>
2022-12-21 01:43:02 +08:00
chao an
6e380c0978
mm/iob: add a helper function to get iob count in chain
...
Signed-off-by: chao an <anchao@xiaomi.com>
2022-12-21 01:40:24 +08:00
zhanghongyu
ba9ef06970
tun: add ioctl cmd TUNGETIFF implement
...
Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2022-12-20 21:15:50 +08:00
jihandong
8e6185f4ad
driver/fb: support linux info.
...
add struct fix_screeninfo and var_screeninfo, and related ioctl,
macro.
Signed-off-by: jihandong <jihandong@xiaomi.com>
2022-12-20 15:54:00 +08:00
zhangyuan21
0113865bb0
sched/pthread: Delay pjoininfo allocation time
...
Create pjoininfo until pthread_exit/pthread_canel/pthread_join get called.
Signed-off-by: zhangyuan21 <zhangyuan21@xiaomi.com>
2022-12-20 10:26:02 +08:00
anjiahao
70791af8e2
procmeminfo:support memdump can show specific task
...
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2022-12-19 20:43:33 +08:00
chao an
4f239e145e
Revert "mm/iob/contig: enhance iob contig to support iob chain"
...
This reverts commit 56a4e90dc4
.
2022-12-19 01:32:05 +08:00
chao an
56a4e90dc4
mm/iob/contig: enhance iob contig to support iob chain
...
Signed-off-by: chao an <anchao@xiaomi.com>
2022-12-18 21:15:47 +08:00
Xiang Xiao
da9a2b9770
compiler.h: Add fopen_like and popen_like macro
...
and apply them to the related functions
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-12-18 09:47:12 -03:00
Xiang Xiao
e1f45857e3
compiler.h: Add malloc_like? and realloc_like macro
...
and apply them to the related functions
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-12-18 09:47:12 -03:00
Xiang Xiao
243983328a
drivers/video: Correct the code style
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-12-17 20:43:07 +08:00
yinshengkai
6f66c0ea0b
drivers/note: sched_note support mulit-channel
...
call callbacks for different channels in sched_note_*
noteram channel is enabled by default
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2022-12-17 19:41:21 +08:00
Xiang Xiao
d5689e070b
net/arp: Remove nuttx/net/arp.h
...
1.move ARPHRD_ETHER to netinet/arp.h
1.move arp_entry_s to net/arp/arp.h
2.move arp_input to nuttx/net/netdev.h
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-12-16 22:10:59 +02:00
zhangyuan21
453a1a7332
arch: move stack and task dump to common code
...
Signed-off-by: zhangyuan21 <zhangyuan21@xiaomi.com>
2022-12-17 01:59:35 +08:00
zhangyuan21
632d87ee71
arch: remove up_release_pending function
...
Signed-off-by: zhangyuan21 <zhangyuan21@xiaomi.com>
2022-12-16 21:29:57 +08:00
Xiang Xiao
06842c824a
sched/note: Change sched_note_[begin|end] to macro
...
improve the speed
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-12-16 12:20:53 +02:00
yinshengkai
552cf4b549
merge sched_note_spinxx into sched_note_spincommon
...
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2022-12-16 17:03:53 +08:00
Peter Bee
aeed8f5d26
include/nuttx/video: remove validate_buf
...
Removing validate_buf since it's only locally called in driver
Signed-off-by: Peter Bee <bijunda1@xiaomi.com>
2022-12-16 17:03:35 +08:00
yinshengkai
2460ff4f78
drivers/note: rename /dev/note to /dev/note/ram
...
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2022-12-15 15:53:49 +08:00
Xiang Xiao
03f07effc9
drivers/note: Fix the style issue
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-12-14 21:24:13 +02:00
Xiang Xiao
c36640e205
drivers/segger: Rename nuttx/note/note_sysview.h to nuttx/segger/sysview.h
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-12-14 21:24:13 +02:00
Xiang Xiao
d7307ef26c
drivers/node: Rename note_register to note_initialize
...
prepare to support the multiple note driver
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-12-14 21:24:13 +02:00
Lee Lup Yuen
b895207489
arm64/a64: Add driver for MIPI DSI
...
This PR adds the driver for Allwinner A64's MIPI Display Serial Interface (DSI) and MIPI Display Physical Layer (D-PHY).
This driver will be used by the upcoming Display Driver for PINE64 PinePhone.
- `include/nuttx/crc16.h`: Added 16-bit CRC-CCITT
- `libs/libc/misc/Make.defs`: Added 16-bit CRC-CCITT to Makefile
- `arch/arm64/src/a64/Kconfig`: Added the Kconfig option for "A64 Peripheral Selection > MIPI DSI" (`CONFIG_A64_MIPI_DSI`), which enables the MIPI DSI Driver
- `arch/arm64/src/a64/hardware/a64_memorymap.h`: Added the Base Address for MIPI DSI
- `arch/arm64/src/a64/Make.defs`: Added the MIPI DSI Driver to the Makefile
- `libs/libc/misc/lib_crc16ccitt.c`: Compute 16-bit CRC-CCITT
- `arch/arm64/src/a64/mipi_dsi.c`, `mipi_dsi.h`: Compose MIPI DSI Packets (Long, Short, Short with Parameter)
- `arch/arm64/src/a64/a64_mipi_dsi.c`, `a64_mipi_dsi.h`: MIPI DSI Driver for Allwinner A64
- `arch/arm64/src/a64/a64_mipi_dphy.c`, `a64_mipi_dphy.h`: MIPI D-PHY Driver for Allwinner A64
- `platforms/arm/a64/boards/pinephone/index.rst`: Added MIPI DSI as supported peripheral for PinePhone
Co-Authored-By: Petro Karashchenko <petro.karashchenko@gmail.com>
2022-12-14 22:37:32 +08:00
chao an
881c9d9fac
mm/iob: add support of partial bytes clone
...
Signed-off-by: chao an <anchao@xiaomi.com>
2022-12-14 21:37:20 +08:00
chao an
d6d56c3372
mm/iob: add support of nonblock iob_clone
...
Signed-off-by: chao an <anchao@xiaomi.com>
2022-12-14 21:37:20 +08:00
anjiahao
bc0fe0ea16
crypto:add some hardware support
...
esp32c3: aes hmac-sha1 hmac-sha256
stm32f0l0g0 stm32l1 : aes
sam34: aes
lpc43: aes
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2022-12-14 02:33:56 +08:00
anjiahao
3d2f0c0e27
crypto:support nuttx /dev/crypto
...
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2022-12-14 02:33:56 +08:00
anjiahao
82956a2894
crypto:convert code style form openbsd to nuttx
...
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2022-12-14 02:33:56 +08:00
anjiahao
acd3350554
crypto:Sync version differences
...
1.fix type warning for compile
2.hamc key can less than specified length
3.add new version algorithms to cryptodev
sha256hmac
sha384hmac
sha512hmac
aes128gmac
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2022-12-14 02:33:56 +08:00
anjiahao
c7d347c7f0
crypto: Initial copy from https://github.com/openbsd/sys/crypto
...
public header files put into include/crpyto
private header/source files put into crpyto
crypto.c cryptodev.[c|h] cryptosoft.[c|h] come from:
commit id is f245bed2a7593bf0decce50caaed4ce05fefd6cf
the rest come from:
commit id is 61b0e532b2dce0a91cf3ea67d346645a61a88cdd
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2022-12-14 02:33:56 +08:00
chao an
47fbfa215e
fs/hostfs: mode_t of mkdir(2) should use the nuttx prototype
...
Signed-off-by: chao an <anchao@xiaomi.com>
2022-12-13 18:16:20 +08:00
Juha Niskanen
9df9136d95
include/stdio.h: add missing FOPEN_MAX
...
Signed-off-by: Juha Niskanen <juha.niskanen@haltian.com>
2022-12-12 19:12:35 +08:00
田昕
0382b63f5d
move common assert logic together.
...
Signed-off-by: 田昕 <tianxin7@xiaomi.com>
2022-12-12 17:05:02 +08:00
Xu Xingliang
252c6a1844
libc/netdb: add proto.c
...
Signed-off-by: Xu Xingliang <xuxingliang@xiaomi.com>
2022-12-10 02:36:24 +08:00
Peter Bee
77504aa1b5
drivers/video: minor fix
...
Fix missing header for bool in imgsensor.h and FAR in video.c
Signed-off-by: Peter Bee <bijunda1@xiaomi.com>
2022-12-09 23:37:49 +08:00
tangyusong1
f454dfccb2
Adjust ioctl function of cellular
...
Add SIOCGCELLNETDEV
Give a uint8_t[136] for cellular to save data
Signed-off-by: tangyusong1 <tangyusong1@xiaomi.com>
2022-12-09 11:19:55 +08:00
Peter van der Perk
f72f7ebee0
Sysview add prefix kconfig to add an option to decouple sched_note calls
2022-12-08 17:49:55 +01:00
tangyusong1
1c7a9d282c
Add mtu set and interface name set in ioctl
...
Follow LinuxOS:linux-5.10.152\include\uapi\linux\sockios.h
Add SIOCSIFMTU and SIOCSIFNAME
Signed-off-by: tangyusong1 <tangyusong1@xiaomi.com>
2022-12-08 13:58:26 +01:00
Peter Bee
31347da187
drivers/video: add support for V4L2 mmap-ed buffer
...
Support V4L2_MEMORY_MMAP memory mode
Signed-off-by: Peter Bee <bijunda1@xiaomi.com>
2022-12-07 01:21:46 +08:00
田昕
2719869ab2
Move _assert to kernel space.
...
Signed-off-by: 田昕 <tianxin7@xiaomi.com>
2022-12-06 18:33:21 +08:00
Zhe Weng
2a780e0467
net/ipfwd: fix devif_forward
after IOB offload.
...
Problem:
- `iob_copyout` to `d_buf` doesn't set `io_len` of the IOB, so `devif_poll` failed to copy the data into `buf` by `iob_copyout`
Modification:
- Just Move the IOB in `devif_forward`.
Signed-off-by: Zhe Weng <wengzhe@xiaomi.com>
2022-12-06 17:03:47 +08:00
chao an
b5507ea9a2
compile/attribute: minor fix for packed struct mismatch
...
Signed-off-by: chao an <anchao@xiaomi.com>
2022-12-06 03:50:20 +08:00
田昕
b9c913a195
include/nuttx/notifier:fix compiling error.
...
Signed-off-by: 田昕 <tianxin7@xiaomi.com>
2022-12-06 00:12:41 +08:00
Xiang Xiao
055f1f33eb
libc/stream: Rename [lib_stream_](put|get) to [lib_stream_](putc|getc)
...
to make the naming style consistent with each other
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-12-05 14:27:55 +01:00
Xiang Xiao
83c4e7d9b6
libc/hex2bin: Remove the unused declaration
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-12-05 10:42:22 +01:00
Xiang Xiao
43bda3282f
net/arp: Move arp_ipin and arp_out to private header file
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-12-04 20:39:21 +08:00
Xiang Xiao
c6e9edcbb6
net: Rename arp_arpin to arp_input
...
align with other similar function(e.g. ipv4_input and ipv6_input)
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-12-04 20:39:21 +08:00
chao an
62004a28a6
net/d_buf: remove d_buf reference from l3/l4
...
l3/l4 stack will decouple the reference of d_buf gradually, Only legacy
devices still retain d_buf support, new net devices will use d_iob
Signed-off-by: chao an <anchao@xiaomi.com>
2022-12-04 20:37:14 +08:00
chao an
34d2cde8a8
net/l2/l3/l4: add support of iob offload
...
1. Add new config CONFIG_NET_LL_GUARDSIZE to isolation of l2 stack,
which will benefit l3(IP) layer for multi-MAC(l2) implementation,
especially in some NICs such as celluler net driver.
new configuration options: CONFIG_NET_LL_GUARDSIZE
CONFIG_NET_LL_GUARDSIZE will reserved l2 buffer header size of
network buffer to isolate the L2/L3 (MAC/IP) data on network layer,
which will be beneficial to L3 network layer protocol transparent
transmission and forwarding
------------------------------------------------------------
Layout of frist iob entry:
iob_data (aligned by CONFIG_IOB_ALIGNMENT)
|
| io_offset(CONFIG_NET_LL_GUARDSIZE)
| |
-------------------------------------------------
iob | Reserved | io_len |
-------------------------------------------------
-------------------------------------------------------------
Layout of different NICs implementation:
iob_data (aligned by CONFIG_IOB_ALIGNMENT)
|
| io_offset(CONFIG_NET_LL_GUARDSIZE)
| |
-------------------------------------------------
Ethernet | Reserved | ETH_HDRLEN | io_len |
---------------------------------|---------------
8021Q | Reserved | ETH_8021Q_HDRLEN | io_len |
---------------------------------|---------------
ipforward | Reserved | io_len |
-------------------------------------------------
--------------------------------------------------------------------
2. Support iob offload to l2 driver to avoid unnecessary memory copy
Support send/receive iob vectors directly between the NICs and l3/l4
stack to avoid unnecessary memory copies, especially on hardware that
supports Scatter/gather, which can greatly improve performance.
new interface to support iob offload:
------------------------------------------
| IOB version | original |
|----------------------------------------|
| devif_iob_poll() | devif_poll() |
| ... | ... |
------------------------------------------
--------------------------------------------------------------------
1> NIC hardware support Scatter/gather transfer
TX:
tcp_poll()/udp_poll()/pkt_poll()/...(l3|l4)
/ \
/ \
devif_poll_[l3|l4]_connections() devif_iob_send() (nocopy:udp/icmp/...)
/ \ (copy:tcp)
/ \
devif_iob_poll("NIC"_txpoll) callback() // "NIC"_txpoll
|
dev->d_iob: |
--------------- ---------------
io_data iob1 | | | iob3 | | |
\ --------------- ---------------
--------------- | --------------- |
iob0 | | | | iob2 | | | |
--------------- | --------------- |
\ | / /
\ | / /
----------------------------------------------
NICs io vector | | | | | | | | | |
----------------------------------------------
RX:
[tcp|udp|icmp|...]ipv[4|6]_data_handler()(iob_concat/append to readahead)
|
|
[tcp|udp|icmp|...]_ipv[4|6]_in()/...
|
|
pkt/ipv[4/6]_input()/...
|
|
NICs io vector receive(iov_base to each iobs)
--------------------------------------------------------------------
2> CONFIG_IOB_BUFSIZE is greater than MTU:
TX:
"(CONFIG_IOB_BUFSIZE) > (MAX_NETDEV_PKTSIZE + CONFIG_NET_GUARDSIZE + CONFIG_NET_LL_GUARDSIZE)"
tcp_poll()/udp_poll()/pkt_poll()/...(l3|l4)
/ \
/ \
devif_poll_[l3|l4]_connections() devif_iob_send() (nocopy:udp/icmp/...)
/ \ (copy:tcp)
/ \
devif_iob_poll("NIC"_txpoll) callback() // "NIC"_txpoll
|
"NIC"_send()
(dev->d_iob->io_data[CONFIG_NET_LL_GUARDSIZE - NET_LL_HDRLEN(dev)])
RX:
[tcp|udp|icmp|...]ipv[4|6]_data_handler()(iob_concat/append to readahead)
|
|
[tcp|udp|icmp|...]_ipv[4|6]_in()/...
|
|
pkt/ipv[4/6]_input()/...
|
|
NICs io vector receive(iov_base to io_data)
--------------------------------------------------------------------
3> Compatible with all old flat buffer NICs
TX:
tcp_poll()/udp_poll()/pkt_poll()/...(l3|l4)
/ \
/ \
devif_poll_[l3|l4]_connections() devif_iob_send() (nocopy:udp/icmp/...)
/ \ (copy:tcp)
/ \
devif_iob_poll(devif_poll_callback()) devif_poll_callback() /* new interface, gather iobs to flat buffer */
/ \
/ \
devif_poll("NIC"_txpoll) "NIC"_send()(dev->d_buf)
RX:
[tcp|udp|icmp|...]ipv[4|6]_data_handler()(iob_concat/append to readahead)
|
|
[tcp|udp|icmp|...]_ipv[4|6]_in()/...
|
|
netdev_input() /* new interface, Scatter/gather flat/iob buffer */
|
|
pkt/ipv[4|6]_input()/...
|
|
NICs io vector receive(Orignal flat buffer)
3. Iperf passthrough on NuttX simulator:
-------------------------------------------------
| Protocol | Server | Client | |
|-----------------------------------------------|
| TCP | 813 | 834 | Mbits/sec |
| TCP(Offload) | 1720 | 1100 | Mbits/sec |
| UDP | 22 | 757 | Mbits/sec |
| UDP(Offload) | 25 | 1250 | Mbits/sec |
-------------------------------------------------
Signed-off-by: chao an <anchao@xiaomi.com>
2022-12-03 11:47:04 +08:00
Peter Bee
c26fd6565d
drivers/video: enhance v4l2 compatibility
...
Add common BSD v4l2 header file
Complete ioctls according to standard v4l2 drivers
Signed-off-by: Peter Bee <bijunda1@xiaomi.com>
2022-12-03 02:48:01 +08:00
田昕
cb0418676f
include/nuttx:add linux-like notifier
...
Signed-off-by: 田昕 <tianxin7@xiaomi.com>
2022-12-02 22:56:22 +08:00
Peter Bee
87e16c3694
drivers/video: add support for yuv420p
...
Add calc functions for buffer size (yuv420p is 6Byte/4px)
Signed-off-by: Peter Bee <bijunda1@xiaomi.com>
2022-12-02 13:18:20 +08:00
Peter Bee
365b1f4bb8
drivers/video: add support for YUYV format
...
Add YUYV format which is used by most USB Cameras
Signed-off-by: Peter Bee <bijunda1@xiaomi.com>
2022-12-02 13:18:20 +08:00
FASTSHIFT
0ae242aa8d
drivers/video/fb: add poll support
...
Signed-off-by: pengyiqiang <pengyiqiang@xiaomi.com>
2022-12-01 15:08:03 +08:00
chao an
4281acdb83
net/chksum: move all chksum api declarations to common header
...
The following APIs need to be overriden by the arch after enabling
CONFIG_NET_ARCH_CHKSUM, move these functions to the common header
file to avoid prototype conflicts
uint16_t chksum(uint16_t sum, FAR const uint8_t *data, uint16_t len);
uint16_t net_chksum(FAR uint16_t *data, uint16_t len);
uint16_t ipv4_upperlayer_chksum(FAR struct net_driver_s *dev, uint8_t proto);
uint16_t ipv6_upperlayer_chksum(FAR struct net_driver_s *dev,
uint8_t proto, unsigned int iplen);
uint16_t ipv4_chksum(FAR struct ipv4_hdr_s *ipv4);
Signed-off-by: chao an <anchao@xiaomi.com>
2022-11-30 15:08:14 +08:00
liyi
391b501639
net: extract l3 header build code into new functions
...
Signed-off-by: liyi <liyi25@xiaomi.com>
2022-11-29 18:36:15 +08:00
Masayuki Ishikawa
8b4ffb8d3e
virtio: Add virtio drivers
...
Summary:
- This commit adds virtio-mmio and virtio-net drivers
Impact:
- None (new drivers)
Testing:
- Tested with rv-virt (will be updated later) with QEMU-7.1
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2022-11-29 13:16:44 +08:00
chao an
cdaa2ba8d4
mm/iob: new function iob_update_pktlen() to update packet length of the iob
...
Signed-off-by: chao an <anchao@xiaomi.com>
2022-11-29 13:16:23 +08:00
chao an
b452e2fddf
mm/iob: new function iob_reserve() to adjust headroom offset
...
Signed-off-by: chao an <anchao@xiaomi.com>
2022-11-29 13:16:23 +08:00
田昕
1d8d6e5ed2
drivers/syslog:support stream as syslog backend.
...
Signed-off-by: 田昕 <tianxin7@xiaomi.com>
2022-11-28 20:19:00 +08:00
Xiang Xiao
af2b491420
driver/segger: Move SYSLOG_RTT config from drivers/syslog to drivers/segger
...
and remove include/nuttx/syslog/syslog_rtt.h
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-11-27 23:10:39 +01:00
Xiang Xiao
fd268d7123
drivers/segger: Add STREAM_RTT option
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-11-27 23:10:39 +01:00
Xiang Xiao
df6666ab5e
libc/stream: Rename lib_stream_[put|get]c to lib_stream_[put|get]
...
keep the macro consistent with the callback name
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-11-27 22:59:21 +01:00
yinshengkai
126b33c488
drivers/segger: add Segger RTT stream support
...
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2022-11-27 23:39:20 +08:00
chao an
8850dee746
net/devif: move preprocess of txpoll into common code
...
Signed-off-by: chao an <anchao@xiaomi.com>
2022-11-27 12:11:12 +08:00
yinshengkai
511070c300
include: unified stream read and write interface
...
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2022-11-25 21:41:51 +08:00
Xiang Xiao
5fd1379d3f
syslog: Move syslog stream to libc like other stream implementation
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-11-25 01:46:31 +08:00
Xiang Xiao
90c641d4c1
libc/streams: Add lib_[si]gets_t callback
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-11-25 01:07:12 +08:00
Xiang Xiao
5ee1da4211
libc/streams: Ensure the different stream type has the common layout
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-11-25 01:07:12 +08:00
田昕
28739b8b8a
libc/stream:Add mtd backend stream.
...
Signed-off-by: 田昕 <tianxin7@xiaomi.com>
2022-11-24 12:07:10 +08:00
dongjiuzhu1
ccf0c3566e
net/local: support cmd SO_PEERCRED
...
the credentials of the peer process connected to this socket.
refs:https://man7.org/linux/man-pages/man7/unix.7.html
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2022-11-23 15:01:54 +08:00
dongjiuzhu1
e6f8ccda4a
net/get/setsockopt: add si_get/setsockopt interface to simply get/setsockopt
...
move private option to protocol sockif
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2022-11-23 15:01:54 +08:00
zhangyuan21
d8051ba979
nuttx/sched: merge up_block_task and up_unblock_task
2022-11-22 22:59:08 +08:00
wangbowen6
25bfd437fe
fs_epoll: support extend the epoll dynamicly.
...
1. epoll_ctl(EPOLL_CTL_ADD) support extend the epoll
events dynamicly;
2. enhance the epoll performance by moving some poll setup
and teardown process to the EPOLL_CTL_ADD/DEL/MOD;
Signed-off-by: wangbowen6 <wangbowen6@xiaomi.com>
2022-11-22 21:08:56 +08:00
Ville Juven
f8a6ec2cdf
mm/shm: Fix ARCH_SHM_VEND
...
The last address is base+size-1
2022-11-22 08:54:34 +01:00
Ville Juven
48b9a8d6f4
mm/shm: Move the vma allocators to separate functions
...
This will allow changing the underlying backend, i.e. granule allocator,
to something more efficient, if this is needed later.
Also, it gives easier access to the common SHM book keeping.
2022-11-22 08:54:34 +01:00
Ville Juven
458ff380e5
mm/gran: Allow run-time execution of gran_reserve
...
User can ask for specific granules to be allocated.
This is useful for one thing only: when mmap() is called for a specific
vaddr. The parameter itself is non-sensical, this is just to satisfy
the POSIX standard.
2022-11-22 08:54:34 +01:00
zhangyuan21
5c1b518314
nuttx/sched: move reprioritize process to public function
2022-11-22 15:29:00 +09:00
zhangyuan21
08f7152d9f
nuttx/sched: remove nxsched_remove_readytorun from up_block_task
...
It takes about 10 cycles to obtain the task list according to the task
status. In most cases, we know the task status, so we can directly
add the task from the specified task list to reduce time consuming.
2022-11-22 15:29:00 +09:00
zhangyuan21
e54b602208
nuttx/sched: remove nxsched_remove_blocked from up_unblock_task
...
It takes about 10 cycles to obtain the task list according to the task
status. In most cases, we know the task status, so we can directly
delete the task from the specified task list to reduce time consuming.
2022-11-22 15:29:00 +09:00
Xiang Xiao
af2aa13873
phtread: Change stacksize type from long to size_t
...
follow the standard prototype:
https://pubs.opengroup.org/onlinepubs/9699919799/functions/pthread_attr_getstack.html
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-11-22 08:23:37 +09:00
Robert-Ionut Alexa
039262484a
drivers/sensors: add LTR308 ambient light sensor
...
Add support for the LTR308 ambient light sensor through I2C. Currently,
the interrupt-driven mode of operation is not supported.
Signed-off-by: Robert-Ionut Alexa <robertalexa2000@gmail.com>
2022-11-21 23:48:52 +08:00
Xiang Xiao
1a942c3c31
Fix lcd/ili9225.c:388:46: error: shift count >= width of type
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-11-20 14:34:44 +01:00
qinwei1
ce95db46b9
include/nuttx/tls.h: add CXX extern define for tls
...
Summary:
In order to use C functions in C++ code, "extern C"
needs to be defined in the C header file.
Add "extern C" define for tls.h
Signed-off-by: qinwei1 <qinwei1@xiaomi.com>
2022-11-18 12:42:26 +08:00
qinwei1
8021dfece6
sched/task/task_getpid: getpid should return process id not thread id
...
Summary:
implement the right semantics:
1. getpid should return the main thread id
2. gettid should return the current thread id
Refer to:
https://github.com/apache/incubator-nuttx/issues/2499
https://github.com/apache/incubator-nuttx/pull/2518
Signed-off-by: qinwei1 <qinwei1@xiaomi.com>
2022-11-17 17:58:08 +08:00
zhangyuan21
f27065cb9e
sched/mqueue: make mqueue and mqueue sysv can disable separately
2022-11-16 20:03:40 +08:00
Simon Filgis
6376d90c3d
In case of SAMV7 it is possible to overwrite the pwm output with 0 or 1 immediately. Changing the dutycycle to 0 or 100 will take effect only on end of cycle, which could be to late for some applications.
...
This solution adds a overwrite flag and value when updating the duty cycle.
2022-11-16 12:07:09 +08:00
David Sidrane
d05a5d16ee
imxrt:Support TJ1103 PHY
2022-11-15 02:27:35 +08:00
anjiahao
a4563b8744
Fix the coding style and typo issue
...
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-11-14 09:34:04 +09:00
Andrés Sánchez Pascual
9f029194e1
sys: boardctl: Add more reset causes to enum
...
Signed-off-by: Andrés Sánchez Pascual <tito97_sp@hotmail.com>
2022-11-13 21:26:31 -03:00
Xiang Xiao
f52ad42425
Fix error: unknown attribute 'long_call' ignored [-Werror,-Wunknown-attributes]
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-11-13 22:35:19 +08:00
Xiang Xiao
6f33dd6ea0
mm/heap: Change TCB_FLAG_HEAPCHECK to TCB_FLAG_HEAP_CHECK
...
align with other flags naming convention
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-11-12 09:39:01 +01:00
Zhe Weng
8239ddeef4
net/nat: Add TCP entry expiration logic
...
Add TCP entry expiration logic for NAT, with entries changed from sq to dq for fast removal.
Signed-off-by: Zhe Weng <wengzhe@xiaomi.com>
2022-11-11 14:36:55 +08:00
Zhe Weng
b595430578
net: add basic NAT workflow
...
Add basic functions for NAT (NAPT), remaining some logic unimplemented (UDP, ICMP, port assignment, etc). NAT for TCP can work now (unless port conflicts).
Outbound: LAN -> Forward -> NAT(only if targeting at WAN) -> WAN
Inbound: WAN -> NAT(only from WAN, change dest) -> Forward -> LAN
Signed-off-by: Zhe Weng <wengzhe@xiaomi.com>
2022-11-11 14:36:55 +08:00
ligd
4501490302
hwspinlock: add hwspinlock driver for multi CPU
...
The design follow Linux kernel:
https://www.kernel.org/doc/html/latest/locking/hwspinlock.html
Signed-off-by: ligd <liguiding@pinecone.net>
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-11-09 09:12:01 +01:00
anjiahao
0c26658906
random_pool:add a new api arc4random
...
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2022-11-09 06:41:19 +01:00
Michael Jung
b401db5ca4
prctl syscall is present unconditionally
...
I had a link problem regarding prctl while CONFIG_TASK_NAME_SIZE was
defined 0 and building in protected mode. Turns out in monolithic
build prctl is present no matter what CONFIG_TASK_NAME_SIZE, but in
protected mode build its only present if CONFIG_TASK_NAME_SIZE > 0.
So, bring protected mode build in sync with the monolithic one.
Signed-off-by: Michael Jung <michael.jung@secore.ly>
2022-11-09 01:21:16 +08:00
Xiang Xiao
38d1244751
mm/mempool: Remove MM_MEMPOOL option from Kconfig
...
since the linker can remove the unused object file from the final image
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-11-08 10:18:27 -03:00
Lucas Saavedra Vaz
fa0ccce046
audio: Add support for the ES8388 codec (output)
2022-11-08 10:03:18 -03:00
Xiang Xiao
ace71efe77
drivers/mbox: Don't reference the nonexistent CONFIG_MBOX
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-11-07 10:14:20 +01:00
Xiang Xiao
a7e99346a1
net/tcp: Make TCP_MAXRTX and TCP_MAXSYNRTX configurable
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-11-07 10:05:57 +01:00
anjiahao
64ebdb0339
include/endian:add openbsd style macro
...
bemtoh htobem lemtoh htolem
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2022-11-05 20:37:39 +08:00
Xiang Xiao
e292200f61
video: Move _VIDIOCBASE and _VIDIOC to include/nuttx/fs/ioctl.h
...
to align with other drivers
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-11-05 06:51:53 +01:00
Xiang Xiao
3b060bad34
Fix error: format specifies type 'unsigned short' but the argument has type 'int'
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-11-01 17:12:42 +01:00
zhangyuan21
b118083c35
arch_timer: adjust timer/arch_timer to support tick
...
Enable CONFIG_SCHED_TICKLESS_TICK_ARGUMENT in tickless mode
to improve the performance.
2022-11-01 21:53:08 +08:00
Xiang Xiao
28947517ca
sched/spawn: Rename task_spawnattr_[get|set]stack[size|addr] to posix_spawnattr_[get|set]stack[size|addr]
...
since they can be not only used in task_spawn but also in posix_spawn
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-11-01 09:51:18 +09:00
chao an
e0a3fdf982
sched/posix/timer: handle invaild timerid correctly
...
TIMER_SETTIME(2)
NAME
timer_settime, timer_gettime - arm/disarm and fetch state of POSIX per-process timer
SYNOPSIS
#include <time.h>
int timer_settime(timer_t timerid, int flags,
const struct itimerspec *new_value,
struct itimerspec *old_value);
int timer_gettime(timer_t timerid, struct itimerspec *curr_value);
...
ERRORS
...
EINVAL timerid is invalid.
Signed-off-by: chao an <anchao@xiaomi.com>
2022-10-31 19:59:29 -03:00
Xiang Xiao
e08c296a8e
Change the type of tg_joinlock, mm_lock and md_lock from sem_t to mutex_t
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-10-31 10:35:53 +01:00