Commit Graph

54290 Commits

Author SHA1 Message Date
makejian
3240540952 pthread/realtime: export interfaces about pthread ceiling priority
pthread_mutex_setprioceiling and pthread_mutex_getprioceiling refers
https://pubs.opengroup.org/onlinepubs/9699919799/functions/pthread_mutex_setprioceiling.html
Signed-off-by: makejian <makejian@xiaomi.com>
2024-09-10 01:26:31 +08:00
makejian
85f8677e21 nxmutex: export priority ceiling interfaces with nxsem
Signed-off-by: makejian <makejian@xiaomi.com>
2024-09-10 01:26:31 +08:00
makejian
ee78219f9c semaphore: export priority ceiling interfaces in semaphore
Signed-off-by: makejian <makejian@xiaomi.com>
2024-09-10 01:26:31 +08:00
makejian
bcb90fab7c nuttx/crypto: export Diffie-Hellman algorithm
Supplementary CRK_DH_MAKE_PUBLIC and CRK_DH_COMPUTE_KEY with curve25519
Signed-off-by: makejian <makejian@xiaomi.com>
2024-09-09 23:55:33 +08:00
makejian
882c09abb3 nuttx/crypto: export ecdsa sign and verify in SECP256R1 curve
Signed-off-by: makejian <makejian@xiaomi.com>
2024-09-09 23:55:33 +08:00
dongjiuzhu1
cccdaf8f88 include/sensors: import public pre-processor definitions types and to uorb.h
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2024-09-09 22:40:30 +08:00
dongjiuzhu1
33f3c3552f Revert "Fix unwanted flush in the SPI slave driver"
because if priv->rx_length is zero , need to call SPIS_CTRLR_QPOLL to
receive new data from lower half and update priv->rx_length.

This reverts commit 6cb649ecf6.
2024-09-09 11:05:07 -03:00
zhanghongyu
7ba125f7cd netdb: Make NETDB_DNSSERVER_NAMESERVERS effective for NETDB_RESOLVCONF
prevent the server list in resolv.conf from increasing indefinitely
the one that is overwritten is always the one configured first.

Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2024-09-09 19:47:09 +08:00
dongjiuzhu1
4e24eec7b6 sched/group/setuptask_file: duplicate idle task fd for kernel thread
The file descriptors of kernel threads should be clean and should
not be generated based on user threads. Instead, an idle thread
hould be chosen.

Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2024-09-09 19:45:29 +08:00
YAMAMOTO Takashi
0078896456 esp32: fix a way to test a config
found by GCC -Wundef
2024-09-09 10:48:09 +02:00
YAMAMOTO Takashi
92a2e22c6c Restore ASSERT/VERIFY semantics
This partly fixes esp32-devkitc:knsh.
2024-09-09 15:25:04 +08:00
dongjiuzhu1
43d0d95f81 fs/inode: using inode reference to indicate unlink and simply code
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2024-09-09 08:42:34 +08:00
dongjiuzhu1
c6815bba3b fs/mount: move inode_lock to before bind to avoid deadlock(nsh and rptun)
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2024-09-09 08:42:34 +08:00
Alan Carvalho de Assis
b733030532 doc: Add NuttX Simulation page from Confluence 2024-09-09 08:40:31 +08:00
yanghuatao
c43c91816d toolchain/ghs: add ghs link script for mps2-an500 platform
Signed-off-by: yanghuatao <yanghuatao@xiaomi.com>
2024-09-09 01:26:13 +08:00
dongjiuzhu1
2a8c023357 fs/inode: using orig_row to ensure correct free logic
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2024-09-09 01:24:08 +08:00
dongjiuzhu1
6542806248 fs/inode: fix assert when free error address
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2024-09-09 01:24:08 +08:00
dongjiuzhu1
c978f2fe4c drivers/mtd/bch: fix size_t overflow when offset > 4GB
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2024-09-09 01:23:02 +08:00
Huang Qi
9d5b9b7c05 Documentation: Add usage guide for the debugpoint command
See https://github.com/apache/nuttx-apps/pull/2549

Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2024-09-08 21:43:47 +08:00
George White
3f00c4aae0 rp2040: support pico-sdk 2.0.0
Since the introduction of the rp2350, the pico-sdk project has been
re-arranged and elf2uf2 has been merged in to a new 'picotool' binary
which is supplied and installed separately.
2024-09-08 21:43:22 +08:00
dongjiuzhu1
5f0230d79f drivers/bch: fix uint32 overflow issue
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2024-09-08 21:42:38 +08:00
guoshichao
99df615c9b toolchain/ghs: fix the ghs build warning
CXX:  libcxxmini/libxx_new.cxx cxarm: cxarm: cxarm: cxarm: Warning: cxarm: cxarm: Unknown option "--gnu++17" passed to linker
Warning: Warning: Warning: Warning: cxarm: Unknown option "--gnu++17" passed to linker
Unknown option "--gnu++17" passed to linker
Warning: Unknown option "--gnu++17" passed to linker
Unknown option "--gnu++17" passed to linker
Unknown option "--gnu++17" passed to linker
Warning: Unknown option "--gnu++17" passed to linker
CXX:  libcxxmini/libxx_newa.cxx cxarm: Warning: Unknown option "--gnu++17" passed to linker

Signed-off-by: guoshichao <guoshichao@xiaomi.com>
2024-09-08 21:42:13 +08:00
hujun5
41e976d119 libs/libc/queue: inline queue list to improve performance
add a config CONFIG_LIBC_INLINE_QUEUE to inline the queue list

test:
We can use qemu for testing.
compiling
make distclean -j20; ./tools/configure.sh -l qemu-armv8a:nsh_smp ;make -j20
running
qemu-system-aarch64 -cpu cortex-a53 -smp 4 -nographic -machine virt,virtualization=on,gic-version=3 -net none -chardev stdio,id=con,mux=on -serial chardev:con -mon chardev=con,mode=readline -kernel ./nuttx

Signed-off-by: hujun5 <hujun5@xiaomi.com>
2024-09-08 18:13:33 +08:00
hujun5
1e57a5653c sched/sched: simplify the implementation of the function nxsched_readytorun_setpriority
Configuring NuttX and compile:
$ ./tools/configure.sh -l qemu-armv8a:nsh_smp
$ make
Running with qemu
$ qemu-system-aarch64 -cpu cortex-a53 -smp 4 -nographic \
   -machine virt,virtualization=on,gic-version=3 \
   -net none -chardev stdio,id=con,mux=on -serial chardev:con \
   -mon chardev=con,mode=readline -kernel ./nuttx

reason:
If the type of tcb is TSTATE_TASK_ASSIGNED, removing it using nxsched_remove_not_running
and then putting it back into the queue may result in a context switch.

Signed-off-by: hujun5 <hujun5@xiaomi.com>
2024-09-08 17:53:59 +08:00
hujun5
1c5a0bf6cc irq: add [enter|leave]_critical_section_nonirq
Configuring NuttX and compile:
$ ./tools/configure.sh -l qemu-armv8a:nsh_smp
$ make
Running with qemu
$ qemu-system-aarch64 -cpu cortex-a53 -smp 4 -nographic \
   -machine virt,virtualization=on,gic-version=3 \
   -net none -chardev stdio,id=con,mux=on -serial chardev:con \
   -mon chardev=con,mode=readline -kernel ./nuttx

reason:
In some non-irq scenarios, we can simplify
the implementation of critical sections to improve performance.

