ron minnich wrote:
On Mon, Aug 4, 2008 at 1:40 PM, Stefan Reinauer stepan@coresystems.de wrote:
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?
That's a fine question. The convention could be that we call those functions as follows: blahblah(device->bus, device->devfn, etc. etc. )
pci_read_config32(PCI_DEV(0,0x1f,0), reg); ?
Maps to about 5 assembler instructions.
works for me. But let's revisit it later.
I am fine with overloading but only in languages that really allow it ;-)
Overloading? I'm talking about simplifying, not inventing an OS ;-)