Commit Graph

53878 Commits

Author SHA1 Message Date
liqinhui 2e9f00d0db wifisim:Fix an assignment error.
Signed-off-by: liqinhui <liqinhui@xiaomi.com>
2024-08-21 13:25:53 +08:00
liqinhui f53f4fb32f wifisim: set carrier on only when wifidriver_start_connect returns OK.
Signed-off-by: liqinhui <liqinhui@xiaomi.com>
2024-08-21 13:25:53 +08:00
liqinhui e9ba55818f wifisim:Modify the down operation logic of the wlan interface.
Align with the linux ifconfig down behavior.

Signed-off-by: liqinhui <liqinhui@xiaomi.com>
2024-08-21 13:25:53 +08:00
liqinhui c3df7c5b00 wifisim: Modify the connection logic based on BSSID.
Signed-off-by: liqinhui <liqinhui@xiaomi.com>
2024-08-21 13:25:53 +08:00
liqinhui 06c1db81ff wifisim: Open the bss file with O_RDONLY.
Signed-off-by: liqinhui <liqinhui@xiaomi.com>
2024-08-21 13:25:53 +08:00
buxiasen 47b2e00d51 pm: irq should disable before sched locked
If sched lock before irq save, and irq handler do post, scheduler will
be delayed after WFI until next sched unlock. which is not acceptable.

Signed-off-by: buxiasen <buxiasen@xiaomi.com>
2024-08-21 10:53:33 +08:00
buxiasen 317afc5ab7 pm: add pm_idle, up_idle only handle pm state execution
pm process should be done by chip specific, but we can provide a standard
flow, then vendor & chip can only focus on handle different state change.

Signed-off-by: buxiasen <buxiasen@xiaomi.com>
2024-08-21 10:53:33 +08:00
zhanghongyu a5a35a1cda defconfig: add SYSTEM_TELNETD related config
fixed an error that symbols could not be found when link

Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2024-08-21 10:51:20 +08:00
Daniel Jasinski 9798bc1d1f build: fix syscall instrumentation in flat build
This fixes syscall instrumentation in flat build:

 - add syscall_names.c if LIB_SYSCALL=n to 'wraps'
   subdirectory

 - change execute_process to add_custom_command

 - fix typo in wrapper naming convention

Signed-off-by: Daniel Jasinski <jasinskidaniel95szcz@gmail.com>
2024-08-21 10:50:30 +08:00
Rodrigo Sim ea5bb64f42 nucleo-l432kc: Revert the USART2 config to be use by virtual COM port
This reverts commit 60236ce94d and fix
the issue reported by https://github.com/apache/nuttx/issues/13061.

Signed-off-by: Rodrigo Sim rcsim10@gmail.com
2024-08-21 10:47:37 +08:00
guohao15 c3791756b2 rpmsgfs: set fs type to rpmsgfs when mount through rpmsgfs
Signed-off-by: guohao15 <guohao15@xiaomi.com>
2024-08-21 04:28:19 +08:00
buxiasen a18e4e85e9 pm_activity: fix deadlock with spinlock and critcal_section
critical_section is not compatible with irq disabled, have to delay the
wd_start after spin_unlock_irqrestore.

Signed-off-by: buxiasen <buxiasen@xiaomi.com>
2024-08-20 17:01:48 -03:00
chenrun1 bb4d710d62 xtensa_cache:Disable clean/flush optimization in case of SMP restriction
In a multicore task scenario, there may be a situation where the task runs on different cores at different time slices (when the task is not bound to a particular core).
When the task calls cache clean/flush(range > cache size), depending on the optimization, clean_all, flush_all are called. however, at this point, there may be dirty data or incomplete data profiles in the cache on the kernel that is running the task, which may result in dirty data being flushed into memory or make the application think that the flushed data should be successfully flushed into memory, leading to unknown consequences.