Signed-off-by: hujun5 <hujun5@xiaomi.com>
2024-09-08 17:50:51 +08:00
dependabot[bot]
5c90cd23f6 build(deps): bump github/super-linter from 6 to 7
Bumps [github/super-linter](https://github.com/github/super-linter) from 6 to 7.
- [Release notes](https://github.com/github/super-linter/releases)
- [Changelog](https://github.com/github/super-linter/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/super-linter/compare/v6...v7)

---
updated-dependencies:
- dependency-name: github/super-linter
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-09-07 12:08:11 +08:00
Luchian Mihai
eadc2f5690 feat: add basic driver for amg88xx sensor
Basic amg88xx sensor handling (open, close, read, ioctl).
No interrupts supported. I intend to add support for this feature when I
gain more know-how on nuttx/posix.
2024-09-07 12:03:38 +08:00
p-szafonimateusz
882c0d0a47 arch/x86_64: convert all asm() to __asm__()
asm() is not supported by -std=c99, __asm__() is more portable

Signed-off-by: p-szafonimateusz <p-szafonimateusz@xiaomi.com>
2024-09-07 01:01:24 +02:00
YAMAMOTO Takashi
8b81689f2c Appease a GCC warning
```
common/xtensa_swint.c:442:24: error: passing argument 1 of 'up_dump_register' discards 'volatile' qualifier from pointer target type [-Werror=discarded-qualifiers]
  442 |       up_dump_register(CURRENT_REGS);
      |                        ^~~~~~~~~~~~
```
2024-09-06 21:17:57 +02:00
Jorge Guzman
ae596418ae arm/linum-stm32h753bi: Add support to RFID MFRC522
Signed-off-by: Jorge Guzman jorge.gzm@gmail.com
2024-09-06 14:10:08 -03:00
ouyangxiangzhen
dc7d3470e6 arch/x86_64: Fix wrong RDTSCP implementation
RDTSCP instruction reads the current value of the processor’s
time-stamp counter (a 64-bit MSR) into the EDX:EAX registers, and it
also reads the value of the IA32_TSC_AUX MSR (address C0000103H) into
the ECX register. However, the current RDTSCP implementation does not
provide a hint for the compiler that ECX has been changed, resulting in
register corrupted and subtle errors.

Signed-off-by: ouyangxiangzhen <ouyangxiangzhen@xiaomi.com>
2024-09-06 17:27:20 +02:00
p-szafonimateusz
e58efb17cc qemu-intel64: simplify linker script
simplify linker script for qemu-intel64 - remove not needed AT instructions

Signed-off-by: p-szafonimateusz <p-szafonimateusz@xiaomi.com>
2024-09-06 21:01:28 +08:00
ouyangxiangzhen
f6e4ab25bd arch/x86_64: Support QEMU PVH ELF loader
Enabling CONFIG_ARCH_CHIP_INTEL64_PVH_BOOT will allow nuttx.elf loaded by QEMU -kernel parameter.

Signed-off-by: ouyangxiangzhen <ouyangxiangzhen@xiaomi.com>
2024-09-06 20:56:46 +08:00
p-szafonimateusz
dc92dee353 include/nuttx/net/netfilter/ip6_tables.h: fix gcc 14 errors
fix gcc 14 errors for ip6_tables.h

Signed-off-by: p-szafonimateusz <p-szafonimateusz@xiaomi.com>
2024-09-06 14:37:01 +02:00
gaohedong
5172da6b16 socketlin : add lin.h and lin bus-type
Add lin.h adn lin bus-type

Signed-off-by: gaohedong <gaohedong@xiaomi.com>
2024-09-06 17:49:29 +08:00
hujun5
427e5f18e8 irq: irq with the same priority share the same wqueue
reason:
1 We place interrupt handling functions of the same priority into the work queue corresponding
to that priority, allowing high-priority interrupts to preempt low-priority ones,
thus ensuring the real-time performance of high-priority interrupts.

2 The sole purpose of the interrupt handler is to wake
up the work queue of the corresponding priority and execute the interrupt handling function.

3 Compared to the functionality of isr threads, this
approach saves more memory, particularly when the number of interrupts is large.

Signed-off-by: hujun5 <hujun5@xiaomi.com>
2024-09-06 17:43:11 +08:00
Petro Karashchenko
c6a7816bed libs/libm/libm: increase number of 'log' iterations before epsilon relaxation
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2024-09-06 17:40:57 +08:00
Petro Karashchenko
02b1e895e2 libs/libm/libm: apply epsilon relax factor only if epsilon is small
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2024-09-06 17:40:57 +08:00
Petro Karashchenko
9cfb10069c Revert "libs/libm: fix epsilon relaxation in log and logf"
This reverts commit a2ed0ddd72.
2024-09-06 17:40:57 +08:00
hujun5
c45e4ac440 boardcrtl: change BOARDCTL_TESTSET to BOARDIOC_SPINLOCK
reason:
BOARDIOC_SPINLOCK can support the combined semantics
of disabling interrupts (irq), trylock, and spinlock.

Signed-off-by: hujun5 <hujun5@xiaomi.com>
2024-09-06 16:10:09 +08:00
Xiang Xiao
659448a9d8 fs/hostfs: Replace strcpy with memcpy
The strcpy function is dangerous because it does not check the length of the

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2024-09-06 12:27:55 +08:00
chenrun1
44351959ee mmcsd_sdio:Limit the use of sleep in mmcsd.
reference:https://github.com/apache/nuttx/pull/12971

Signed-off-by: chenrun1 <chenrun1@xiaomi.com>
2024-09-06 12:25:55 +08:00
chenrun1
0e13ea9ed1 mmcsd_sdio:Fix performing read and write in irq
In some usage scenarios, read and write tasks will be performed during interruptions. If sleep is used at this time, it will cause a timeout crash. Therefore, a macro is added to determine whether it is currently interrupted to select sleep/delay.

Signed-off-by: chenrun1 <chenrun1@xiaomi.com>
2024-09-06 12:25:55 +08:00
hujun5
40ae660d30 init: add OSINIT_TASK_READY
reason:
simplifying some code writing

Signed-off-by: hujun5 <hujun5@xiaomi.com>
2024-09-06 11:25:34 +08:00
lipengfei28
aeb98d9c05 fix Compile error
Signed-off-by: lipengfei28 <lipengfei28@xiaomi.com>
2024-09-06 10:01:11 +08:00
lipengfei28
5c119b4a03 refresh the pci test config
Signed-off-by: lipengfei28 <lipengfei28@xiaomi.com>
2024-09-06 10:01:11 +08:00
lipengfei28
b70922cb24 pci: add ioctl for userspace
which is same as OpenBSD:
https://github.com/openbsd/src/blob/master/sys/sys/pciio.h

Signed-off-by: lipengfei28 <lipengfei28@xiaomi.com>
2024-09-06 10:01:11 +08:00
lipengfei28
dba7700813 pci: add rom addr and rom size to resource
Signed-off-by: lipengfei28 <lipengfei28@xiaomi.com>
2024-09-06 10:01:11 +08:00
lipengfei28
3250625a15 pci: add find device from bus
Signed-off-by: lipengfei28 <lipengfei28@xiaomi.com>
2024-09-06 10:01:11 +08:00
lipengfei28
9dc9500aaf pci add register drivers
Signed-off-by: lipengfei28 <lipengfei28@xiaomi.com>
2024-09-06 10:01:11 +08:00