From nobody Mon Feb 03 15:28:09 2025 X-Original-To: freebsd-arm@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Ymr465Rzhz5lp2S for ; Mon, 03 Feb 2025 15:28:22 +0000 (UTC) (envelope-from maciphone2@googlemail.com) Received: from mail-ej1-x629.google.com (mail-ej1-x629.google.com [IPv6:2a00:1450:4864:20::629]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Ymr463sbRz3fnd for ; Mon, 03 Feb 2025 15:28:22 +0000 (UTC) (envelope-from maciphone2@googlemail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-ej1-x629.google.com with SMTP id a640c23a62f3a-ab2b29dfc65so746975166b.1 for ; Mon, 03 Feb 2025 07:28:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20230601; t=1738596501; x=1739201301; darn=freebsd.org; h=to:in-reply-to:references:message-id:date:subject:mime-version:from :content-transfer-encoding:from:to:cc:subject:date:message-id :reply-to; bh=kJDfJ3HCVwFJLEOxRE62WXIirhZOuf2P8S2WyoVnw9I=; b=FCEZzdiqiR83NkQUzyq+jajx3OwP2d03vCFdLBXo7qYA/5EbVN6vXAvsSbvBjXFvwK t+u8BU805SyihY4oi/ujODWOZdtoWSG7zwFCoosaiBdvZeEaOM3ezFji7ZTzqIhPKAYy WgVz9WIcsat2QGX+GHCx0XZzhAPiT/fgSdhmQPNyjay7DKBQV+xZx1CbEGzGiofOPe6k Bk9/L9BwNCGTe57IESw3IBIRip4G2UU2aZq81a48Wifwv9yj/wcKuAn0pGGdAbT0oM+L R2yZd07fAfTbqDFBPS7BWVQ3fqWMZH3GNHlYX4fdUYvOnqieOs1lQWkSnWOiDJHcgTEw 1WdA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1738596501; x=1739201301; h=to:in-reply-to:references:message-id:date:subject:mime-version:from :content-transfer-encoding:x-gm-message-state:from:to:cc:subject :date:message-id:reply-to; bh=kJDfJ3HCVwFJLEOxRE62WXIirhZOuf2P8S2WyoVnw9I=; b=MMNoYR7FPhDNnMWQ8pecWC3A7zsPoJj9AR0eRFPxmXjvsyPimjBzy8zxTTXl7cMubQ daTPc03qQTzCx9QjUGH9VkYHWgQcWhowzpCEwaqtM4sSfN/ZrjJG6U3hOG5UUzYyhb5K xVetCz79fml3vdjdV1YL79aJVHMDc89u3MjlQXmcyYFbukIKHCCFzMrvVfxMsO5F8rDG t01Ip4nyzvN0cIz/KQCgkB6MKWSr1uk7dFCgojZGdAjMt1jQi04C+ve92gcmNmoIFkho 6tcJ9S3jJqbrftb3IeH8rzy9PbZxJmhLE+KUZcQnBn9RbN18NRcF8xoqA5+a2Jbm+Mou zQSg== X-Forwarded-Encrypted: i=1; AJvYcCUFeW/5FyxPgZWaRAOiY/eyJTBqQSwu2kOG7hvrmMbvd2zqKuirzcHjnUo3gYQP8TK6HL7W0BKWzbHi7Q==@freebsd.org X-Gm-Message-State: AOJu0Yy14nJdD0reL8aQJnY0VvvWzMtnnYcV8u/Ew5h9lLgfVtpFsxxj hAzopqACqeNmpm9+0mJjmi3RUw4HqCA/pmK1ICJ1crUOVm/lFDzre0nGdA== X-Gm-Gg: ASbGncuZAVnQn4VMIu/ObpfwxAkpA306ccUskriPD3aCrZIOmjKDN5SgTGFMjQe42x9 ogSol08MNGPTBbVluSjU3j2fK9sCKvFIhX92RmsNAJL3tvAS6J1bmcijyRkZ9NFxmHbzAATcVpu hOiQeTM/ItfAKnBktmbrakwIepx+/y7JsD/A2rQLnMVCo3YPQeL2lAgZz+9MyYJKUgFhIQ3NicN CNPRc2kvjG3+W0iv/hMeiJUIjiwFCSD0qpi/fKGLJNIqr0XVzFPWUrjS3oqkAGVyqWcAiDPxaN6 FQWfLCGiumoPrlIYA+rssHhGN3SYNiw8gttMDYXWNGrOPAGTUO93yeDIA+YZIaIiQxnqMOyuGac HRdQCy6FXGtPO+ncEZ/4= X-Google-Smtp-Source: AGHT+IGvhAZuV4YqNU355p4GIGuhJX/DOkUENlPN2NEVu7d+ZQyXiD8Kxe2P7t85FYAdBzwa5m/v0A== X-Received: by 2002:a17:906:7308:b0:aab:daf0:3198 with SMTP id a640c23a62f3a-ab6cfdbe546mr2319700266b.40.1738596500721; Mon, 03 Feb 2025 07:28:20 -0800 (PST) Received: from smtpclient.apple (dynamic-046-114-023-050.46.114.pool.telefonica.de. [46.114.23.50]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-ab6e4a3145bsm774989866b.135.2025.02.03.07.28.20 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 03 Feb 2025 07:28:20 -0800 (PST) Content-Type: multipart/alternative; boundary=Apple-Mail-314AD64B-292F-4635-B3A0-7278E03CC01A Content-Transfer-Encoding: 7bit From: Klaus Cucinauomo List-Id: Porting FreeBSD to ARM processors List-Archive: https://lists.freebsd.org/archives/freebsd-arm List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-arm@FreeBSD.org Mime-Version: 1.0 (1.0) Subject: Re: you`ll have to hack u-boot&kernel drivers Re: RPI5 16GB panic on boot Date: Mon, 3 Feb 2025 16:28:09 +0100 Message-Id: <74B4EE31-F853-4B89-9BFE-51923C3EBAEB@googlemail.com> References: <1780949667.5141.1738581623154@localhost> In-Reply-To: <1780949667.5141.1738581623154@localhost> To: Ronald Klop , freebsd-arm@freebsd.org X-Mailer: iPad Mail (22C161) X-Rspamd-Queue-Id: 4Ymr463sbRz3fnd X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US] --Apple-Mail-314AD64B-292F-4635-B3A0-7278E03CC01A Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable
Hi Ronald,

even u-boot is actively working on ACPI-int= egration and of course 
on bcm2712-support.
=
So u-boot is not a dead project like that WindowsOnArm and I= think 
tracking the upstreams(u-boot,Linux& R= PILinux/Firmwares) is the way to go if don`t want to wait =E2=80=9E100 years= =E2=80=9C again to get a useful RPI-support.
But even u= -boot`s latest integrations of e.g. reasonable compat-strings are quite = ;
new( 5 days or so).. so what we can say for sure:
Yes, bootlaoder-support will come but if we do not want t= o stay months or even years behind , there`s something to do, specially(patc= hed) bootloader-integration/updates 
and the corr= esponding driver-patches, mainly pcie&genet..

=
As the logs I`ve sent say, I`m currently trying to mo= unt root :-) ,
after reaching that state I can make my= currently private repos public for collaboration,
tha= nks for your interest in helping FreeBSD with RPI-support.
As a starting point I would recommend trackingv the upstreams, understa= nding 
the u-boot file-structure and reading(real= ly hard to understand;-) e.g. the pcie drivers.  

thanks
Regards
Klaus


=

Am 03.02.2025 um 12:20 schrie= b Ronald Klop <ronald-lists@klop.ws>:

=EF=BB=BFHi Klaus,

I was under the impression that the pre-16GB RPI5 were booting using ACPI de= vice enumeration. (https://wiki.freebsd.org/arm/Raspberry%20Pi%205) That is why I hoped t= he 16GB version to work similarly.
I don't have a personal preference for one way or the other (ACPI vs DTB).
Is your work available in a public repository somewhere? So I could try and s= ee if I can help somehow.

Regards,
Ronald.

 

Van: "Klaus K=C3=BCchemann" <maciphone2@googlemail.co= m>
Datum: zondag, 2 februari 2025 18:06
Aan: Ronald Klop <ronald-lists@klop.ws>, freebsd-arm@= freebsd.org
Onderwerp: you`ll have to hack u-boot&kernel drivers Re= : RPI5 16GB panic on boot



> Am 02.02.2025 um 10:56 schrieb Ronald Klop <ronald-lists@klop.ws>= :
>
>
> No valid device tree blob found!
>


For FreeBSD go the u-boot fdt-based way ! ( since all existing drivers rely o= n that)..
A device tree blob( dtb) is a compiled binary which is read in by u-boot , While a device tree source( dts) can be compiled into u-boot`kernel directly= =E2=80=A6.

Some steps further here. I just show you the things I=E2=80=99ve already hac= ked ( in u-boot & fbsd-kernel),
Not showing you the things which have to be future-hacked into the kernel:-)= ,
 it=E2=80=99ll be a massive hack because e.g because the RP1 chip has m= any things  hanging behind pcie,
I have currently  pcie detected in boot but there`s something more to d= o/hack regarding DMA=E2=80=A6.. and so further and so on   :

=E2=80=A6
  4.05 dt-match: compatible: brcm,bcm2712 match: brcm,bcm2712=E2=80= =A6.
=E2=80=A6 4.95 Loading 'bcm2712-rpi-cm5-cm5io.dtb' to 0x00000000 offset 0x10= 0
  5.06 Read bcm2712-rpi-cm5-cm5io.dtb bytes    8058= 7 hnd 0x198b
=E2=80=A6   5.84 MESS:00:00:05.184071:0: Loaded overlay =E2=80=9Ad= wc2=E2=80=98=E2=80=A6
  5.04 Loading 'u-boot.bin' to 0x00000000 offset 0x200000,,
  5.39 Read u-boot.bin bytes   694000 hnd 0x148d=E2=80=A6=
=E2=80=A6.
=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80= =94
U-Boot 2025.01 (Jan 19 2025 - 06:10:39 +0100)

DRAM:  1020 MiB (effective 4 GiB)
RPI: Board rev 0x18 outside known range
RPI Unknown model (0xc04180)
Core:  25 devices, 12 uclasses, devicetree: board
MMC:   mmc@fff000: 0, mmc@1100000: 1
Loading Environment from FAT... ** Bad device specification mmc 1 **
In:    serial,usbkbd
Out:   serial,vidconsole
Err:   serial,vidconsole
Net:   No ethernet found.

starting USB...
Bus usb@480000: USB DWC2
scanning bus usb@480000 for devices... 1 USB Device(s) found
       scanning usb for storage devices..= . 0 Storage Device(s) found
Hit any key to stop autoboot:  0  Cannot persist EFI variables wit= hout system partition
** Booting bootflow '<NULL>' with efi_mgr
Booting: mmc 0

=E2=80=94=E2=80=94=E2=80=94
Consoles: EFI console  
    Reading loader env vars from /efi/freebsd/loader.env=
Setting currdev to disk0p1:
FreeBSD/arm64 EFI loader, Revision 3.0
(Sat Feb  1 03:46:15 UTC 2025 root@fbsd5pro)

   Command line arguments: loader.efi
   Image base: 0x3e54d000
   EFI version: 2.100
   EFI Firmware: Das U-Boot (rev 8229.256)
   Console: efi,comconsole (0)
   Load Path: /\EFI\BOOT\BOOTAA64.EFI
   Load Device: /VenHw(e61d73b9-a384-4acc-aeab-82e828f3628b,0= 000000000000000)/VenHw(e61d73b9-a384-4acc-aeab-82e828f3628b,6d00000004000000= )/eMMC(0)/eMMC(0)/HD(1,0x01,0,0x800,0x19000)
   BootCurrent: 0000
   BootOrder: 0000[*]
   BootInfo Path: /VenHw(e61d73b9-a384-4acc-aeab-82e828f3628b= ,0000000000000000)/VenHw(e61d73b9-a384-4acc-aeab-82e828f3628b,6d000000040000= 00)/eMMC(0)/eMMC(0)
Ignoring Boot0000: Only one DP found
Trying ESP: /VenHw(e61d73b9-a384-4acc-aeab-82e828f3628b,0000000000000000)/Ve= nHw(e61d73b9-a384-4acc-aeab-82e828f3628b,6d00000004000000)/eMMC(0)/eMMC(0)/H= D(1,0x01,0,0x800,0x19000)
Setting currdev to disk0p1:
Trying: /VenHw(e61d73b9-a384-4acc-aeab-82e828f3628b,0000000000000000)/VenHw(= e61d73b9-a384-4acc-aeab-82e828f3628b,6d00000004000000)/eMMC(0)/eMMC(0)/HD(2,= 0x01,0,0x19800,0x9e6800)
Setting currdev to disk0p2:
Loading /boot/defaults/loader.conf
Loading /boot/defaults/loader.conf
Loading /boot/device.hints
Loading /boot/loader.conf
Loading /boot/loader.conf.local
/

=E2=80=94=E2=80=94=E2=80=94=E2=80=94

Loading kernel=E2=80=A6
=E2=80=94

Booting [/boot/kernel/kernel]...        &= nbsp;      
Using DTB provided by EFI at 0x3e6da000.
Loading splash ok
---<<BOOT>>---
GDB: no debug ports present
KDB: debugger backends: ddb
KDB: current backend: ddb
WARNING: Cannot find freebsd,dts-version property, cannot check DTB complian= ce
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 #3: Sat Feb  1 16:02:48 UTC 2025
    root@fbsd5pro:/usr/obj/usr/src/arm64.aarch64/sys/GEN= ERIC arm64
FreeBSD clang version 19.1.7 (https://github.com/llvm/llvm-project.git llvmorg-19.1.7-0-gcd7080= 29e0b2)
WARNING: WITNESS option enabled, expect reduced performance.
VT: init without driver.
real memory  =3D 4290248704 (4091 MB)
avail memory =3D 4152508416 (3960 MB)
Starting CPU 1 (100)
Starting CPU 2 (200)
Starting CPU 3 (300)
FreeBSD/SMP: Multiprocessor System Detected: 4 CPUs
random: unblocking device.
random: entropy device external interface
kbd0 at kbdmux0
ofwbus0: <Open Firmware Device Tree>
simplebus0: <Flattened device tree simple bus> on ofwbus0
regfix0: <Fixed Regulator> on simplebus0
regfix1: <Fixed Regulator> on simplebus0
simplebus1: <Flattened device tree simple bus> on ofwbus0
ofw_clkbus0: <OFW clocks bus> on ofwbus0

=E2=80=94=E2=80=94=E2=80=94

simple_mfd0: <Simple MFD (Multi-Functions Device)> mem 0x7d542000-0x7d= 542eff on simplebus0
bcm2835_firmware0: <BCM2835 Firmware> on simplebus0
ofw_clkbus1: <OFW clocks bus> on bcm2835_firmware0
=E2=80=94

psci0: <ARM Power State Co-ordination Interface Driver> on ofwbus0
= smccc0: <ARM SMCCC v1.2> on psci0

=E2=80=94=E2=80=94
gic0: <ARM Generic Interrupt Controller> mem 0x107fff9000-0x107fff9fff= ,0x107fffa000-0x107fffbfff,0x107fffc000-0x107fffdfff,0x107fffe000-0x107fffff= ff irq 86 on simplebus1
gic0: pn 0x2, arch 0x2, rev 0x1, implementer 0x43b irqs 320
=E2=80=94
usbus1: 480Mbps High Speed USB v2.0
ugen1.1: <DWCOTG OTG Root HUB> at usbus1
uhub0 on usbus1
uhub0: <DWCOTG OTG Root HUB, class 9/0, rev 2.00/1.00, addr 1> on usbu= s1
bcm2835_cpufreq0: ARM 1500MHz, Core 500MHz, SDRAM 0MHz, Turbo OFF
CPU  0: ARM Cortex-A76 r4p1 affinity:  0  0
            &nbs= p;      Cache Type =3D <IDC,64 byte CWG,64 b= yte ERG,64 byte D-cacheline,PIPT I-cache,64 byte I-cacheline>
 Instruction Set Attributes 0 =3D <DP,RDM,Atomic,CRC32,SHA2,SHA1,AES= +PMULL>
 Instruction Set Attributes 1 =3D <RCPC-8.3,DCPoP>
 Instruction Set Attributes 2 =3D <>
         Processor Features 0 =3D= <CSV3,CSV2,RAS,AdvSIMD+HP,FP+HP,EL3,EL2,EL1,EL0 32>
         Processor Features 1 =3D= <PSTATE.SSBS>
         Processor Features 2 =3D= <>
      Memory Model Features 0 =3D <TGran4,T= Gran64,TGran16,SNSMem,BigEnd,16bit ASID,1TB PA>
      Memory Model Features 1 =3D <XNX,PAN+= ATS1E1,LO,HPD+TTPBHA,VH,16bit VMID,HAF+DS>
      Memory Model Features 2 =3D <32bit CC= IDX,48bit VA,IESB,UAO,CnP>
      Memory Model Features 3 =3D <>
=       Memory Model Features 4 =3D <>
=             &nbs= p;Debug Features 0 =3D <DoubleLock,2 CTX BKPTs,4 Watchpoints,6 Breakpoint= s,PMUv3p1,Debugv8p2>
            &nbs= p;Debug Features 1 =3D <>
         Auxiliary Features 0 =3D= <>
         Auxiliary Features 1 =3D= <>
AArch32 Instruction Set Attributes 5 =3D <RDM,CRC32,SHA2,SHA1,AES+VMULL,S= EVL>
AArch32 Media and VFP Features 0 =3D <FPRound,FPSqrt,FPDivide,DP VFPv3+v4= ,SP VFPv3+v4,AdvSIMD>
AArch32 Media and VFP Features 1 =3D <SIMDFMAC,FPHP Arith,SIMDHP Arith,SI= MDSP,SIMDInt,SIMDLS,FPDNaN,FPFtZ>
CPU  1: ARM Cortex-A76 r4p1 affinity:  1  0
CPU  2: ARM Cortex-A76 r4p1 affinity:  2  0
CPU  3: ARM Cortex-A76 r4p1 affinity:  3  0
gic0: using for IPIs
Release APs...Trying to mount root from ufs:/dev/ufs/rootfs [rw]..
---
 


 
= --Apple-Mail-314AD64B-292F-4635-B3A0-7278E03CC01A--