From owner-freebsd-arm@freebsd.org Sat Mar 17 10:20:55 2018 Return-Path: Delivered-To: freebsd-arm@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4A1A3F5A104 for ; Sat, 17 Mar 2018 10:20:55 +0000 (UTC) (envelope-from tuexen@freebsd.org) Received: from drew.franken.de (drew.ipv6.franken.de [IPv6:2001:638:a02:a001:20e:cff:fe4a:feaa]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "*.franken.de", Issuer "COMODO RSA Domain Validation Secure Server CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C8DDE73237 for ; Sat, 17 Mar 2018 10:20:54 +0000 (UTC) (envelope-from tuexen@freebsd.org) Received: from dhcp-10-248-110-205.eduroam.wireless.private.cam.ac.uk (global-5-142.nat-2.net.cam.ac.uk [131.111.5.142]) (Authenticated sender: macmic) by mail-n.franken.de (Postfix) with ESMTPSA id 94EA3721E281E for ; Sat, 17 Mar 2018 11:20:51 +0100 (CET) From: Michael Tuexen Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 11.2 \(3445.5.20\)) Subject: arm64 panics on boot on a RPi3 Message-Id: <7D7EAF74-95E3-4B48-BC57-C3CE4D13501B@freebsd.org> Date: Sat, 17 Mar 2018 10:20:50 +0000 To: freebsd-arm X-Mailer: Apple Mail (2.3445.5.20) X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,BAYES_00 autolearn=disabled version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on mail-n.franken.de X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Mar 2018 10:20:55 -0000 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 =20 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@bsd18.fh-muenster.de) EFI boot environment Loading /boot/defaults/loader.conf /boot/kernel/kernel text=3D0x8482a0 data=3D0x137018+0x71f83c = syms=3D[0x8+0x1148a0+0x8+0x106675] /boot/entropy size=3D0x1000 /boot/kernel/geom_label.ko text=3D0x2b40 text=3D0x2610 = data=3D0x10120+0xfee4 syms=3D[0x8+0x15a8+0x8+0xf73] Hit [Enter] to boot immediately, or any other key for command prompt. Booting [/boot/kernel/kernel]... =20 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@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: simplebus0: on ofwbus0 ofw_clkbus0: on ofwbus0 clk_fixed0: on ofw_clkbus0 clk_fixed1: on ofw_clkbus0 regfix0: on ofwbus0 regfix1: on ofwbus0 psci0: on ofwbus0 local_intc0: mem 0x40000000-0x400000ff on = simplebus0 intc0: mem 0x7e00b200-0x7e00b3ff irq 16 = on simplebus0 generic_timer0: 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 =3D 0 time =3D 1 KDB: stack backtrace: db_trace_self() at db_trace_self_wrapper+0x28 pc =3D 0xffff00000066ead0 lr =3D 0xffff0000000ba870 sp =3D 0xffff0000000103a0 fp =3D 0xffff0000000105b0 db_trace_self_wrapper() at vpanic+0x19c pc =3D 0xffff0000000ba870 lr =3D 0xffff000000362fb0 sp =3D 0xffff0000000105c0 fp =3D 0xffff000000010670 vpanic() at panic+0x44 pc =3D 0xffff000000362fb0 lr =3D 0xffff000000362e10 sp =3D 0xffff000000010680 fp =3D 0xffff000000010700 panic() at data_abort+0x21c pc =3D 0xffff000000362e10 lr =3D 0xffff0000006868b8 sp =3D 0xffff000000010710 fp =3D 0xffff0000000107c0 data_abort() at do_el1h_sync+0x11c pc =3D 0xffff0000006868b8 lr =3D 0xffff000000686598 sp =3D 0xffff0000000107d0 fp =3D 0xffff000000010800 do_el1h_sync() at handle_el1h_sync+0x74 pc =3D 0xffff000000686598 lr =3D 0xffff000000671074 sp =3D 0xffff000000010810 fp =3D 0xffff000000010920 handle_el1h_sync() at efi_get_time+0x38 pc =3D 0xffff000000671074 lr =3D 0xffff0000000fee84 sp =3D 0xffff000000010930 fp =3D 0xffff0000000109d0 efi_get_time() at efirtc_probe+0x18 pc =3D 0xffff0000000fee84 lr =3D 0xffff0000000ff5b8 sp =3D 0xffff0000000109e0 fp =3D 0xffff000000010a00 efirtc_probe() at device_probe_child+0x150 pc =3D 0xffff0000000ff5b8 lr =3D 0xffff000000397c1c sp =3D 0xffff000000010a10 fp =3D 0xffff000000010a70 device_probe_child() at device_probe+0x88 pc =3D 0xffff000000397c1c lr =3D 0xffff0000003988ac sp =3D 0xffff000000010a80 fp =3D 0xffff000000010aa0 device_probe() at bus_generic_new_pass+0xec pc =3D 0xffff0000003988ac lr =3D 0xffff00000039a78c sp =3D 0xffff000000010ab0 fp =3D 0xffff000000010ae0 bus_generic_new_pass() at bus_generic_new_pass+0xd0 pc =3D 0xffff00000039a78c lr =3D 0xffff00000039a770 sp =3D 0xffff000000010af0 fp =3D 0xffff000000010b20 bus_generic_new_pass() at root_bus_configure+0x78 pc =3D 0xffff00000039a770 lr =3D 0xffff00000039c700 sp =3D 0xffff000000010b30 fp =3D 0xffff000000010b60 root_bus_configure() at mi_startup+0xc8 pc =3D 0xffff00000039c700 lr =3D 0xffff0000002fbbcc sp =3D 0xffff000000010b70 fp =3D 0xffff000000010bb0 mi_startup() at virtdone+0x54 pc =3D 0xffff0000002fbbcc lr =3D 0xffff000000001084 sp =3D 0xffff000000010bc0 fp =3D 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 =3D 0xffff00000066ead0 lr =3D 0xffff0000000ba870 sp =3D 0xffff00000000f990 fp =3D 0xffff00000000fba0 db_trace_self_wrapper() at kdb_reenter+0x38 pc =3D 0xffff0000000ba870 lr =3D 0xffff0000003a778c sp =3D 0xffff00000000fbb0 fp =3D 0xffff00000000fbc0 kdb_reenter() at do_el1h_sync+0x11c pc =3D 0xffff0000003a778c lr =3D 0xffff000000686598 sp =3D 0xffff00000000fbd0 fp =3D 0xffff00000000fc00 do_el1h_sync() at handle_el1h_sync+0x74 pc =3D 0xffff000000686598 lr =3D 0xffff000000671074 sp =3D 0xffff00000000fc10 fp =3D 0xffff00000000fd20 handle_el1h_sync() at db_read_bytes+0x34 pc =3D 0xffff000000671074 lr =3D 0xffff00000066e878 sp =3D 0xffff00000000fd30 fp =3D 0xffff00000000ffe0 db_read_bytes() at db_get_value+0x38 pc =3D 0xffff00000066e878 lr =3D 0xffff0000000b69fc sp =3D 0xffff00000000fff0 fp =3D 0xffff000000010020 db_get_value() at db_disasm_read_word+0x10 pc =3D 0xffff0000000b69fc lr =3D 0xffff00000066e7f4 sp =3D 0xffff000000010030 fp =3D 0xffff000000010030 db_disasm_read_word() at disasm+0x40 pc =3D 0xffff00000066e7f4 lr =3D 0xffff00000066f6a0 sp =3D 0xffff000000010040 fp =3D 0xffff0000000100a0 disasm() at db_print_loc_and_inst+0x40 pc =3D 0xffff00000066f6a0 lr =3D 0xffff0000000b8adc sp =3D 0xffff0000000100b0 fp =3D 0xffff0000000100c0 db_print_loc_and_inst() at db_trap+0xd4 pc =3D 0xffff0000000b8adc lr =3D 0xffff0000000ba9b8 sp =3D 0xffff0000000100d0 fp =3D 0xffff0000000102f0 db_trap() at kdb_trap+0x1c8 pc =3D 0xffff0000000ba9b8 lr =3D 0xffff0000003a7bdc sp =3D 0xffff000000010300 fp =3D 0xffff0000000103b0 kdb_trap() at do_el1h_sync+0xf0 pc =3D 0xffff0000003a7bdc lr =3D 0xffff00000068656c sp =3D 0xffff0000000103c0 fp =3D 0xffff0000000103f0 do_el1h_sync() at handle_el1h_sync+0x74 pc =3D 0xffff00000068656c lr =3D 0xffff000000671074 sp =3D 0xffff000000010400 fp =3D 0xffff000000010510 handle_el1h_sync() at kdb_enter+0x34 pc =3D 0xffff000000671074 lr =3D 0xffff0000003a7280 sp =3D 0xffff000000010520 fp =3D 0xffff0000000105b0 kdb_enter() at vpanic+0x1b8 pc =3D 0xffff0000003a7280 lr =3D 0xffff000000362fcc sp =3D 0xffff0000000105c0 fp =3D 0xffff000000010670 vpanic() at panic+0x44 pc =3D 0xffff000000362fcc lr =3D 0xffff000000362e10 sp =3D 0xffff000000010680 fp =3D 0xffff000000010700 panic() at data_abort+0x21c pc =3D 0xffff000000362e10 lr =3D 0xffff0000006868b8 sp =3D 0xffff000000010710 fp =3D 0xffff0000000107c0 data_abort() at do_el1h_sync+0x11c pc =3D 0xffff0000006868b8 lr =3D 0xffff000000686598 sp =3D 0xffff0000000107d0 fp =3D 0xffff000000010800 do_el1h_sync() at handle_el1h_sync+0x74 pc =3D 0xffff000000686598 lr =3D 0xffff000000671074 sp =3D 0xffff000000010810 fp =3D 0xffff000000010920 handle_el1h_sync() at efi_get_time+0x38 pc =3D 0xffff000000671074 lr =3D 0xffff0000000fee84 sp =3D 0xffff000000010930 fp =3D 0xffff0000000109d0 efi_get_time() at efirtc_probe+0x18 pc =3D 0xffff0000000fee84 lr =3D 0xffff0000000ff5b8 sp =3D 0xffff0000000109e0 fp =3D 0xffff000000010a00 efirtc_probe() at device_probe_child+0x150 pc =3D 0xffff0000000ff5b8 lr =3D 0xffff000000397c1c sp =3D 0xffff000000010a10 fp =3D 0xffff000000010a70 device_probe_child() at device_probe+0x88 pc =3D 0xffff000000397c1c lr =3D 0xffff0000003988ac sp =3D 0xffff000000010a80 fp =3D 0xffff000000010aa0 device_probe() at bus_generic_new_pass+0xec pc =3D 0xffff0000003988ac lr =3D 0xffff00000039a78c sp =3D 0xffff000000010ab0 fp =3D 0xffff000000010ae0 bus_generic_new_pass() at bus_generic_new_pass+0xd0 pc =3D 0xffff00000039a78c lr =3D 0xffff00000039a770 sp =3D 0xffff000000010af0 fp =3D 0xffff000000010b20 bus_generic_new_pass() at root_bus_configure+0x78 pc =3D 0xffff00000039a770 lr =3D 0xffff00000039c700 sp =3D 0xffff000000010b30 fp =3D 0xffff000000010b60 root_bus_configure() at mi_startup+0xc8 pc =3D 0xffff00000039c700 lr =3D 0xffff0000002fbbcc sp =3D 0xffff000000010b70 fp =3D 0xffff000000010bb0 mi_startup() at virtdone+0x54 pc =3D 0xffff0000002fbbcc lr =3D 0xffff000000001084 sp =3D 0xffff000000010bc0 fp =3D 0x0000000000000000 *** error reading from address 3af61fd0 *** KDB: reentering KDB: stack backtrace: db_trace_self() at db_trace_self_wrapper+0x28 pc =3D 0xffff00000066ead0 lr =3D 0xffff0000000ba870 sp =3D 0xffff00000000fdb0 fp =3D 0xffff00000000ffc0 db_trace_self_wrapper() at kdb_reenter+0x38 pc =3D 0xffff0000000ba870 lr =3D 0xffff0000003a778c sp =3D 0xffff00000000ffd0 fp =3D 0xffff00000000ffe0 kdb_reenter() at db_get_value+0x50 pc =3D 0xffff0000003a778c lr =3D 0xffff0000000b6a14 sp =3D 0xffff00000000fff0 fp =3D 0xffff000000010020 db_get_value() at db_disasm_read_word+0x10 pc =3D 0xffff0000000b6a14 lr =3D 0xffff00000066e7f4 sp =3D 0xffff000000010030 fp =3D 0xffff000000010030 db_disasm_read_word() at disasm+0x40 pc =3D 0xffff00000066e7f4 lr =3D 0xffff00000066f6a0 sp =3D 0xffff000000010040 fp =3D 0xffff0000000100a0 disasm() at db_print_loc_and_inst+0x40 pc =3D 0xffff00000066f6a0 lr =3D 0xffff0000000b8adc sp =3D 0xffff0000000100b0 fp =3D 0xffff0000000100c0 db_print_loc_and_inst() at db_trap+0xd4 pc =3D 0xffff0000000b8adc lr =3D 0xffff0000000ba9b8 sp =3D 0xffff0000000100d0 fp =3D 0xffff0000000102f0 db_trap() at kdb_trap+0x1c8 pc =3D 0xffff0000000ba9b8 lr =3D 0xffff0000003a7bdc sp =3D 0xffff000000010300 fp =3D 0xffff0000000103b0 kdb_trap() at do_el1h_sync+0xf0 pc =3D 0xffff0000003a7bdc lr =3D 0xffff00000068656c sp =3D 0xffff0000000103c0 fp =3D 0xffff0000000103f0 do_el1h_sync() at handle_el1h_sync+0x74 pc =3D 0xffff00000068656c lr =3D 0xffff000000671074 sp =3D 0xffff000000010400 fp =3D 0xffff000000010510 handle_el1h_sync() at kdb_enter+0x34 pc =3D 0xffff000000671074 lr =3D 0xffff0000003a7280 sp =3D 0xffff000000010520 fp =3D 0xffff0000000105b0 kdb_enter() at vpanic+0x1b8 pc =3D 0xffff0000003a7280 lr =3D 0xffff000000362fcc sp =3D 0xffff0000000105c0 fp =3D 0xffff000000010670 vpanic() at panic+0x44 pc =3D 0xffff000000362fcc lr =3D 0xffff000000362e10 sp =3D 0xffff000000010680 fp =3D 0xffff000000010700 panic() at data_abort+0x21c pc =3D 0xffff000000362e10 lr =3D 0xffff0000006868b8 sp =3D 0xffff000000010710 fp =3D 0xffff0000000107c0 data_abort() at do_el1h_sync+0x11c pc =3D 0xffff0000006868b8 lr =3D 0xffff000000686598 sp =3D 0xffff0000000107d0 fp =3D 0xffff000000010800 do_el1h_sync() at handle_el1h_sync+0x74 pc =3D 0xffff000000686598 lr =3D 0xffff000000671074 sp =3D 0xffff000000010810 fp =3D 0xffff000000010920 handle_el1h_sync() at efi_get_time+0x38 pc =3D 0xffff000000671074 lr =3D 0xffff0000000fee84 sp =3D 0xffff000000010930 fp =3D 0xffff0000000109d0 efi_get_time() at efirtc_probe+0x18 pc =3D 0xffff0000000fee84 lr =3D 0xffff0000000ff5b8 sp =3D 0xffff0000000109e0 fp =3D 0xffff000000010a00 efirtc_probe() at device_probe_child+0x150 pc =3D 0xffff0000000ff5b8 lr =3D 0xffff000000397c1c sp =3D 0xffff000000010a10 fp =3D 0xffff000000010a70 device_probe_child() at device_probe+0x88 pc =3D 0xffff000000397c1c lr =3D 0xffff0000003988ac sp =3D 0xffff000000010a80 fp =3D 0xffff000000010aa0 device_probe() at bus_generic_new_pass+0xec pc =3D 0xffff0000003988ac lr =3D 0xffff00000039a78c sp =3D 0xffff000000010ab0 fp =3D 0xffff000000010ae0 bus_generic_new_pass() at bus_generic_new_pass+0xd0 pc =3D 0xffff00000039a78c lr =3D 0xffff00000039a770 sp =3D 0xffff000000010af0 fp =3D 0xffff000000010b20 bus_generic_new_pass() at root_bus_configure+0x78 pc =3D 0xffff00000039a770 lr =3D 0xffff00000039c700 sp =3D 0xffff000000010b30 fp =3D 0xffff000000010b60 root_bus_configure() at mi_startup+0xc8 pc =3D 0xffff00000039c700 lr =3D 0xffff0000002fbbcc sp =3D 0xffff000000010b70 fp =3D 0xffff000000010bb0 mi_startup() at virtdone+0x54 pc =3D 0xffff0000002fbbcc lr =3D 0xffff000000001084 sp =3D 0xffff000000010bc0 fp =3D 0x0000000000000000 db>=20 Any idea what goes wrong? Best regards Michael=