start rewrite of pci_find_classcode

was scanning PCI config space of all valid slot/bus combination when all needed information is already available from the initial scan.
This commit is contained in:
Markus Fröschle
2016-12-05 07:03:16 +00:00
parent 486bc3f063
commit be9e859ee6
8 changed files with 52 additions and 81 deletions

View File

@@ -198,11 +198,11 @@ typedef struct /* structure of address conversion */
#define PCI_STATUS(i) ((i) & 0xffff)
#define PCI_COMMAND(i) (((i) >> 16) & 0xffff)
/* register 0x08 macros */
#define PCI_CLASS_CODE(i) (((i) & 0xff000000) >> 24)
#define PCI_SUBCLASS(i) (((i) & 0x00ff0000) >> 16)
#define PCI_PROG_IF(i) (((i) & 0x0000ff00) >> 8)
#define PCI_REVISION_ID(i) (((i) & 0x000000ff))
/* register 0x08 macros (use on little endian value!) */
#define PCI_CLASS_CODE(i) (((i) & 0x00ff0000) >> 16)
#define PCI_SUBCLASS(i) (((i) & 0x0000ff00) >> 8)
#define PCI_PROG_IF(i) (((i) & 0x000000ff) >> 0)
#define PCI_REVISION_ID(i) (((i) & 0xff000000) >> 24)
/* register 0x0c macros */
#define PCI_BIST(i) (((i) & 0xff000000) >> 24)