Where do MSI quirks belong?

John Baldwin jhb at freebsd.org
Mon Nov 20 10:43:18 PST 2006


On Sunday 19 November 2006 23:11, John Polstra wrote:
> I have at least one motherboard on which MSI doesn't work.  It's a
> Tyan S2721-533, also known as Thunder i7501 Pro.  (When MSI is enabled
> and used, it often hangs the system solid.)  It seems like we're going
> to need a quirk table to deal with this sort of thing.  I have a
> couple of questions before I work on it.
> 
> First, I assume that whether MSI works or not is at least partially
> a function of the motherboard and maybe the BIOS, as opposed to the
> chipset.  Is that right?  At least on this Tyan board, there seem
> to be some nice kenv variables (e.g., smbus.planar.product) already
> set that could help me recognize the board.  Is that a reasonable
> approach?

It's going to be a function of the chipset, as something in the chipset 
(presumably a Host -> PCI bridge) has to listen for writes to 0xfeeXXXXXX and 
convert them into APIC messages.  There are two ways I planned on doing this:

1) Allow PCI-PCI bridges to be blacklisted, and the pcib_alloc_msi[x]() 
methods would compare the bridge's device id against a blacklist.  This can 
matter if you have virtual PCI-PCI bridges that really a HT -> PCI bridge or 
the like.

2) Blacklist chipsets in the x86 MD code based on the device ID of the first 
Host -> PCI bridge at device 0.0.0.

I haven't worked on this yet as I haven't had a broken system to test on yet.  
It would also probably be a good idea to see what chipsets Linux blacklists, 
though we might not have to blacklist as many (e.g. Linux blacklists the 7502 
chipset because of issues with level triggered messages, but since we use 
edge-trigger it seems to work fine).

> Second, is there already a similar quirk table that I could simply
> extend to deal with this, or does it make more sense to create a new
> one?

No.

> Third, is there already an "initialize the whole PCI subsystem"
> function where I could handle the quirk table, or should I add
> a new SYSINIT?

See above.

-- 
John Baldwin


More information about the freebsd-arch mailing list