From nobody Wed Feb 14 20:04:22 2024 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 4TZq0n64Fgz52k0x for ; Wed, 14 Feb 2024 20:04:41 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic312-24.consmr.mail.gq1.yahoo.com (sonic312-24.consmr.mail.gq1.yahoo.com [98.137.69.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 4TZq0n3BqGz4nnN for ; Wed, 14 Feb 2024 20:04:41 +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=1707941079; bh=uQn9c2r1u6XAou+9lOv3df9TplyPdH0dHnMgHP8UgYY=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From:Subject:Reply-To; b=qY4go2lUYaUzT76jq38SuSGtGIRd14015cAO5BcnZmXtVIIEB9o05VNkZhQOehABjBtTkkNcSbcGhKGEwwsZAVs2YGWxaOPp8b+ZBvhRVvKAT+khBI/gCFAmqbNA2Op9Z2TNCv2VDrG04q8yehiDvBQLVSRrUb9kyYk9zFD9tVR/+2SADJmTixRmlwVg1HaAByixmt4Wgm5pHRdkX9s0JJ6b+JSK5h7I14ba5TM5dOGvm85aqNRxoyeieAGAlIRSKilSNzENS/oGd0tRa1h5BLeZXlTUhVXK/36P3YkZZY4GCtQ2Wi/Lvwg5jqfnfmciIGsNdoDBU8Ac4sNGRAbECA== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1707941079; bh=91WMRUCvXjNLbRZh/mfvCQQXHrxC5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IiSmECe2YhZmpws18iW62sKVd7UIsYbwK.77.WmJsyHOsPNztUKF0pQw3Xx5YIey2VgyzbBS udtoQti96Z_mtIJj7zCT8HPn_fm4eWF.Mtwsp29LMdJkAfN5RE4mmwOtBjjrTPjWjVsbvIxdRZp5 _dYzR_FK_nSSMLLW.I.feJw9OOuuKli4tVo28M1OKjT_7on1dIPHtR16sWVlNj85YD0KJMMy_1C2 5bIb4sjakoOpigndpWfPNOizKF4BSt8TzqamIT9q.jQqQe2qUbt_4bxUG9cl0yZ476pkeyi0QvvV gbOIycwOvG8t6O6hndKA4ZaqjLqJfEwLI0Dyb.CUe4dqGvhChkZIN8p_pJip0FoOoBvrmUtKSVVV sV81FlUpyT9DCdLs.vQzjruYbguXW7e2dS3kZcs0NA5Jml5eIlUpBbG5vhNBgMCxtprZSROrKanr wZ7P0I4oxSiDnmhuS7a2yJmLOdtLgoX4mp0OZdUremn7iyqaskNq7zm8nJC9O1dEkPTFrE6BMnIq maUMR2wruakdBER5oTQnROvsbnelNzpIhEgcEUDqedMV1AuJlPON0B88cTpeEoAW7kf1kEl9VhDv LYQOFEcUkki48DMJ6gWsc X-Sonic-MF: X-Sonic-ID: 0e1f2332-e8d8-4a82-8e4a-7f36db08e4be Received: from sonic.gate.mail.ne1.yahoo.com by sonic312.consmr.mail.gq1.yahoo.com with HTTP; Wed, 14 Feb 2024 20:04:39 +0000 Received: by hermes--production-gq1-5c57879fdf-7xbd4 (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID ae84ef058a9f03c91879aa66a7f75d31; Wed, 14 Feb 2024 20:04:33 +0000 (UTC) Content-Type: text/plain; charset=us-ascii 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 \(3774.400.31\)) Subject: Re: Recent commits reject RPi4B booting: pcib0 vs. pcib1 "rman_manage_region: request" leads to panic From: Mark Millard In-Reply-To: <0b0ba1b0-dee5-47e2-bb93-b44a24492abd@FreeBSD.org> Date: Wed, 14 Feb 2024 12:04:22 -0800 Cc: FreeBSD ARM List , Current FreeBSD , Warner Losh Content-Transfer-Encoding: quoted-printable Message-Id: <072C1A6A-85AA-4B26-9598-E5A586F9A4C2@yahoo.com> References: <76AB969F-5BC5-4116-8AF4-3ED2CABEBBA5.ref@yahoo.com> <76AB969F-5BC5-4116-8AF4-3ED2CABEBBA5@yahoo.com> <1F704317-FDB8-4BDA-8A67-61CF48794DFE@yahoo.com> <9AFDF067-96E4-4E67-90D2-F40DAF3F138F@yahoo.com> <4C279710-5F88-4295-B1A4-7C395F3587E5@yahoo.com> <3A145420-399D-4EBD-9FF4-18924908AB1D@yahoo.com> <1298DF9C-0F82-4567-8E81-7332A608C7FC@yahoo.com> <36ECB040-7E09-47A9-AF71-DE546A78E9CA@yahoo.com> <0b0ba1b0-dee5-47e2-bb93-b44a24492abd@FreeBSD.org> To: John Baldwin X-Mailer: Apple Mail (2.3774.400.31) 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-Queue-Id: 4TZq0n3BqGz4nnN X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated [Added at bottom: EDK2 notes referencing the non-ECAM compliant PCie in the BCM2711.] On Feb 14, 2024, at 10:23, John Baldwin wrote: > On 2/14/24 10:16 AM, Mark Millard wrote: >> Top posting a related but separate item: >> I looked up some old (2022-Dec-17) lspci -v output from >> a Linux boot. Note the "Memory at" value 600000000 (in >> the 35 bit BCM2711 address space) and the "(64-bit, >> non-prefetchable)" (and "[size=3D4K]"). >> 01:00.0 USB controller: VIA Technologies, Inc. VL805/806 xHCI USB 3.0 = Controller (rev 01) (prog-if 30 [XHCI]) >> Subsystem: VIA Technologies, Inc. VL805/806 xHCI USB 3.0 = Controller >> Device tree node: = /sys/firmware/devicetree/base/scb/pcie@7d500000/pci@0,0/usb@0,0 >> Flags: bus master, fast devsel, latency 0, IRQ 51 >> Memory at 600000000 (64-bit, non-prefetchable) [size=3D4K] >> Capabilities: [80] Power Management version 3 >> Capabilities: [90] MSI: Enable+ Count=3D1/4 Maskable- 64bit+ >> Capabilities: [c4] Express Endpoint, MSI 00 >> Capabilities: [100] Advanced Error Reporting >> Kernel driver in use: xhci_hcd >> "Memory at 600000000 (64-bit, non-prefetchable)": >> Violation of a PCIe standard? >=20 > No, this is a device BAR which can be 64-bit (memory BARs can either > be 32-bits or 64-bits). However, the "window" in a PCI _bridge_ for > memory is only defined to be 32-bits. Windows in PCI-PCI bridges > are a special type of BAR that defines the address ranges that the > bridge decodes on the parent side and passes down to child devices. > The prefetchable window in PCI-PCI bridges can optionally be 64-bit. >=20 > BAR =3D=3D a range of memory or I/O port addresses decoded by a = device, > usually mapped to a register bank, but sometimes mapped to internal > memory (e.g. a framebuffer) >=20 > Window =3D=3D a range of memory or I/O port addresses decoded by a = bridge > for which transactions are passed across the bridge to be handled by > a child device. Good to know. Thanks. FYI: From: = https://github.com/tianocore/edk2-non-osi/commit/c1075e9ddd647fa7f7cb17b31= 2f6bf8246952e09 There are these notes that indicate the non-standard ECAM status: (Other details are just for reference. EDK2 UEFI/ACPI is not the official usage context.) QUOTE The RPi4 has a single nonstandard PCI config region. It is broken into = two pieces, the root port config registers and a window to a single device's config space which can move between devices. However there isn't (yet) = an authoritative public document on this since the available BCM2711 = reference notes that there is a PCIe root port in the memory map but doesn't = describe it. Considering that it's not ECAM compliant, yet relatively simple, it is however possible to make use of the newly introduced PCI SMCCC interface that was added for the RPi4 platform as part of the TF-A 2.6 release. As a result, we update the RPi4 TF-A to the 2.6 release version, and, = for good measure, the RPi3 also, using binaries that were built in an open = and verifiable manner through the GitHub Actions build script located at https://github.com/pftf/pitf. For more details on the SMCCC interface, see DEN0115 available from: https://developer.arm.com/documentation/den0115/latest END QUOTE Other notes: I remember, FreeBSD supports the SMCCC interfacing in question. By contrast, Linux refused to add such support. The default RPi4B EDK2 configuration avoids exposing the PCIe but there is an option that uses the SMCCC technique to expose it. =3D=3D=3D Mark Millard marklmi at yahoo.com