[LinuxBIOS] usage of pci_write_config32()?
corey_osgood at verizon.net
Tue Mar 20 05:45:26 CET 2007
ron minnich wrote:
> On 3/19/07, Corey Osgood <corey_osgood at verizon.net> wrote:
>> With pci_write_config32 (or pci_write_config16), do you send the value
>> to the first or the last register in the set? In other words, if it's a
>> range of 0x50-0x53, where should it be sent to? And if you were looking
>> to set it like this:
>> 0x50 -> 0x11
>> 0x51 -> 0x22
>> 0x52 -> 0x33
>> 0x53 -> 0x44
>> it should be set as 0x11223344, correct? I'm looking at two different
>> files, and their usage conflicts, I'd like to know which is right.
> I'd like to know where that is.
It's raminit.c from LBv1's src/northbridge/440gx/, it addresses the
first register for a 32-bit write to 0x50-0x53, then the second for a
16-bit write later on, can't see at the moment which it was. I'm working
on trying to port that up to v2, to see if it'll work on a 440zx, since
nothing else I've done seems to be working.
> I believe that since the x86 is a little-endian machine, you actually
> want 0x44332211, for the example above, since in 0x44332211, the LSB
> will be written "first". I am not near a machine to test this on,
> It's pretty easy to test, so, as always, the ultimate truth is in what
> happens when you do it.
Yeah, I hadn't thought about it, but the bios scratch registers should
work perfect for a quick test.
> I hope to be back to life by monday. I just moved to Livermore, CA and
> am busy ...
Enjoy the new place!
More information about the coreboot