Commit graph

7595 commits

Author SHA1 Message Date
wangmingrong1
b27dc9ee7f mm: Unified memory management alignment length
Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com>
2024-12-30 19:49:00 +08:00
Bowen Wang
f0a3c43a54 rpmsg/rpmsg_virtio_lite: rename rpmsg_virtio to rpmsg_virtio_lite
Because rpmsg_virtio_lite is a better name to inform user that the
rpmsg virtio (original name) is a lite implementation of rpmsg virtio.

Signed-off-by: Bowen Wang <wangbowen6@xiaomi.com>
2024-12-28 22:43:20 -03:00
zhangyuan29
ca4fd09275 arch_atomic: change atomic_fetch_x interface to inline function
When CONFIG_LIBC_ARCH_ATOMIC is defined, the atomic_fetch_x
interface conflicts with the atomic_fetch_x interface in libcxx.
Therefore, it has been changed to a inline function.

Signed-off-by: zhangyuan29 <zhangyuan29@xiaomi.com>
2024-12-28 11:46:04 +08:00
zhanghongyu
05f7b7ac97 include/netinet/arp.h: change the type of arp_dev from uint8_t to char
the same variable type in linux is char, in order to avoid modifying
the third-party library code when porting the third-party library code.

Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2024-12-26 23:29:23 +08:00
zhangshoukui
f8377f8666 Add LINE_MAX configuration
Signed-off-by: zhangshoukui <zhangshoukui@xiaomi.com>
2024-12-26 13:25:19 +08:00
YAMAMOTO Takashi
958e30b3e2 Add some clarification comments on the mutex api 2024-12-25 11:11:41 +08:00
Matteo Golin
1cbb7183ad wireless/ieee82011: Used definitions from existing NuttX includes where possible, and otherwise defined macros using built-ins to allow the 802.11 header to compile on Arch Linux where cpu_to_le16, le32_to_cpu and hweight8 definitions were missing. 2024-12-23 14:50:13 +08:00
hujun5
8411a97b85 use small lock in following files
arch/xtensa/src/esp32s3/esp32s3_rtc_lowerhalf.c
arch/z16/src/z16f/z16f_serial.c
arch/z80/src/z8/z8_serial.c
boards/arm/max326xx/max32660-evsys/src/max326_button.c
boards/arm/stm32/stm32f4discovery/src/stm32_gs2200m.c
drivers/i2c/i2c_bitbang.c
drivers/power/supply/act8945a.c
drivers/serial/uart_pci_16550.c
drivers/serial/uart_pl011.c
drivers/wireless/bluetooth/bt_uart_shim.c

Signed-off-by: hujun5 <hujun5@xiaomi.com>
2024-12-22 18:43:26 +08:00
yaojingwei
bbd6931d61 nuttx/audio: add fake audio driver.
Some checks are pending
Build Documentation / build-html (push) Waiting to run
The fake audio driver aims to easily simulate the functions of audio driver through reading and writing files.
With it, you can conveniently customize and define various capture or playback audio drivers for debugging or automated testing.

