Obtain 'Bus Device Funct.' of PCI slot

This forum is for general developer support questions.

Obtain 'Bus Device Funct.' of PCI slot

Postby javierdlr » Mon Sep 12, 2016 11:51 pm

Hi how can I get 'Bus: 0x00 Device: 0x04 Function: 0x00' alas shown in Ranger or showconfig?

Is it one if the 'enum enPCIConfigSpace' tag? Os I can query like 'dev->ReadConfigWord()/Byte()'

Right now I have (Slot values are always 0, just plain printf("00:00:00")):
Code: Select all
#lspci v
##  Ven   Dev  Description
02 1095  3114  Silicon Image, Inc. SiI 3114 [SATALink/SATARaid] Serial ATA Controller
    IOBase   : 0:0x00001000; 1:0x00001008; 2:0x00001010; 3:0x00001018; 4:0x00001020; 5:0x80000000
    Slot     : 00:00:00
    Class    : Base:0x01  Sub:0x04  IFace:0x00
    Revision : 0x02
    Interrupt: Line:0x20  Pin:0x01
...
User avatar
javierdlr
Beta Tester
Beta Tester
 
Posts: 350
Joined: Sun Jun 19, 2011 11:13 pm
Location: Donostia (GUIPUZCOA) - Spain

Re: Obtain 'Bus Device Funct.' of PCI slot

Postby javierdlr » Tue Sep 13, 2016 12:18 am

Answering myself:

Using 'dev->GetAddress(&bus,&devi,&func);' then I get such values a wanted

THX ;-)
User avatar
javierdlr
Beta Tester
Beta Tester
 
Posts: 350
Joined: Sun Jun 19, 2011 11:13 pm
Location: Donostia (GUIPUZCOA) - Spain


Return to General Developer Support

Who is online

Users browsing this forum: No registered users and 1 guest