Signed-off-by: chenrun1 <chenrun1@xiaomi.com>
2024-08-21 03:04:41 +08:00
chenrun1 91cf97ed84 arm_cache:Disable clean/flush optimization in case of SMP restriction
In a multicore task scenario, there may be a situation where the task runs on different cores at different time slices (when the task is not bound to a particular core).
When the task calls cache clean/flush(range > cache size), depending on the optimization, clean_all, flush_all are called. however, at this point, there may be dirty data or incomplete data profiles in the cache on the kernel that is running the task, which may result in dirty data being flushed into memory or make the application think that the flushed data should be successfully flushed into memory, leading to unknown consequences.

Signed-off-by: chenrun1 <chenrun1@xiaomi.com>
2024-08-21 03:04:41 +08:00
wangming9 0c12fb9237 arm/armv8-r: Fix cache interface
Signed-off-by: wangming9 <wangming9@xiaomi.com>
2024-08-21 03:04:41 +08:00
wangming9 0bfd4c5e0d arm/armv8-r: Adding a cache interface to armv8-r
Summary:
1. Add up_get_icache_size、up_get_dcache_size
2. Added L2 cahce PL310 implementation

Signed-off-by: wangming9 <wangming9@xiaomi.com>
2024-08-21 03:04:41 +08:00
guoshichao ddc6e31740 libc/fputwc: fix the return value truncated from stdio interface
Signed-off-by: guoshichao <guoshichao@xiaomi.com>
2024-08-21 02:57:43 +08:00
guoshichao d74e37d9db wchar/wcsstr: fix the variable overflow bug
Signed-off-by: guoshichao <guoshichao@xiaomi.com>
2024-08-21 02:57:43 +08:00
guoshichao ca1e007a22 wchar/lib_ungetwc: fix the array access out of bounds error
Signed-off-by: guoshichao <guoshichao@xiaomi.com>
2024-08-21 02:57:43 +08:00
guoshichao 9876b0b615 wchar/fgetwc: fix the return value truncate error
Signed-off-by: guoshichao <guoshichao@xiaomi.com>
2024-08-21 02:57:43 +08:00
guoshichao 390275f867 wchar/putwc: fix the putwc return value truncate error
Signed-off-by: guoshichao <guoshichao@xiaomi.com>
2024-08-21 02:57:43 +08:00
fangxinyong 13cb355a4e arm/armv[7|8]-m: add syn barrier for MPU ops
Execute data and instruction sync barriers after writing MPU register,
to ensure MPU setting take effects that the new changes are seen.

testing in lm3s6965-ek:qemu-protected

Signed-off-by: fangxinyong <fangxinyong@xiaomi.com>
2024-08-21 02:57:25 +08:00
jianglianfang 1e29b8de1d driver/fb:remove overlay from fb_notify_vsync
Signed-off-by: jianglianfang <jianglianfang@xiaomi.com>
2024-08-21 02:57:08 +08:00
jianglianfang 468617096e goldfish_fb: add notify vsync
Signed-off-by: jianglianfang <jianglianfang@xiaomi.com>
2024-08-21 02:57:08 +08:00
jianglianfang 8122cbd5d2 drivers/video: add fb_vsync_pollnotify
when the vsync comes, fb drivers should call fb_vsync_pollnotify to notify POLLPRI, so that users can catch the synchronization time of vsync and do something.

