arm64 panics on boot on a RPi3
Michael Tuexen
tuexen at freebsd.org
Sat Mar 17 23:36:42 UTC 2018
> On 17. Mar 2018, at 12:02, Andrew Turner <andrew at fubar.geek.nz> wrote:
>
> You need to update loader.efi. A recent change to the kernel means we can now enable the EFI runtime services when booting from U-Boot. There is however an issue where if you try to read the time before calling SetVirtualAddressMap it will try to call into a function out side of the runtime map. As this isn’t a valid address we don’t include it in the memory map so you get the panic below.
Hi Andrew,
updating loader.efi fixed the problem. Thank you very much!
Best regards
Michael
>
> It doesn’t seem to be an issue on UEFI implementations derived from EDK2.
>
> Andrew
>
>> On 17 Mar 2018, at 10:20, Michael Tuexen <tuexen at freebsd.org> wrote:
>>
>> Dear all,
>>
>> FreeBSD head of today panics when booting the arm64 code on a RPi3:
>>
>>>> FreeBSD EFI boot block
>> Loader path: /boot/loader.efi
>>
>> Initializing modules: UFS
>> Probing 3 block devices.....* done
>> UFS found 1 partition
>> Consoles: EFI console
>> Command line arguments: loader.efi
>> Image base: 0x39ab8008
>> EFI version: 2.05
>> EFI Firmware: Das U-boot (rev 0.00)
>>
>> FreeBSD/arm64 EFI loader, Revision 1.1
>> (Wed Dec 6 19:13:14 CET 2017 root at bsd18.fh-muenster.de)
>> EFI boot environment
>> Loading /boot/defaults/loader.conf
>> /boot/kernel/kernel text=0x8482a0 data=0x137018+0x71f83c syms=[0x8+0x1148a0+0x8+0x106675]
>> /boot/entropy size=0x1000
>> /boot/kernel/geom_label.ko text=0x2b40 text=0x2610 data=0x10120+0xfee4 syms=[0x8+0x15a8+0x8+0xf73]
>>
>> Hit [Enter] to boot immediately, or any other key for command prompt.
>> Booting [/boot/kernel/kernel]...
>> Using DTB provided by EFI at 0x8004000.
>> KDB: debugger backends: ddb
>> KDB: current backend: ddb
>> Copyright (c) 1992-2018 The FreeBSD Project.
>> Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
>> The Regents of the University of California. All rights reserved.
>> FreeBSD is a registered trademark of The FreeBSD Foundation.
>> FreeBSD 12.0-CURRENT #65 r331093: Sat Mar 17 11:05:06 CET 2018
>> tuexen at bsd10.fh-muenster.de:/usr/home/tuexen/head/sys/arm64/compile/TCP arm64
>> FreeBSD clang version 5.0.1 (branches/release_50 319231) (based on LLVM 5.0.1)
>> VT: init without driver.
>> sysctl_warn_reuse: can't re-use a leaf (kern.features.geom_label)!
>> module_register: cannot register g_label from kernel; already loaded from geom_label.ko
>> Module g_label failed to register: 17
>> Starting CPU 1 (1)
>> Starting CPU 2 (2)
>> Starting CPU 3 (3)
>> FreeBSD/SMP: Multiprocessor System Detected: 4 CPUs
>> random: unblocking device.
>> MAP 39b1b000 mode 2 pages 1
>> MAP 3af86000 mode 2 pages 2
>> MAP 3f100000 mode 1 pages 1
>> random: entropy device external interface
>> kbd0 at kbdmux0
>> ofwbus0: <Open Firmware Device Tree>
>> simplebus0: <Flattened device tree simple bus> on ofwbus0
>> ofw_clkbus0: <OFW clocks bus> on ofwbus0
>> clk_fixed0: <Fixed clock> on ofw_clkbus0
>> clk_fixed1: <Fixed clock> on ofw_clkbus0
>> regfix0: <Fixed Regulator> on ofwbus0
>> regfix1: <Fixed Regulator> on ofwbus0
>> psci0: <ARM Power State Co-ordination Interface Driver> on ofwbus0
>> local_intc0: <BCM2836 Interrupt Controller> mem 0x40000000-0x400000ff on simplebus0
>> intc0: <BCM2835 Interrupt Controller> mem 0x7e00b200-0x7e00b3ff irq 16 on simplebus0
>> generic_timer0: <ARMv7 Generic Timer> irq 47,48,49,50 on simplebus0
>> Timecounter "ARM MPCore Timecounter" frequency 19200000 Hz quality 1000
>> Event timer "ARM MPCore Eventtimer" frequency 19200000 Hz quality 1000
>> x0: ffff0000000109e0
>> x1: ffff0000000109b0
>> x2: 4
>> x3: ffff00000043e638
>> x4: ffff00000076eb28
>> x5: 110
>> x6: ffff000000010808
>> x7: ffff000000010638
>> x8: 3af61fd0
>> x9: 0
>> x10: ffff000000993f20
>> x11: 0
>> x12: ffff0000003b3ab4
>> x13: ffff00000043e2f0
>> x14: a
>> x15: 0
>> x16: 7
>> x17: ffff00000043e2f0
>> x18: ffff0000000109b0
>> x19: ffff0000000109e0
>> x20: ffff000000993000
>> x21: ffff000000b89000
>> x22: fffffd00012d9070
>> x23: 0
>> x24: fffffd00011c1d00
>> x25: fffffd00011c1c80
>> x26: fffffd00011c1cd8
>> x27: 0
>> x28: fffffd00011d0080
>> x29: ffff0000000109d0
>> sp: ffff0000000109b0
>> lr: ffff0000000fee88
>> elr: 3af61fd0
>> spsr: a00001c5
>> far: 3af61fd0
>> esr: 86000007
>> panic: data abort in critical section or under mutex
>> cpuid = 0
>> time = 1
>> KDB: stack backtrace:
>> db_trace_self() at db_trace_self_wrapper+0x28
>> pc = 0xffff00000066ead0 lr = 0xffff0000000ba870
>> sp = 0xffff0000000103a0 fp = 0xffff0000000105b0
>>
>> db_trace_self_wrapper() at vpanic+0x19c
>> pc = 0xffff0000000ba870 lr = 0xffff000000362fb0
>> sp = 0xffff0000000105c0 fp = 0xffff000000010670
>>
>> vpanic() at panic+0x44
>> pc = 0xffff000000362fb0 lr = 0xffff000000362e10
>> sp = 0xffff000000010680 fp = 0xffff000000010700
>>
>> panic() at data_abort+0x21c
>> pc = 0xffff000000362e10 lr = 0xffff0000006868b8
>> sp = 0xffff000000010710 fp = 0xffff0000000107c0
>>
>> data_abort() at do_el1h_sync+0x11c
>> pc = 0xffff0000006868b8 lr = 0xffff000000686598
>> sp = 0xffff0000000107d0 fp = 0xffff000000010800
>>
>> do_el1h_sync() at handle_el1h_sync+0x74
>> pc = 0xffff000000686598 lr = 0xffff000000671074
>> sp = 0xffff000000010810 fp = 0xffff000000010920
>>
>> handle_el1h_sync() at efi_get_time+0x38
>> pc = 0xffff000000671074 lr = 0xffff0000000fee84
>> sp = 0xffff000000010930 fp = 0xffff0000000109d0
>>
>> efi_get_time() at efirtc_probe+0x18
>> pc = 0xffff0000000fee84 lr = 0xffff0000000ff5b8
>> sp = 0xffff0000000109e0 fp = 0xffff000000010a00
>>
>> efirtc_probe() at device_probe_child+0x150
>> pc = 0xffff0000000ff5b8 lr = 0xffff000000397c1c
>> sp = 0xffff000000010a10 fp = 0xffff000000010a70
>>
>> device_probe_child() at device_probe+0x88
>> pc = 0xffff000000397c1c lr = 0xffff0000003988ac
>> sp = 0xffff000000010a80 fp = 0xffff000000010aa0
>>
>> device_probe() at bus_generic_new_pass+0xec
>> pc = 0xffff0000003988ac lr = 0xffff00000039a78c
>> sp = 0xffff000000010ab0 fp = 0xffff000000010ae0
>>
>> bus_generic_new_pass() at bus_generic_new_pass+0xd0
>> pc = 0xffff00000039a78c lr = 0xffff00000039a770
>> sp = 0xffff000000010af0 fp = 0xffff000000010b20
>>
>> bus_generic_new_pass() at root_bus_configure+0x78
>> pc = 0xffff00000039a770 lr = 0xffff00000039c700
>> sp = 0xffff000000010b30 fp = 0xffff000000010b60
>>
>> root_bus_configure() at mi_startup+0xc8
>> pc = 0xffff00000039c700 lr = 0xffff0000002fbbcc
>> sp = 0xffff000000010b70 fp = 0xffff000000010bb0
>>
>> mi_startup() at virtdone+0x54
>> pc = 0xffff0000002fbbcc lr = 0xffff000000001084
>> sp = 0xffff000000010bc0 fp = 0x0000000000000000
>>
>> KDB: enter: panic
>> [ thread pid 0 tid 100000 ]
>> Stopped at 0x3af61fd0:KDB: reentering
>> KDB: stack backtrace:
>> db_trace_self() at db_trace_self_wrapper+0x28
>> pc = 0xffff00000066ead0 lr = 0xffff0000000ba870
>> sp = 0xffff00000000f990 fp = 0xffff00000000fba0
>>
>> db_trace_self_wrapper() at kdb_reenter+0x38
>> pc = 0xffff0000000ba870 lr = 0xffff0000003a778c
>> sp = 0xffff00000000fbb0 fp = 0xffff00000000fbc0
>>
>> kdb_reenter() at do_el1h_sync+0x11c
>> pc = 0xffff0000003a778c lr = 0xffff000000686598
>> sp = 0xffff00000000fbd0 fp = 0xffff00000000fc00
>>
>> do_el1h_sync() at handle_el1h_sync+0x74
>> pc = 0xffff000000686598 lr = 0xffff000000671074
>> sp = 0xffff00000000fc10 fp = 0xffff00000000fd20
>>
>> handle_el1h_sync() at db_read_bytes+0x34
>> pc = 0xffff000000671074 lr = 0xffff00000066e878
>> sp = 0xffff00000000fd30 fp = 0xffff00000000ffe0
>>
>> db_read_bytes() at db_get_value+0x38
>> pc = 0xffff00000066e878 lr = 0xffff0000000b69fc
>> sp = 0xffff00000000fff0 fp = 0xffff000000010020
>>
>> db_get_value() at db_disasm_read_word+0x10
>> pc = 0xffff0000000b69fc lr = 0xffff00000066e7f4
>> sp = 0xffff000000010030 fp = 0xffff000000010030
>>
>> db_disasm_read_word() at disasm+0x40
>> pc = 0xffff00000066e7f4 lr = 0xffff00000066f6a0
>> sp = 0xffff000000010040 fp = 0xffff0000000100a0
>>
>> disasm() at db_print_loc_and_inst+0x40
>> pc = 0xffff00000066f6a0 lr = 0xffff0000000b8adc
>> sp = 0xffff0000000100b0 fp = 0xffff0000000100c0
>>
>> db_print_loc_and_inst() at db_trap+0xd4
>> pc = 0xffff0000000b8adc lr = 0xffff0000000ba9b8
>> sp = 0xffff0000000100d0 fp = 0xffff0000000102f0
>>
>> db_trap() at kdb_trap+0x1c8
>> pc = 0xffff0000000ba9b8 lr = 0xffff0000003a7bdc
>> sp = 0xffff000000010300 fp = 0xffff0000000103b0
>>
>> kdb_trap() at do_el1h_sync+0xf0
>> pc = 0xffff0000003a7bdc lr = 0xffff00000068656c
>> sp = 0xffff0000000103c0 fp = 0xffff0000000103f0
>>
>> do_el1h_sync() at handle_el1h_sync+0x74
>> pc = 0xffff00000068656c lr = 0xffff000000671074
>> sp = 0xffff000000010400 fp = 0xffff000000010510
>>
>> handle_el1h_sync() at kdb_enter+0x34
>> pc = 0xffff000000671074 lr = 0xffff0000003a7280
>> sp = 0xffff000000010520 fp = 0xffff0000000105b0
>>
>> kdb_enter() at vpanic+0x1b8
>> pc = 0xffff0000003a7280 lr = 0xffff000000362fcc
>> sp = 0xffff0000000105c0 fp = 0xffff000000010670
>>
>> vpanic() at panic+0x44
>> pc = 0xffff000000362fcc lr = 0xffff000000362e10
>> sp = 0xffff000000010680 fp = 0xffff000000010700
>>
>> panic() at data_abort+0x21c
>> pc = 0xffff000000362e10 lr = 0xffff0000006868b8
>> sp = 0xffff000000010710 fp = 0xffff0000000107c0
>>
>> data_abort() at do_el1h_sync+0x11c
>> pc = 0xffff0000006868b8 lr = 0xffff000000686598
>> sp = 0xffff0000000107d0 fp = 0xffff000000010800
>>
>> do_el1h_sync() at handle_el1h_sync+0x74
>> pc = 0xffff000000686598 lr = 0xffff000000671074
>> sp = 0xffff000000010810 fp = 0xffff000000010920
>>
>> handle_el1h_sync() at efi_get_time+0x38
>> pc = 0xffff000000671074 lr = 0xffff0000000fee84
>> sp = 0xffff000000010930 fp = 0xffff0000000109d0
>>
>> efi_get_time() at efirtc_probe+0x18
>> pc = 0xffff0000000fee84 lr = 0xffff0000000ff5b8
>> sp = 0xffff0000000109e0 fp = 0xffff000000010a00
>>
>> efirtc_probe() at device_probe_child+0x150
>> pc = 0xffff0000000ff5b8 lr = 0xffff000000397c1c
>> sp = 0xffff000000010a10 fp = 0xffff000000010a70
>>
>> device_probe_child() at device_probe+0x88
>> pc = 0xffff000000397c1c lr = 0xffff0000003988ac
>> sp = 0xffff000000010a80 fp = 0xffff000000010aa0
>>
>> device_probe() at bus_generic_new_pass+0xec
>> pc = 0xffff0000003988ac lr = 0xffff00000039a78c
>> sp = 0xffff000000010ab0 fp = 0xffff000000010ae0
>>
>> bus_generic_new_pass() at bus_generic_new_pass+0xd0
>> pc = 0xffff00000039a78c lr = 0xffff00000039a770
>> sp = 0xffff000000010af0 fp = 0xffff000000010b20
>>
>> bus_generic_new_pass() at root_bus_configure+0x78
>> pc = 0xffff00000039a770 lr = 0xffff00000039c700
>> sp = 0xffff000000010b30 fp = 0xffff000000010b60
>>
>> root_bus_configure() at mi_startup+0xc8
>> pc = 0xffff00000039c700 lr = 0xffff0000002fbbcc
>> sp = 0xffff000000010b70 fp = 0xffff000000010bb0
>>
>> mi_startup() at virtdone+0x54
>> pc = 0xffff0000002fbbcc lr = 0xffff000000001084
>> sp = 0xffff000000010bc0 fp = 0x0000000000000000
>>
>> *** error reading from address 3af61fd0 ***
>> KDB: reentering
>> KDB: stack backtrace:
>> db_trace_self() at db_trace_self_wrapper+0x28
>> pc = 0xffff00000066ead0 lr = 0xffff0000000ba870
>> sp = 0xffff00000000fdb0 fp = 0xffff00000000ffc0
>>
>> db_trace_self_wrapper() at kdb_reenter+0x38
>> pc = 0xffff0000000ba870 lr = 0xffff0000003a778c
>> sp = 0xffff00000000ffd0 fp = 0xffff00000000ffe0
>>
>> kdb_reenter() at db_get_value+0x50
>> pc = 0xffff0000003a778c lr = 0xffff0000000b6a14
>> sp = 0xffff00000000fff0 fp = 0xffff000000010020
>>
>> db_get_value() at db_disasm_read_word+0x10
>> pc = 0xffff0000000b6a14 lr = 0xffff00000066e7f4
>> sp = 0xffff000000010030 fp = 0xffff000000010030
>>
>> db_disasm_read_word() at disasm+0x40
>> pc = 0xffff00000066e7f4 lr = 0xffff00000066f6a0
>> sp = 0xffff000000010040 fp = 0xffff0000000100a0
>>
>> disasm() at db_print_loc_and_inst+0x40
>> pc = 0xffff00000066f6a0 lr = 0xffff0000000b8adc
>> sp = 0xffff0000000100b0 fp = 0xffff0000000100c0
>>
>> db_print_loc_and_inst() at db_trap+0xd4
>> pc = 0xffff0000000b8adc lr = 0xffff0000000ba9b8
>> sp = 0xffff0000000100d0 fp = 0xffff0000000102f0
>>
>> db_trap() at kdb_trap+0x1c8
>> pc = 0xffff0000000ba9b8 lr = 0xffff0000003a7bdc
>> sp = 0xffff000000010300 fp = 0xffff0000000103b0
>>
>> kdb_trap() at do_el1h_sync+0xf0
>> pc = 0xffff0000003a7bdc lr = 0xffff00000068656c
>> sp = 0xffff0000000103c0 fp = 0xffff0000000103f0
>>
>> do_el1h_sync() at handle_el1h_sync+0x74
>> pc = 0xffff00000068656c lr = 0xffff000000671074
>> sp = 0xffff000000010400 fp = 0xffff000000010510
>>
>> handle_el1h_sync() at kdb_enter+0x34
>> pc = 0xffff000000671074 lr = 0xffff0000003a7280
>> sp = 0xffff000000010520 fp = 0xffff0000000105b0
>>
>> kdb_enter() at vpanic+0x1b8
>> pc = 0xffff0000003a7280 lr = 0xffff000000362fcc
>> sp = 0xffff0000000105c0 fp = 0xffff000000010670
>>
>> vpanic() at panic+0x44
>> pc = 0xffff000000362fcc lr = 0xffff000000362e10
>> sp = 0xffff000000010680 fp = 0xffff000000010700
>>
>> panic() at data_abort+0x21c
>> pc = 0xffff000000362e10 lr = 0xffff0000006868b8
>> sp = 0xffff000000010710 fp = 0xffff0000000107c0
>>
>> data_abort() at do_el1h_sync+0x11c
>> pc = 0xffff0000006868b8 lr = 0xffff000000686598
>> sp = 0xffff0000000107d0 fp = 0xffff000000010800
>>
>> do_el1h_sync() at handle_el1h_sync+0x74
>> pc = 0xffff000000686598 lr = 0xffff000000671074
>> sp = 0xffff000000010810 fp = 0xffff000000010920
>>
>> handle_el1h_sync() at efi_get_time+0x38
>> pc = 0xffff000000671074 lr = 0xffff0000000fee84
>> sp = 0xffff000000010930 fp = 0xffff0000000109d0
>>
>> efi_get_time() at efirtc_probe+0x18
>> pc = 0xffff0000000fee84 lr = 0xffff0000000ff5b8
>> sp = 0xffff0000000109e0 fp = 0xffff000000010a00
>>
>> efirtc_probe() at device_probe_child+0x150
>> pc = 0xffff0000000ff5b8 lr = 0xffff000000397c1c
>> sp = 0xffff000000010a10 fp = 0xffff000000010a70
>>
>> device_probe_child() at device_probe+0x88
>> pc = 0xffff000000397c1c lr = 0xffff0000003988ac
>> sp = 0xffff000000010a80 fp = 0xffff000000010aa0
>>
>> device_probe() at bus_generic_new_pass+0xec
>> pc = 0xffff0000003988ac lr = 0xffff00000039a78c
>> sp = 0xffff000000010ab0 fp = 0xffff000000010ae0
>>
>> bus_generic_new_pass() at bus_generic_new_pass+0xd0
>> pc = 0xffff00000039a78c lr = 0xffff00000039a770
>> sp = 0xffff000000010af0 fp = 0xffff000000010b20
>>
>> bus_generic_new_pass() at root_bus_configure+0x78
>> pc = 0xffff00000039a770 lr = 0xffff00000039c700
>> sp = 0xffff000000010b30 fp = 0xffff000000010b60
>>
>> root_bus_configure() at mi_startup+0xc8
>> pc = 0xffff00000039c700 lr = 0xffff0000002fbbcc
>> sp = 0xffff000000010b70 fp = 0xffff000000010bb0
>>
>> mi_startup() at virtdone+0x54
>> pc = 0xffff0000002fbbcc lr = 0xffff000000001084
>> sp = 0xffff000000010bc0 fp = 0x0000000000000000
>>
>> db>
>>
>> Any idea what goes wrong?
>>
>> Best regards
>> Michael
>> _______________________________________________
>> freebsd-arm at freebsd.org mailing list
>> https://lists.freebsd.org/mailman/listinfo/freebsd-arm
>> To unsubscribe, send any mail to "freebsd-arm-unsubscribe at freebsd.org"
>>
>
More information about the freebsd-arm
mailing list