Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 3 Oct 2020 18:27:27 -0700
From:      Mark Millard <marklmi@yahoo.com>
To:        Robert Crowston <crowston@protonmail.com>, freebsd-arm <freebsd-arm@freebsd.org>
Subject:   Re: lspci XHCI "Memory at" for RPi4 (u-boot based context): FreeBSD vs. ubuntu vs. "Memory behind bridge" addresses
Message-ID:  <9D47356E-4CC4-410C-B258-330B943988D4@yahoo.com>
In-Reply-To: <8D837FD4-FC25-4D17-B008-141DC6A3D0FC@yahoo.com>
References:  <8D837FD4-FC25-4D17-B008-141DC6A3D0FC@yahoo.com>

next in thread | previous in thread | raw e-mail | index | archive | help

On 2020-Oct-3, at 13:01, Mark Millard <marklmi at yahoo.com> wrote:

> [Be warned that I'm reporting differences that I do not
> understand. I may end up being told "nothing of interest
> in these differences".]
>=20
> In the later lspci -v output diff, there is the following for
> the XHCI (-: FreeBSD, +: ubuntu):
>=20
> -       Memory at f8000000 (64-bit, non-prefetchable)
> . . .
> +       Memory at 600000000 (64-bit, non-prefetchable) [size=3D4K]

Looks like this is the two lspci's disagreeing about what
to show for "Memory at":

ubuntu "fdt print /" output:

                pcie@7d500000 {
. . .
                        #address-cells =3D <0x00000003>;
. . .
                        #size-cells =3D <0x00000002>;
. . .
                        ranges =3D <0x02000000 0x00000000 0xf8000000 =
0x00000006 0x00000000 0x00000000 0x04000000>;

Note that both the figures are in ranges:

0x00000000 0xf8000000
and:
0x00000006 0x00000000

. As for FreeBSD, the same is true:

                pcie@7d500000 {
                        #address-cells =3D <0x3>;
. . .
                        #size-cells =3D <0x2>;
. . .
                        ranges =3D <0x2000000 0x0 0xf8000000 0x6 0x0 0x0 =
0x4000000>;
. . .

So:

0x0 0xf8000000
and:
0x6 0x0

> Odder(?) is comparison of the FreeBSD address with what is
> listed by both OS's for "Memory behind bridge":
>=20
>        Memory behind bridge: f8000000-f80fffff [size=3D1M]
> . . .
> -       Memory at f8000000 (64-bit, non-prefetchable)
>=20
> ubuntu gets a distinct address (600000000) and FreeBSD gets
> an exact match to the start of the "Memory behind bridge".
> (There may be a possible 32-bit address vs. 64-bit address
> distinction?)

Looks like this part is not odd.

> [There are also IRQ differences (81/82 for FreeBSD; 41/42 for
> ubuntu) and ubuntu lists the kernel drivers used.]
>=20
> For reference:
>=20
> # diff -u ~/rpi4-lspci_v-*.txt | more
> --- /root/rpi4-lspci_v-fbsd.txt 2020-10-03 12:19:57.162261000 -0700
> +++ /root/rpi4-lspci_v-ubuntu.txt       2020-10-03 12:21:01.448646000 =
-0700
> @@ -1,5 +1,5 @@
> -00:00.0 PCI bridge: Broadcom Inc. and subsidiaries Device 2711 =
(prog-if 00 [Normal decode])
> -       Flags: bus master, fast devsel, latency 0, IRQ 81
> +00:00.0 PCI bridge: Broadcom Inc. and subsidiaries Device 2711 (rev =
10) (prog-if 00 [Normal decode])
> +       Flags: bus master, fast devsel, latency 0, IRQ 41
>        Bus: primary=3D00, secondary=3D01, subordinate=3D01, =
sec-latency=3D0
>        I/O behind bridge: 00000000-00000fff [size=3D4K]
>        Memory behind bridge: f8000000-f80fffff [size=3D1M]
> @@ -9,13 +9,15 @@
>        Capabilities: [100] Advanced Error Reporting
>        Capabilities: [180] Vendor Specific Information: ID=3D0000 =
Rev=3D0 Len=3D028 <?>
>        Capabilities: [240] L1 PM Substates
> +       Kernel driver in use: pcieport
>=20
> 01:00.0 USB controller: VIA Technologies, Inc. VL805 USB 3.0 Host =
Controller (rev 01) (prog-if 30 [XHCI])
>        Subsystem: VIA Technologies, Inc. VL805 USB 3.0 Host Controller
> -       Flags: bus master, fast devsel, latency 0, IRQ 82
> -       Memory at f8000000 (64-bit, non-prefetchable)
> +       Flags: bus master, fast devsel, latency 0, IRQ 42
> +       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
>=20
>=20
>=20
> Is this odd? Expected/reasonable?

f8000000 vs. 600000000 Looks to be an odd lspci -v variation,
with FreeBSD apparently showing the figure as if -b had been
supplied on the command line ("Bus-centric view"): ubuntu
shows f8000000 when the -b is supplied.

=3D=3D=3D
Mark Millard
marklmi at yahoo.com
( dsl-only.net went
away in early 2018-Mar)




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?9D47356E-4CC4-410C-B258-330B943988D4>