More experiments with OpenSBI 1.5 with debug

This commit is contained in:
Rodrigo Arias 2024-07-15 11:02:27 +02:00
parent 9fac87a00e
commit eee26f2b4d
3 changed files with 51 additions and 16 deletions

View File

@ -2554,3 +2554,38 @@ No output, lets enable the PLIC again in the DT. Same.
Probably we have a better chance to fix it in the generic platform. Probably we have a better chance to fix it in the generic platform.
Let's use a very far away address for the FDT just in case: `0x0_c000_0000` Let's use a very far away address for the FDT just in case: `0x0_c000_0000`
This one doesn't work:
=> setenv bootargs "root=/dev/ram0 loglevel=7 debug rw earlycon=sbi console=hvc0 ftrace=function ftrace_filter=* tp_printk"
This one yes:
=> setenv bootargs "root=/dev/ram0 loglevel=7 debug rw earlycon=sbi console=hvc0 trace_event=*:* tp_printk trace_buf_size=1M"
=> setenv ramdisk_size 12614846
=> booti ${kernel_addr_r} ${ramdisk_addr_r}:${ramdisk_size} ${fdtcontroladdr}
[ 164.849640] initcall_finish: func=vdso_init+0x0/0x4c ret=0
[ 164.849960] console: initcall_finish: func=vdso_init+0x0/0x4c ret=0
[ 164.862820] initcall_start: func=check_unaligned_access_all_cpus+0x0/0x1d4
[ 164.863140] console: initcall_start: func=check_unaligned_access_all_cpus+0x0/0x1d4
[ 164.878860] kmalloc: call_site=check_unaligned_access_all_cpus+0xa8/0x1d4 ptr=(____ptrval____) bytes_req=8 bytes_alloc=8 gfp_flags=GFP_KERNEL|__GFP_ZERO node=-1 accounted=false
[ 164.879200] console: kmalloc: call_site=check_unaligned_access_all_cpus+0xa8/0x1d4 ptr=(____ptrval____) bytes_req=8 bytes_alloc=8 gfp_flags=GFP_KERNEL|__GFP_ZERO node=-1 accounted=false
[ 164.912380] mm_page_alloc_zone_locked: page=(____ptrval____) pfn=0x83d28 order=2 migratetype=0 percpu_refill=1
[ 164.912680] console: mm_page_alloc_zone_locked: page=(____ptrval____) pfn=0x83d28 order=2 migratetype=0 percpu_refill=1
[ 164.934340] mm_page_alloc_zone_locked: page=(____ptrval____) pfn=0x83d2c order=2 migratetype=0 percpu_refill=1
[ 164.934660] console: mm_page_alloc_zone_locked: page=(____ptrval____) pfn=0x83d2c order=2 migratetype=0 percpu_refill=1
[ 164.956300] mm_page_alloc_zone_locked: page=(____ptrval____) pfn=0x83d30 order=2 migratetype=0 percpu_refill=1
[ 164.956620] console: mm_page_alloc_zone_locked: page=(____ptrval____) pfn=0x83d30 order=2 migratetype=0 percpu_refill=1
[ 164.978280] mm_page_alloc_zone_locked: page=(____ptrval____) pfn=0x83d34 order=2 migratetype=0 percpu_refill=1
[ 164.978600] console: mm_page_alloc_zone_locked: page=(____ptrval____) pfn=0x83d34 order=2 migratetype=0 percpu_refill=1
[ 165.000260] mm_page_alloc_zone_locked: page=(____ptrval____) pfn=0x83d38 order=2 migratetype=0 percpu_refill=1
[ 165.000560] console: mm_page_alloc_zone_locked: page=(____ptrval____) pfn=0x83d38 order=2 migratetype=0 percpu_refill=1
[ 165.022200] mm_page_alloc_zone_locked: page=(____ptrval____) pfn=0x83d3c order=2 migratetype=0 percpu_refill=1
[ 165.022540] console: mm_page_alloc_zone_locked: page=(____ptrval____) pfn=0x83d3c order=2 migratetype=0 percpu_refill=1
[ 165.044200] mm_page_alloc_zone_locked: page=(____ptrval____) pfn=0x83d40 order=2 migratetype=0 percpu_refill=1
[ 165.044500] console: mm_page_alloc_zone_locked: page=(____ptrval____) pfn=0x83d40 order=2 migratetype=0 percpu_refill=1
[ 165.066220] mm_page_alloc: page=(____ptrval____) pfn=0x83d28 order=2 migratetype=0 gfp_flags=GFP_KERNEL
[ 165.066540] console: mm_page_alloc: page=(____ptrval____) pfn=0x83d28 order=2 migratetype=0 gfp_flags=GFP_KERNEL

