j
: Next unread message k
: Previous unread message j a
: Jump to all threads
j l
: Jump to MailingList overview
Hi everyone!
I've run into what seems to be a contradiction with reference to the "relocatability" of a BAR's mem/io space.
In the following example the spec. of the device says that BARs 0x10, 0x14 and 0x30 are relocatable.
assigned-addresses 81001810 00000000 00000300 00000000 00000100 82001814 00000000 00100000 00000000 00002000 82001830 00000000 00180000 00000000 00080000 reg 00001800 00000000 00000000 00000000 00000000 01001810 00000000 00000000 00000000 00000100 02001814 00000000 00000000 00000000 00002000 02001830 00000000 00000000 00000000 00080000
So when I create and assign values to the reg property, I set the "n" bit to 0. Example BAR 0x10: 01001810 As defined in the OpenFirmware IEEE-1275 PCI Bus Binding 2.1, the "n" bit indicates (non)relocatability of the corresponding BAR's mem/io address space.
The assigned-addresses property, however, is created by the system OpenFirmware (Sun SPARC Blade 1500 in this example). And as you can see the "n" bit in the phy-hi values is set for all the BARs (0x10, 0x14, 0x30), indicating that the corresponding BAR's space is non-relocatable. Example BAR 0x10: 81001810
I know, I'm being lazy! I can look for the piece of code in Sun's OBP source.
But I'm trying to understand the rule for setting this "n" bit as far as the PCI spec. is concerned. I could not find anything indicating the attribute of relocatibility in the PCI spec. (including the PCI Architecture 2.1 book from Mindshare.)
The only place I was able to make any sense of relocatability was the type bit field in the BAR[2:1]:
For BAR[0] = 0, this BAR is associated with a memory address space: Type field BAR[2:1] = 00 (locate anywhere in lower 4GB) 01 (locate below 1MB (reserved in PCI 2.2 spec)) 10 (locate anywhere over 4GB (implies that register is 64-bits wide)) 11 (reserved)
For BAR[0] = 1, this BAR is associated with a IO address space. There is no type field in this case.
All this leads me to conclude: - all memory-address-space BARs are relocatable; - all io-address-space BARs are non-relocatable.
Is this conclusion correct?
_____________
Äsif Haswaréy
QLogic Corporation
FCode Driver Development
Phone: 949.389.7607
Fax: 949.389.6308
asif.haswarey@qlogic.com
Attachments: