Commit Graph

43004 Commits

Author SHA1 Message Date
zhuyanlin 1464315884 xtensa:backtrace: flush to stack when in interrupt
The registers may be in window when in interrupt.
Flush window stack to stack first.
And fix warning in build.

Change-Id: I45f3a8e6aa4f8baa1d54871a02bd6defc8915144
2021-09-17 10:12:40 +08:00
zhuyanlin 57bafa48b8 arch:xtensa:dumpstate: use sched_dumpstack
Use sched_dumpstack instead. The backtrace infomation like

xtensa_user_panic: User Exception: EXCCAUSE=0009 task: hello
xtensa_registerdump:    PC: 202b32b8    PS: 00060030
xtensa_registerdump:    A0: a02acb87    A1: 20998d10    A2: ffffaaaa    A3: 12345678
xtensa_registerdump:    A4: a02ba26c    A5: 209949c0    A6: 20990994    A7: 00000258
xtensa_registerdump:    A8: a02b32af    A9: 20998cb0   A10: 0000000f   A11: 209949a0
xtensa_registerdump:   A12: a02be95c   A13: 20994980   A14: 00000003   A15: 209949d0
xtensa_registerdump:   SAR: 00000000 CAUSE: 00000009 VADDR: ffffaaaa
xtensa_registerdump:  LBEG: 00000000  LEND: 00000000  LCNT: 00000000
xtensa_registerdump:  TMP0: 202b1512  TMP1: 20998af0
sched_dumpstack: [BackTrace| 3|0]:  0x202acbae 0x202b232e 0x202b1912 0x202b19f5 0x202b24f1 0x202b152f    0x40023 0x202b32b0
sched_dumpstack: [BackTrace| 3|1]:  0x202acb87 0x202a86a4

Signed-off-by: zhuyanlin <zhuyanlin1@xiaomi.com>
2021-09-16 20:17:37 +08:00
zhuyanlin 40840204f3 arch:xtensa: add up_backtrace support
Up_backtrace can be backtrace from task or interrupt.

Signed-off-by: zhuyanlin <zhuyanlin1@xiaomi.com>
2021-09-16 20:17:34 +08:00
zhuyanlin 0bad15d41e xtensa:arch: force up_getsp to inline
Up_getsp may be not inline in gcc, thus get the sp
is up_getsp function's sp, not the caller function.

Signed-off-by: zhuyanlin <zhuyanlin1@xiaomi.com>
2021-09-16 20:17:31 +08:00
zhuyanlin b1e6bd158a arch:xtensa: remove WSBITS/WBBITS to core.h
Remove WSBITS/WBBITS macro to core.h as may be used by
arch common code.

Signed-off-by: zhuyanlin <zhuyanlin1@xiaomi.com>
2021-09-16 20:17:26 +08:00
chao.an 358e387d8a net/local: split the waiter node from lc_node
Change-Id: I5b052aa34bf9c37dcfd948d24875454467ed8af5
Signed-off-by: chao.an <anchao@xiaomi.com>
2021-09-16 17:42:05 +08:00
Jiuzhu Dong de00e567da syslog: reslove crash because vmov.i32 instruction is not ready when system boot
So avoid to use vmov.i32 instruction before FPU is ready.

