Date: Wed, 15 Apr 2015 22:52:55 -0700 From: Justin Hibbits <jrh29@alumni.cwru.edu> To: Marcel Moolenaar <marcel@xcllnt.net> Cc: FreeBSD PowerPC ML <freebsd-ppc@freebsd.org> Subject: Re: Should the MPC8544 root complex really show up as a device? Message-ID: <CAHSQbTBSy6vsSFTYEsuJOQmisiiU0cssT=APCrY%2BNQshGOVUCQ@mail.gmail.com> In-Reply-To: <CAHSQbTCSMtmAuTZCSBvzbYafPbBmxYX-qhGMLkDziTcBhWA3OQ@mail.gmail.com> References: <CAHSQbTBcrwYkLUE8F2MrpE_q=ooV2McEk%2BWjHwrzFr=3Lf_jcQ@mail.gmail.com> <6368B454-B882-4D0B-ACBE-02AE0F78D7C5@xcllnt.net> <CAHSQbTCSMtmAuTZCSBvzbYafPbBmxYX-qhGMLkDziTcBhWA3OQ@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Apr 15, 2015 at 10:17 AM, Justin Hibbits <jrh29@alumni.cwru.edu> wr= ote: > On Mon, Apr 13, 2015 at 3:39 PM, Marcel Moolenaar <marcel@xcllnt.net> wro= te: >> >>> On Apr 13, 2015, at 3:28 PM, Justin Hibbits <jrh29@alumni.cwru.edu> wro= te: >>> >>> I'm trying to get the mini-PCIe slot on my RouterBoard RB800 working, >>> and running into a snag. It works just fine in RouterOS (Linux), but >>> on FreeBSD, the card in the slot doesn't show up. From all my >>> Googling, it appears the slot should show up on PCIe controller 1, but >>> the only device that shows up is the root complex as 1/0:0:0, as type >>> Processor. Should this show up anyway? Shouldn't the device behind >>> it show up instead? >> >> The problem is that the device is flagged as a processor, not >> as a PCI bridge. That=E2=80=99s why it shows up and also why you don=E2= =80=99t >> find anything underneath. One way to fix it is by spoofing the >> device type in sys/powerpc/mpc85xx/pci_mpc85xx.c or otherwise >> by changing common PCI code to accept this device as a (host) >> bridge. >> >> HTH, >> >> -- >> Marcel Moolenaar >> marcel@xcllnt.net > > Thanks Marcel, > > I did try spoofing it in pci_mpc85xx.c, with the attached patch (patch > includes quite a bit of debug as well). The reference manual doesn't > indicate if the root complex appears on every controller, or just the > first (there are 3 PCIe controllers on the MPC8544, and only the first > has this device showing up). Maybe I'm missing something. This is > new to me, and PCI configuration has always baffled me. Trying to > read bus 1 on the controller (which is configured in the Second Bus > register), I only saw 0xff returned during probing in fsl_pcib_init(). > Been looking at the Linux driver for hints, but not a whole lot has > come from that. > > Unfortunately, the last couple days my RouterBoard has decided it > doesn't want to boot FreeBSD, so I have to debug that before I can > continue working on this, but PCI register 0x4B0 (CFG_READY) seems a > contender for needing initialized, although the documentation doesn't > indicate if it's only relevant for EP mode or also relevant for RC > mode. > > - Justin One thing I just discovered: Removing the card from the minipcie slot causes the Processor device to disappear. - Justin
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAHSQbTBSy6vsSFTYEsuJOQmisiiU0cssT=APCrY%2BNQshGOVUCQ>