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

feat: add-ci #1

Merged
merged 3 commits into from
Sep 9, 2023
Merged

feat: add-ci #1

merged 3 commits into from
Sep 9, 2023

Conversation

RevySR
Copy link
Member

@RevySR RevySR commented Sep 8, 2023

No description provided.

@RevySR
Copy link
Member Author

RevySR commented Sep 8, 2023

测试启动

Loading, please wait...
sbi_trap_error: hart1: illegal instruction handler failed (error -2)
sbi_trap_error: hart1: mcause=0x0000000000000002 mtval=0x0000000000000000
sbi_trap_error: hart1: mepc=0x0000000000018086 mstatus=0x8000000a01805822
sbi_trap_error: hart1: ra=0x000000000000132a sp=0x000000000002ae38
sbi_trap_error: hart1: gp=0x000000000001d9b0 tp=0x0000000000000000
sbi_trap_error: hart1: s0=0x000000000002ae68 s1=0x000000000002b0f8
sbi_trap_error: hart1: a0=0x0000000000000001 a1=0x0000000000035a00
sbi_trap_error: hart1: a2=0x0000000000000000 a3=0x000000000002b000
sbi_trap_error: hart1: a4=0x0000000000022248 a5=0x0000000000018086
sbi_trap_error: hart1: a6=0x0000003ff49f8000 a7=0x0000000000000001
sbi_trap_error: hart1: s2=0x0000000000000001 s3=0x0000000000022038
sbi_trap_error: hart1: s4=0x000000000002b000 s5=0x0000000000000000
sbi_trap_error: hart1: s6=0x000000000000001f s7=0xffffffffffffff7e
sbi_trap_error: hart1: s8=0x000000000000000a s9=0x000000000001b000
sbi_trap_error: hart1: s10=0x0000000000000000 s11=0x0000000000000000
sbi_trap_error: hart1: t0=0x8000000a01804022 t1=0x00000000002021a8
sbi_trap_error: hart1: t2=0x000000000001d195 t3=0x0000000000000081
sbi_trap_error: hart1: t4=0x0000000000000000 t5=0x0000000000000000
sbi_trap_error: hart1: t6=0x000000000001d196

@RevySR
Copy link
Member Author

RevySR commented Sep 8, 2023

使用强制 sfence.vma 内核出了问题

