From nobody Tue Dec 27 18:26:29 2022 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 4NhNQw1xrsz2kv6P for ; Tue, 27 Dec 2022 18:26:48 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic310-21.consmr.mail.gq1.yahoo.com (sonic310-21.consmr.mail.gq1.yahoo.com [98.137.69.147]) (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 4NhNQv0VNWz45dH for ; Tue, 27 Dec 2022 18:26:46 +0000 (UTC) (envelope-from marklmi@yahoo.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=yahoo.com header.s=s2048 header.b=feVsQd8c; spf=pass (mx1.freebsd.org: domain of marklmi@yahoo.com designates 98.137.69.147 as permitted sender) smtp.mailfrom=marklmi@yahoo.com; dmarc=pass (policy=reject) header.from=yahoo.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1672165605; bh=JQw0BUpLCE9E4p0a1iJz7OyJ1gLxdl/GG0Y5whHGZHo=; h=From:Subject:Date:To:References:From:Subject:Reply-To; b=feVsQd8cM5Ei5cEV1WbJxxz9LduECLsnpJZgeNMLhcMTu9jDbvyDPRoytIR0MiKZ81XkK/Iqq2CVO4xOoRKgse8i/5fDmkxdaKBGKhFy1Yd+geL5xwfpnQInN7wQ5Jgc+6DSuRBCtArBhEMVyzwVn2L3uLmbvD8vvNvSOCit3QbnBgodd467EpYpvVc6pRJoDqEBYgBcv3x3y9jcobctcBKQXJOOl/1kxJ86BrKhY4cqXqLKYLllJCH8EMS0/bHn9gBnTVtv6LzhKzBm1b14WDaqFbXsdXGbmsqol5Xs4luTWsuVn++jZduKGQy9VRPSlz2UPDXhT6qtf0NX2wiu0Q== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1672165605; bh=V0oEEuuuqD2o0WmDbobiW0kE/oeBRdIxsK1zCtqvM0d=; h=X-Sonic-MF:From:Subject:Date:To:From:Subject; b=ogcnbJ363C1u64uJPzImzeacCKReRdZZ2w7hr50udhlyA64PW1JwVogfsUPI24Is69E0oo3os2s9kWYA4HUSJlno/ELaWVOZiBwJ1NgklHAOr6/UlsVAaBStAXraidvMdbQ/p8mAClByJ8Do5bLrbL55gHaEz9x2TBe8xsyFlzvwsNX+qdk1CYl3edLVhtD4Km6ZBlnwGwAqp3lwEbnF8CG2gILk9nYSVhimXGeydwNrsXZ67m/4K07fHb8YFph9fNJ9+gWNNIke1rQL3SDyATbQDXeIeCY/EULcwHVouSzv1a6aLP8AFOOTtWnuGvJZY6fJFHwYcDY7jPpwpNiySA== X-YMail-OSG: MdWNR2cVM1nVh4katJvojcotnLDox0K6rF88PVu2uU_xZ0ypXUgCye3112qw_mZ F5.3ihIkGf0LNTpONG3oTuRXQwr35ZvlgrhExUhrDGuic5maHEeuiGfzYPfNRnV4lnRADJ9i8k4W pMn80VHvnDr9dhhQCXA817OqIVnzSjK1PY1me7NMryvxqeB3w_wTb2zvm1A4fs_WKgSv8M3fxQjj Z.8wzpA.BmTW4uUzJA8tOEwEi2__YNqJwfoRoVwZgIM.2BArGqx9lvnVH19iLcc5w_9qTFyaX3pq MR8DiulVyKtl5SKQ.Li8omMx0In.5RpMVRrhEmKYqaTY5kTwcYnYofNUyIV.yxAICHqt.Dzgu8q0 y.NA6pFxEcI8Bai4tucvf_UWIbtqslpE8qCUVQpdRoHN3HEKv_Hq3dF5soCRFQIVgFQhwcACltgD iBUiZmr1dZjREmnUU3aawwe5RfPe5C2hqp0l4uPXI_i6wEYw6H2uEj.bxlNj8LHV0bZCZCI0YCTz VaBH24SsXVrtfvI4Zn9CNvRt6KkqPyz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YebRuAsFQEdw846oxcJE9.pE JDkonqXJQfMj8J61MmrPPQNIMdy2.9OMkiPqs9ZDwC5FCs1bRxR0FD_YkezhMtrNclMxpfbXIX3y KvojVQI83C61PNL50kySBqMD.ZcQeyIHIOz0ndjrdfraVT9iEw9OH6onaZJ92IbOVcfspuNOUGUF tKFhx9sMMpFw09JHsjZ0GZezL3WmnGy7SAhrzlZdqd4NfEItTpD1_jFUr40AwYbx0.ams5FU6EQS kvQwmCIk6GC5SUTeMrDVfMN8_3ztdObeKFfnH0Ifq3mK6aYCnz.MY5dYGiWcDOucpiz64g.LPXny GepvgMZn4d5.x.3C5eXOvgiTOqvbuBaGumEn6C9UL8aMyvbcFNB8._g1GHajgCDhpsmPO_hinWfA ls.ZVDjEbaNC9YZ49mpRoqneQ3Ob_YkKlj6_p_3Kb9d15WyFqRRXiBJbzgps7iYh2HRUaOZYQoH8 KrghpKLwTw55RxwymbQuBAXUp331fPRvhIrTXWQmNJqPGKWp0MTWhkOkjknAw4.qaQgTKD0sRu1_ _ZBBZcUk8SiYVM27fxoR58WSM61QlXQ6Bm.tuzN.Rxmk520yWA5ciWVS0sMNlCeHNKHD.xfKs21k .XYiNNazDtKLuyH52QEcAfhzGnMj0E55t9tGNZKOC8kae.LBVS_6eFTf9eVsKuw-- X-Sonic-MF: Received: from sonic.gate.mail.ne1.yahoo.com by sonic310.consmr.mail.gq1.yahoo.com with HTTP; Tue, 27 Dec 2022 18:26:45 +0000 Received: by hermes--production-ne1-7b69748c4d-bmdl9 (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID 3e86c5d742eb7ee7ed1ce61a8fa0352c; Tue, 27 Dec 2022 18:26:41 +0000 (UTC) From: Mark Millard Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable 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.300.101.1.3\)) Subject: RPi4B's: 13.* boot "'failed to allocate bus number" message vs. main's [so: 14's] lack of such, also related Device Tree content Message-Id: <2837F65C-9812-4A78-855E-7B6FAB8936B8@yahoo.com> Date: Tue, 27 Dec 2022 10:26:29 -0800 To: freebsd-arm X-Mailer: Apple Mail (2.3731.300.101.1.3) References: <2837F65C-9812-4A78-855E-7B6FAB8936B8.ref@yahoo.com> X-Spamd-Result: default: False [-3.47 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.97)[-0.971]; DMARC_POLICY_ALLOW(-0.50)[yahoo.com,reject]; MV_CASE(0.50)[]; R_DKIM_ALLOW(-0.20)[yahoo.com:s=s2048]; R_SPF_ALLOW(-0.20)[+ptr:yahoo.com]; MIME_GOOD(-0.10)[text/plain]; ARC_NA(0.00)[]; FROM_HAS_DN(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; DWL_DNSWL_NONE(0.00)[yahoo.com:dkim]; RCPT_COUNT_ONE(0.00)[1]; MID_RHS_MATCH_FROM(0.00)[]; ASN(0.00)[asn:36647, ipnet:98.137.64.0/20, country:US]; RCVD_IN_DNSWL_NONE(0.00)[98.137.69.147:from]; TO_DN_ALL(0.00)[]; RCVD_COUNT_THREE(0.00)[3]; FREEMAIL_FROM(0.00)[yahoo.com]; RCVD_TLS_LAST(0.00)[]; DKIM_TRACE(0.00)[yahoo.com:+]; MIME_TRACE(0.00)[0:+]; FROM_EQ_ENVFROM(0.00)[]; FREEMAIL_ENVFROM(0.00)[yahoo.com]; MLMMJ_DEST(0.00)[freebsd-arm@freebsd.org] X-Rspamd-Queue-Id: 4NhNQv0VNWz45dH X-Spamd-Bar: --- X-ThisMailContainsUnwantedMimeParts: N # uname -apKU FreeBSD generic 13.1-STABLE FreeBSD 13.1-STABLE #0 = stable/13-n253304-461210143fbb: Fri Dec 23 23:25:49 UTC 2022 = root@releng3.nyi.freebsd.org:/usr/obj/usr/src/arm64.aarch64/sys/GENERIC = arm64 aarch64 1301510 1301510 boot -v output (to give more context): . . . pcib0: mem = 0x7d500000-0x7d50930f irq 80,81 on simplebus2 pcib0: parsing FDT for ECAM0: pcib0: PCI addr: 0xc0000000, CPU addr: 0x600000000, Size: 0x40000000 pcib0: PCI addr: 0x0, CPU addr: 0x0, Size: 0x0 pcib0: PCI addr: 0x0, CPU addr: 0x0, Size: 0x0 pcib0: PCI addr: 0x0, CPU addr: 0x0, Size: 0x0 pcib0: PCI addr: 0x0, CPU addr: 0x0, Size: 0x0 pcib0: PCI addr: 0x0, CPU addr: 0x0, Size: 0x0 pcib0: PCI addr: 0x0, CPU addr: 0x0, Size: 0x0 pcib0: PCI addr: 0x0, CPU addr: 0x0, Size: 0x0 pcib0: PCI addr: 0x0, CPU addr: 0x0, Size: 0x0 pcib0: PCI addr: 0x0, CPU addr: 0x0, Size: 0x0 pcib0: PCI addr: 0x0, CPU addr: 0x0, Size: 0x0 pcib0: PCI addr: 0x0, CPU addr: 0x0, Size: 0x0 pcib0: PCI addr: 0x0, CPU addr: 0x0, Size: 0x0 pcib0: PCI addr: 0x0, CPU addr: 0x0, Size: 0x0 pcib0: PCI addr: 0x0, CPU addr: 0x0, Size: 0x0 pcib0: PCI addr: 0x0, CPU addr: 0x0, Size: 0x0 pcib0: Bus is not cache-coherent pcib0: hardware identifies as revision 0x304. pcib0: note: reported link speed is 5.0 GT/s. pci1: on pcib0 pci1: domain=3D0, physical bus=3D0 found-> vendor=3D0x14e4, dev=3D0x2711, revid=3D0x00 domain=3D0, bus=3D0, slot=3D0, func=3D0 class=3D06-04-00, hdrtype=3D0x01, mfdev=3D0 cmdreg=3D0x0000, statreg=3D0x0010, cachelnsz=3D0 (dwords) lattimer=3D0x00 (0 ns), mingnt=3D0x00 (0 ns), maxlat=3D0x00 (0 = ns) intpin=3Da, irq=3D0 powerspec 3 supports D0 D3 current D0 secbus=3D1, subbus=3D1 pcib1: irq 91 at device 0.0 on pci1 pcib0: rman_reserve_resource: start=3D0xc0000000, end=3D0xc00fffff, = count=3D0x100000 pcib1: domain 0 pcib1: secondary bus 1 pcib1: subordinate bus 1 pcib1: memory decode 0xc0000000-0xc00fffff pci2: on pcib1 pcib1: allocated bus range (1-1) for rid 0 of pci2 pci2: domain=3D0, physical bus=3D1 found-> vendor=3D0x1106, dev=3D0x3483, revid=3D0x01 domain=3D0, bus=3D1, slot=3D0, func=3D0 class=3D0c-03-30, hdrtype=3D0x00, mfdev=3D0 cmdreg=3D0x0000, statreg=3D0x0010, cachelnsz=3D0 (dwords) lattimer=3D0x00 (0 ns), mingnt=3D0x00 (0 ns), maxlat=3D0x00 (0 = ns) intpin=3Da, irq=3D0 powerspec 3 supports D0 D3 current D0 MSI supports 4 messages, 64 bit map[10]: type Memory, range 64, base 0, size 12, memory disabled pcib1: slot 0 INTA is routed to irq 92 bcm_xhci0: irq 92 at = device 0.0 on pci2 bcm_xhci0: note: xhci firmware not found. bcm_xhci0: note: installing xhci firmware. bcm_xhci0: note: xhci firmware detected; firmware is revision 138a1. pcib1: allocated memory range (0xc0000000-0xc0000fff) for rid 10 of = bcm_xhci0 bcm_xhci0: Lazy allocation of 0x1000 bytes rid 0x10 type 3 at 0xc0000000 bcm_xhci0: 32 bytes context size, 64-bit DMA bcm_xhci0: attempting to allocate 1 MSI vectors (4 supported) bcm_xhci0: using IRQ 93 for MSI bcm_xhci0: MSI enabled bcm_xhci0: (New XHCI DeviceId=3D0x34831106) usbus0 on bcm_xhci0 bcm_xhci0: usbpf: Attached bcm_xhci0: note: switched to 32-bit DMA. pci0: on pcib0 pci0: failed to allocate bus number device_attach: pci0 attach returned 6 genet0: mem 0x7d580000-0x7d58ffff irq 82,83 on = simplebus2 . . . But this goes back to releng/13.0 (and, likely, beyond), including in main after stable/13 . Higlighting what is different vs. main . . . First note pci1: vs. pci0: (and main's "OFW") in . . . pcib0: Bus is not cache-coherent pcib0: hardware identifies as revision 0x304. pcib0: note: reported link speed is 5.0 GT/s. pci1: on pcib0 pci1: domain=3D0, physical bus=3D0 vs. pcib0: Bus is not cache-coherent pcib0: hardware identifies as revision 0x304. pcib0: note: reported link speed is 5.0 GT/s. pci0: on pcib0 pci0: domain=3D0, physical bus=3D0 Again, later . . . pcib1: irq 91 at device 0.0 on pci1 vs. pcib1: irq 91 at device 0.0 on pci0 Note pci2 vs pci1 later (and, again main has "OFW") . . . pci2: on pcib1 pcib1: allocated bus range (1-1) for rid 0 of pci2 pci2: domain=3D0, physical bus=3D1 vs. pci1: on pcib1 pcib1: allocated bus range (1-1) for rid 0 of pci1 pci1: domain=3D0, physical bus=3D1 Again, later . . . bcm_xhci0: irq 92 at = device 0.0 on pci2 vs. bcm_xhci0: irq 92 at = device 0.0 on pci1 Finally the error report vs. not . . .. bcm_xhci0: note: switched to 32-bit DMA. pci0: on pcib0 pci0: failed to allocate bus number device_attach: pci0 attach returned 6 genet0: mem 0x7d580000-0x7d58ffff irq 82,83 on = simplebus2 vs. bcm_xhci0: note: switched to 32-bit DMA. genet0: mem 0x7d580000-0x7d58ffff irq 82,83 on = simplebus2 The rest of main's output text for the block I first quoted is the same. An FYI about later RPi* firmware updates and the .dts/.dtb content that is related (two separate changes). . . = https://github.com/raspberrypi/linux/commit/13dbc954b3c9a9de0ad5b7279e8d3b= 708d31068b reports (2021-Oct-12): QUOTE ARM: dts: bcm2711-rpi-4-b: Fix pcie0's unit address formatting dtbs_check currently complains that: arch/arm/boot/dts/bcm2711-rpi-4-b.dts:220.10-231.4: Warning (pci_device_reg): /scb/pcie@7d500000/pci@1,0: PCI unit address format error, expected "0,0" Unsurprisingly pci@0,0 is the right address, as illustrated by its reg property: &pcie0 { pci@0,0 { /* * As defined in the IEEE Std 1275-1994 document, * reg is a five-cell address encoded as (phys.hi * phys.mid phys.lo size.hi size.lo). phys.hi * should contain the device's BDF as 0b00000000 * bbbbbbbb dddddfff 00000000. The other cells * should be zero. */ reg =3D <0 0 0 0 0>; }; }; The device is clearly 0. So fix it. Also add a missing 'device_type =3D "pci"'. Fixes: 258f92d ("ARM: dts: bcm2711: Add reset controller to xHCI node") Suggested-by: Rob Herring Reviewed-by: Rob Herring Link: = https://lore.kernel.org/r/20210831125843.1233488-1-nsaenzju@redhat.com Signed-off-by: Nicolas Saenz Julienne END QUOTE The diff shows (leading whitespace possibly not preserved): &pcie0 { - pci@1,0 { + pci@0,0 { + device_type =3D "pci"; #address-cells =3D <3>; #size-cells =3D <2>; ranges; There is also (same day): = https://github.com/raspberrypi/linux/commit/3f32472854614d6f53b09b4812372d= ba9fc5c7de that reports: QUOTE ARM: dts: bcm2711-rpi-4-b: Fix usb's unit address The unit address is supposed to represent ','. Which are both 0 for RPi4b's XHCI controller. On top of that although OpenFirmware states bus number goes in the high part of the last reg parameter, FDT doesn't seem to care for it[1], so remove it. [1] = https://patchwork.kernel.org/project/linux-arm-kernel/patch/20210830103909= .323356-1-nsaenzju@redhat.com/#24414633 Fixes: 258f92d ("ARM: dts: bcm2711: Add reset controller to xHCI node") Suggested-by: Rob Herring Reviewed-by: Rob Herring Link: = https://lore.kernel.org/r/20210831125843.1233488-2-nsaenzju@redhat.com Signed-off-by: Nicolas Saenz Julienne END QUOTE The diff shows (leading whitespace possibly not preserved): reg =3D <0 0 0 0 0>; =20 - usb@1,0 { - reg =3D <0x10000 0 0 0 0>; + usb@0,0 { + reg =3D <0 0 0 0 0>; resets =3D <&reset RASPBERRYPI_FIRMWARE_RESET_ID_USB>; }; }; =3D=3D=3D Mark Millard marklmi at yahoo.com