Date: Tue, 21 Jan 2025 11:50:40 -0800 From: Mark Millard <marklmi@yahoo.com> To: Warner Losh <imp@bsdimp.com> Cc: FUKAUMI Naoki <naoki@radxa.com>, freebsd-arm@freebsd.org Subject: Re: Radxa Orion O6 Message-ID: <D5EEF0A0-58CE-4686-B519-46D4F43678E5@yahoo.com> In-Reply-To: <CANCZdfqkxocZyGsbuVJjuHcXv8XohSm7=U0TQsaWaKByE8yySw@mail.gmail.com> References: <EDDF572D3560B2F6%2Bc4a27a6d-9a19-40df-9eef-42bbb4e9aa39@radxa.com> <087C4A9F-288B-40EA-BE1B-ACFD32C86DF2@yahoo.com> <C7599FF0E0B3381D%2Be0606559-357c-435c-8534-7353a2055749@radxa.com> <CANCZdfqkxocZyGsbuVJjuHcXv8XohSm7=U0TQsaWaKByE8yySw@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Jan 21, 2025, at 11:08, Warner Losh <imp@bsdimp.com> wrote: > On Mon, Jan 20, 2025 at 2:07=E2=80=AFPM FUKAUMI Naoki = <naoki@radxa.com> wrote: >> Hi Mark, >>=20 >> On 1/21/25 02:01, Mark Millard wrote: >> > On Jan 18, 2025, at 20:57, FUKAUMI Naoki <naoki@radxa.com> wrote: >> >=20 >> >> I'm trying to boot FreeBSD/arm64 on a Radxa Orion O6. >> >> >> >> UEFI has a "O/S Hardware Description Selection" menu where I can = choose "Device Tree" or "ACPI". "ACPI" allows me to boot a mainline = Linux kernel. >> >> >> >> With "ACPI" I can use the serial console with EFI loader, but the = kernel output only shows up on the display after the kernel is loaded. >> >=20 >> > My guess is that there is something that needs to be added to >> > /boot/loader.conf to get the display of the kernel output. >> > But I'm not expert at such and currently do not have access >> > to the FreeBSD systems that I normally do. >> >=20 >> >> ---- >> >> Consoles: EFI console >> >> Reading loader env vars from /efi/freebsd/loader.env >> >> Setting currdev to disk1p1: >> >> FreeBSD/arm64 EFI loader, Revision 3.0 >> >> (Thu Jan 16 06:56:52 UTC 2025 root@releng3.nyi.freebsd.org) >> >> >> >> Command line arguments: loader.efi >> >> Image base: 0x47ab5a000 >> >> EFI version: 2.70 >> >> EFI Firmware: EDK II (rev 1.00) >> >> Console: efi (0x1000) >> >> Load Path: \EFI\BOOT\BOOTAA64.EFI >> >> Load Device: = VenHw(0D51905B-B77E-452A-A2C0-ECA0CC8D514A,00801D090000000000)/U >> >> = SB(0x1,0x0)/HD(1,GPT,009521E2-D3EE-11EF-81EA-0CC47AD8B808,0x22,0x10418) >> >> BootCurrent: 0003 >> >> BootOrder: 0000 0001 0002 0003[*] >> >> BootInfo Path: = VenHw(0D51905B-B77E-452A-A2C0-ECA0CC8D514A,00801D090000000000) >> >> /USB(0x1,0x0) >> >> Ignoring Boot0003: Only one DP found >> >> Trying ESP: = VenHw(0D51905B-B77E-452A-A2C0-ECA0CC8D514A,00801D090000000000)/USB(0 >> >> = x1,0x0)/HD(1,GPT,009521E2-D3EE-11EF-81EA-0CC47AD8B808,0x22,0x10418) >> >> Setting currdev to disk1p1: >> >> Trying: = VenHw(0D51905B-B77E-452A-A2C0-ECA0CC8D514A,00801D090000000000)/USB(0x1,0 >> >> = x0)/HD(2,GPT,009521EB-D3EE-11EF-81EA-0CC47AD8B808,0x1043A,0x283540) >> >> Setting currdev to disk1p2: >> >> Loading /boot/defaults/loader.conf >> >> Loading /boot/defaults/loader.conf >> >> Loading /boot/device.hints >> >> Loading /boot/loader.conf >> >> Loading /boot/loader.conf.d/rtw8922a.conf >> >> Loading /boot/loader.conf.d/rtw8851b.conf >> >> Loading /boot/loader.conf.d/rtw8852c.conf >> >> Loading /boot/loader.conf.d/rtw8703b.conf >> >> Loading /boot/loader.conf.d/rtw8852b.conf >> >> Loading /boot/loader.conf.d/rtw8723d.conf >> >> Loading /boot/loader.conf.d/rtw8822c.conf >> >> Loading /boot/loader.conf.d/rtw8821c.conf >> >> Loading /boot/loader.conf.d/rtw8822b.conf >> >> Loading /boot/loader.conf.d/rtw8852a.conf >> >> Loading /boot/loader.conf.local >> >> ?c/ >> >> - ______ ____ _____ _____ >> >> | ____| | _ \ / ____| __ \ >> >> | |___ _ __ ___ ___ | |_) | (___ | | | | >> >> | ___| '__/ _ \/ _ \| _ < \___ \| | | | >> >> | | | | | __/ __/| |_) |____) | |__| | >> >> | | | | | | || | | | >> >> |_| |_| \___|\___||____/|_____/|_____/ >> >> >> >> /-------- Welcome to FreeBSD ----------\ ``` = ` >> >> | | s` `.....---.......--.``` = -/ >> >> | 1. Boot Installer [Enter] | +o .--` /y:` = +. >> >> | 2. Boot Single user | yo`:. :o = `+- >> >> | 3. Escape to loader prompt | y/ -/` = -o/ >> >> | 4. Reboot | .- = ::/sy+:. >> >> | 5. Cons: Serial | / = `-- / >> >=20 >> > Does there a UART based serial console? Or is there >> > a video console? Or are both possible? >>=20 >> As I wrote, in "ACPI" mode the video console is only visible after = the=20 >> kernel has started. >>=20 >> >> | | `: = :` >> >> | Kernel: | `: = :` >> >> | 6. kernel (1 of 1) | / = / >> >> | | .- = -. >> >> | Options: | -- = -. >> >> | 7. Boot Options | `:` = `:` >> >> | | .-- `--. >> >> \--------------------------------------/ .---.....----. >> >> Loading kernel...seconds. [Space] to pause >> >> /boot/kernel/kernel text=3D0x318 text=3D0x99d0f8 text=3D0x2c9ca0 = data=3D0x17f8e0 data=3D0x >> >> 0+0x371000 0x8+0x16f1b8+0x8+0x19fc8a| >> >> Loading configured modules... >> >> can't find '/etc/hostid' >> >> can't find '/boot/entropy' >> >> Loading splash ok >> >> No valid device tree blob found! >> >> WARNING! Trying to fire up the kernel, but no device tree blob = found! >> >=20 >> > The above 2 lines are normal for a UEFI/AACPI boot. >> > They do indicate that it was not an Device Tree based boot. >> >=20 >> >> EFI framebuffer information: >> >> addr, size 0x84800000, 0x7e9000 >> >> dimensions 1920 x 1080 >> >> stride 1920 >> >> masks 0x00ff0000, 0x0000ff00, 0x000000ff, 0xff000000 >> >> ---- >> >> >> >> Here is a screenshot on the display: >> >> = https://drive.google.com/file/d/1pa0Uv3FONpsyVyt3QfU_1CzRSYW2cita/view?usp= =3Dsharing >> >> >> >> Using the "Device Tree" I was able to use both the serial console = and the display and boot the installer. Please see dmesg below. >> >=20 >> > That later output indicates an UEFI/ACPI boot instead of Device = Tree. >> > For example: >> >=20 >> > . . . >> > ACPI: IORT: Dropping unhandled type 6 >> > . . . >> > acpi0: <CIXTEK SKY1EDK2> >> > acpi0: Power Button (fixed) >> > acpi0: Sleep Button (fixed) >> > acpi0: Could not update all GPEs: AE_NOT_CONFIGURED >> > . . . >> >=20 >> > and there are lots more examples of "acpi" references in the = output, >> > 30+ references counting the ones quoted above. >>=20 >> Yes, I understand that. But as I wrote, things work differently in=20 >> "ACPI" and "Device Tree". >>=20 >> >> But all pcib are not configured. >> >=20 >> > Looks like it always reported: >> >=20 >> > pcib0: could not allocate memory. >> >=20 >> > A verbose boot output would likely be handy for someone that >> > knows what they are doing for ACPI contexts. >>=20 >> Changing FreeBSD boot options causes a kernel panic on the serial=20 >> console as shown below ("DeviceTree" mode): >>=20 >> Best regards, >>=20 >> -- >> FUKAUMI Naoki >> Radxa Computer (Shenzhen) Co., Ltd. >>=20 >> | Boot Options: | .- = ::/sy+:. >> | 3. ACPI :off | / `-- = / >> | 4. Safe Mode :off | `: = :` >> | 5. Single user:off | `: = :` >> | 6. Verbose :On | / = / >>=20 >> Loading kernel... >> /boot/kernel/kernel text=3D0x318 text=3D0x99d0f8 text=3D0x2c9cc0 = data=3D0x17f8e0=20 >> data=3D0x >> 0+0x371000 0x8+0x16f158+0x8+0x19fc2d >> Loading configured modules... >> /boot/entropy size=3D0x1000 >> /etc/hostid size=3D0x25 >> /boot/kernel/zfs.ko text=3D0xe6f10 text=3D0x25b6b8 = data=3D0x3bda8+0xabe84=20 >> 0x8+0x37a58+ >> 0x8+0x30bc7 >> Using DTB provided by EFI at 0x47cf40018. >> Loading splash ok >> EFI framebuffer information: >> addr, size 0x84800000, 0x7e9000 >> dimensions 1920 x 1080 >> stride 1920 >> masks 0x00ff0000, 0x0000ff00, 0x000000ff, 0xff000000 >> ---<<BOOT>>--- >> GDB: debug ports: uart >> GDB: current port: uart >> KDB: debugger backends: ddb gdb >> KDB: current backend: ddb >> Type Physical Virtual #Pages Attr >> Reserved 000080000000 000000000000 00002500 WC WT WB >> RuntimeServicesData 000082500000 000082500000 00001f00 WC WT WB = RUNTIME >> BootServicesData 000084400000 000000000000 00000200 WC WT WB >> ConventionalMemory 000085000000 000000000000 0001b000 WC WT WB >> Reserved 0000a0000000 000000000000 00008000 WC WT WB >> ConventionalMemory 0000a8000000 000000000000 00057fc0 WC WT WB >> RuntimeServicesData 0000fffc0000 0000fffc0000 00000020 WC WT WB = RUNTIME >> ACPIMemoryNVS 0000fffe0000 000000000000 00000010 WC WT WB >> ConventionalMemory 0000ffff0000 000000000000 0000000e WC WT WB >> Reserved 0000ffffe000 000000000000 00000002 WC WT WB >> ConventionalMemory 000100000000 000000000000 00080000 WC WT WB >> BootServicesCode 000180000000 000000000000 00000025 WC WT WB >> ConventionalMemory 000180025000 000000000000 002f1402 WC WT WB >> LoaderCode 000471427000 000000000000 00004000 WC WT WB >> LoaderData 000475427000 000000000000 000047e9 WC WT WB >> ACPIReclaimMemory 000479c10000 000000000000 00000030 WC WT WB >> ConventionalMemory 000479c40000 000000000000 0000000b WC WT WB >> LoaderData 000479c4b000 000000000000 00000001 WC WT WB >> ConventionalMemory 000479c4c000 000000000000 00000f2f WC WT WB >> LoaderCode 00047ab7b000 000000000000 000000d1 WC WT WB >> ConventionalMemory 00047ac4c000 000000000000 00000e38 WC WT WB >> BootServicesData 00047ba84000 000000000000 00002490 WC WT WB >> ConventionalMemory 00047df14000 000000000000 00000164 WC WT WB >> BootServicesCode 00047e078000 000000000000 00000478 WC WT WB >> RuntimeServicesCode 00047e4f0000 00047e4f0000 000004b0 WC WT WB = RUNTIME >> RuntimeServicesData 00047e9a0000 00047e9a0000 00000450 WC WT WB = RUNTIME >> ConventionalMemory 00047edf0000 000000000000 00000005 WC WT WB >> BootServicesData 00047edf5000 000000000000 00000001 WC WT WB >> BootServicesCode 00047edf6000 000000000000 00000038 WC WT WB >> BootServicesData 00047ee2e000 000000000000 000011d2 WC WT WB >> MemoryMappedIO 000004070000 000004070000 00000001 UC = RUNTIME >> MemoryMappedIO 000004120000 000004120000 00000040 UC = RUNTIME >> MemoryMappedIO 000004170000 000004170000 00000010 UC = RUNTIME >> MemoryMappedIO 000016004000 000016004000 00000004 UC = RUNTIME >> Reserved 000084800000 000000000000 00000800 >> Physical memory chunk(s): >> 0x82500000 - 0x845fffff, 33 MB ( 8448 pages) >> 0x85000000 - 0x9fffffff, 432 MB ( 110592 pages) >> 0xa8000000 - 0xfffdffff, 1407 MB ( 360416 pages) >> 0xffff0000 - 0xffffdfff, 0 MB ( 14 pages) >> 0x100000000 - 0x47fffffff, 14336 MB (3670016 pages) >> Excluded memory regions: >> 0x82500000 - 0x833fffff, 15 MB ( 3840 pages) NoAlloc NoDump >> 0x82500000 - 0x843fffff, 31 MB ( 7936 pages) NoAlloc >>=20 > No good can come from this duplication. That's why we get an error / = panic right away. It may be an example problem but a picture of a verbose boot ( https://drive.google.com/file/d/1uCMljSjxDDpfPFatJ3ji0gyFhD4Bi844/view = ) shows: ram0: reserving mempry region: 84400000-84600000 ram0: reserving memory region: 85000000-a0000000 panic: ram_attach: resource 1 failed to attach. I expect that means that: ram0: reserving memory region: 85000000-a0000000 is what was rejected at that stage. (More could be wrong.) Interestingly, https://drive.google.com/file/d/1ynr6-bfWg0zs6sbe76QE6XsPstgegbEu/view does not show: 0x85000000 - 0x9fffffff, 432 MB ( 110592 pages) But it looks to possibly be a screen update vs. picture time issue instead of a missing range. (So my prior notes look to be wrong.) >> 0x83de0000 - 0x83dfffff, 0 MB ( 32 pages) NoAlloc NoDump >> 0x84000000 - 0x84107fff, 1 MB ( 264 pages) NoAlloc NoDump >> 0x84380000 - 0x843fffff, 0 MB ( 128 pages) NoAlloc NoDump >> 0x84800000 - 0x867fffff, 32 MB ( 8192 pages) NoAlloc NoDump >> 0x84800000 - 0x84fe8fff, 7 MB ( 2025 pages) NoAlloc >>=20 > or this... they may come from these, but I've not looked super = closely. >>=20 >> RuntimeServicesData 000082500000 000082500000 00001f00 WC WT WB = RUNTIME >> BootServicesData 000084400000 000000000000 00000200 WC WT WB >> ConventionalMemory 000085000000 000000000000 0001b000 WC WT WB >> ... >> Reserved 000084800000 000000000000 00000800 >=20 > So I'll have to walk through the code to understand why we wind up = collapsing things like we do... > It kinda looks like they overlap each other, which I'd call a bug, but = I've not looked > closely at the code to understand why. >=20 > Warner >> 0x90000000 - 0xafffffff, 512 MB ( 131072 pages) NoAlloc NoDump >> 0xbde00000 - 0xcdf07fff, 257 MB ( 65800 pages) NoAlloc NoDump >> 0xce000000 - 0xd0dfffff, 46 MB ( 11776 pages) NoAlloc NoDump >> 0xfffc0000 - 0xfffdffff, 0 MB ( 32 pages) NoAlloc >> 0x471600000 - 0x4732e5fff, 28 MB ( 7398 pages) NoAlloc >> 0x479c10000 - 0x479c3ffff, 0 MB ( 48 pages) NoAlloc >> 0x47e4f0000 - 0x47edeffff, 9 MB ( 2304 pages) NoAlloc >> 0x1ca0000000 - 0x1ca007ffff, 0 MB ( 128 pages) NoAlloc = NoDump >> Copyright (c) 1992-2025 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 15.0-CURRENT #0 main-n274861-c75d5bdf9818: Tue Jan 21 = 05:40:01=20 >> JST 2025 >> root@orion-o6:/usr/obj/usr/src/arm64.aarch64/sys/GENERIC arm64 >> FreeBSD clang version 19.1.7 = (https://github.com/llvm/llvm-project.git=20 >> llvmorg-19.1.7-0-gcd708029e0b2) >> WARNING: WITNESS option enabled, expect reduced performance. >> VT(efifb): resolution 1920x1080 >> Preloaded elf kernel "/boot/kernel/kernel" at 0xffff000001aa1000. >> Preloaded boot_entropy_cache "/boot/entropy" at 0xffff000001aaa6b8. >> Preloaded hostuuid "/etc/hostid" at 0xffff000001aaa710. >> Preloaded elf module "/boot/kernel/zfs.ko" at 0xffff000001aaa760. >> Preloaded TSLOG data "TSLOG" at 0xffff000001aab038. >> module scmi already present! >> real memory =3D 16996294656 (16208 MB) >> Physical memory chunk(s): >> 0x00000084400000 - 0x000000845fffff, 2097152 bytes (512 pages) >> 0x00000086800000 - 0x0000008fffffff, 159383552 bytes (38912 pages) >> 0x000000b0000000 - 0x000000bddfffff, 232783872 bytes (56832 pages) >> 0x000000cdf08000 - 0x000000cdffffff, 1015808 bytes (248 pages) >> 0x000000d0e00000 - 0x000000fffbffff, 790364160 bytes (192960 pages) >> 0x000000ffff0000 - 0x000000ffffdfff, 57344 bytes (14 pages) >> 0x00000100000000 - 0x000004593ebfff, 14382186496 bytes (3511276 = pages) >> 0x000004732e6000 - 0x00000479c0ffff, 110272512 bytes (26922 pages) >> 0x00000479c40000 - 0x0000047e4effff, 76218368 bytes (18608 pages) >> 0x0000047edf0000 - 0x0000047fffffff, 18939904 bytes (4624 pages) >> avail memory =3D 15769264128 (15038 MB) >> No PSCI/SMCCC call function found >> FreeBSD/SMP: Multiprocessor System Detected: 1 CPUs >> Enabling IDC ICache sync >> Enabling LSE atomics in the kernel >> Enabling BTI >> random: read 4096 bytes from preloaded cache >> random: no platform bootloader entropy >> random: unblocking device. >> VIMAGE (virtualized network stack) enabled >> hostuuid: using 8ffcdd88-11db-4128-a57d-64bbe656c1ac >> ULE: setup cpu 0 >> random: entropy device external interface >> firmware: 'tegra210_xusb_fw' version 0: 132608 bytes loaded at=20 >> 0xffff000000b3d738 >> MAP 82500000 mode 2 pages 7936 >> MAP fffc0000 mode 2 pages 32 >> MAP 47e4f0000 mode 2 pages 1200 >> MAP 47e9a0000 mode 2 pages 1104 >> MAP 4070000 mode 4 pages 1 >> MAP 4120000 mode 4 pages 64 >> MAP 4170000 mode 4 pages 16 >> MAP 16004000 mode 4 pages 4 >> kbd0 at kbdmux0 >> mem: <memory> >> null: <full device, null device, zero device> >> openfirm: <Open Firmware control device> >> sound_global_init: snd_unit=3D-1 snd_maxautovchans=3D16 latency=3D2=20= >> feeder_rate_min=3D1 feeder_rate_max=3D2016000 feeder_rate_round=3D25 >> tcp_log: tcp_log device >> crypto: <crypto core> >> Device configuration finished. >> procfs registered >> panic: No usable event timer found! >> cpuid =3D 0 >> time =3D 1 >> KDB: stack backtrace: >> db_trace_self() at db_trace_self >> db_trace_self_wrapper() at db_trace_self_wrapper+0x38 >> vpanic() at vpanic+0x1a0 >> panic() at panic+0x48 >> cpu_initclocks_bsp() at cpu_initclocks_bsp+0x5e0 >> initclocks() at initclocks+0x28 >> mi_startup() at mi_startup+0x1f4 >> virtdone() at virtdone+0x6c >> KDB: enter: panic >> [ thread pid 0 tid 100000 ] >> Stopped at kdb_enter+0x48: str xzr, [x19, #2048] >> db> =3D=3D=3D Mark Millard marklmi at yahoo.com
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?D5EEF0A0-58CE-4686-B519-46D4F43678E5>