Signed-off-by: yaojingwei <yaojingwei@xiaomi.com>
2024-12-20 11:47:08 -03:00
guoshichao
a58d6552e6 fcntl: add sys/fcntl.h header file
Signed-off-by: guoshichao <guoshichao@xiaomi.com>
2024-12-20 11:46:14 -03:00
guoshichao
1701ca1e11 sem: add sys/sem.h header file
Signed-off-by: guoshichao <guoshichao@xiaomi.com>
2024-12-20 11:46:14 -03:00
guoshichao
0d4e36ce29 wait: add wait.h header file
Signed-off-by: guoshichao <guoshichao@xiaomi.com>
2024-12-20 11:46:14 -03:00
guoshichao
0af01312fd sys/socket: add SOL_PACKET packet operation type definition
Signed-off-by: guoshichao <guoshichao@xiaomi.com>
2024-12-20 11:46:14 -03:00
guoshichao
2badabfb67 signal: add include/sys/signal.h to the signal
Signed-off-by: guoshichao <guoshichao@xiaomi.com>
2024-12-20 11:46:14 -03:00
guoshichao
8fcdae3544 sys/types.h: add loff_t data type definition
Signed-off-by: guoshichao <guoshichao@xiaomi.com>
2024-12-20 11:46:14 -03:00
guoshichao
092f4a1b79 sys/mount: add mount flag definition
Signed-off-by: guoshichao <guoshichao@xiaomi.com>
2024-12-20 11:46:14 -03:00
guoshichao
16789ed818 signal: add SA_NOMASK flag definition
according to linux kernel doc, "the SA_NOMASK is an obsolete,
nonstandard synonym for this SA_NODEFER" flag, and some ltp linux kernel
testcases need this flag, so we add this flag to make the testcases pass

Signed-off-by: guoshichao <guoshichao@xiaomi.com>
2024-12-20 11:46:14 -03:00
guoshichao
a8cdd63d56 proctl: add PR_SET_DUMPABLE support
Signed-off-by: guoshichao <guoshichao@xiaomi.com>
2024-12-20 11:46:14 -03:00
guoshichao
203fb15c2e limits: add LINE_MAX limits definition
Signed-off-by: guoshichao <guoshichao@xiaomi.com>
2024-12-20 11:46:14 -03:00
guoshichao
23e0b70290 sys/resource: add RLIMIT_NICE consntant
Signed-off-by: guoshichao <guoshichao@xiaomi.com>
2024-12-20 11:46:14 -03:00
guoshichao
2b34c61c6e signal: add sa_restorer to struct sigaction
Signed-off-by: guoshichao <guoshichao@xiaomi.com>
2024-12-20 11:46:14 -03:00
wangjianyu3
0fe3aebd6a nuttx/uorb.h: Add carrier frequency for GNSS Satellite
The `struct sensor_gnss_satellite.cf` may be parsed from `GSV.signal_id`(e.g. NMEA 0183 v4.11) and `struct sensor_gnss_satellite.constellation`

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2024-12-20 20:05:26 +08:00
Alan Carvalho de Assis
0e162eeb7a drivers/sensors: Add Velocity sensor type to UORB
This patch adds support for velocity measurement sensors.
I plan to use it as a generic velocity type to be used for
Renesas FS3000 (Air Velocity Flow).

Signed-off-by: Alan C. Assis <acassis@gmail.com>
2024-12-19 23:58:04 +01:00
Antoine Juckler
1f2946b7ab include/threads.h: Replace thrd_ defines by actual function definitions 2024-12-19 21:56:02 +08:00
guoshichao
ef6723af9e nuttx: add get_current_dir_name implementation
Signed-off-by: guoshichao <guoshichao@xiaomi.com>
2024-12-19 20:55:51 +08:00
hujun5
bc6bf019dd bt_buf: use small lock to protect bt_bufferlist_s
reason:
We would like to replace the big lock with a small lock.

Signed-off-by: hujun5 <hujun5@xiaomi.com>
2024-12-18 18:10:23 +08:00
Alin Jerpelea
fe90b2ee7a include: migrate to SPDX identifier
Most tools used for compliance and SBOM generation use SPDX identifiers
This change brings us a step closer to an easy SBOM generation.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2024-12-18 17:51:57 +08:00
Alin Jerpelea
83de09d31a drivers/input/uinput: migrate to ASF license
Xiaomi has submitted the SGA and the license can be migrated to ASF

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2024-12-18 17:46:28 +08:00
Ville Juven
510d9659b4 sem_waitirq: Use kmap interface to access the semaphore
The temporary mappings via addrenv_select() and addrenv_restore() simply
do not work from interrupt, so remove its usage and replace with kmap
which is safe.
2024-12-18 08:57:01 +08:00
Ville Juven
95d1e52535 mm/kmap: Provide the user tcb as parameter to map_user()
This allows mapping pages from others than the running task. Obiously
this can only be done with proper preparations (the task in question
cannot exit before the mapping is released).
2024-12-18 08:57:01 +08:00
Eren Terzioglu
3894dc12b0 driver/capture: Add ioctl function for architecture specific ioctl commands 2024-12-17 13:35:42 -03:00
chao an
157e75c7ab lib/circbuf: add static initialize macro helper
struct circbuf_s circ = CIRCBUF_INITIALIZER(buffer, size);