Signed-off-by: jianglianfang <jianglianfang@xiaomi.com>
2024-08-21 02:57:08 +08:00
wanggang26 a2662bd369 mmcsd: add support of getting ext_csd reg data
Signed-off-by: wanggang26 <wanggang26@xiaomi.com>
2024-08-21 02:53:54 +08:00
guoshichao 24ce8dfbf2 armv7-a/irq: add up_irq_disable method implementation
Signed-off-by: guoshichao <guoshichao@xiaomi.com>
(cherry picked from commit 7059b05e501d67c342f1753e8eb96e723b99d6b8)
2024-08-21 02:53:04 +08:00
guoshichao 0aa7e39eef nuttx/arch/irq: add up_irq_disable method implementation
Signed-off-by: guoshichao <guoshichao@xiaomi.com>
2024-08-21 02:53:04 +08:00
chenrun1 96abb51562 lib_getcwd:Fix the Name in the function description.
Signed-off-by: chenrun1 <chenrun1@xiaomi.com>
2024-08-21 02:52:45 +08:00
zhanghongyu ccf60a7bab netdev_upperhalf: add polling mode support for tx/rx
support more work modes to support more scenarios

Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2024-08-21 02:31:53 +08:00
liqinhui bf78bf1db4 net/tcp: reset the dupack counter.
After setting the retransmission flag, we need to set the dupack counter to 0.

Signed-off-by: liqinhui <liqinhui@xiaomi.com>
2024-08-21 02:12:55 +08:00
SPRESENSE eea5f98bca drivers/modem/alt1250: Disable the PIN feature in ALT1250
Disable the PIN feature in ALT1250 because the SIM may
accidentally become unusable.
2024-08-21 02:11:02 +08:00
liqinhui 4c69ef988f simwifi: Add the netlink event of connect/disconnect.
Signed-off-by: liqinhui <liqinhui@xiaomi.com>
2024-08-21 02:08:10 +08:00
chenrun1 5bf24a15b5 lib_getnprocs:add #include <sys/types.h> instead of ifdef
Summary:
  Since there is a default definition for CONFIG_SMP_NCPUS in sys/types.h, we can remove #ifdef and return CONFIG_SMP_NCPUS directly.

Signed-off-by: chenrun1 <chenrun1@xiaomi.com>
2024-08-21 02:04:15 +08:00
chenrun1 f3cf11dcb5 libc/msic:Implement get_nprocs API
Summary:
 1.Remove the macro definition of getnproc in sysinfo
 2.New get_nprocs_conf and get_nprocs interfaces, return CONFIG_SMP_NCPUS, return 1 when not defined

Signed-off-by: chenrun1 <chenrun1@xiaomi.com>
2024-08-21 02:04:15 +08:00
zhanghongyu aa2ae421d5 Documentation: add documentation for USB cdcncm device
add a documented description of the cdcncm device module, including
execution steps and associated outputs

Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2024-08-21 02:01:01 +08:00
zhanghongyu 640b766d2b usbdev/cdcncm: fix some issues
1. increase CDCECM_MXDESCLEN to avoid memory overrun when sending
configuration description(mkcfmdesc) information

2. correct the request structure used in the notify phase

3. disable unused configuration options

Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2024-08-21 02:01:01 +08:00
zhanghongyu 7aa3e2ebd6 cdcncm: switch net driver to netdev_lowerhalf
optimize the interaction flow associated with network drivers to reduce
the amount of code and improve compatibility

Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2024-08-21 02:01:01 +08:00
zhanghongyu 4e79741e7d usbdev: add ncm driver
The compilation and verification commands are shown below:
./tools/configure.sh sim:usbdev
make -j
sudo ./nuttx
nsh> conn 2
nsh> dhcpd_start eth1

Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2024-08-21 02:01:01 +08:00
xuxin19 b328b35e2b cmake:bugfix fix CMake post_build phase time orderless
[1209/1210] cd cmake_out && arm-none-eabi-objcopy -O binary nuttx nuttx.bin && arm-none-eabi-objcopy -O binary nuttx vela_core1.bin && cp nuttx vela_core1.elf && cp nuttx.hex vela_core1.hex && cp nuttx.map vela_core1.mapfile
FAILED: boards/exclude_board/CMakeFiles/nuttx_post_build /home/work/ssd1/workspace/MiRTOS-car-dev-CI/cmake_out/boards/exclude_board/CMakeFiles/nuttx_post_build
cd cmake_out && arm-none-eabi-objcopy -O binary nuttx nuttx.bin && arm-none-eabi-objcopy -O binary nuttx vela_core1.bin && cp nuttx vela_core1.elf && cp nuttx.hex vela_core1.hex && cp nuttx.map vela_core1.mapfile
cp: cannot stat 'nuttx.hex': No such file or directory
[1210/1210] Generating nuttx.hex
ninja: build stopped: subcommand failed.

