Commit Graph

56135 Commits

Author SHA1 Message Date
wangming9 a7c4ceb869 boards/arm/qemu: Add an impls section to the link script
Signed-off-by: wangming9 <wangming9@xiaomi.com>
Signed-off-by: lipengfei28 <lipengfei28@xiaomi.com>
2024-10-16 12:27:10 +08:00
wangming9 d9558a3583 arm/armv7-r: Correctly use CONFIG_ARMV7R_ASSOCIATIVITY_16WAY
Signed-off-by: wangming9 <wangming9@xiaomi.com>
Signed-off-by: lipengfei28 <lipengfei28@xiaomi.com>
2024-10-16 12:27:10 +08:00
wangming9 1f0cc62a8d board/arm/qemu: Adjust the address mapping in the LD script
Summary:
1. The start location of FLASH reserves the extended bootloader
2. DTB data is reserved at the start location of RAM

Signed-off-by: wangming9 <wangming9@xiaomi.com>
Signed-off-by: lipengfei28 <lipengfei28@xiaomi.com>
2024-10-16 12:27:10 +08:00
zhangyuan29 080c22e944 atomic: include stddef.h in atomic.h
error info:
error: expected '=', ',', ';', 'asm' or '__attribute__' before 'atomic_wchar_t'

Signed-off-by: zhangyuan29 <zhangyuan29@xiaomi.com>
2024-10-16 12:24:18 +08:00
qiaohaijiao1 54e128367d sim/alsa: clear AUDIO_APB_FINAL flag before DEQUEUE
Signed-off-by: qiaohaijiao1 <qiaohaijiao1@xiaomi.com>
2024-10-16 12:23:17 +08:00
qiaohaijiao1 eba292f4b9 sim/alsa: add ptr check in _stop
Signed-off-by: qiaohaijiao1 <qiaohaijiao1@xiaomi.com>
2024-10-16 12:21:19 +08:00
qiaohaijiao1 09afb4d7d0 sim/alsa: fix runtime warning.
sim/posix/sim_offload.c:369:18: runtime error: left shift of 255 by 24 places cannot be represented in type 'int'
    #0 0x3a146c2  (/home/qiaohj/disk1/work/vela/nuttx/nuttx+0x3a146c2)
    #1 0x3a0ecb0  (/home/qiaohj/disk1/work/vela/nuttx/nuttx+0x3a0ecb0)
    #2 0x3a1193a  (/home/qiaohj/disk1/work/vela/nuttx/nuttx+0x3a1193a)
    #3 0x3a13141  (/home/qiaohj/disk1/work/vela/nuttx/nuttx+0x3a13141)
    #4 0x39fc3ef  (/home/qiaohj/disk1/work/vela/nuttx/nuttx+0x39fc3ef)
    #5 0x38ca7f2  (/home/qiaohj/disk1/work/vela/nuttx/nuttx+0x38ca7f2)
    #6 0x39fc6cf  (/home/qiaohj/disk1/work/vela/nuttx/nuttx+0x39fc6cf)

Signed-off-by: qiaohaijiao1 <qiaohaijiao1@xiaomi.com>
2024-10-16 12:17:35 +08:00
chenzhijia b63cffe000 libs/libc/unistd:Fix errcode not return normally
Exit the program and return errcode when ioctl fail

Signed-off-by: chenzhijia <chenzhijia@xiaomi.com>
2024-10-16 11:15:25 +08:00
chenzhijia d52074a9cb libs/libc/unistd: add getspnam function
Add getspnam function to pass tlpi example:
https://man7.org/tlpi/code/online/dist/users_groups/check_password.c.html

Signed-off-by: chenzhijia <chenzhijia@xiaomi.com>
2024-10-16 11:15:25 +08:00
chenzhijia 2a328279ca libs/libc/unistd: add crypt function
Add crypt function to pass tlpi example:
https://man7.org/tlpi/code/online/dist/users_groups/check_password.c.html

Signed-off-by: chenzhijia <chenzhijia@xiaomi.com>
2024-10-16 11:15:25 +08:00
chenzhijia ad70ca33c8 libs/libc/unistd: add getpass function
Add getpass function to pass tlpi example:
https://man7.org/tlpi/code/online/dist/users_groups/check_password.c.html

Signed-off-by: chenzhijia <chenzhijia@xiaomi.com>
2024-10-16 11:15:25 +08:00
chenzhijia c0039d6623 libs/libc/pwd: add new member to passwd struct
Add pw_passwd member to pass tlpi example:
https://man7.org/tlpi/code/online/dist/users_groups/check_password.c.html

Signed-off-by: chenzhijia <chenzhijia@xiaomi.com>
2024-10-16 11:15:25 +08:00
hanqiyuan ff4b654be0 memdump: fix warnings.
mm_heap/mm_malloc.c: In function 'mm_malloc':
mm_heap/mm_malloc.c:281:33: warning: excess elements in struct initializer
  281 |         MM_BACKTRACE_ALLOC_PID, 0, ULONG_MAX
      |                                 ^
