[coreboot] patch: resource map proposal.

Stefan Reinauer stepan at coresystems.de
Mon Aug 4 22:40:15 CEST 2008

ron minnich wrote:
> romcc-based code used to have:
> nbcap = pci_read_config32(ctrl->f3, NORTHBRIDGE_CAP);
> This worked in v2 due to abuse of cpp and a few other bits.
I think that was very elegant actually, given the assumption that we 
need a device_t (I still like that better than struct device) to do a 
simple pci config read/write,... but...
> I was
> never comfortable with it -- more magic than I like. in romcc and CAR
> code, a device_t was a u32; in other code, it was a struct device *.
> icky.
> In v3 pci_read_config32 takes a struct device *. We don't have them in
> stage 1. So to make this work, I do this:
> nbcap = pci_cf8_conf1.read32(NULL, 0, ctrl->f3, NORTHBRIDGE_CAP);
> Which will work fine.
The obvious question: Do we need to use device_t as an input to that 
function at all? Why don't we instead use simple pci functions taking a 
u32 as an input? We're a bios, after all, not an OS. Are we?

> I did not pick the name, it's the name of the struct with the function
> pointers.
> I've got an ack from peter and I'd like to commit. Yes these are two
> patches but --key point -- they'll work and we can keep going.
Sure, keep going. I'll wait and see what comes out of this in the end.


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/20080804/b2e1b691/attachment.sig>

More information about the coreboot mailing list