Signed-off-by: xuxin19 <xuxin19@xiaomi.com>
2024-08-21 01:53:09 +08:00
xuxin19 b1b66ce491 cmake:add unified timing control phase apps_context for apps build
solve the interdependency problem of cross-target dependency generation.
like Makefile base, a PHONY context target is used as a dependency for timing order.

Signed-off-by: xuxin19 <xuxin19@xiaomi.com>
2024-08-21 01:53:09 +08:00
hujun5 4cb419866f arch: inline up_testset in arm arm64 riscv xtensa
test:
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

Signed-off-by: hujun5 <hujun5@xiaomi.com>
2024-08-21 01:45:10 +08:00
cuiziwei 7b43a9413a arch/EXTRA_LIBS: link all staging library.
Signed-off-by: cuiziwei <cuiziwei@xiaomi.com>
2024-08-21 01:40:15 +08:00
Zhe Weng 648c52fc4b drivers/virtio-net: Use `reclaim` in `ops` to finish TODO
Signed-off-by: Zhe Weng <wengzhe@xiaomi.com>
2024-08-21 01:39:34 +08:00
zhanghongyu d740a8e73c netdev_lowerhalf: add reclaim callback in netdev_ops_s
Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2024-08-21 01:39:34 +08:00
wangchen ff7eda46e7 net_chksum.c:mod process of generating sum to solve checksum error
Signed-off-by: wangchen <wangchen41@xiaomi.com>
2024-08-21 01:38:23 +08:00
wangchen 27c2940df2 netdev/ioctl: Setting log level to warning on SIOCGIFHWADDR failure
When our apps call getifaddrs on lo frequently, the loopback device will failed in SIOCGIFHWADDR and print too many error logs.

Signed-off-by: wangchen <wangchen41@xiaomi.com>
2024-08-21 01:37:06 +08:00
guoshichao 07c370817c armv7a/irq: enable fiq in tee, enable irq in ap
According to the current design on the armv7-a platform,
only fiq is processed in TEE, while irq and fiq are processed
in REE.
If we enable the irq function in TEE, when we process
some signal-related scenarios in TEE,
such as the ostest sighand testcase, this testcase will
call up_irq_enable() to enable irq interrupt in the
arm_sigdeliver() function. After the signal processing
logic is executed, irq will be disabled again.
During the interval of enabling irq, some external device
irq interrupts will be enabled, but these external device
irqs do not have corresponding handlers registered in TEE,
so an "unexpected irq isr exception" will be triggered.
Therefore, a better implementation is to keep the original
implementation of the up_irq_enable() function, that is,
to enable only fiq in TEE and to enable irq and fiq in REE.
Then  for vendor-specific requirements, such as the need to
briefly enable irq during the TEE initialization process
and then disable irq before starting APz in TEE, we directly
provide a separate implementation of enabling irq in the
vendor, without modifying the implementation of the public
up_enable_irq() function.

Signed-off-by: guoshichao <guoshichao@xiaomi.com>
2024-08-21 01:36:32 +08:00
liqinhui 590c7fe129 icmpv6: Allow IPv6 address obtained by both
stateless and stateful to coexist.

Signed-off-by: liqinhui <liqinhui@xiaomi.com>
2024-08-21 01:33:28 +08:00
liqinhui c00ff58baa icmpv6: Set the default gateway for the stateful dhcpv6.
Signed-off-by: liqinhui <liqinhui@xiaomi.com>
2024-08-21 01:33:28 +08:00