Signed-off-by: chao an <anchao@lixiang.com>
2024-12-17 20:48:23 +08:00
chao an
e7c5608f4a drivers/reset: fix typo retrun -> return
Signed-off-by: chao an <anchao@lixiang.com>
2024-12-17 20:48:07 +08:00
chao an
f7ab66fa86 drivers/can: fix typo specfic -> specific
Signed-off-by: chao an <anchao@lixiang.com>
2024-12-17 20:48:07 +08:00
zhaohaiyang1
0913fa4b73 nuttx/can.h: delete "begin_packed_struct" and "end_packed_struct" qualifier
Signed-off-by: zhaohaiyang1 <zhaohaiyang1@xiaomi.com>
2024-12-16 18:52:02 +08:00
Alin Jerpelea
6c322d0bfa include/crypto/sha1: migrate to SPDX identifier
Most tools used for compliance and SBOM generation use SPDX identifiers
This change brings us a step closer to an easy SBOM generation.

define NuttX local NuttX-PublicDomain identifier

 “Public Domain” is a concept distinct from copyright licensing;
it generally means that the work no longer has any copyright protection
or ownership, and therefore requires no license permission in order to
use, copy, modify, distribute, perform, display, etc.
In the United States – and many jurisdictions – copyright protections
attach automatically to creative works upon creation if they satisfy
certain minimum criteria.
“Public Domain” would thus represent a significant change to the legal
status of the work.
The rules around “Public Domain” often vary or are unspecified
jurisdiction to jurisdiction. Adding to the confusion, some
jurisdictions may not even recognize the concept of “Public Domain”
(or similar). As such, a license may nevertheless be required or implied
in these cases. Even in the U.S., there is no clear,
officially-sanctioned procedure for affirmatively placing
copyright-eligible works into the “Public Domain” aside from natural
statutory expiration of copyright. The bottom-line is, there are few if
any objective, brightline rules for proactively placing
copyright-eligible works into the Public Domain that we can broadly
rely on.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2024-12-16 14:18:35 +08:00
Alin Jerpelea
3b1a5ccffa include/crypto/rijndael: migrate to SPDX identifier
Most tools used for compliance and SBOM generation use SPDX identifiers
This change brings us a step closer to an easy SBOM generation.

define NuttX local NuttX-PublicDomain identifier

 “Public Domain” is a concept distinct from copyright licensing;
it generally means that the work no longer has any copyright protection
or ownership, and therefore requires no license permission in order to
use, copy, modify, distribute, perform, display, etc.
In the United States – and many jurisdictions – copyright protections
attach automatically to creative works upon creation if they satisfy
certain minimum criteria.
“Public Domain” would thus represent a significant change to the legal
status of the work.
The rules around “Public Domain” often vary or are unspecified
jurisdiction to jurisdiction. Adding to the confusion, some
jurisdictions may not even recognize the concept of “Public Domain”
(or similar). As such, a license may nevertheless be required or implied
in these cases. Even in the U.S., there is no clear,
officially-sanctioned procedure for affirmatively placing
copyright-eligible works into the “Public Domain” aside from natural
statutory expiration of copyright. The bottom-line is, there are few if
any objective, brightline rules for proactively placing
copyright-eligible works into the Public Domain that we can broadly
rely on.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2024-12-16 14:18:35 +08:00
Alin Jerpelea
a273b094fa include/crypto/poly1305: migrate to SPDX identifier
Most tools used for compliance and SBOM generation use SPDX identifiers
This change brings us a step closer to an easy SBOM generation.

