Commit Graph

50395 Commits

Author SHA1 Message Date
chao an
21d2cc741f wireless/bluetooth: correct judgment conditions
Signed-off-by: chao an <anchao@xiaomi.com>
2023-08-07 03:34:00 -07:00
SPRESENSE
72b9d97560 boards: cxd56xx: Disable NET_ARP from lte defconfig
LTE does not support ARP, and so disable CONFIG_NET_ARP.
2023-08-07 02:18:19 -07:00
xucheng5
860571471d driver/mtdconfig_fs : return -ENOENT when delete non-existed key
Signed-off-by: xucheng5 <xucheng5@xiaomi.com>
2023-08-07 01:15:15 -07:00
xucheng5
f1287a9996 fs_open: add ioctl checkflag
fixed open error when driver not implement write

Signed-off-by: xucheng5 <xucheng5@xiaomi.com>
2023-08-07 01:09:52 -07:00
Lee Lup Yuen
a59673b526 boards/risc-v: Add support for PINE64 Star64 JH7110 SBC
This PR adds support for PINE64 Star64 64-bit RISC-V SBC, based on StarFive JH7110 SoC. Most of the code is derived from NuttX for QEMU RISC-V (Kernel Mode). [The source files are explained in the articles here](https://github.com/lupyuen/nuttx-star64)

Modified Files:

boards/Kconfig: Added Star64 board

New Files in boards/risc-v/jh7110/star64:

src/jh7110_appinit.c: Startup Code

include/board.h: Star64 Definitions

include/board_memorymap.h: Memory Map

src/etc/init.d/rc.sysinit, rcS: Startup Script

src/.gitignore: Ignore the tmp filesystem

scripts/ld.script: Linker Script

scripts/Make.defs: Star64 Makefile

src/Makefile: Star64 Makefile

Kconfig: Star64 Config

configs/nsh/defconfig: NSH Build Config

Updated Documentation:

introduction/detailed_support.rst: Added StarFive JH7110 SoC and Star64 SBC

platforms/risc-v/jh7110/index.rst: New page for StarFive JH7110 SoC

platforms/risc-v/jh7110/boards/star64/index.rst: Building and booting NuttX for Star64
2023-08-07 01:08:35 -07:00
xucheng5
d0a2fa626a driver/mtd_config : add mtdconfig_register_by_path()
Signed-off-by: xucheng5 <xucheng5@xiaomi.com>
2023-08-07 01:08:24 -07:00
pengyiqiang
8c19fc547d mm_heap: check heap member in advance
Block wrong address in advance before entering mempool.

Signed-off-by: pengyiqiang <pengyiqiang@xiaomi.com>
2023-08-07 01:06:05 -07:00
zhangyuan21
98fba71998 usbadb: add usbadb boardctl
Signed-off-by: zhangyuan21 <zhangyuan21@xiaomi.com>
2023-08-07 11:23:36 +08:00
zhangyuan21
419207d23d adb: Use composite devices as universal devices
Signed-off-by: zhangyuan21 <zhangyuan21@xiaomi.com>
2023-08-07 11:23:36 +08:00
zhangyuan21
f52f04e131 composite: return ok when host send a duplicate setconfig message
Signed-off-by: zhangyuan21 <zhangyuan21@xiaomi.com>
2023-08-07 11:23:36 +08:00
zhangyuan21
fe6b0619f9 usbdev: Use composite devices as universal devices
The enumeration process for composite and non-composite devices
has a lot of duplicate code. Treating the code for composite
devices as universal enumeration code can reduce redundant code.

Signed-off-by: zhangyuan21 <zhangyuan21@xiaomi.com>
2023-08-07 11:23:36 +08:00
Tiago Medicci Serrano
d55e0cce9c Documentation: Add documentation about sim:alsa defconfig
Add documentation referring to sim:alsa defconfig, about how to
mount host system files in the simulator using `hostfs` and
playing them using the ALSA adapter.
2023-08-06 18:58:46 -07:00
Xiang Xiao
7884c18620 Don't call lib_free in the kernel code
since kernel just allocate memory from kmm_malloc

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-08-06 06:51:24 -03:00
cuiziwei
6289205104 sched: Define sched_getcpu return 0 when CONFIG_SMP equals n
Signed-off-by: cuiziwei <cuiziwei@xiaomi.com>
2023-08-06 11:28:49 +02:00
cuiziwei
c1ddfcfa83 nuttx/arch:support to obtain host cpuinfo in NSH. 2023-08-05 14:57:15 -07:00
Brennan Ashton
46b0f6d6ee fdt: Add initial FDT support and procfs for userspace export
VELAPLATFO-12536

This provides the initial hooks for Flattened Device Tree support
with QEMU RV. It also provides a new procfs file that exposes the
fdt to userspace much like the /sys/firmware/fdt endpoint in Linux.
See https://www.kernel.org/doc/Documentation/ABI/testing/sysfs-firmware-ofw

Nodes in the fdt are not yet usable by the OS.

Signed-off-by: Brennan Ashton <bashton@brennanashton.com>
Signed-off-by: liaoao <liaoao@xiaomi.com>
2023-08-05 12:41:06 -07:00
ligd
dfdb3aa2f4 armv8m: support busfault forward to TEE
For TEE & REE, securefault & busfault are not banked, so the faults can
only forword to TEE/REE.
But how to crash dump the other core which not handled faults ?

Here we provide a way to resolve this problem:
1. Set the securefault & busfault to TEE
2. busfault happend from TEE, then directly dump TEE
3. busfault happend from REE, then generate nonsecurefault
4. Back to REE, and dump

Signed-off-by: ligd <liguiding1@xiaomi.com>
2023-08-05 12:40:34 -07:00
ligd
b445029cf2 armv8m: fix up_secure_irq failed for NVIC_IRQ_BUSFAULT
Signed-off-by: ligd <liguiding1@xiaomi.com>
2023-08-05 12:40:34 -07:00
ligd
7a0ef1d0ca secure: fix compile failed when no CONFIG_ARCH_HAVE_TRUSTZONE
Signed-off-by: ligd <liguiding1@xiaomi.com>
2023-08-05 12:40:34 -07:00
ligd
452211586e xtensa: fix compile miss file
comiple xtensa_mpu.c

Signed-off-by: ligd <liguiding1@xiaomi.com>
2023-08-05 12:40:16 -07:00
anjiahao
79f6efb977 ofloader:add Documentation for ofloader
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2023-08-05 12:40:02 -07:00
anjiahao
3a808bab19 support stm32f429i-disco run open flash loader
We can use the driver in nuttx to download
files with debugger

Signed-off-by: anjiahao <anjiahao@xiaomi.com>
Signed-off-by: chao an <anchao@xiaomi.com>
2023-08-05 12:40:02 -07:00
cuiziwei
7c8bb8c293 nuttx/tls: Remove the max key limiatation in task_tls_alloc and pthread_key_create
Signed-off-by: cuiziwei <cuiziwei@xiaomi.com>
2023-08-05 06:33:49 -07:00
cuiziwei
5334c065b4 nuttx/tls:Setting the candidtate index to null prevents dangling pointers.
Signed-off-by: cuiziwei <cuiziwei@xiaomi.com>
2023-08-05 06:33:49 -07:00
cuiziwei
8ffde7cf16 nuttx/tls:Setting the candidtate index to null prevents dangling pointers.
Signed-off-by: cuiziwei <cuiziwei@xiaomi.com>
2023-08-05 06:33:49 -07:00
yinshengkai
a6fcb0a5a9 fs: add pipe type support to inode
Both the device and the pipe used the FSNODEFLAG_TYPE_DRIVER type before,
and now add an independent pipe type

Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2023-08-05 06:32:50 -07:00
cuiziwei
25eb09c3bb nuttx/boards:add KEEP to *(.init_array .init_array.*)
replace *(.init_array .init_array.*) with KEEP(*(.init_array .init_array.*)).

The KEEP statement within a linker script will instruct the linker to keep the specified section, even if no symbols inside it are referenced. This statement is used within the SECTIONS section of the linker script. This becomes relevant when garbage collection is performed at link time, enabled by passing the --gc-sections switch to the linker. The KEEP statement instructs the linker to use the specified section as a root node when creating a dependency graph, looking for unused sections. Essentially forcing the section to be marked as used.

Signed-off-by: cuiziwei <cuiziwei@xiaomi.com>
2023-08-05 05:02:25 -07:00
Xiang Xiao
1dfcdaad84 noteram: Remove the unnessary inclusion and declaration from header file
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-08-04 19:24:08 -03:00
yinshengkai
b0bbac852e boards: bl602evb:timer remove CONFIG_SCHED_CPULOAD_EXTCLK
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2023-08-04 10:58:54 -07:00
yinshengkai
996be8f2cf sched/cpuload: use perf to implement cpuload without relying on external timers
Need to enable CONFIG_SCHED_CRITMONITOR

Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2023-08-04 10:58:54 -07:00
yinshengkai
e8bf910c3d sched: rename nxsched_cpu_process_cpuload
put nxsched_process_cpuload_ticks partial implementation into nxsched_task_process_cpuload

Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2023-08-04 10:58:54 -07:00
yinshengkai
08c4ac133b sched/cpuload: add SCHED_CPULOAD_OSCLK option
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2023-08-04 10:58:54 -07:00
Lucas Saavedra Vaz
d1b5558c8b arch/espressif: Add MCUboot support for ESP32-C3
Add MCUboot support for ESP32-C3 when using the Espressif HAL
2023-08-04 10:30:57 -07:00
Peter van der Perk
0b721ac21c imxrt: flexcan use hpwork for receiving frames
FlexCAN before used interrupts to process incoming frames.
This patch adds a HPWORK workqueue to process incoming frames in the workqueue
context instead. Also renamed mbi to txmb for better readability.
2023-08-04 19:28:52 +02:00
yinshengkai
72de29422a drivers/noteram: noteram support multiple instances
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2023-08-04 06:48:48 -07:00
yinshengkai
3ab4d4a113 drivers/noteram: reduce global variable references
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2023-08-04 06:48:48 -07:00
yinshengkai
2168b744ca drivers/noteram: change ni_buffer to point
ni_buffer is defined in the initialized structure, put it in the data segment, it will increase the flash size

Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2023-08-04 06:48:48 -07:00
Michal Lenc
a5fb83a5d3 ioexpander: define IOEXPANDER_OPTION_NONGENERIC option
This introduces non-generic option interface for IO expanders.
Some IO expanders have more advance options for pins and communication.
This is used to pass driver dependend structure to expander driver.

Signed-off-by: Michal Lenc <michallenc@seznam.cz>
2023-08-04 05:54:24 -07:00
cuiziwei
5e3df24092 replace nxsched_gettid with nxsched_getpid.
When we find the exit status entry in this task, we need to use pid instead of tid.

Signed-off-by: cuiziwei <cuiziwei@xiaomi.com>
2023-08-04 04:21:08 -07:00
likun17
50fe301e8f fix SIM sensor rpmsg runtime error by asan report.
Signed-off-by: likun17 <likun17@xiaomi.com>
2023-08-04 04:20:45 -07:00
cuiziwei
a0206adcfa nuttx/fs:remove (flags & MAP_PRIVATE) == 0.
NuttX not support MAP_PRIVATE currently.

Signed-off-by: cuiziwei <cuiziwei@xiaomi.com>
2023-08-04 04:20:06 -07:00
sunkun3
e872610071 usbdev-composite: In the device descriptor, 0xEF means use of IAD
Signed-off-by: sunkun3 <sunkun3@xiaomi.com>
2023-08-04 10:58:50 +02:00
sunkun3
1b0ab4c0f7 usbdev-composite: The maximum number of composite devices supported is changed to 8
Signed-off-by: sunkun3 <sunkun3@xiaomi.com>
2023-08-04 10:58:50 +02:00
sunkun3
324402ed30 usbdev-composite: fix enumeration error for 192 bytes desc
when the size of the usb configuration descriptor
is a multiple of 64 integers, only for this size less than wlength,
host do need send ZLP

Signed-off-by: sunkun3 <sunkun3@xiaomi.com>
2023-08-04 10:58:50 +02:00
sunkun3
9f19a333d2 usbdev/cdcacm: Logic error handled in USB_REQ_SETINTERFACE.
config value changed after resetconfig was executed
endpoint will stay disable state after setinterface cmd

Signed-off-by: sunkun3 <sunkun3@xiaomi.com>
2023-08-04 10:58:50 +02:00
dinglongfei
8520a40866 usb:When the adbd task is running, the usb uninstall process will panic in the adbd task, because the memory of the adb driver has been freed.
unbind will call the adb_char_on_connect interface to wake up the adbd task,
adbd will then access the adb device and fail to return, at this time it will
close the adb device, we can do the final memory release operation in the
second unbind

Signed-off-by: dinglongfei <dinglongfei@xiaomi.com>
2023-08-04 10:58:50 +02:00
makejian
cee9f25dde crypto: add curve25519 license
add curve25519 implementation, and the implementation are ported from open-bsd

Signed-off-by: makejian <makejian@xiaomi.com>
2023-08-04 08:35:58 +02:00
Lee Lup Yuen
856526adee arch/risc-v: Add support for StarFive JH7110 SoC
This PR adds support for the StarFive JH7110 RISC-V SoC. This will be used by the upcoming port of NuttX for PINE64 Star64 SBC. [The source files are explained in the articles here](https://github.com/lupyuen/nuttx-star64)

Modified Files in arch/risc-v:

Kconfig: Added ARCH_CHIP_JH7110 for JH7110 SoC

New Files in arch/risc-v:

include/jh7110/chip.h: JH7110 Definitions

include/jh7110/irq.h: Support 127 External Interrupts

src/jh7110/chip.h: Interrupt Stack Macro

src/jh7110/jh7110_allocateheap.c: Kernel Heap

src/jh7110/jh7110_head.S: Linux Header and Boot Code

src/jh7110/jh7110_irq.c: Configure Interrupts

src/jh7110/jh7110_irq_dispatch.c: Dispatch Interrupts

src/jh7110/jh7110_memorymap.h: Memory Map

src/jh7110/jh7110_mm_init.c, jh7110_mm_init.h: Memory Mgmt

src/jh7110/jh7110_pgalloc.c: Page Allocator

src/jh7110/jh7110_start.c: Startup Code

src/jh7110/jh7110_timerisr.c: Timer Interrupt

src/jh7110/hardware/jh7110_memorymap.h: PLIC Base Address

src/jh7110/hardware/jh7110_plic.h: PLIC Register Addresses

src/jh7110/Kconfig: JH7110 Config

src/jh7110/Make.defs: Makefile
2023-08-03 22:55:55 -07:00
zhangyuan21
602d5974c8 usbdev: move usbdev_req function to common code
Move usbdev_req function to common code, Reduce duplicated code.

Signed-off-by: zhangyuan21 <zhangyuan21@xiaomi.com>
2023-08-03 22:46:25 -07:00
yangsen5
d8ca744052 drivers/video: video driver supports NV12
Signed-off-by: yangsen5 <yangsen5@xiaomi.com>
2023-08-03 22:37:53 -07:00