Before modification:
3c03b35c <nx_vsyslog>:
3c03b35c:	f2c00010 	vmov.i32	d16, #0	; 0x00000000
3c03b360:	f2c02050 	vmov.i32	q9, #0	; 0x00000000
3c03b364:	e92d40f0 	push	{r4, r5, r6, r7, lr}
3c03b368:	e24dd08c 	sub	sp, sp, #140	; 0x8c
3c03b36c:	e28d301c 	add	r3, sp, #28
3c03b370:	e2505000 	subs	r5, r0, #0
3c03b374:	edcd0b0f 	vstr	d16, [sp, #60]	; 0x3c
3c03b378:	edcd0b01 	vstr	d16, [sp, #4]

After modification:
3c03b35c <nx_vsyslog>:
3c03b35c:       e92d40f0        push    {r4, r5, r6, r7, lr}
3c03b360:       e2505000        subs    r5, r0, #0
3c03b364:       e24dd08c        sub     sp, sp, #140    ; 0x8c
3c03b368:       e1a06001        mov     r6, r1
3c03b36c:       e1a07002        mov     r7, r2
3c03b370:       e28d000c        add     r0, sp, #12
3c03b374:       1a00003a        bne     3c03b464 <nx_vsyslog+0x108>

Change-Id: I643c19f5416c94a529764fdaa81f3088fcf95355
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
(cherry picked from commit 696bf0d368a62493c3d7462735127ed2c6ef7594)
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-09-16 10:50:31 +08:00
Jiuzhu Dong e2c717d1fd net: limit NET_NACTIVESOCKETS to 4 when enable DEFAULT_SMALL
Change-Id: Iac28b59227f84c4df0d81d75f34aabad39191f5b
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-09-16 10:50:24 +08:00
Xiang Xiao c1c478538f drivers/sdmmc: Remove rwbuffer to avoid panic
since rwbuffer isn't fully initiailized in mmcsd_slotinitialize.
BTW, if the cache is important for performance, it is better to
implement a general block cache and put in a common location.

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-09-16 10:45:54 +08:00
chao.an 32ea5aa887 net/local: replace the listener list to global
Change-Id: Id4700fddeea27a2a86cca2e4aa6284424b53ec4d
Signed-off-by: chao.an <anchao@xiaomi.com>
2021-09-15 23:20:57 +08:00
chao.an 2394394401 net/local: bypass the message field to support SCM further
Change-Id: I51028036db049788d7db4289e26821a3bf1e1dd0
Signed-off-by: chao.an <anchao@xiaomi.com>
2021-09-15 23:08:30 +08:00
chao.an 09a752e602 net/local: add local_peerconn helper
Change-Id: I2cbceb68f709c581bc0b878844dd16efcd76d4a7
Signed-off-by: chao.an <anchao@xiaomi.com>
2021-09-15 22:04:12 +08:00
zhuyanlin 0b1f2fcb45 xtensa:dcache_clean: use DCACHE_LINZESIZE instead of DCACHE_SIZE
Clean_dcache use DCACHE_LINZESIZE instead of DCACHE_SIZE in addr loop

Signed-off-by: zhuyanlin <zhuyanlin1@xiaomi.com>
Change-Id: I7c37ff91b06fff2f29c142a43127acac7fc92941
2021-09-14 19:56:50 +08:00
chao.an 3d22d6b631 vfs/poll: correct the return event if inode has disconnect
Change-Id: I0f312a706ab1be8d8ac91b1d77cd3c1be0671457
Signed-off-by: chao.an <anchao@xiaomi.com>
2021-09-14 13:04:42 +08:00
chao.an ad480a31bd net/local_recvmsg: remove unused return
Change-Id: I4c3b9a17a36fbb1aba84ebfb96bbe5920d03ddf5
Signed-off-by: chao.an <anchao@xiaomi.com>
2021-09-13 18:04:47 +08:00
ligd 590561dd8d openamp: select DEV_SIMPLE_ADDRENV when openamp opened
Change-Id: Id87868a3879165da1e729aca02173ecbcb896454
Signed-off-by: ligd <liguiding1@xiaomi.com>
2021-09-13 17:31:29 +08:00
Jiuzhu Dong a3de95c7d7 exfat: fix comlile break because tzset undefine
Change-Id: Ia2a9b5474d5fd7b66de2353b9c62483af7d35c8a
Signe-off-by: Jiuzhu Dong <dongjiuzhu1@xiaom.com>
2021-09-13 12:01:54 +08:00
Xiang Xiao dcebb60441 arch/arm: Add ARCH_CORTEXM55 Kconfig for cortex-m55
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-09-13 11:28:41 +08:00
zhouliang3 66e451b8f6 fs/littlefs: revert fstat and use lfs_file_attr function
N/A

Signed-off-by: zhouliang3 <zhouliang3@xiaomi.com>
Change-Id: Ifaa12b2b7450be5875ae2bb62084801561861e22
2021-09-13 10:04:30 +08:00
zhuyanlin 4d1affa210 uClibc++:remove typeinfo.cpp that confict with libsupc++
Typeinfo.cpp already defined in libsupc++

Change-Id: Ie61b95d8fa9da2034b57498de006dce8551c5ad5
2021-09-10 15:32:17 +08:00
Jiuzhu Dong aa1c65a364 errno: use staic errno to replace tl_errno before tls initialization
Change-Id: I44a53b2f5cdb3f4e6c755e5663867cd74361bc7c
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-09-09 21:18:32 +08:00
liushuai25 00d49aa9c2 feature: driver: add interface for fb driver
CHAMPION-99

add get and set panel power interface for fb driver.
add get and set framerate interface for fb driver.
add panel information at videoinfo for fb driver.

Signed-off-by: liushuai25 <liushuai25@xiaomi.com>
Change-Id: I4121411280027b12e7ab68c56a68d1efbbcc7641
2021-09-09 20:31:28 +08:00
liushuai25 193e898b51 feature: driver: add interface for lcd dev driver
CHAMPION-100

add get and set framerate interface for lcd dev driver.

Signed-off-by: liushuai25 <liushuai25@xiaomi.com>
Change-Id: I42584fa2adde9783fac9ac31bfe0b29b426a82e1
2021-09-09 20:28:58 +08:00
chao.an f70bc7c5f1 net/local: add FIONSPACE support
Change-Id: Ib96079c6ef7fe3df60ee9f83330b6ed55718bc5f
Signed-off-by: chao.an <anchao@xiaomi.com>
2021-09-09 20:02:04 +08:00
Jiuzhu Dong 04b3a17662 rpmsg_socket: add prefix "rpmsg-socket" for the name of rpmsg endpoint
Change-Id: If731fb8df651986d944ccbb4f0ba9862b7164676
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-09-09 16:56:49 +08:00
Jiuzhu Dong 06ef56386b getaddrinfo: support AF_RPMSG
The hostname is as rp_cpu, the servname is as rp_name

Change-Id: Icc2128f26192fe71e657dc6b65cec6f104d31aa2
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-09-09 15:29:33 +08:00
Jiuzhu Dong a214fe03eb getaddrinfo: support AF_LOCAL
Change-Id: I1e6a5d3cb64acaeeecad49315ea5e5874bc9440e
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-09-09 15:29:33 +08:00
chao.an e2b71ef804 vfs/poll: remove inode check since which could be NULL
Change-Id: Ib9a5a44e12acaa82e255028d7749bea9a8a371ed
Signed-off-by: chao.an <anchao@xiaomi.com>
2021-09-09 11:39:46 +08:00
chao.an 3118efa317 sched/pidhash: init g_pidhash to NULL to avoid wild pointer
Change-Id: Icbc70a850efb47eaaf942711430c72980c4bb95c
Signed-off-by: chao.an <anchao@xiaomi.com>
2021-09-09 11:28:20 +08:00
zhuyanlin 269266638b xtensa:cache: fix typo error
use addr instead of add
2021-09-08 17:49:47 +08:00
zhuyanlin 3f9fbfdc41 arch:xtensa: add xtensa_cache code support
Add xtensa_cache code support
2021-09-08 11:40:17 +08:00
zhuyanlin db3fb1ba58 arch:xtensa: add XTENSA_CACHE config support
Add support for XTENSA_HAVE_ICACHE & XTENSA_HAVE_DACHE
2021-09-08 11:40:13 +08:00
zhuyanlin 24b658f023 makefile: let clean_context in distclean command
In multi-jobs build, `distclean` may be faster than `clean_context`,
Fix the case `distclean` use the dirctorys that have been
removed by `clean_context` in board/xtensa with xt-xcc
2021-09-08 11:40:10 +08:00
liuhaitao 5e67443c71 checkpatch.sh: add check gerrit Change-ID support
Signed-off-by: liuhaitao <liuhaitao@xiaomi.com>
Change-Id: Iaf6ebbee9337fb021b171385626d7c5bf8860e2c
2021-09-08 10:34:36 +08:00
Jiuzhu Dong 3149af15b9 lib_fread: return the number of bytes when error occurs.
Change-Id: I12228f53cf928c9f29bf739e57a25bca120a9ec1
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-09-07 22:10:31 +08:00
chao.an be683ba2c9 arm/backtrace: workaround for bes platform
Change-Id: I2998a23a07b2e72c8eed6a3ab11ca459e74b4ce6
Signed-off-by: chao.an <anchao@xiaomi.com>
2021-09-07 16:49:22 +08:00
chao.an 2c10b3874d arch/arm: correct the function name of up_getsp()
Change-Id: I1454a6187c4eb744cff802a06a96b19a9dadc080
Signed-off-by: chao.an <anchao@xiaomi.com>
2021-09-07 16:49:18 +08:00
yangjiukui d699e7ed62 fix: nxstyle: recognize the division operator as a comment.
N/A

the nxstyle check tool recognizes the division operator as
a comment, check the following content to determine whether
it is a comment.

Change-Id: Id07c6668489895b45a1042794bc3acca66cd3c47
Signed-off-by: yangjiukui <yangjiukui@xiaomi.com>
2021-09-07 11:49:41 +08:00
zhuyanlin a2d6632e7c uClibcxx: remove function that conflict with libsupc++
The New_/del_ function already contain in libsupc++.
2021-09-07 10:33:11 +08:00
Jiuzhu Dong 4457c3d8cd littlefs/stat: return OK when stat success
Change-Id: I2f2a57af39d477097ad6909a57b252b141063c49
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-09-06 20:25:14 +08:00
zhuyanlin 46e75346f9 arch:xtensa: add xtensa mpu support
Add support for Xtensa Memory Protect Unit.

Change-Id: I27e2f05daae24429ef7513d843b4f217daeefa0d
2021-09-06 16:40:13 +08:00
zhouliang3 601467a05b fs/littlefs: Add attr to dir
N/A

Signed-off-by: zhouliang3 <zhouliang3@xiaomi.com>
Change-Id: Ibe2bf53f4eb37e67bd982d6523a1b686a52b77ad
2021-09-06 16:11:26 +08:00
Xiang Xiao c1cd83cf9e drivers/mmcsd: Fix the wrong format argument in mmcsd_dmpcsd
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-09-06 11:59:55 +08:00
Xiang Xiao 703c4b9b8c drivers/mmcsd: Handle the failure correctly in mmcsd_slotinitialize
1.Return -ENOMEM directly if kmm_malloc return NULL
2.Call nxsem_destroy if the initialization can't succeed

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-09-06 11:59:47 +08:00
Xiang Xiao ad864dcf8e drivers/mmcsd: Change up_udelay to nxsig_usleep if delay >= 1ms
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-09-06 11:58:42 +08:00
Xiang Xiao 8df6a1de6a drivers/mmcsd: Change mmsd_ prefix to mmcsd_ prefix
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-09-06 11:58:22 +08:00
Xiang Xiao 0d8d90f5aa arch: Replace ar and nm with gcc-ar and gcc-nm
to make enable LTO easily

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-09-03 10:22:51 +08:00
chao.an 3478386698 tools/checkstack.pl: handle the <stmdb> instruct properly
Change-Id: Id34b04134c7bd164598da52c682fd0b7711415f2
Signed-off-by: chao.an <anchao@xiaomi.com>
2021-09-03 00:05:22 +08:00
chao.an 1d52c08bdd sys/socket/scm: add more socket message control helper
Change-Id: I051e82f1722d092b62f1ff52a6492a91191cfe25
Signed-off-by: chao.an <anchao@xiaomi.com>
2021-09-02 22:46:41 +08:00
Jiuzhu Dong 93d0da801a rptun: add CONFIG_RPTUN_LOADER to optimize code size
Change-Id: I8a8d85eba5058d455d4ca8a8627169cf29060a4d
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-09-02 18:28:19 +08:00