define NuttX local NuttX-PublicDomain identifier

 “Public Domain” is a concept distinct from copyright licensing;
it generally means that the work no longer has any copyright protection
or ownership, and therefore requires no license permission in order to
use, copy, modify, distribute, perform, display, etc.
In the United States – and many jurisdictions – copyright protections
attach automatically to creative works upon creation if they satisfy
certain minimum criteria.
“Public Domain” would thus represent a significant change to the legal
status of the work.
The rules around “Public Domain” often vary or are unspecified
jurisdiction to jurisdiction. Adding to the confusion, some
jurisdictions may not even recognize the concept of “Public Domain”
(or similar). As such, a license may nevertheless be required or implied
in these cases. Even in the U.S., there is no clear,
officially-sanctioned procedure for affirmatively placing
copyright-eligible works into the “Public Domain” aside from natural
statutory expiration of copyright. The bottom-line is, there are few if
any objective, brightline rules for proactively placing
copyright-eligible works into the Public Domain that we can broadly
rely on.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2024-12-16 14:18:35 +08:00
Alin Jerpelea
7e74a0b8fa include/crypto/md5: migrate to SPDX identifier
Most tools used for compliance and SBOM generation use SPDX identifiers
This change brings us a step closer to an easy SBOM generation.

define NuttX local NuttX-PublicDomain identifier

 “Public Domain” is a concept distinct from copyright licensing;
it generally means that the work no longer has any copyright protection
or ownership, and therefore requires no license permission in order to
use, copy, modify, distribute, perform, display, etc.
In the United States – and many jurisdictions – copyright protections
attach automatically to creative works upon creation if they satisfy
certain minimum criteria.
“Public Domain” would thus represent a significant change to the legal
status of the work.
The rules around “Public Domain” often vary or are unspecified
jurisdiction to jurisdiction. Adding to the confusion, some
jurisdictions may not even recognize the concept of “Public Domain”
(or similar). As such, a license may nevertheless be required or implied
in these cases. Even in the U.S., there is no clear,
officially-sanctioned procedure for affirmatively placing
copyright-eligible works into the “Public Domain” aside from natural
statutory expiration of copyright. The bottom-line is, there are few if
any objective, brightline rules for proactively placing
copyright-eligible works into the Public Domain that we can broadly
rely on.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2024-12-16 14:18:35 +08:00
Alin Jerpelea
085c7e7b81 include/crypto/cast: migrate to SPDX identifier
Most tools used for compliance and SBOM generation use SPDX identifiers
This change brings us a step closer to an easy SBOM generation.

define NuttX local NuttX-PublicDomain identifier

 “Public Domain” is a concept distinct from copyright licensing;
it generally means that the work no longer has any copyright protection
or ownership, and therefore requires no license permission in order to
use, copy, modify, distribute, perform, display, etc.
In the United States – and many jurisdictions – copyright protections
attach automatically to creative works upon creation if they satisfy
certain minimum criteria.
“Public Domain” would thus represent a significant change to the legal
status of the work.
The rules around “Public Domain” often vary or are unspecified
jurisdiction to jurisdiction. Adding to the confusion, some
jurisdictions may not even recognize the concept of “Public Domain”
(or similar). As such, a license may nevertheless be required or implied
in these cases. Even in the U.S., there is no clear,
officially-sanctioned procedure for affirmatively placing
copyright-eligible works into the “Public Domain” aside from natural
statutory expiration of copyright. The bottom-line is, there are few if
any objective, brightline rules for proactively placing
copyright-eligible works into the Public Domain that we can broadly
rely on.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2024-12-16 14:18:35 +08:00
Alin Jerpelea
d9b5c6e498 include/search: migrate to SPDX identifier
Most tools used for compliance and SBOM generation use SPDX identifiers
This change brings us a step closer to an easy SBOM generation.

