Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RK3128 kernel panic PSCI #315

Open
UnknowName01 opened this issue Jan 21, 2024 · 0 comments
Open

RK3128 kernel panic PSCI #315

UnknowName01 opened this issue Jan 21, 2024 · 0 comments

Comments

@UnknowName01
Copy link

UnknowName01 commented Jan 21, 2024

Hello all. I have a board RK3128 and I tried to build kernel from this source. But it was panic
Branch: develop-4.4
Config: rockchip_linux_defconfig
DTS: rk3128-fireprime.dts
Boot console from UART:

DDR Version 2.06 20170316
In
1A1A1B1C   3
DDR3
282C1B1C   3
35351B1C   3
Bus Width=16 Col=11 Bank=8 Row=15 CS=1 Die Bus-Width=16 Size=1024MB
mach:2
OUT
Boot1 Release Time: 2017-06-12, version: 2.40
ChipType = 0xa, 1384
No.1 FLASH ID:45 de 94 93 76 51
ECC:60
*V▒k%▒▒▒▒0 20
StorageInit ok = 541225
Code check OK! theLoader 0x60000000, 576936
hdr 0x0:0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,

hdr 0x0:0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,

hdr 0x0:0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,

hdr 0x0:0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
▒

U-Boot 2014.10-RK3128-06-02481-g829baaa (Apr 11 2018 - 13:55:35)

CPU: rk3128
cpu version = 0
CPU's clock information:
    arm pll = 600000000HZ
    periph pll = 594000000HZ
    ddr pll = 600000000HZ
    codec pll = 400000000HZ
Board:  Rockchip platform Board
Uboot as second level loader
DRAM:  Found dram banks: 1
Adding bank:0000000060000000(0000000040000000)
128 MiB
GIC CPU mask = 0x00000001
rk dma pl330 version: 1.4
remotectl v0.1
pwm freq=0xb▒*V▒k%▒▒с= 0 20
SdmmcInit = 2 20
storage init OK!
Using default environment

GetParam
Load FDT from resource image.
no key node
can't find dts node for fixed
No pmic detect.
can't find dts node for pwm0
SecureBootEn = 0, SecureBootLock = 0

#Boot ver: 2018-04-11#2.40
empty serial no.
normal boot.
checkKey
vbus = 1
board_fbt_key_pressed: ir_keycode = 0x0, frt = 0
no fuel gauge found
no fuel gauge found
read logo on state from dts [0]
no fuel gauge found
checkKey
vbus = 1
board_fbt_key_pressed: ir_keycode = 0x0, frt = 0
got recovery cmd from misc.
load fdt from resouce.
Secure Boot state: 0
kernel   @ 0x62000000 (0x006b20e0)
ramdisk  @ 0x65bf0000 (0x00732e20)
bootrk: do_bootm_linux...
   Loading Device Tree to 65600000, end 6560f20f ... OK
Add bank:0000000060000000, 0000000040000000

Starting kernel ...