mm_heap/mm_malloc.c:281:33: note: (near initialization for 'dump')
mm_heap/mm_malloc.c:281:36: warning: excess elements in struct initializer
  281 |         MM_BACKTRACE_ALLOC_PID, 0, ULONG_MAX
      |                                    ^~~~~~~~~
mm_heap/mm_malloc.c:281:36: note: (near initialization for 'dump')

Signed-off-by: hanqiyuan <hanqiyuan@xiaomi.com>
2024-10-16 10:23:10 +08:00
Xu Xingliang 3d8b504779 mm: fix kasan report error when delay free is enabled
Signed-off-by: Xu Xingliang <xuxingliang@xiaomi.com>
2024-10-16 10:23:10 +08:00
xuxingliang bc9d6549e9 mm: call sched_note within mm lock
Signed-off-by: xuxingliang <xuxingliang@xiaomi.com>
2024-10-16 10:23:10 +08:00
Xiang Xiao 5397a58731 libc/modlib: Make modlib selectable from defconfig
since bootloader may call modlib functions directly
to load elf firmware without binfmt, dlfcn or module.

BTW, this patch also remove the duplicated selecttion

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2024-10-16 10:11:20 +08:00
hanqiyuan c7455e7e8e audio: add offload underflow msg state
Signed-off-by: hanqiyuan <hanqiyuan@xiaomi.com>
2024-10-16 08:11:04 +08:00
Neo Xu 7466237b14 mm/Kconfig: adjust config options order and fix typos
Signed-off-by: Neo Xu <neo.xu1990@gmail.com>
2024-10-16 08:09:43 +08:00
wangmingrong1 533c11eee2 coredump.c: Delete the judgment of continue
Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com>
2024-10-16 08:07:09 +08:00
wangmingrong1 2beef702cc coredump.c: del multiple behavior
Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com>
2024-10-16 08:07:09 +08:00
Peter Bee c3506448c2 drivers/serial: fix cmsdk serial driver warning
serial/serial_cmsdk.c: In function 'uart_cmsdk_ioctl':
serial/serial_cmsdk.c:544:10: warning: 'ret' may be used uninitialized in this function [-Wmaybe-uninitialized]
  544 |   return ret;
      |          ^~~

Signed-off-by: Peter Bee <bijunda1@xiaomi.com>
2024-10-16 08:05:01 +08:00
Gao Jiawei d5c44de14c add missing source file
Signed-off-by: Gao Jiawei <gaojiawei@xiaomi.com>
2024-10-16 08:04:13 +08:00
liwenxiang1 3fd75efed9 Revert "libs/libc:Openlibm adds exp10 and exp10f function implementations"
This implementation is from glibc, and the license is LGPL

This reverts commit 862244586976b9388f87dc639225d714dd70e4af.

Signed-off-by: liwenxiang1 <liwenxiang1@xiaomi.com>
2024-10-16 08:03:31 +08:00
raiden00pl cf64060a72 .github/labler.yml: fix confition condition for Area: Bluetooth
Signed-off-by: raiden00pl <raiden00@railab.me>
2024-10-16 08:01:49 +08:00
anjiahao 7c37a46f69 gdbserver:skip load symbol if use logfile as input
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2024-10-16 08:01:28 +08:00
anjiahao ddf44def10 gdbserver:fix bug when use arm-a coredump addr mismatch
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2024-10-16 08:01:28 +08:00
anjiahao a1ff878bed gdbserver:Special processing xtensa architecture
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2024-10-16 08:01:28 +08:00
anjiahao 0bd9c8d7ae Kconfig:Add an option to disable compilation of floating point related files
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2024-10-16 07:58:00 +08:00
wangmingrong1 16c90ada1c mps/bringup: Add initialization of tmpfs
Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com>
2024-10-16 07:57:15 +08:00
raiden00pl c393416580 libs/libxx: uClibc depends on CONFIG_ALLOW_GPL_COMPONENTS=y
uClibc is LGPL so it should depends on CONFIG_ALLOW_GPL_COMPONENTS=y
2024-10-16 07:56:50 +08:00
daichuan a75ca4acf3 modify for set conn status with connected when receive event USRSOCK_EVENT_SENDTO_READY 2024-10-16 07:55:10 +08:00
Kyle Wilson df47241a2b STM32G4 Flash Driver
Added a flash driver for the STM32G4 series. The primary change here is
the addition of stm32g4xxx_flash.c. This file uses the STM32L4 flash
driver as a template. The primary difference is the accounting for dual
banks with different page sizes.

Fixed error while building b-g474e-dpow1/buckboost. It was possible (technically) to have page be used uninitialzied. Changing the if statement to default to using a flash_page_size == 2048 fixes this issue.
2024-10-15 18:11:38 -03:00
Filipe Cavalcanti 5592145dc7 tools/espressif: add esptool version check to Espressif build system 2024-10-15 20:42:57 +02:00
cuiziwei 9d9857acd2 Change the judgment of GCCVER version to greater equal.
Signed-off-by: cuiziwei <cuiziwei@xiaomi.com>
2024-10-15 23:32:13 +08:00
anjiahao ae126a8065 lib_stdoutstream:need return write size
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2024-10-15 23:30:57 +08:00
liguiding1 b4def16ac3 Revert "mm/iob: Replace the critical section with spin lock"
`g_iob_sem.semcount` is both manually changed in iob source code and api
nxsem_xxx.

