<br><br><div class="gmail_quote">On Thu, Nov 20, 2008 at 2:45 PM, Myles Watson <span dir="ltr"><<a href="mailto:mylesgw@gmail.com">mylesgw@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="Ih2E3d"><br>
<br>
> -----Original Message-----<br>
> From: Marc Jones [mailto:<a href="mailto:marcj303@gmail.com">marcj303@gmail.com</a>]<br>
</div><div><div></div><div class="Wj3C7c">> Sent: Thursday, November 20, 2008 1:58 PM<br>
> To: Myles Watson<br>
> Cc: Coreboot<br>
> Subject: Re: [coreboot] HT chains fixup<br>
><br>
> On Thu, Nov 20, 2008 at 11:55 AM, Myles Watson <<a href="mailto:mylesgw@gmail.com">mylesgw@gmail.com</a>> wrote:<br>
> ><br>
> ><br>
> >> -----Original Message-----<br>
> >> From: Marc Jones [mailto:<a href="mailto:marcj303@gmail.com">marcj303@gmail.com</a>]<br>
> >> Sent: Thursday, November 20, 2008 11:13 AM<br>
> >> To: Myles Watson<br>
> >> Cc: Coreboot<br>
> >> Subject: Re: [coreboot] HT chains fixup<br>
> >><br>
> >> On Wed, Nov 19, 2008 at 9:16 PM, Myles Watson <<a href="mailto:mylesgw@gmail.com">mylesgw@gmail.com</a>><br>
> wrote:<br>
> >> ><br>
> >> ><br>
> >> >> -----Original Message-----<br>
> >> >> From: Marc Jones [mailto:<a href="mailto:marcj303@gmail.com">marcj303@gmail.com</a>]<br>
> >> >> Sent: Wednesday, November 19, 2008 4:11 PM<br>
> >> >> To: Myles Watson<br>
> >> >> Subject: Re: [coreboot] HT chains fixup<br>
> >> >><br>
> >> >> Myles,<br>
> >> >> Hi, sorry to take so long to look at this. I have some possibly dumb<br>
> >> >> questions.<br>
> >> ><br>
> >> > No problem.  I appreciate the review.<br>
> >> ><br>
> >> >> What is gained by knowing the ht path?<br>
> >> > When a HT chain is powered on, all the devices have the same UnitID<br>
> (0)<br>
> >> > The subordinate busses get assigned bus numbers in the order that<br>
> they<br>
> >> are<br>
> >> > found by PCI scan, but they are found in the order of the chain.  As<br>
> you<br>
> >> > assign each a device number, another device is visible at device 0<br>
> until<br>
> >> the<br>
> >> > end of the chain is found.<br>
> >> ><br>
> >><br>
> >> But I think that the unitid scan happens before and device/dts is used<br>
> >> or called. This has to be done to set the HT link speed. See<br>
> >> northbridge\amd\k8\incoherent_ht.c. By the time the device code starts<br>
> >> they are setup and the bus can be scanned as normal pci.<br>
> ><br>
> > The problem is HTX slots and modules that can't be initialized without<br>
> some<br>
> > code.<br>
> ><br>
> >> >> Every HT bridge/tunnel under a<br>
> >> >> CPU acts like a PCI device. Linux doesn't know about HT and I am not<br>
> >> >> sure that the dts needs to.<br>
> >> ><br>
> >> > That's why I made ht devices morph into pci devices at chain<br>
> enumeration<br>
> >> > time.  Once they're assigned UnitIDs it doesn't matter where they are<br>
> in<br>
> >> the<br>
> >> > chain.<br>
> >> ><br>
> >><br>
> >> Because it is a unitid bus number it is already numbered. I think that<br>
> >> the device code should use any  bus number already set. That would be<br>
> >> equivalent to setting the bus number with pci_x@ in the dts.<br>
> ><br>
> > That could happen.  The problem is how you pick the "correct" early<br>
> > enumeration.  It's easy to pick an enumeration that lets you see all the<br>
> > busses and optimize the HT links.  It's not easy to make the busses get<br>
> > numbered correctly, which is why you need the dts information.<br>
> ><br>
><br>
> So you are moving the HT_CHAIN_UNITID_BASE and<br>
> HT_CHAIN_END_UNITID_BASE to be done by the device and dts setting?<br>
<br>
</div></div>Yes.  I'm hoping that there will be no #ifs in the code.  It's too fragile,<br>
especially when there are multiple chains.<br>
<br>
The way I envision it is that the HT chains get optimized (assign valid but<br>
unimportant UnitIDs), then collapsed and set by dts when it matters.</blockquote><div><br>I'm hoping we can make it so that Stefan can have his automatic depth-first assignment too.  If you don't assign UnitIDs in the dts, they just get assigned as they're reached.<br>
<br>Thanks again for the good questions.  I'm hoping to come out of this with much simpler code.<br><br>Thanks,<br>Myles<br></div></div><br>