summaryrefslogtreecommitdiffstats
path: root/src/include
diff options
context:
space:
mode:
authorMichael Brown2005-04-16 13:42:56 +0200
committerMichael Brown2005-04-16 13:42:56 +0200
commite29be5e342e82f789e119beda7fd21ec107f1598 (patch)
tree3f7bd0b081447f5b9b9f3ecb824f05ce2f92f601 /src/include
parentRead number of PCI buses returned by BIOS so that we can scan more (diff)
downloadipxe-e29be5e342e82f789e119beda7fd21ec107f1598.tar.gz
ipxe-e29be5e342e82f789e119beda7fd21ec107f1598.tar.xz
ipxe-e29be5e342e82f789e119beda7fd21ec107f1598.zip
Speed up PCI bus scanning by skipping fns 1-7 if fn 0 is not present.
Diffstat (limited to 'src/include')
-rw-r--r--src/include/pci.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/include/pci.h b/src/include/pci.h
index 9b7fcadae..d4e871d47 100644
--- a/src/include/pci.h
+++ b/src/include/pci.h
@@ -252,6 +252,7 @@ struct pci_device {
#define PCI_BUS(busdevfn) ( ( (busdevfn) >> 8 ) & 0xff )
#define PCI_DEV(busdevfn) ( ( (busdevfn) >> 3 ) & 0x1f )
#define PCI_FUNC(busdevfn) ( (busdevfn) & 0x07 )
+#define PCI_FN0(busdevfn) ( (busdevfn) & 0xfff8 )
/*
* An individual PCI device identified by vendor and device IDs