[    0.000000] Booting Linux on physical CPU 0xf00
[    0.000000] Initializing cgroup subsys cpuset
[    0.000000] Initializing cgroup subsys cpu
[    0.000000] Initializing cgroup subsys cpuacct
[    0.000000] Linux version 4.4.194 (root@dev) (gcc version 6.3.1 20170404 (Linaro GCC 6.3-2017.05) ) #11 SMP Sun Jan 21 18:55:03 UTC 2024
[    0.000000] CPU: ARMv7 Processor [410fc075] revision 5 (ARMv7), cr=10c5387d
[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[    0.000000] Machine model: Rockchip RK3128 Fireprime board
[    0.000000] earlycon: Early serial console at MMIO32 0x20068000 (options '')
[    0.000000] bootconsole [uart0] enabled
[    0.000000] cma: Reserved 16 MiB at 0x9f000000
[    0.000000] Memory policy: Data cache writealloc
[    0.000000] psci: probing for conduit method from DT.
[    0.000000] Bad mode in prefetch abort handler detected
[    0.000000] Internal error: Oops - bad mode: 0 [#1] SMP ARM
[    0.000000] Modules linked in:
[    0.000000] CPU: 0 PID: 0 Comm: swapper Not tainted 4.4.194 #11
[    0.000000] Hardware name: Generic DT based system
[    0.000000] task: c100d480 task.stack: c1000000
[    0.000000] PC is at 0xe9258e48
[    0.000000] LR is at __invoke_psci_fn_smc+0x38/0x44
[    0.000000] pc : [<e9258e48>]    lr : [<c079545c>]    psr: 600001d6
[    0.000000] sp : c1001e98  ip : c1001ef0  fp : c1001f24
[    0.000000] r10: ef7f2700  r9 : c1023cc8  r8 : c100d180
[    0.000000] r7 : 00000000  r6 : 00000000  r5 : 00000000  r4 : 00000000
[    0.000000] r3 : 00000000  r2 : 00000000  r1 : 00000000  r0 : 84000000
[    0.000000] Flags: nZCv  IRQs off  FIQs off  Mode MON_32  ISA ARM  Segment none
[    0.000000] Control: 10c5387d  Table: 6000406a  DAC: c1141330
[    0.000000] Process swapper (pid: 0, stack limit = 0xc1000258)
[    0.000000] Stack: (0xc1001e98 to 0xc1002000)
[    0.000000] 1e80:                                                       84000000 00000000
[    0.000000] 1ea0: 00000000 00000000 00000000 00000000 00000000 00000000 c100d180 c1023cc8
[    0.000000] 1ec0: ef7f2700 c1001f24 c1001ef0 c1001e98 c079545c e9258e48 600001d6 ffffffff
[    0.000000] 1ee0: c1141330 00000000 c0795424 c10cf140 00000000 00000000 00000000 00000000
[    0.000000] 1f00: c1001f08 c0414b2c c0acd67c c560108c ef7d47f0 c1006c88 c1001f44 c1001f28
[    0.000000] 1f20: c0f37620 c0795430 c1006c88 c0f59a0c c100e8b8 c10cf140 c1001f5c c1001f48
[    0.000000] 1f40: c0f37860 c0f375f8 c1023cc8 c0fa8cec c1001fb4 c1001f60 c0f04a38 c0f37834
[    0.000000] 1f60: ffffffff 10c5387d c1001f8c c1001f78 c01759c4 c01753e8 c0cce92a c1001fac
[    0.000000] 1f80: c1001fa4 c1001f90 c01eabf0 c0f64068 00000000 c10cf000 ffffffff 6000406a
[    0.000000] 1fa0: c1006c80 00000000 c1001ff4 c1001fb8 c0f00a10 c0f044b4 00000000 00000000
[    0.000000] 1fc0: 00000000 00000000 00000000 c0f65250 c10cf294 c1006d00 c0f6524c c100e9d8
[    0.000000] 1fe0: 6000406a 410fc075 00000000 c1001ff8 6000807c c0f00984 00000000 00000000
[    0.000000] [<c079545c>] (__invoke_psci_fn_smc) from [<c0f37620>] (psci_0_2_init+0x34/0x23c)
[    0.000000] [<c0f37620>] (psci_0_2_init) from [<c0f37860>] (psci_dt_init+0x38/0x44)
[    0.000000] [<c0f37860>] (psci_dt_init) from [<c0f04a38>] (setup_arch+0x590/0x900)
[    0.000000] [<c0f04a38>] (setup_arch) from [<c0f00a10>] (start_kernel+0x98/0x418)
[    0.000000] [<c0f00a10>] (start_kernel) from [<6000807c>] (0x6000807c)
[    0.000000] Code: ffffffff ffff7fff ff7fff7e ffffffff (ffffffff)
[    0.000000] ---[ end trace cb88537fdc8fa200 ]---
[    0.000000] Kernel panic - not syncing: Attempted to kill the idle task!
[    0.000000] ---[ end Kernel panic - not syncing: Attempted to kill the idle task!
scpcom pushed a commit to scpcom/linux that referenced this issue Apr 28, 2024
[ Upstream commit a51cd6b ]

In case when is64 == 1 in emit(A64_REV32(is64, dst, dst), ctx) the
generated insn reverses byte order for both high and low 32-bit words,
resuling in an incorrect swap as indicated by the jit test:

[ 9757.262607] test_bpf: rockchip-linux#312 BSWAP 16: 0x0123456789abcdef -> 0xefcd jited:1 8 PASS
[ 9757.264435] test_bpf: rockchip-linux#313 BSWAP 32: 0x0123456789abcdef -> 0xefcdab89 jited:1 ret 1460850314 != -271733879 (0x5712ce8a != 0xefcdab89)FAIL (1 times)
[ 9757.266260] test_bpf: rockchip-linux#314 BSWAP 64: 0x0123456789abcdef -> 0x67452301 jited:1 8 PASS
[ 9757.268000] test_bpf: rockchip-linux#315 BSWAP 64: 0x0123456789abcdef >> 32 -> 0xefcdab89 jited:1 8 PASS
[ 9757.269686] test_bpf: rockchip-linux#316 BSWAP 16: 0xfedcba9876543210 -> 0x1032 jited:1 8 PASS
[ 9757.271380] test_bpf: rockchip-linux#317 BSWAP 32: 0xfedcba9876543210 -> 0x10325476 jited:1 ret -1460850316 != 271733878 (0xa8ed3174 != 0x10325476)FAIL (1 times)
[ 9757.273022] test_bpf: rockchip-linux#318 BSWAP 64: 0xfedcba9876543210 -> 0x98badcfe jited:1 7 PASS
[ 9757.274721] test_bpf: rockchip-linux#319 BSWAP 64: 0xfedcba9876543210 >> 32 -> 0x10325476 jited:1 9 PASS

Fix this by forcing 32bit variant of rev32.

Fixes: 1104247 ("bpf, arm64: Support unconditional bswap")
Signed-off-by: Artem Savkov <asavkov@redhat.com>
Tested-by: Puranjay Mohan <puranjay12@gmail.com>
Acked-by: Puranjay Mohan <puranjay12@gmail.com>
Acked-by: Xu Kuohai <xukuohai@huawei.com>
Message-ID: <20240321081809.158803-1-asavkov@redhat.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant