Private PCI config space addresses?

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
johank
Posts: 7
Joined: Sun Dec 20, 2009 5:25 pm

Private PCI config space addresses?

Post by johank »

Hi everyone,

I was looking for an overview of (common/typical) private PCI config space addresses, that is, addresses above 0x3f. For example, I found a datasheet (http://www.datasheetcatalog.com/datashe ... C572.shtml) that mentioned the following private addresses for an USB controller:

Code: Select all

#define USB_MISC_CTRL_1	0x40
#define USB_MISC_CTRL_2	0x41
#define USB_REVISION_NR	0x60
#define USB_LEGACY_SUP_1	0xc0
#define USB_LEGACY_SUP_2	0xc1
I was wondering if there exists an overview of such (commonly used) private addresses per type of controller. For example, does a legacy (P/S)ATA or (P/S)ATAPI controller use any private address? Would it be safe to assume that the USB revision number (e.g. 1.0, 2.0 etc) is always at 0x60? etc.

Thanks for your input!

best
Johan
User avatar
BenLunt
Member
Member
Posts: 941
Joined: Sat Nov 22, 2014 6:33 pm
Location: USA
Contact:

Re: Private PCI config space addresses?

Post by BenLunt »

johank wrote:I was looking for an overview of (common/typical) private PCI config space addresses, that is, addresses above 0x3f. For example, I found a datasheet (cut) that mentioned the following private addresses for an USB controller.

I was wondering if there exists an overview of such (commonly used) private addresses per type of controller. For example, does a legacy (P/S)ATA or (P/S)ATAPI controller use any private address?
I think the term "Private" explains it all. The registers at these addresses are specific to the device they are on, nothing more. A device is allowed to have any (extra) registers it decides as long as the "general" registers are the same, in the same place, use the same format, etc., to make it compatible with the platform it is designed for.
johank wrote:Would it be safe to assume that the USB revision number (e.g. 1.0, 2.0 etc) is always at 0x60? etc.
No, it is not safe to assume anything. However, every UHCI controller I have seen, has these registers. Note, UHCI, not USB. Therefore, this revision number will not be more than 1.1, in theory.

Therefore, if you write a generic UHCI driver, it may use all of the capabilities described by the USB specifications for Low and Full speed controllers and the UHCI specification. Period. Then, if you wish, if you find a specific UHCI controller, via the PCI address space ID fields, you may then load a driver specific for that device and then use the "Private" registers that go along with that device. This is the technique used by most modern commercial operating systems.

Ben
- http://www.fysnet.net/osdesign_book_series.htm
Post Reply