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.
Thanks, Corey
On 3/19/07, Corey Osgood corey_osgood@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.
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, however.
It's pretty easy to test, so, as always, the ultimate truth is in what happens when you do it.
I hope to be back to life by monday. I just moved to Livermore, CA and am busy ...
thanks
ron
ron minnich wrote:
On 3/19/07, Corey Osgood corey_osgood@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, however.
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!
Thanks, Corey
* Corey Osgood corey_osgood@verizon.net [070320 05:45]:
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.
Note that on some systems, a 32bit write is very different from 4 8bit writes. If it is a 32bit register, you should always read/write all 32 bits.
Stefan
Stefan Reinauer wrote:
- Corey Osgood corey_osgood@verizon.net [070320 05:45]:
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.
Note that on some systems, a 32bit write is very different from 4 8bit writes. If it is a 32bit register, you should always read/write all 32 bits.
Stefan
Yes, but on 440bx doesn't seem to matter, LBv1 uses 8-bit writes all over the place on it. And yes, it was 0x44332211, written to the last reg in the set, I've fixed my code accordingly (not that it works, but at least correct now on that part).
-Corey
* Corey Osgood corey_osgood@verizon.net [070320 04:40]:
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.
Since it is little endian, I would expect it to be 0x44332211.