define NuttX local NuttX-PublicDomain identifier

 “Public Domain” is a concept distinct from copyright licensing;
it generally means that the work no longer has any copyright protection
or ownership, and therefore requires no license permission in order to
use, copy, modify, distribute, perform, display, etc.
In the United States – and many jurisdictions – copyright protections
attach automatically to creative works upon creation if they satisfy
certain minimum criteria.
“Public Domain” would thus represent a significant change to the legal
status of the work.
The rules around “Public Domain” often vary or are unspecified
jurisdiction to jurisdiction. Adding to the confusion, some
jurisdictions may not even recognize the concept of “Public Domain”
(or similar). As such, a license may nevertheless be required or implied
in these cases. Even in the U.S., there is no clear,
officially-sanctioned procedure for affirmatively placing
copyright-eligible works into the “Public Domain” aside from natural
statutory expiration of copyright. The bottom-line is, there are few if
any objective, brightline rules for proactively placing
copyright-eligible works into the Public Domain that we can broadly
rely on.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2024-12-16 14:18:35 +08:00
geniusdo
fdbf520a99 fix a typo 2024-12-15 17:53:48 -03:00
hujun5
a459280fac use atomic to protect f_refs
fix regresion from https://github.com/apache/nuttx/pull/14801

Signed-off-by: hujun5 <hujun5@xiaomi.com>
2024-12-15 09:43:36 -03:00
hujun5
98ce36cdc7 remove fl_crefs
Signed-off-by: hujun5 <hujun5@xiaomi.com>
2024-12-13 23:04:10 +08:00
p-szafonimateusz
7b8f01f2da drivers/can: add CTU CAN FD driver (qemu only)
Add CTU CAN FD driver for qemu only:
https://www.qemu.org/docs/master/system/devices/can.html#ctu-can-fd-support-examples

Signed-off-by: p-szafonimateusz <p-szafonimateusz@xiaomi.com>
2024-12-13 11:19:22 +08:00
p-szafonimateusz
033f203e2a drivers/can: add Kvaser PCI card driver (qemu only)
add Kvaser PCI card driver support, works only with QEMU now:

https://www.qemu.org/docs/master/system/devices/can.html#examples-how-to-use-can-emulation-for-sja1000-based-boards

Signed-off-by: p-szafonimateusz <p-szafonimateusz@xiaomi.com>
2024-12-13 11:19:22 +08:00
ligd
4a51c21afc sched/clock: call up_timer_gettime() to get higher resolution
Signed-off-by: ligd <liguiding1@xiaomi.com>
2024-12-12 14:47:02 +08:00
chao an
1efbe6b302 binfmt/modlib: reduce size of binary_s if CONFIG_LIBC_MODLIB is disabled
Test on nsh/sim

before:
sizeof(struct binary_s): 216

after:
sizeof(struct binary_s): 56(-160)

Signed-off-by: chao an <anchao@lixiang.com>
2024-12-12 02:06:05 +08:00
zhangyuan29
b74a50775f sem: change sem wait to atomic operation
Add sem_wait fast operations, use atomic to ensure
atomicity of semcount operations, and do not depend
on critical section.

Test with robot:
before modify:
nxmutex_lock cost: 78 ns
nxmutex_unlock cost: 82 ns

after modify:
nxmutex_lock cost: 28 ns
nxmutex_unlock cost: 14 ns

Signed-off-by: zhangyuan29 <zhangyuan29@xiaomi.com>
2024-12-10 22:00:42 +08:00
zhangyuan29
46f8b3adaf atomic: Unify the compare_exchange functions of nx and stdatomic
define nx_atomic_compare_exchange_weak and nx_atomic_compare_exchange_strong function

Signed-off-by: zhangyuan29 <zhangyuan29@xiaomi.com>
2024-12-10 22:00:42 +08:00