nxsem related API uses critical_section to ensure sem value is modified
correctly. If iob using spin lock and modify sem value in the same time,
it's not safe.

This PR revert the spin lock change and uses critical section to align
with what nxsem uses.
2024-10-15 22:45:02 +08:00
Lup Yuen Lee 1280ac845a CI: Label `include/*.h` and `include/nuttx/*.h` as "Area: OS Components"
This patch fixes the PR Labeler, such that PRs with modified files in `include/*.h` and `include/nuttx/*.h` are labeled as "Area: OS Components". Previously the PR Labeler ignores files like `include/nuttx/elf.h`, which causes Build Jobs to be skipped incorrectly.
2024-10-15 22:41:30 +08:00
Tim Hardisty bb7dce11a2 SAMA5 fix compiler warning in sam_adc.c 2024-10-15 11:37:54 -03:00
liwenxiang1 7541311ac0 mm/mm_heap: Optimizing heap performance, changing the mm_size2ndx and mm-addfreechunk functions to inline functions can improve by about 7%
Signed-off-by: liwenxiang1 <liwenxiang1@xiaomi.com>
2024-10-15 22:29:17 +08:00
zhangyuan29 57650d841e armv8-m: set fpscr when do exception_direct
In armv8m the FPSCR[18:16] LTPSIZE field must be set to 0b100 for
"Tail predication not applied" as it's reset value.

Signed-off-by: zhangyuan29 <zhangyuan29@xiaomi.com>
2024-10-15 22:16:09 +08:00
anjiahao ef9640c696 armv7-a:adjust gdb register order
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2024-10-15 21:46:41 +08:00
Bowen Wang 43557c15c8 qemu-armv8a/qemu_bringup: init the pci ecam
Signed-off-by: Bowen Wang <wangbowen6@xiaomi.com>
Signed-off-by: lipengfei28 <lipengfei28@xiaomi.com>
2024-10-15 21:40:45 +08:00
lipengfei28 054257c36e update defconfig
Signed-off-by: lipengfei28 <lipengfei28@xiaomi.com>
2024-10-15 21:40:35 +08:00
ligd f0e12a983d cpuload: add nxsched_update_critmon() to handle thread busyloop
Signed-off-by: ligd <liguiding1@xiaomi.com>
Signed-off-by: lipengfei28 <lipengfei28@xiaomi.com>
2024-10-15 21:11:15 +08:00
wangming9 5b14fb75bc arm/fpu: FPU is supported when the TEE is enabled
Summary:
1. Support armv7-a armv7-r armv8-r
2. The NSACR is read-only in Non-secure PL1 and PL2 modes.
3. The NSACR is read/write in Secure PL1 modes.
4. When the NSACR.{CP11,CP10} bit is set to 1,
   Non-secure access to coprocessor 11,10 enable

Signed-off-by: wangming9 <wangming9@xiaomi.com>
Signed-off-by: lipengfei28 <lipengfei28@xiaomi.com>
2024-10-15 21:11:15 +08:00
wangming9 f465443f37 cpuinfo: Decouple the fetch cpuinfo from up_perf_getfreq
Summary:
Add the default CPU frequency configuration.

Signed-off-by: wangming9 <wangming9@xiaomi.com>
Signed-off-by: lipengfei28 <lipengfei28@xiaomi.com>
2024-10-15 21:11:15 +08:00
chenzhijia 10d0526f3f nuttx/sched:Modify the comment error in sched_resumescheduler.c
Signed-off-by: chenzhijia <chenzhijia@xiaomi.com>
2024-10-15 21:05:36 +08:00
chenzhijia 65fbf4cf64 nuttx/include:Modify the CPU_SET series macro definition in sched.h
Modify the CPU_SET series macro definition to avoid an error when shifting 31 bits to the left.

Signed-off-by: chenzhijia <chenzhijia@xiaomi.com>
2024-10-15 21:05:36 +08:00
chenzhijia aca7552d9c nuttx/include:add #define CPU_SETSIZE in sched.h
add #define CPU_SETSIZE in sched.h to pass tlpi example: https://man7.org/tlpi/code/online/dist/procpri/t_sched_getaffinity.c.html

Signed-off-by: chenzhijia <chenzhijia@xiaomi.com>
2024-10-15 21:05:36 +08:00
zhanghu5 32717ae353 sdio_probe: set voltage use CMD5
reference doc: https://www.infineon.com/dgdl/Infineon-SDIO_platform_support_guide-UserManual-v01_00-EN.pdf?fileId=8ac78c8c8c3de074018c8ba3a9973619

Signed-off-by: zhanghu5 <zhanghu5@xiaomi.com>
2024-10-15 21:04:28 +08:00