From nobody Sat Jul 29 18:07:11 2023 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 4RCsst6xsVz4prV2 for ; Sat, 29 Jul 2023 18:07:30 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic304-24.consmr.mail.gq1.yahoo.com (sonic304-24.consmr.mail.gq1.yahoo.com [98.137.68.205]) (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 did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4RCsst4JPxz44lT for ; Sat, 29 Jul 2023 18:07:30 +0000 (UTC) (envelope-from marklmi@yahoo.com) Authentication-Results: mx1.freebsd.org; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1690654047; bh=rY5EY8j4bMIGZOVJmq+KN2ov/bu+ioYVfUVlmVpiqs8=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From:Subject:Reply-To; b=YV9MIgkhISYOEhU0Vn+KIvymhixpVgg7/rVZO38BVu1M0ArkfhDx6eiYSoCtloCBHUQCe8dWphCkG95p1N2BX1HJ9G0SrEjZFzZdVFbNKZJAx3UAofimpSRzlDbPOCp403zHrt/F9XthVlCF8w4HlPIFjB1aquTJQJ5Jc2evOKARvMEaqwIzR2za5j//5MdHAx9WEHIbXJKSLo8av28swwCwHqc5i8VMizXY3ms7sNKhn0O9ow9EGC4liwn3xm0D9AeLxEcXO9BxdXTFBf/CsKXL2bD+LFH3ABKt2RoglCQTA/jfjNZz65xyzeXq5CJ93sGaHwDuFUj3h9YV0BqJBQ== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1690654047; bh=4oxPLC/3mEzmX6AYkPXGcivw1TALNkWt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8ldbZVilzAUTERaXz6sORGKpWlbW6Un3tSktvi.qDIOmHxhxJw qy_nmJu9ik.lCjEGGl776TH.aB7YO7xE4DM2M.1A13Pl_j3AdEZbK6Su55XwOjTqYvJJlJ8.RiEu RDZ6afiOpXW.SpcTb3ZgWsArRGZxiY5h5.ORRvke9Rm4uEAkFxBG2kVCC9hS8QEx0Go.qGivnppX sf3PmOPXA.Bb7iF2K3TAuone5h1RUMcPPGkR7_dsqg7VDU87YoXGDKR2gyaNaUriX_nLkPThV5f7 2AtfVRQ9EiCOWARJ2C5JFpz0fFLrzG8XZtcOLGKU1BUOL5rXROrRqfUMvOCS_pJoTwILnuLkPeEA ln8UzF65Dc.7LR81NBQz9PPSYAVaFLkh4gLO3r9KOpf2lCMOAXLy7.aaJhkE3zZi5Ozed7TmWT_U ukYnRzFGQAwFYy9K.wd3oLeuJwb2ZzMJyR6PbjNnHcxZcWamBt_wpGp_G91CCLkiwrWwiOLNf7_a BO8wCAPjE10fxXUl9eU6WTVFcG2GX6yhcmdvUQzdTXb42btwnl1Tf0grCRLrOZQvl7Ay5kny9h25 wWg-- X-Sonic-MF: X-Sonic-ID: 86d85120-eac3-4b83-a0e8-8f7dc9fb66ca Received: from sonic.gate.mail.ne1.yahoo.com by sonic304.consmr.mail.gq1.yahoo.com with HTTP; Sat, 29 Jul 2023 18:07:27 +0000 Received: by hermes--production-gq1-7d844d8954-pkqkw (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID f718332d30c97c060b48c09af0a5b566; Sat, 29 Jul 2023 18:07:22 +0000 (UTC) Content-Type: text/plain; charset=utf-8 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 (Mac OS X Mail 16.0 \(3731.700.6\)) Subject: Re: Some issues related to the port of Raspberry Pi. From: Mark Millard In-Reply-To: Date: Sat, 29 Jul 2023 11:07:11 -0700 Cc: freebsd-uboot@freebsd.org, FreeBSD ARM List Content-Transfer-Encoding: quoted-printable Message-Id: References: To: ykla X-Mailer: Apple Mail (2.3731.700.6) X-Rspamd-Queue-Id: 4RCsst4JPxz44lT X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:36647, ipnet:98.137.64.0/20, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated On Jul 29, 2023, at 09:23, ykla wrote: >=20 > Hi, > However, strangely, when I replaced the rpi4-firmware in the ports = with the latest version from the official Raspberry Pi source and copied = it to a USB drive, the system started to loop with the following code. >=20 > --------------- >=20 > Net: eth0:ethernet@7d580000 > PCIe BRCM: link up, 5.0 Gbps x1 (SSC) > starting USB=E2=80=A6=E2=80=A6 > Bus xhci_pci:Reglster 58000420 NbrPorts 5 > Starting the contorller > USB XHCI 1.00 > scanning bug xhci_pci for devices... Unexpected XHCI event TRB, = Skipping > 6a0 000000004 01000000 01008401) That output looks like U-Boot output, before FreeBSD's UEFI loader has been loaded. (I'd be more sure if there was more context.) Of course the RPi* firmware and .dtb starts being involved before U-Boot starts and, so, is involved. I actually use my own U-Boot build, in part because some of my USB3 boot media require something like a usb_pgood_delay for U-Boot to tolerate them. My in-use build is based on 2023.01 : # strings /boot/efi/u-boot.bin.2023.01.arm64 | grep "U-Boot 20" U-Boot 2023.01 (Feb 06 2023 - 08:06:49 +0000) (My config.txt references that name.) So, the later material below is not based on the same U-Boot that you are using. > --------------- > The original author seems to have abandoned the project, so I forked a = copy from the ports archive. You can find it here: = https://github.com/FreeBSD-Ask/rpi3-psci-monitor and = https://github.com/FreeBSD-Ask/freebsd-ports/tree/main/sysutils/rpi-firmwa= re > I don't understand programming very well. Can someone help me with = this problem? >=20 > Additionally, the author of raspberrypi-userland (who is the same = person as the firmware's port author) has also deleted the project. = There is currently no upstream for this project >=20 > The current Raspberry Pi 4B 8GB version has issues with booting. The = current u-boot booting process gets stuck at the rainbow screen.see also = https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D272792 > If someone could provide assistance, I would be very grateful. >=20 > I'm not sure if the upstream has made any fixes for this issue. >=20 I expect that you may not be using an officially tagged release but instead are using a development version of the RPi* firmware. I avoid the development versions when I can. I had no trouble with the firmware-1.20230405 materials, the most recent tagged release available. The RPi4B context is the 8 GiByte Rev 1.5 with the "C0T" part number label on the top of the SOC. The tagged versions are available via: https://github.com/raspberrypi/firmware/tags/ The most recent there is: https://github.com/raspberrypi/firmware/releases/tag/1.20230405/ I downloaded: = https://github.com/raspberrypi/firmware/archive/refs/tags/1.20230405.tar.g= z and did: # tar -xf 1.20230405.tar.gz firmware-1.20230405/boot/ = firmware-1.20230405/README.md # rm ~/firmware-1.20230405/boot/kernel*.img to extract the relvent material. I updated one of the RPi4B USB3 boot media to have this firmware (and .dtb's) in its msdosfs file system. It booted the 8 GiByte RPi4B Rev 1.5 just fine (based, in part, on my U-Boot build, however). The media I picked to test with has not had its FreeBSD updated in a while: # uname -apKU FreeBSD CA72_UFS 14.0-CURRENT FreeBSD 14.0-CURRENT #90 = main-n261544-cee09bda03c8-dirty: Wed Mar 15 20:25:49 PDT 2023 = root@CA72_16Gp_ZFS:/usr/obj/BUILDs/main-CA72-nodbg-clang/usr/main-src/arm6= 4.aarch64/sys/GENERIC-NODBG-CA72 arm64 aarch64 1400082 1400082 =3D=3D=3D Mark Millard marklmi at yahoo.com