Re: I ported the panfrost driver on FreeBSD 15.0 for my radxa zero 3W board,BUT....

From: Warner Losh <imp_at_bsdimp.com>
Date: Wed, 05 Nov 2025 08:21:08 UTC
I'm happy to review doc patches...

Warner

On Wed, Nov 5, 2025, 12:29 AM Adrian Chadd <adrian@freebsd.org> wrote:

> Oh don't worry, i'll bug warner about it thursday in san jose. :-)
>
>
>
> -adrian
>
>
> On Tue, 4 Nov 2025 at 13:38, Mark Millard <marklmi@yahoo.com> wrote:
>
>> Hello Warner,
>>
>>
>> No you do not suck. And I'm not even aware for the full range of your
>> competing activities. If FreeBSD had no such oddities, that would be
>> amazing --and I trust your judgment of the tradeoffs.
>>
>> Still, in a local context a specific oddity can prove unfortunate,
>> including ones that occur less often than many other oddities.
>>
>> The list could help Adrian look up the details if desired, avoiding some
>> research. I just knew that I had such a list someplace in my records and
>> found and used it. (I did not even remember "eficom" accurately prior to
>> finding the list in my records.)
>>
>>
>> Mark
>>
>>
>> On Nov 4, 2025, at 11:25, Warner Losh <imp@bsdimp.com> wrote:
>>
>> Yea. I suck. But the energy that's gone into complaining about this issue
>> could have produced diffs.
>>
>> Warner
>>
>> On Tue, Nov 4, 2025, 12:17 PM Mark Millard <marklmi@yahoo.com> wrote:
>>
>>>
>>>
>>> On Nov 4, 2025, at 11:05, Adrian Chadd <adrian@freebsd.org> wrote:
>>>
>>> > So, it LOOKS like its cutting over to the EFI framebuffer at this
>>> point, what you you have plugged in as a monitor? does it do anything?
>>> >
>>> > You could try setting console="comconsole" before you boot, to force a
>>> serial console?
>>>
>>> Unfortunately, the following changes never got corresponding
>>> man page updates:
>>>
>>> Commit message (Expand) Author Age Files Lines
>>> * stand: libefi: avoid a null pointer deref in eficom Kyle Evans
>>> 2023-05-28 1 -2/+2
>>> * stand/efi/eficom: Free comc_port if we can't find the serial port
>>> Warner Losh 2023-05-25 1 -0/+10
>>> * stand/efi/eficom: Make aarch64 compat code probe correctly Warner Losh
>>> 2023-05-25 1 -2/+5
>>> * stand/efi/eficom: Don't allow this for !HYPERV machines Warner Losh
>>> 2023-05-25 1 -0/+17
>>> * stand/efi/eficom: better handling of absent device Warner Losh
>>> 2023-05-25 1 -5/+16
>>> * stand: eficom: Only set baudrate when it changes Warner Losh
>>> 2023-05-11 1 -17/+22
>>> * stand: eficom: Don't preemtively assume flow control Warner Losh
>>> 2023-05-11 1 -9/+5
>>> * stand: eficom : remove unused ignore_cd Warner Losh 2023-05-11 1 -2/+0
>>> * stand: Move eficom to libefi Warner Losh 2023-05-11 6 -6/+1
>>> * stand: efi create eficom console device. Warner Losh 2023-05-11 3
>>> -72/+39
>>>
>>> > -adrian
>>> >
>>> >
>>> > On Sun, 2 Nov 2025 at 08:14, Mario Marietto <marietto2008@gmail.com>
>>> wrote:
>>> > Hello to everyone.
>>> >
>>> > I ported the panfrost driver on FreeBSD 15.0 for my radxa zero 3W
>>> board. I mean,I've been able to fix all the errors I found and I compiled
>>> correctly the kernel and the modules. Unfortunately,when I tried to boot
>>> it,this is what happened :
>>> >
>>> >
>>> > It is stuck there. My sensation is that the problem can be fixed
>>> easily. But I need to understand why. What could be the reason,what to try
>>> and so on.
>>> >
>>> > Anyway,I want to share the source code of the kernel ,the compiled
>>> kernel and the modules,if someone wants to study the code and try on his
>>> board :
>>> >
>>> >
>>> https://drive.google.com/file/d/1yn--aq1QxgIOY23eIF8Crdadv9sWkFCR/view?usp=drive_link
>>> >
>>> > This is the full log that I've got from the serial connection :
>>> >
>>> > marietto# minicom -D /dev/ttyU0 -b 115200
>>> >
>>> > Welcome to minicom 2.10
>>> >
>>> > OPTIONS: I18n
>>> > Compiled on Apr 4 2025, 15:33:54.
>>> > Port /dev/ttyU0, 14:55:08 [U]
>>> >
>>> > Press CTRL-A Z for help on special keys
>>> >
>>> > DDR Version V1.11 20211103
>>> > ln
>>> > ddrconfig:7
>>> > LP4 MR14:0x4d
>>> > LPDDR4, 324MHz
>>> > BW=32 Col=10 Bk=8 CS0 Row=16 CS1 Row=16 CS=2 Die BW=16 Size=4096MB
>>> >
>>> > change to: 324MHz
>>> > PHY drv:clk:38,ca:38,DQ:30,odt:0
>>> > vrefinner:41%, vrefout:41%
>>> > dram drv:40,odt:0
>>> > clk skew:0x58
>>> >
>>> > change to: 528MHz
>>> > PHY drv:clk:38,ca:38,DQ:30,odt:0
>>> > vrefinner:41%, vrefout:41%
>>> > dram drv:40,odt:0
>>> > clk skew:0x73
>>> >
>>> > change to: 780MHz
>>> > PHY drv:clk:38,ca:38,DQ:30,odt:0
>>> > vrefinner:41%, vrefout:41%
>>> > dram drv:40,odt:0
>>> > clk skew:0x58
>>> >
>>> > change to: 1560MHz(final freq)
>>> > PHY drv:clk:38,ca:38,DQ:30,odt:60
>>> > vrefinner:16%, vrefout:29%
>>> > dram drv:40,odt:80
>>> > clk skew:0xa
>>> > out
>>> > U-Boot SPL board init
>>> > U-Boot SPL 2017.09-gaaca6ffec1-211203 #zzz (Dec 03 2021 - 18:42:16)
>>> > unknown raw ID phN
>>> > unrecognized JEDEC id bytes: 00, 00, 00
>>> > Trying to boot from MMC2
>>> > No misc partition
>>> > Trying fit image at 0x5000 sector
>>> > ## Verified-boot: 0
>>> > ## Checking atf-1 0x00040000 ... sha256(fe4f274c06...) + OK
>>> > ## Checking uboot 0x00a00000 ... OK
>>> > ## Checking fdt 0x00b00000 ... sha256(1804d514f1...) + OK
>>> > ## Checking atf-2 0x00068000 ... sha256(8d44036095...) + OK
>>> > ## Checking atf-3 0xfdcd0000 ... sha256(e410275b51...) + OK
>>> > ## Checking atf-4 0xfdcc9000 ... sha256(990c53fc01...) + OK
>>> > ## Checking atf-5 0x00066000 ... sha256(315a4195a9...) + OK
>>> > ## Checking optee 0x08400000 ... sha256(08e1fd41e1...) + OK
>>> > Jumping to U-Boot(0x00a00000) via ARM Trusted Firmware(0x00040000)
>>> > Total: 319.354 ms
>>> >
>>> > INFO: Preloader serial: 2
>>> > NOTICE: BL31: v2.3():v2.3-181-gc9a647cae:cl
>>> > NOTICE: BL31: Built : 10:55:41, Oct 18 2021
>>> > INFO: GICv3 without legacy support detected.
>>> > INFO: ARM GICv3 driver initialized in EL3
>>> > INFO: pmu v1 is valid
>>> > INFO: dfs DDR fsp_param[0].freq_mhz= 1560MHz
>>> > INFO: dfs DDR fsp_param[1].freq_mhz= 324MHz
>>> > INFO: dfs DDR fsp_param[2].freq_mhz= 528MHz
>>> > INFO: dfs DDR fsp_param[3].freq_mhz= 780MHz
>>> > INFO: Using opteed sec cpu_context!
>>> > INFO: boot cpu mask: 0
>>> > INFO: BL31: Initializing runtime services
>>> > INFO: BL31: Initializing BL32
>>> > I/TC:
>>> > I/TC: OP-TEE version: 3.13.0-595-gf5add58be #hisping.lin (gcc version
>>> 10.2.1 20201103 (GNU Toolchai4
>>> > I/TC: Primary CPU initializing
>>> > I/TC: Primary CPU switching to normal world boot
>>> > INFO: BL31: Preparing for EL3 exit to normal world
>>> > INFO: Entry point address = 0xa00000
>>> > INFO: SPSR = 0x3c9
>>> > UEFI firmware (version EDK2-DEV built at 01:23:28 on May 24 2025)
>>> >
>>> > 3h
>>> >
>>> > Consoles: EFI console
>>> > Reading loader env vars from /efi/freebsd/loader.env
>>> > Setting currdev to disk0p3:
>>> > FreeBSD/arm64 EFI loader, Revision 3.0
>>> >
>>> > Command line arguments: loader.efi
>>> > Image base: 0xec0ae000
>>> > EFI version: 2.70
>>> > EFI Firmware: EDK2 (rev 1.00)
>>> > Console: efi (0x1000)
>>> > Load Path: \EFI\BOOT\BOOTAA64.EFI
>>> > Load Device:
>>> MemoryMapped(0xB,0xFE2B0000,0xFE2B0FFF)/HD(3,GPT,07D4C210-2E74-1
>>> > 1F0-832C-F1B721F986A1,0x20000,0x10000)
>>> > BootCurrent: 0002
>>> > BootOrder: 0000 0001 0002[*]
>>> > BootInfo Path: MemoryMapped(0xB,0xFE2B0000,0xFE2B0FFF)
>>> > Ignoring Boot0002: Only one DP found
>>> > Trying ESP:
>>> MemoryMapped(0xB,0xFE2B0000,0xFE2B0FFF)/HD(3,GPT,07D4C210-2E74-11F0-
>>> > 832C-F1B721F986A1,0x20000,0x10000)
>>> > Setting currdev to disk0p3:
>>> > Trying:
>>> MemoryMapped(0xB,0xFE2B0000,0xFE2B0FFF)/HD(1,GPT,07D35DA3-2E74-11F0-832C
>>> > -F1B721F986A1,0x40,0x4FC0)
>>> > Setting currdev to disk0p1:
>>> > Trying:
>>> MemoryMapped(0xB,0xFE2B0000,0xFE2B0FFF)/HD(2,GPT,07D3AC23-2E74-11F0-832C
>>> > -F1B721F986A1,0x5000,0x2800)
>>> > Setting currdev to disk0p2:
>>> > Trying:
>>> MemoryMapped(0xB,0xFE2B0000,0xFE2B0FFF)/HD(4,GPT,07D6525C-2E74-11F0-832C
>>> > -F1B721F986A1,0x30000,0xEDFAFD8)
>>> > Setting currdev to disk0p4:
>>> > Loading /boot/defaults/loader.conf
>>> > /boot/kernel/kernel text=0x318 text=0xa5a548 text=0x28e030
>>> data=0x1614d0 data=0x
>>> > 0+0x2c1000 0x8+0x15c0f0+0x8+0x18894d\
>>> > /etc/hostid size=0x25
>>> > /boot/entropy size=0x1000
>>> > /boot/kernel/if_bridge.ko text=0x3dde text=0x7de8 data=0x1038+0x8
>>> 0x8+0x1ec0+0x8
>>> > +0x1847
>>> > loading required module 'bridgestp'
>>> > /boot/kernel/bridgestp.ko text=0x1463 text=0x4e44 data=0x320+0x28
>>> 0x8+0xbd0+0x8+
>>> > 0x6c0
>>> > /boot/dtb/rockchip/a.si.drm.dtb size=0x1a867
>>> > /boot/kernel/if_rtwn_usb.ko text=0xcc80 text=0x7880 data=0x1e40+0x37
>>> 0x8+0x4140+
>>> > 0x8+0x2a16
>>> > loading required module 'rtwn'
>>> > /boot/kernel/rtwn.ko text=0x6b90 text=0x1a820 data=0x6e8
>>> 0x8+0x3390+0x8+0x1ad6
>>> > loading required module 'wlan'
>>> > /boot/kernel/wlan.ko text=0x1af18 text=0x4bce0 data=0x8c68+0x318
>>> 0x8+0x92d0+0x8+
>>> > 0x79fb
>>> > /boot/kernel/wlan_wep.ko text=0x1130 text=0xca0 data=0x310+0x4
>>> 0x8+0x888+0x8+0x4
>>> > a1
>>> > /boot/kernel/wlan_ccmp.ko text=0x3788 text=0x25c0 data=0x388+0x4
>>> 0x8+0xb28+0x8+0
>>> > x5dd
>>> > /boot/kernel/wlan_tkip.ko text=0x1488 text=0x1818 data=0x320+0x4
>>> 0x8+0x930+0x8+0
>>> > x525
>>> > /boot/modules/ums.ko text=0x26c3 text=0x252c data=0x7a0+0x4
>>> 0x8+0x1110+0x8+0xbce
>>> >
>>> > loading required module 'kernel'
>>> > module 'kernel' exists but with wrong version
>>> > ?c
>>> > Hit [Enter] to boot immediately, or any other key for command prompt.
>>> > Booting [/boot/kernel/kernel]...
>>> > Using DTB from the loaded file '/boot/dtb/rockchip/a.si.drm.dtb'.
>>> > EFI framebuffer information:
>>> > addr, size 0xec190000, 0x7e9000
>>> > dimensions 1920 x 1080
>>> > stride 1920
>>> > masks 0x00ff0000, 0x0000ff00, 0x000000ff, 0xff000000
>>> >
>>>
>>> ===
>>> Mark Millard
>>> marklmi at yahoo.com
>>>
>>>
>>>
>> ===
>> Mark Millard
>> marklmi at yahoo.com
>>
>>