View File

@ -301,14 +301,14 @@
''; '';
opensbi = prev.opensbi.overrideAttrs (old: rec { opensbi = prev.opensbi.overrideAttrs (old: rec {
version = "1.4"; #version = "1.4";
#version = "1.5"; version = "1.5";
src = prev.fetchFromGitHub { src = prev.fetchFromGitHub {
owner = "riscv-software-src"; owner = "riscv-software-src";
repo = "opensbi"; repo = "opensbi";
rev = "v${version}"; rev = "v${version}";
hash = "sha256-T8ZeAzjM9aeTXitjE7s+m+jjGGtDo2jK1qO5EuKiVLU="; #1.4 #hash = "sha256-T8ZeAzjM9aeTXitjE7s+m+jjGGtDo2jK1qO5EuKiVLU="; #1.4
#hash = "sha256-vK14P97FcaVz4GDr/0055Z6s/k7BPKPQGZ/MQxbOWu0="; #1.5 hash = "sha256-vK14P97FcaVz4GDr/0055Z6s/k7BPKPQGZ/MQxbOWu0="; #1.5
}; };
#NIX_DEBUG=5; #NIX_DEBUG=5;
makeFlags = [ makeFlags = [
@ -325,7 +325,7 @@
"FW_PAYLOAD_FDT_ADDR=0xc0000000" "FW_PAYLOAD_FDT_ADDR=0xc0000000"
]; ];
patches = [ patches = [
#./opensbi-timer-debug.patch ./opensbi-timer-debug.patch
#./ox-alveo-platform-plic.patch #./ox-alveo-platform-plic.patch
]; ];
}); });

View File

@ -224,17 +224,17 @@
* property is described in * property is described in
* Documentation/devicetree/bindings/riscv/cpus.yaml * Documentation/devicetree/bindings/riscv/cpus.yaml
*/ */
// clint: clint@40002000 { clint: clint@40002000 {
// /* MTIME and MTIMECMP address and size pairs */ /* MTIME and MTIMECMP address and size pairs */
// reg = <0x0 0x40002000 0x0 0x8>, <0x0 0x40002008 0x0 0x8>; reg = <0x0 0x40002000 0x0 0x8>, <0x0 0x40002008 0x0 0x8>;
// interrupts-extended = <&HLIC0 3>, <&HLIC0 7>; interrupts-extended = <&HLIC0 3>, <&HLIC0 7>;
// /*<&CPU0 0x3>, <&CPU0 0x7>,*/ /*<&CPU0 0x3>, <&CPU0 0x7>,*/
// /*<&onic_pool 0x3>, <&onic_pool 0x7>,*/ /*<&onic_pool 0x3>, <&onic_pool 0x7>,*/
// /*<&SERIAL 0x3>, <&SERIAL 0x7>*/ /*<&SERIAL 0x3>, <&SERIAL 0x7>*/
//
// /* Allows using the "generic" platform in OpenSBI. */ /* Allows using the "generic" platform in OpenSBI. */
// compatible = "riscv,aclint-mtimer"; compatible = "riscv,aclint-mtimer";
// }; };
/* Guesswork: There must be a timer at 0x40170000 as it is /* Guesswork: There must be a timer at 0x40170000 as it is
* initialized in OpenSBI. It seems to drive the console. */ * initialized in OpenSBI. It seems to drive the console. */