[coreboot] r3304 - in trunk/util: . inteltool

Stefan Reinauer stepan at coresystems.de
Wed May 14 04:38:05 CEST 2008

Joseph Smith wrote:
> On Wed, 14 May 2008 04:06:55 +0200, Stefan Reinauer <stepan at coresystems.de>
> wrote:
>> Joseph Smith wrote:
>>> The research that I have done for i82801xx(I'm sure Corey & Uwe can back
>> me
>>> on this) is that most of the register settings for ICH -> ICH5 are the
>> same
>>> and ICH6 -> ICH9 are a little bit different. inteltool may get a little
>>> more complicated now that you have the northbridge involved also. I am
>>> pretty sure the nothbridge registers very dramaticly from chip to chip.
>>> But, I will give it a shot, and at least get a few more chips added :-)
>>  From what I could see the older ICHs have PMBASE and GPIOs but no RCBA 
>> for example. This should be fairly easy to handle. It might be safe to 
>> add the PCI IDs from the i82801xx_lpc.c driver. For the in-firmware part 
>> this tends to look different for different steppings of the same chip, 
>> so we need to be careful there. The dumping utility is quite simple as 
>> it doesn't need to know about chipset revision errata.
>> As long as you don't add the northbridge to the dumping functions, it 
>> will bail out with a message like "this is not supported (yet) on your 
>> northbridge".
> i82801xx_lpc.c is a perfect example. In that one we decided to say if the
> PCI ID is lower than ICH5 than do this....
> And if it is equal to or greater than ICH6 than do this....
If you read the specs to the end, you will find out that for ICH6 and 
above, there are so many things different that the driver would become 
unreadable, if one tried to make it actually work. That is why the 
pci_driver scheme was invented to begin with. It safes us all those pci 
id compares in coreboot. Instead, there should be 2 functions, one 
associated with all PCI IDs up to ICH5, and one or more for the newer 

> This is what I did for gpio_dump.
> I think it is a great approach for seperating various differences for
> inteltool. What do you think?
In inteltool, this is just a big case statement...

so let's do this instead:

    case PCI_DEVICE_ID_ICH0:
    case PCI_DEVICE_ID_ICH1:
    case PCI_DEVICE_ID_ICH2:
    case PCI_DEVICE_ID_ICH3:
    case PCI_DEVICE_ID_ICH4:
    case PCI_DEVICE_ID_ICH5:
    case PCI_DEVICE_ID_ICH6:
    case PCI_DEVICE_ID_ICH7:
    case PCI_DEVICE_ID_ICH8:

so we don't have to rely on heuristics in case the LPC device would get 
a different number in future chipsets.

coresystems GmbH • Brahmsstr. 16 • D-79104 Freiburg i. Br.
      Tel.: +49 761 7668825 • Fax: +49 761 7664613
Email: info at coresystems.dehttp://www.coresystems.de/
Registergericht: Amtsgericht Freiburg • HRB 7656
Geschäftsführer: Stefan Reinauer • Ust-IdNr.: DE245674866

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 249 bytes
Desc: OpenPGP digital signature
URL: <http://www.coreboot.org/pipermail/coreboot/attachments/20080514/0eae9d3e/attachment.sig>

More information about the coreboot mailing list