Hardware rebooting when booting FreeBSD

I’ve been porting FreeBSD to the DragonBoard 410c. I can get the kernel to start booting, however during the boot process the hardware resets. When I added verbose logging I found the reboot location is not deterministic. This makes me think there is a watchdog resetting the hardware, however I haven’t found anything in any of the dts files that look like one.

Is there something I’m missing?

I’ve pasted the current boot messages below:

Format: Log Type - Time(microsec) - Message - Optional Info Log Type: B - Since Boot(Power On Reset), D - Delta, S - Statistic S - QC_IMAGE_VERSION_STRING=BOOT.BF.3.0-00261 S - IMAGE_VARIANT_STRING=HAAAANAAA S - OEM_IMAGE_VERSION_STRING=C-BPATTH S - Boot Config, 0x000002e3 S - Core 0 Frequency, 0 MHz B - 1544 - PBL, Start B - 3489 - bootable_media_detect_entry, Start B - 15755 - bootable_media_detect_success, Start B - 15759 - elf_loader_entry, Start B - 18639 - auth_hash_seg_entry, Start B - 18849 - auth_hash_seg_exit, Start B - 46869 - elf_segs_hash_verify_entry, Start B - 105742 - PBL, End B - 112331 - SBL1, Start B - 175222 - pm_device_init, Start D - 14762 - pm_device_init, Delta B - 190594 - boot_flash_init, Start D - 0 - boot_flash_init, Delta B - 194620 - boot_config_data_table_init, Start D - 277306 - boot_config_data_table_init, Delta - (0 Bytes) B - 476501 - CDT version:3,Platform ID:24,Major ID:1,Minor ID:0,Subtype:0 B - 482693 - sbl1_ddr_set_params, Start B - 486383 - cpr_init, Start D - 0 - cpr_init, Delta B - 492026 - Pre_DDR_clock_init, Start D - 213 - Pre_DDR_clock_init, Delta D - 0 - sbl1_ddr_set_params, Delta B - 504531 - pm_driver_init, Start D - 6832 - pm_driver_init, Delta B - 520025 - clock_init, Start D - 30 - clock_init, Delta B - 551684 - Image Load, Start D - 36600 - QSEE Image Loaded, Delta - (460664 Bytes) B - 588314 - Image Load, Start D - 823 - SEC Image Loaded, Delta - (2048 Bytes) B - 595543 - sbl1_efs_handle_cookies, Start D - 0 - sbl1_efs_handle_cookies, Delta B - 603351 - Image Load, Start D - 14152 - QHEE Image Loaded, Delta - (51952 Bytes) B - 617533 - Image Load, Start D - 18727 - RPM Image Loaded, Delta - (149492 Bytes) B - 636291 - Image Load, Start D - 23698 - APPSBL Image Loaded, Delta - (476384 Bytes) B - 659989 - QSEE Execution, Start D - 61 - QSEE Execution, Delta B - 665693 - SBL1, End D - 555710 - SBL1, Delta S - Flash Throughput, 54000 KB/s (1140540 Bytes, 21106 us) S - DDR Frequency, 400 MHz Android Bootloader - UART_DM Initialized!!! [0] welcome to lk

[10] platform_init()
[10] target_init()
[30] SDHC Running in HS200 mode
[40] Done initialization of the card
[50] pm8x41_get_is_cold_boot: Warm boot
[50] Rescue image for DragonBoard 410c, boot into fastboot mode only
[60] Not able to search the panel:
[60] Display not enabled for 24 HW type
[60] Target panel init not found!
[60] pm8x41_get_is_cold_boot: Warm boot
[70] fastboot_init()
[70] Loading keystore failed status 5 [180] USB init ept @ 0x8f690000
[200] udc_start()
[510] – reset –
[510] – portchange –
[900] fastboot: processing commands
[131050] fastboot: download:007bb800
[131300] fastboot: boot
[131300] DTB Total entry: 15, DTB version: 2
[131300] Using DTB entry 0x000000f7/00000000/0x00010018/0 for device 0x000000f7/00010000/0x00010018/0
[131310] Using pmic info 0x2000b/0x0/0x0/0x0 for device 0x2000b/0x0/0x0/0x0
[131370] cmdline: androidboot.emmc=true androidboot.serialno=2f5a20c8 androidboot.baseband=apq mdss_mdp.panel=0:dsi:0:
[131380] Updating device tree: start
[131470] Updating device tree: done
[131470] booting linux @ 0x80080000, ramdisk @ 0x82000000 (7938720), tags/device tree @ 0x81e00000
[131480] Jumping to kernel via monitor
Consoles: Qualcomm console
entry: 0x82001000 94000035 ffffff80007a1000
KDB: debugger backends: ddb
KDB: current backend: ddb
Copyright (c) 1992-2015 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 11.0-CURRENT #376 2f77486(arm64-qcomm)-dirty: Wed Aug 19 14:49:30 BST 2015
andrew@bender:/usr/obj/arm64.aarch64/usr/home/andrew/freebsd/repo/head-git/sys/GENERIC arm64
FreeBSD clang version 3.6.1 (tags/RELEASE_361/final 237755) 20150525
WARNING: WITNESS option enabled, expect reduced performance.
CPU(0): ARM Cortex-A53 r0p0
random: entropy device external interface
ACPI: Table initialisation failed: AE_NOT_FOUND
ACPI: Try disabling either ACPI or apic support.
ofwbus0: <Open Firmware Device Tree>
cpulist0: <Open Firmware CPU Group> on ofwbus0
cpu0: <Open Firmware CPU> on cpulist0
arm64_cpu0 on cpu0
arm64_cpu0: Found register: 0
cpu1: <Open Firmware CPU> on cpulist0
arm64_cpu1 on cpu1
arm64_cpu1: Found register: 1
cpu2: <Open Firmware CPU> on cpulist0
cpu3: <Open Firmware CPU> on cpulist0
pmu0: <Performance Monitoring Unit> irq 23 on ofwbus0
generic_timer0: <ARMv8 Generic Timer> irq 18,19,20,17 on ofwbus0
Timecounter “ARM MPCore Timecounter” frequency 19200000 Hz quality 1000
Event timer “ARM MPCore Eventtimer” frequency 19200000 Hz quality 1000
simplebus0: <Flattened device tree simple bus> on ofwbus0
uart0: <Qualcomm HSUART> mem 0x78b0000-0x78b01ff irq 140 on simplebus0
uart0: console (-1,n,8,1)
gic0: <ARM Generic Interrupt Controller> mem 0xb000000-0xb000fff,0xb002000-0xb002fff on simplebus0
gic0: pn 0x0, arch 0x2, rev 0x0, implementer 0x70 irqs 288
cryptosoft0: <software crypto>
Timecounters tick every 1.000 msec

How about this one?
https://www.codeaurora.org/cgit/quic/la/kernel/msm-3.10/tree/arch/arm/boot/dts/qcom/msm8916.dtsi?h=LA.BR.1.2.4_rb1.13#n783

That entry is not in the device tree I got from Linaro. In general FreeBSD is trying to use the same dtb as Linux.

The lack of an entry makes me think something else is happening, for example it’s only being enabled in some cases.

@andrew did you make progress on this port?