Jouni Ukkonen
a3d1b06214
arch/arm64/imx9 4byte addressing to nor
...
-Use 4byte addressing in flexpi nor
-report 4k blocksize to userland
-increase clock to 100MHz
-some cleanup
Signed-off-by: Jouni Ukkonen <jouni.ukkonen@unikie.com>
2024-11-07 16:51:13 +08:00
Jouni Ukkonen
d260e7f59e
imx9/flexcan: Add disable/enable cycle
...
Add enable/disable cycle to initialize
function to speed up soft reset
Signed-off-by: Jouni Ukkonen <jouni.ukkonen@unikie.com>
2024-11-07 16:20:29 +08:00
Jukka Laitinen
4ba8723ab8
arch/arm64/src/common/arm64_fatal.c: Fix compilation warning with -Wextra
...
Wextra complains on some silly issues, like this one. Work around the issue in code directly.
Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2024-11-07 00:56:40 +08:00
Jouni Ukkonen
6a0c239c8e
arch/arm64/imx9: Clear edma4 mux conf before set
...
Warm boot might fail if edma4 channel mux is
not written to default value
Signed-off-by: Jouni Ukkonen <jouni.ukkonen@unikie.com>
2024-11-06 02:56:52 +08:00
wangmingrong1
6381685a8b
toolchains: Compiler versioning adds --print-memory-usage
...
1. The "-print-memory-usage" parameter introduced in GNU Link version 2.26
Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com>
2024-11-06 01:57:38 +08:00
ligd
91b228fcdd
arm64: fix compile failed when build ELF apps
...
aarch64-none-elf-gcc -c -D_LDBL_EQ_DBL -fno-common -Wall -Wstrict-prototypes -Wshadow -Wundef -Werror -Wno-attributes -Wno-unknown-pragmas -Wno-psabi "-O3" -fno-strict-aliasing -fno-omit-frame-pointer -fno-optimize-sibling-calls -fstack-protector-all -fsanitize=kernel-address --param asan-globals=1 -ffunction-sections -fdata-sections "-g3" -mcpu=cortex-a53 -isystem /home/ligd/platform/trunk/nuttx/include -D__NuttX__ -pipe -I /home/ligd/platform/trunk/apps/crypto/mbedtls/include -I /home/ligd/platform/trunk/apps/crypto/mbedtls/mbedtls/include -I /home/ligd/platform/trunk/apps/crypto/openssl_mbedtls_wrapper/include -I /home/ligd/platform/trunk/apps/external/android/frameworks/native/libs/binder/include_rpc_unstable -I /home/ligd/platform/trunk/apps/external/android/frameworks/native/libs/binder/ndk/include_ndk -I /home/ligd/platform/trunk/apps/external/android/frameworks/native/libs/binder/ndk/include_platform -I /home/ligd/platform/trunk/apps/external/android/system/chre/chre/chre_api/include/chre_api -DCHRE_MESSAGE_TO_HOST_MAX_SIZE=2048 -I /home/ligd/platform/trunk/apps/external/android/system/core/libcutils/include -I /home/ligd/platform/trunk/apps/frameworks/graphics/uikit/include -I /home/ligd/platform/trunk/apps/frameworks/runtimes/feature/include -I /home/ligd/platform/trunk/apps/frameworks/runtimes/feature/src -I /home/ligd/platform/trunk/apps/frameworks/security/include -I /home/ligd/platform/trunk/apps/frameworks/system/dfx/include -I /home/ligd/platform/trunk/apps/frameworks/system/topics/include -I /home/ligd/platform/trunk/apps/frameworks/system/utils/include -I /home/ligd/platform/trunk/apps/graphics/lvgl -I /home/ligd/platform/trunk/apps/graphics/lvgl/lvgl -I "/home/ligd/platform/trunk/apps/system/argtable3/argtable3/src" -I /home/ligd/platform/trunk/apps/system/libuv/libuv/include -DUV_HANDLE_BACKTRACE=CONFIG_LIBUV_HANDLE_BACKTRACE -I /home/ligd/platform/trunk/apps/system/uorb/ -I /home/ligd/platform/trunk/nuttx/arch/arm64/src/board/include -I /home/ligd/platform/trunk/nuttx/arch/arm64/src/chip -I /home/ligd/platform/trunk/apps/vendor/bes/drivers/best1600_ep/miwear_drivers/display -I /home/ligd/platform/trunk/apps/vendor/bes/drivers/best1600_ep/miwear_drivers/boards -I /home/ligd/platform/trunk/apps/vendor/bes/drivers/best1600_ep/miwear_drivers/include -I "/home/ligd/platform/trunk/apps/include" -fvisibility=hidden -mlong-calls modprint.c -o modprint.c.home.ligd.platform.trunk.apps.examples.sotest.modprint.o
aarch64-none-elf-gcc: error: unrecognized command-line option '-mlong-calls'
Signed-off-by: ligd <liguiding1@xiaomi.com>
2024-11-04 16:24:29 +08:00
Jukka Laitinen
da19d79656
arch/arm64/src/imx9/imx9_lpuart.c: Fix parity get in TCGETS
...
This is a partial revert / fix for regression from 44d1811ebb
Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2024-10-31 17:54:22 +08:00
cuiziwei
d42f16939e
nuttx: Fix build warning with can't found xt-g++
...
Signed-off-by: cuiziwei <cuiziwei@xiaomi.com>
2024-10-29 22:27:58 +08:00
Jukka Laitinen
62194400f9
imx9/serial: Take proper use of RX/TX FIFOs, clean up interrupt service routine
...
- i.MX93 LPUARTs have 16-byte RX and TX FIFOs. Take those into use and correct some related register definitions
- There is no reason to loop inside interrupt handler, remove the looping
Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2024-10-29 22:24:48 +08:00
Jukka Laitinen
44d1811ebb
imx9/serial: Clean up the flow control code
...
- Remove GPIO (SW) based flow control. It didn't work, and pure HW flow control seems to work fine
- Remove some unneeded ifdefs and change bit-field flags to booleans to clean up the code
Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2024-10-29 22:24:48 +08:00
Xiang Xiao
69100ef0e4
arch: Fix minor style issue
...
not real behaviour change
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2024-10-28 09:24:55 +01:00
chao an
c6591c0f49
driver/serial: remove return value of up_putc()
...
modify the prototype of up_putc(): remove the return value
The architecture code does not care about the return value of up_putc(), so removing it saves two statements:
Before: After:
de4c: e52de004 push {lr} @ (str lr, [sp, #-4]!) | de4c: e52de004 push {lr} @ (str lr, [sp, #-4]!)
de50: e24dd014 sub sp, sp, #20 | de50: e24dd014 sub sp, sp, #20
de54: e58d0004 str r0, [sp, #4 ] | de54: e58d0004 str r0, [sp, #4 ]
de58: e30030f8 movw r3, #248 @ 0xf8 | de58: e30030f8 movw r3, #248 @ 0xf8
de5c: e3423000 movt r3, #8192 @ 0x2000 | de5c: e3423000 movt r3, #8192 @ 0x2000
de60: e58d300c str r3, [sp, #12 ] | de60: e58d300c str r3, [sp, #12 ]
de64: e59d1004 ldr r1, [sp, #4 ] | de64: e59d1004 ldr r1, [sp, #4 ]
de68: e59d000c ldr r0, [sp, #12 ] | de68: e59d000c ldr r0, [sp, #12 ]
de6c: ebfffe66 bl d80c <pl011_putc> | de6c: ebfffe66 bl d80c <pl011_putc>
de70: e59d3004 ldr r3, [sp, #4 ] | de70: e28dd014 add sp, sp, #20
de74: e1a00003 mov r0, r3 | de74: e49df004 pop {pc} @ (ldr pc, [sp], #4 )
de78: e28dd014 add sp, sp, #20 |
de7c: e49df004 pop {pc} @ (ldr pc, [sp], #4 ) |
Signed-off-by: chao an <anchao@lixiang.com>
2024-10-26 13:21:29 +08:00
chao an
b28f87e3f0
arm/gicv3: replace this_cpu() to up_cpu_index()
...
If the core id needs to be included in the hardware register
calculation, up_cpu_index() should be used instead of this_cpu().
Signed-off-by: chao an <anchao@lixiang.com>
2024-10-25 14:27:34 +08:00
wangmingrong1
f11b04fc61
kconfig: Add link parameters that can print remaining memory information
...
LD: nuttx
Memory region Used Size Region Size %age Used
flash: 284272 B 512 KB 54.22%
sram1: 13296 B 2 MB 0.63%
sram2: 0 GB 2 MB 0.00%
CP: nuttx.hex
CP: nuttx.bin
Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com>
2024-10-25 00:55:50 +08:00
hujun5
9395669ac0
arm64: fix fvp smp faild to boot
...
reason:
we should give a busy wait addr
This commit fixes the regression from https://github.com/apache/nuttx/pull/13640
Signed-off-by: hujun5 <hujun5@xiaomi.com>
2024-10-24 10:17:48 +08:00
cuiziwei
12fd5ec472
nuttx: Add LIBSUPCXX_TOOLCHAIN to link the prebuilt library provide by toolchain.
...
Signed-off-by: cuiziwei <cuiziwei@xiaomi.com>
2024-10-24 01:38:03 +08:00
Jukka Laitinen
cdd11112fd
arch/arm64/src/imx9/imx9_lpspi.c: Small cache operation optimization
...
There is no need to invalidate the RX buffer before every transfer.
It is never gets dirty, so it is good to invalidate initially after allocation,
and after each transfer.
Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2024-10-23 19:46:42 +08:00
Jukka Laitinen
6cadfc16cd
arch/arm64/src/imx9/imx9_lpspi.c: Fix 9-16 bit transfers
...
Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2024-10-23 19:46:42 +08:00
lipengfei28
3225aa853f
arch/arm64: vector table 2K align
...
Signed-off-by: lipengfei28 <lipengfei28@xiaomi.com>
2024-10-23 15:15:12 +08:00
lipengfei28
877f42cde5
remove unused variable 'cpu_freq'
...
Signed-off-by: lipengfei28 <lipengfei28@xiaomi.com>
2024-10-23 10:53:27 +08:00
wangmingrong1
45c5d3c143
arm64/toolchains:Add the following kasan compilation options
...
Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com>
2024-10-23 10:53:16 +08:00
lipengfei28
c95ed45ccc
arhc/arm64: vector table may be far away form arm64_fatal_handle
...
use 33-bit (+/-4GB) pc-relative addressing to load
the address of arm64_fatal_handle
Signed-off-by: lipengfei28 <lipengfei28@xiaomi.com>
2024-10-23 10:09:17 +08:00
cuiziwei
8e95f6800b
fix GCCVER cmake define.
...
Signed-off-by: cuiziwei <cuiziwei@xiaomi.com>
2024-10-21 18:03:23 +02:00
cuiziwei
9614e1fed5
Add GCCVER define to Toolchain.cmake
...
Since GCCVER will also be used in the toolchain, it needs to be defined in advance.
Signed-off-by: cuiziwei <cuiziwei@xiaomi.com>
2024-10-19 14:32:08 +08:00
Ville Juven
8fe3ab3e39
arch/arm64: Remove arm64_copystate.c
...
The file is not referenced from anywhere and is obsolete / dead code anyway
-> remove it from the index.
2024-10-17 18:07:54 +08:00
lipengfei28
ef350afd28
Revert "arch/arm64: add CONFIG_ARCH_VMA_MAPPING"
...
This reverts commit e7326cfa62 .
2024-10-17 12:28:58 +08:00
Jukka Laitinen
d6c795dda3
imx9/flexcan: Make self reception disable to be configurable
...
Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2024-10-17 09:02:17 +08:00
Xiang Xiao
c6aed84638
tools: Rename apps-or-nuttx-Make.defs to Make.defs
...
follow the same pattern as other Make.defs files
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2024-10-17 07:55:02 +08:00
yangsong8
8c13b8df1d
syslog: convert \n to \r\n in syslog framework layer
...
Signed-off-by: yangsong8 <yangsong8@xiaomi.com>
2024-10-17 02:29:51 +08:00
Jukka Laitinen
6a5b395459
arch/arm64/src/imx9: Add initial version of canbus driver
...
Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2024-10-16 15:43:19 +08:00
Jukka Laitinen
bcfdb58686
arch/arm64/src/common/arm64_initialize.c: Add initializing of socket can interface
...
Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2024-10-16 15:43:19 +08:00
ouyangxiangzhen
a45f903650
imx8qm-mek: Resolve boot issue for non-EL3 environments.
...
This commit addresses the issue of unauthorized writes to cntfrq_el0 during boot when not in EL3 mode.
Signed-off-by: ouyangxiangzhen <ouyangxiangzhen@xiaomi.com>
2024-10-16 13:54:44 +08:00
hujun5
aa0346610b
arm64: we need to initialize the percpu register storing the current task more earlier.
...
A call stack looks like the following:
sched_idletask
syslog_write
nx_vsyslog
syslog
getreg64
gic_validate_redist_version
arm64_gic_init
arm64_gic_secondary_init
arm64_boot_secondary_c_routine
Signed-off-by: hujun5 <hujun5@xiaomi.com>
2024-10-15 15:25:55 +08:00
hujun5
948ac9b4cc
arm64: add up_this_task and up_change_task macro impl
...
Signed-off-by: hujun5 <hujun5@xiaomi.com>
2024-10-15 15:25:55 +08:00
hujun5
d77cb8af70
sched: fix nxsched_process_delivered did not call hook
...
Signed-off-by: hujun5 <hujun5@xiaomi.com>
2024-10-15 01:50:06 +08:00
Xu Xingliang
632feb2b51
arch/arm64: remove struct regs_context
...
Signed-off-by: Xu Xingliang <xuxingliang@xiaomi.com>
Signed-off-by: lipengfei28 <lipengfei28@xiaomi.com>
2024-10-14 23:05:56 +08:00
xuxingliang
f031dc39a6
arch/arm64: fix build warnings
...
common/arm64_mpu.c:355:13: error: format '%llX' expects argument of type 'long long unsigned int', but argument 4 has type 'long unsigned int' [-Werror=format=]
355 | _info("MPU-%d, 0x%08llX-0x%08llX SH=%llX AP=%llX XN=%llX\n", i,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
common/arm64_mpu.c:355:29: note: format string is defined here
355 | _info("MPU-%d, 0x%08llX-0x%08llX SH=%llX AP=%llX XN=%llX\n", i,
| ~~~~~^
| |
| long long unsigned int
| %08lX
common/arm64_mpu.c:355:13: error: format '%llX' expects argument of type 'long long unsigned int', but argument 5 has type 'long unsigned int' [-Werror=format=]
355 | _info("MPU-%d, 0x%08llX-0x%08llX SH=%llX AP=%llX XN=%llX\n", i,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
common/arm64_mpu.c:355:38: note: format string is defined here
355 | _info("MPU-%d, 0x%08llX-0x%08llX SH=%llX AP=%llX XN=%llX\n", i,
Signed-off-by: xuxingliang <xuxingliang@xiaomi.com>
2024-10-14 17:59:56 +08:00
chao an
7288a8d000
arch/arm64: add support to config SPI interrupt affinity routing to CPU0 by default
...
Signed-off-by: chao an <anchao@lixiang.com>
2024-10-14 17:58:13 +08:00
chao an
83c483c1b4
arch/armv8-a: new config to set SPIs Configuration to edge-triggered
...
Configure all SPIs(Shared Peripheral Interrupts) as edge-triggered by default
Signed-off-by: chao an <anchao@lixiang.com>
2024-10-14 17:58:13 +08:00
xuxingliang
d655569a7c
cmake: add newly added sources to cmake
...
These newly added files are missing from cmake.
Signed-off-by: xuxingliang <xuxingliang@xiaomi.com>
2024-10-14 17:19:45 +08:00
chenzhijia
505adfa277
nuttx:move "#define STRINGIFY(x)" to nuttx/macro.h
...
Franklin requirement, "#define STRINGIFY(x)" conflicts with https://github.com/mborgerding/kissfft define
Signed-off-by: chenzhijia <chenzhijia@xiaomi.com>
Signed-off-by: lipengfei28 <lipengfei28@xiaomi.com>
2024-10-13 03:16:25 +08:00
lipengfei28
e7326cfa62
arch/arm64: add CONFIG_ARCH_VMA_MAPPING
...
Signed-off-by: lipengfei28 <lipengfei28@xiaomi.com>
2024-10-13 02:09:38 +08:00
anjiahao
e5f9b42ea0
binfmt/libelf:Remove libelf implementation [2/2]
...
this commit is part two, all logic move to modlib, so we can remove it.
and change all use defconfig
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2024-10-12 12:29:06 +08:00
lipengfei28
78a6ba6d5f
PFU: do not cause execution of any instructions to be trapped
...
Signed-off-by: lipengfei28 <lipengfei28@xiaomi.com>
2024-10-11 17:04:28 +08:00
Bowen Wang
313d6df787
include/nuttx.h: replace all the align macros to nuttx version
...
1. add IS_ALIGNED() definitions for NuttX;
2. replace all the ALIGN_UP() and ALIGN_DOWN() to use common
align implementation;
Signed-off-by: Bowen Wang <wangbowen6@xiaomi.com>
2024-10-11 16:55:43 +08:00
lipengfei28
274ca2ea65
arch: arm64: Fix ARM64_CONTEXT_REGS number
...
This commit fixes the regression in https://github.com/apache/nuttx/pull/14063
Signed-off-by: lipengfei28 <lipengfei28@xiaomi.com>
2024-10-11 13:26:54 +08:00
Xu Xingliang
f68d594420
arch/arm64: rename register names to align with arm32
...
Signed-off-by: Xu Xingliang <xuxingliang@xiaomi.com>
Signed-off-by: lipengfei28 <lipengfei28@xiaomi.com>
2024-10-11 01:17:24 +08:00
yinshengkai
02eb280302
arch/perf: modify the return value of up_perf_gettime to clock_t
...
When using alarm_arch implementation, 64-bit time can be returned. Using unsign long will cause precision loss.
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2024-10-10 23:17:14 +08:00
yinshengkai
d375a09c0a
libs: add gprof arm64 support
...
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2024-10-10 18:46:51 +08:00
wangming9
1c2856dfcb
arch/arm64: Fixed up_getusrsp getting stack Pointers
...
Signed-off-by: wangming9 <wangming9@xiaomi.com>
Signed-off-by: lipengfei28 <lipengfei28@xiaomi.com>
2024-10-10 15:40:03 +08:00