[   54.028042] Unable to handle kernel paging request at virtual address 0000000100000000
[   54.035985] Oops [#1]
[   54.038260] Modules linked in: binfmt_misc pvrsrvkm galcore vc8000(C) memalloc(C) hantrodec(C) vidmem dwc3 roles dwc3_thead
[   54.049424] CPU: 0 PID: 1 Comm: systemd-shutdow Tainted: G         C        5.10.113-lpi4a #2023.09.06.04.36+f72e7cd07
[   54.060126] epc : dev_driver_string+0xa/0x26
[   54.064401]  ra : __dev_printk+0x24/0x5c
[   54.068322] epc: ffffffe00085709e ra : ffffffe000dbe370 sp : ffffffe0fff73bf0
[   54.075455]  gp : ffffffe001611150 tp : ffffffe0fff68000 t0 : ffffffe0014283d8
[   54.082675]  t1 : ffffffe0010b0898 t2 : 0000000000000000 s0 : ffffffe0fff73c00
[   54.089894]  s1 : ffffffe1fc124b80 a0 : ffffffe001061050 a1 : ffffffe001040a18
[   54.097115]  a2 : ffffffe0fff73c38 a3 : 00000000000000f4 a4 : 00000000000000c0
[   54.104335]  a5 : 00000000ffffffff a6 : 0000000000000030 a7 : ffffffffffffffff
[   54.111554]  s2 : ffffffe0fff73c38 s3 : 0000000000000033 s4 : 0000000000000000
[   54.118773]  s5 : 0000000000008000 s6 : 0000003fffd5de58 s7 : 0000000000000005
[   54.125992]  s8 : 0000003fffd5e7c8 s9 : 0000003fffd5e860 s10: 0000000000000000
[   54.133212]  s11: 0000003fffd5e7c8 t3 : d7bed8df323b0500 t4 : 0000000000000256
[   54.140430]  t5 : 0000000000000007 t6 : ffffffe0fff73ac8
[   54.145741] status: 0000000200000120 badaddr: 0000000100000000 cause: 000000000000000d
[   54.153690] ---[ end trace cf715772c7340a36 ]---
[   54.158323] Unable to handle kernel paging request at virtual address 0000000100000000
[   54.166262] Oops [#2]
[   54.168534] Modules linked in: binfmt_misc pvrsrvkm galcore vc8000(C) memalloc(C) hantrodec(C) vidmem dwc3 roles dwc3_thead
[   54.179689] CPU: 0 PID: 1 Comm: systemd-shutdow Tainted: G      D  C        5.10.113-lpi4a #2023.09.06.04.36+f72e7cd07
[   54.190383] epc : dev_driver_string+0xa/0x26
[   54.194653]  ra : __dev_printk+0x24/0x5c
[   54.198574] epc: ffffffe00085709e ra : ffffffe000dbe370 sp : ffffffe0fff737f0
[   54.205706]  gp : ffffffe001611150 tp : ffffffe0fff68000 t0 : ffffffe001428a60
[   54.212926]  t1 : ffffffe0010b0860 t2 : ffffffe000e002f8 s0 : ffffffe0fff73800
[   54.220145]  s1 : ffffffe1fc124b80 a0 : ffffffe001061050 a1 : ffffffe001040a18
[   54.227363]  a2 : ffffffe0fff73838 a3 : ffffffe101308400 a4 : 00000000000000c0
[   54.234582]  a5 : 00000000ffffffff a6 : 0000000000000030 a7 : ffffffffffffffff
[   54.241803]  s2 : ffffffe0fff73838 s3 : 0000000000000033 s4 : 0000000000000000
[   54.249022]  s5 : 0000000000000001 s6 : 0000000000000214 s7 : 000000000000000c
[   54.256241]  s8 : 000000000000000f s9 : 000000000000000d s10: ffffffe101308468
[   54.263461]  s11: 000000000000000d t3 : d7bed8df323b0500 t4 : ffffffe00103a948
[   54.270680]  t5 : 0000000000000007 t6 : ffffffe0fff73738
[   54.275989] status: 0000000200000120 badaddr: 0000000100000000 cause: 000000000000000d
[   54.283934] ---[ end trace cf715772c7340a37 ]---
[   54.288560] Fixing recursive fault but reboot is needed!
[   75.652388] rcu: INFO: rcu_preempt detected stalls on CPUs/tasks:
[   75.658490] rcu:     Tasks blocked on level-0 rcu_node (CPUs 0-3): P1/1:b..l
[   75.665290]  (detected by 0, t=5254 jiffies, g=8573, q=70)
[   75.670775] task:systemd-shutdow state:D stack:    0 pid:    1 ppid:     0 flags:0x00000000
[   75.679128] Call Trace:
[   75.681585] [<ffffffe000dc948a>] __schedule+0x1dc/0x63e
[   75.686812] [<ffffffe000dc9a46>] schedule+0x34/0xda
[   75.691690] [<ffffffe00021b796>] do_exit+0x7f4/0x842
[   75.696655] [<ffffffe000203452>] die+0xee/0x10e
[   75.701185] [<ffffffe0002075e0>] no_context.part.0+0x48/0x58
[   75.706844] [<ffffffe00020774e>] do_page_fault+0x15e/0x304
[   75.712329] [<ffffffe000201b90>] ret_from_exception+0x0/0xc
[   75.717902] CPU: 0 PID: 0 Comm: swapper/0 Tainted: G      D  C        5.10.113-lpi4a #2023.09.06.04.36+f72e7cd07
[   75.728075] epc : dev_driver_string+0xa/0x26
[   75.732346]  ra : __dev_printk+0x24/0x5c
[   75.736267] epc: ffffffe00085709e ra : ffffffe000dbe370 sp : ffffffe0fff737f0
[   75.743401]  gp : ffffffe001611150 tp : ffffffe0fff68000 t0 : ffffffe001428a60
[   75.750621]  t1 : ffffffe0010b0860 t2 : ffffffe000e002f8 s0 : ffffffe0fff73800
[   75.757840]  s1 : ffffffe1fc124b80 a0 : ffffffe001061050 a1 : ffffffe001040a18
[   75.765060]  a2 : ffffffe0fff73838 a3 : ffffffe101308400 a4 : 00000000000000c0
[   75.772279]  a5 : 00000000ffffffff a6 : 0000000000000030 a7 : ffffffffffffffff
[   75.779498]  s2 : ffffffe0fff73838 s3 : 0000000000000033 s4 : 0000000000000000
[   75.786717]  s5 : 0000000000000001 s6 : 0000000000000214 s7 : 000000000000000c
[   75.793936]  s8 : 000000000000000f s9 : 000000000000000d s10: ffffffe101308468
[   75.801155]  s11: 000000000000000d t3 : d7bed8df323b0500 t4 : ffffffe00103a948
[   75.808373]  t5 : 0000000000000007 t6 : ffffffe0fff73738
[   75.813684] status: 0000000200000120 badaddr: 0000000100000000 cause: 000000000000000d
[   75.821599] [<ffffffe00085709e>] dev_driver_string+0xa/0x26
[   75.827168] End Trace.

As the mmu of T-HEAD th1520 is still functional after switching
opensbi, so they need to execute sfence.vma in the trap handler to function
properly.

To handle this workaroud, add a degraded alternative mechanism in the thead
platform to patch the trap handler.

Signed-off-by: Inochi Amaoto <[email protected]>
Author-by: Inochi Amaoto <[email protected]>
Signed-off-by: Han Gao <[email protected]>
Signed-off-by: Han Gao <[email protected]>
@RevySR
Copy link
Member Author

RevySR commented Sep 9, 2023

Restart test: passed
Restart counter: 46
Tested by revy

@RevySR RevySR merged commit a12297f into th1520 Sep 9, 2023
4 checks passed
@RevySR RevySR deleted the feat/ci branch December 29, 2023 14:03
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

Successfully merging this pull request may close these issues.

2 participants