Commit Graph

55173 Commits

Author SHA1 Message Date
hujun5 5fb56f6d95 sim: add NXSYMBOLS pthread_gettid_np pthread_self
reason:
enable sim:smp can boot

This commit fixes the regression from https://github.com/apache/nuttx/pull/12561

Signed-off-by: hujun5 <hujun5@xiaomi.com>
2024-09-30 18:26:00 +08:00
anjiahao ee07a269af fs/ioctl:add FIOC_XIPBASE to get file xip address
in tmpfs/romfs, we can get file real xip address to execute program

Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2024-09-30 18:25:46 +08:00
xuxingliang 1ec3623b6b serial: add message for FORCE_PANIC
Signed-off-by: xuxingliang <xuxingliang@xiaomi.com>
2024-09-30 18:21:05 +08:00
dongjiuzhu1 58d233cb42 drivers/sensors/gnss: check invalid nmea statement to avoid parsebuffer overflow
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2024-09-30 17:00:23 +08:00
dongjiuzhu1 9599302f10 drivers/sensors/gnss: using new buffer lock avoid deadlock
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2024-09-30 17:00:23 +08:00
dongjiuzhu1 58fbe31c28 drivers/sensors/gnss: notify user when new data ready
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2024-09-30 17:00:23 +08:00
buxiasen 2746aa0643 fs: fix dup not compatible with fdcheck & fdsan
Signed-off-by: buxiasen <buxiasen@xiaomi.com>
2024-09-30 16:53:51 +08:00
dongjiuzhu1 5b889b9270 fs/dup: remove template filep to optimize dup operation
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2024-09-30 16:53:51 +08:00
liaoao e8f9ef022f reset: fix build warning when CONFIG_RESET_RPMSG is not set
Signed-off-by: liaoao <liaoao@xiaomi.com>
2024-09-30 16:43:02 +08:00
chenrun1 96206cbf9d fs/xxfs:Replace kmm with fs heap
Summary:
  1.Add configuration to allocate memory from the specified section
  2.Replace all memory operations (kmm_) in the vfs with
    fs_heap_. When FS_HEAPSIZE > 0, memory is requested for the file system by specifying a configured heap location. By default (i.e. FS_HEAPSIZE=0) fs_heap_ is equivalent to kmm_

Signed-off-by: chenrun1 <chenrun1@xiaomi.com>
2024-09-30 16:30:56 +08:00
chenrun1 e0df067d3c accept4:move function from net to fs
Summary:
  Implementation in accept4 is special, the requested newsock is saved as filep->priv. This will cause sock_file_close to use fs_heap_free filep->priv during close. When fs_heap is configured, the released memory will not be on fs_heap, causing a crash.

Signed-off-by: chenrun1 <chenrun1@xiaomi.com>
2024-09-30 16:30:56 +08:00
Xiang Xiao 8aa42eba20 can: Add more critical section to fix the race condition.
since routines called by IRQ need to be protected in SMP too.

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2024-09-30 16:29:00 +08:00
yangsong8 6290e70212 cdcacm: remove the duplicate code with serial
Signed-off-by: yangsong8 <yangsong8@xiaomi.com>
2024-09-30 16:27:21 +08:00
yangsong8 6c71276359 cdcacm: support polling mode in order to work normally in interrupt
Signed-off-by: yangsong8 <yangsong8@xiaomi.com>
2024-09-30 16:27:21 +08:00
yangsong8 7d570182be usbdev: add usb APIs for polling mode
Signed-off-by: yangsong8 <yangsong8@xiaomi.com>
2024-09-30 16:27:21 +08:00
yangsong8 6161b1ea84 cdcacm: use DMA to rx and tx
Signed-off-by: yangsong8 <yangsong8@xiaomi.com>
2024-09-30 16:27:21 +08:00
yangsong8 e3fcabaec2 cdcacm: use serial public APIs
Signed-off-by: yangsong8 <yangsong8@xiaomi.com>
2024-09-30 16:27:21 +08:00
yangsong8 b319c27f03 serial: Added APIs for receiving and sending multiple chars
Signed-off-by: yangsong8 <yangsong8@xiaomi.com>
2024-09-30 16:27:21 +08:00
xuxingliang a9b8681a9f sched: handle sched lock in interrupt
Signed-off-by: xuxingliang <xuxingliang@xiaomi.com>
2024-09-30 16:22:44 +08:00
dulibo1 1d135dbfd9 sched_smp:adjust the unlock order
1.nxsem_post wake up  nxsched_smp_call;
2.stack smp_call_data_s may return;
3.nxsched_smp_call_handler access call_data->lock is not safety;
so adjust the unlock order

Signed-off-by: dulibo1 <dulibo1@xiaomi.com>
2024-09-30 16:22:44 +08:00
zhangkai25 323b6bdea9 Check if the lower half is initialized for af_channel and af_data
Signed-off-by: zhangkai25 <zhangkai25@xiaomi.com>
2024-09-30 15:46:58 +08:00
zhangkai25 e73c32b848 Fix the situation where af_channel is still being read after it is released
Signed-off-by: zhangkai25 <zhangkai25@xiaomi.com>
2024-09-30 15:46:58 +08:00
zhangkai25 bf50899637 Allocate fifosize on demand to optimize memory
Signed-off-by: zhangkai25 <zhangkai25@xiaomi.com>
2024-09-30 15:46:58 +08:00
zhanghongyu 8bb1e30884 net/arp: modify some flow of arp return failure.
If arp search fails once, subsequent searches for the ip will directly
return failure, and sends an asynchronous arp request to try to update
arp table in the future. In this way, the psock_sendmsg interface will
not block for a long time each time because arp cannot be obtained.

This scenario is triggered when a udp socket frequently attempts to
access an ip address that does not exist on the LAN.

Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2024-09-30 15:43:02 +08:00
yezhonghui 85591fc360 pci alloc mis irq support new interface
Signed-off-by: yezhonghui <yezhonghui@xiaomi.com>
2024-09-30 15:41:28 +08:00
ouyangxiangzhen edd7d718eb arch/x86_64: Reimplement the NuttX32 multiboot1 wrapper.
This commit reimplemented the NuttX32 multiboot1 wrapper:
1. Fixed the issue of SMP AP booting.
2. Reduced memory copy overhead. We only need to copy .realmode section
   now.
3. Move the multiboot1 header to intel64_head.S.

Signed-off-by: ouyangxiangzhen <ouyangxiangzhen@xiaomi.com>
2024-09-30 15:35:41 +08:00
chenxiaoyi 45f4ce84ad xtensa: fix up_saveusercontext in interrupt context
Signed-off-by: chenxiaoyi <chenxiaoyi@xiaomi.com>
2024-09-30 14:59:00 +08:00
liaoao 02c292a25a fdt: add fdt description document
Signed-off-by: liaoao <liaoao@xiaomi.com>
2024-09-30 14:20:49 +08:00
ligd c4b969b5ee armv7/8-m/r: fix build warning
Error: armv7-m/arm_mpu.c:211:13: error: function declaration isn't a prototype [-Werror=strict-prototypes]
  211 | static void mpu_reset_internal()
      |             ^~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
make[1]: *** [Makefile:168: arm_mpu.o] Error 1

Signed-off-by: ligd <liguiding1@xiaomi.com>
2024-09-30 14:09:15 +08:00
Huang Qi 52bb516d37 risc-v: Support customize idle loop
Support customize idle loop by CONFIG_ARCH_IDLE_CUSTOM
as other architectures.

Then user can provide their own `up_idle()` function
with CONFIG_ARCH_IDLE_CUSTOM enabled.

Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2024-09-30 14:08:56 +08:00
dongjiuzhu1 aa03182bab drivers/usbdev/: don't send setconfig response for xxxx_setup with composite
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2024-09-30 14:06:35 +08:00
dongjiuzhu1 4df9a3cb42 fs/mount: move mountpoint inode create after bind
This can avoid the issue of invalid inode access when bind is not yet
completed.

Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2024-09-30 10:30:16 +08:00
buxiasen e9ea9f30ed Doc/ioexpand: add descriptions about ioexpander
Signed-off-by: buxiasen <buxiasen@xiaomi.com>
2024-09-30 08:45:37 +08:00
dulibo1 f1fc53d7da gpio:add feature for gpio wakeup
1.add pin type to cfg gpio as wake up source
2.add IOEXPANDER_OPTION_WAKEUPCFG for set wake up option

Signed-off-by: dulibo1 <dulibo1@xiaomi.com>
Signed-off-by: buxiasen <buxiasen@xiaomi.com>
2024-09-30 08:45:37 +08:00
Neo Xu 94a114b19a tools/btdecode.sh: add optional elf file parameter
Example: ./nuttx/tools/btdecode.sh aarch64-none-elf-addr2line crash.log build/nuttx
Signed-off-by: Neo Xu <neo.xu1990@gmail.com>
2024-09-30 08:44:18 +08:00
yangyalei 3e6ba4c17c audio: add AUDIO_MSG_IOERR msg to meida service
Signed-off-by: yangyalei <yangyalei@xiaomi.com>
2024-09-30 08:43:22 +08:00
Ludovic Vanasse 79fc4a1454 Documentation: improve command doc to run CI test locally
Add `<>` for user defined variable in the command to run CI test
locally. This makes it more obvious that the user needs to change those
to execute the command.
2024-09-30 08:35:07 +08:00
Ludovic Vanasse 40c5e793b6 Documentation: Clarifying the workflow of building the documentation
Remove navigating to the Documentation folder in the section description
for building the documentation, and add it to the first building steps.
Also remove the command to `cd Documentation` in the second steps, which
is necessary to properly install the dependencies to build the
documentation.
2024-09-30 08:34:34 +08:00
Ludovic Vanasse 17e59a3426 Documentation: Fix code block in implementation/simulation.rst
Some codeblock had code that wasn't correctly align, which result in the
code not being in the code block.
2024-09-30 08:33:39 +08:00
Petro Karashchenko f0cbcb95ff nuttx/libm: switch from integer to double constants in pow
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2024-09-30 08:32:46 +08:00
Petro Karashchenko 776035ee9e nuttx/libm: fix powl wrong if first parameter is negative
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2024-09-30 08:32:46 +08:00
yezhonghui 6b3f51986d pci ep support msi/msi-x test
Signed-off-by: yezhonghui <yezhonghui@xiaomi.com>
2024-09-29 22:50:59 +02:00
ligd 7cf5e7cb34 ci: corrent the error judgement on mq testcase
Signed-off-by: ligd <liguiding1@xiaomi.com>
2024-09-29 18:18:01 +08:00
ligd 1e7631e695 mqueue: refactor of mqueue
1. mainly for long time within critical_section
2. move out memcpy buffer from enter_critical_section()
3. let mq_send() return fail when mq buffer full in ISR

Signed-off-by: ligd <liguiding1@xiaomi.com>
2024-09-29 18:18:01 +08:00
ligd 083dd03018 sched: change xx_timeout param from pid to tcb
Signed-off-by: ligd <liguiding1@xiaomi.com>
2024-09-29 18:18:01 +08:00
ligd 92f8f9b8f8 clock: correct compile failed
LD: nuttx.elf
ld: /home/ligd/platform/mainline/nuttx/staging/libsched.a(mq_sndinternal.o): in function `wd_start_realtime':
/home/ligd/platform/mainline/nuttx/include/nuttx/wdog.h:274: undefined reference to `clock_realtime2absticks'
/home/ligd/platform/mainline/nuttx/include/nuttx/wdog.h:274:(.text+0xad): relocation truncated to fit: R_X86_64_PLT32 against undefined symbol `clock_realtime2absticks'
ld: /home/ligd/platform/mainline/nuttx/staging/libsched.a(mq_rcvinternal.o): in function `wd_start_realtime':
/home/ligd/platform/mainline/nuttx/include/nuttx/wdog.h:274: undefined reference to `clock_realtime2absticks'
/home/ligd/platform/mainline/nuttx/include/nuttx/wdog.h:274:(.text+0xad): relocation truncated to fit: R_X86_64_PLT32 against undefined symbol `clock_realtime2absticks'
make[1]: *** [Makefile:128: nuttx.elf] Error 1
make: *** [tools/Unix.mk:551: nuttx.elf] Error 2

Signed-off-by: ligd <liguiding1@xiaomi.com>
2024-09-29 18:18:01 +08:00
hujun5 07061d882c fix compile error:
Register: smp
Register: nsh
Register: sh
Register: getprime
Register: ostest
Espressif HAL for 3rd Party Platforms: b4c723a119344b4b71d69819019d55637fb570fd
common/xtensa_cpupause.c: In function 'xtensa_pause_handler':
common/xtensa_cpupause.c:240:3: warning: implicit declaration of function 'xtensa_savestate'; did you mean 'xtensa_setps'? [-Wimplicit-function-declaration]
  240 |   xtensa_savestate(tcb->xcp.regs);
      |   ^~~~~~~~~~~~~~~~
      |   xtensa_setps
common/xtensa_cpupause.c:243:3: warning: implicit declaration of function 'xtensa_restorestate'; did you mean 'xtensa_context_restore'? [-Wimplicit-function-declaration]
  243 |   xtensa_restorestate(tcb->xcp.regs);
      |   ^~~~~~~~~~~~~~~~~~~
      |   xtensa_context_restore

Signed-off-by: hujun5 <hujun5@xiaomi.com>
2024-09-29 16:30:33 +08:00
anjiahao 29e4e71167 modlib/dlfcn:unify same code
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2024-09-29 15:06:54 +08:00
dongjiuzhu1 fc1aefbeb3 libc/modlib: free memory resource when rmmod elf
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2024-09-29 15:06:54 +08:00
dongjiuzhu1 1f1d90de1c binfmt/modlib: support loading each sections to different memory for Relocate object
The feature depends on ARCH_USE_SEPARATED_SECTION
the different memory area has different access speed and cache
capability, so the arch can custom allocate them based on
section names to achieve performance optimization

test:
sim:elf
sim:sotest

Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2024-09-29 15:06:54 +08:00