diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2010-12-04 17:06:33 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2010-12-04 17:06:33 +0000 |
commit | 4b7076ea351a93ed49ec893da421f6291344206e (patch) | |
tree | 8e5937b390074e65576adaef9e87dde05d917958 /sys/arch/i386 | |
parent | a0570286cbc603d45d495c2ab02e4654ae5c8a90 (diff) |
Introduce a new pci routine, pci_conf_size(), which returns the size of a
given pcitag_t configuration address space. Currently, all pci controllers
will return the usual 0x100 bytes of PCI configuration space, but this will
eventually change on PCIe-capable controlers.
ok kettenis@
Diffstat (limited to 'sys/arch/i386')
-rw-r--r-- | sys/arch/i386/pci/pci_machdep.c | 8 | ||||
-rw-r--r-- | sys/arch/i386/pci/pci_machdep.h | 3 |
2 files changed, 9 insertions, 2 deletions
diff --git a/sys/arch/i386/pci/pci_machdep.c b/sys/arch/i386/pci/pci_machdep.c index d47c18b6e53..15a4e0cbfcd 100644 --- a/sys/arch/i386/pci/pci_machdep.c +++ b/sys/arch/i386/pci/pci_machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pci_machdep.c,v 1.54 2010/09/06 19:05:48 kettenis Exp $ */ +/* $OpenBSD: pci_machdep.c,v 1.55 2010/12/04 17:06:31 miod Exp $ */ /* $NetBSD: pci_machdep.c,v 1.28 1997/06/06 23:29:17 thorpej Exp $ */ /*- @@ -260,6 +260,12 @@ pci_decompose_tag(pci_chipset_tag_t pc, pcitag_t tag, int *bp, int *dp, int *fp) } } +int +pci_conf_size(pci_chipset_tag_t pc, pcitag_t tag) +{ + return PCI_CONFIG_SPACE_SIZE; +} + pcireg_t pci_conf_read(pci_chipset_tag_t pc, pcitag_t tag, int reg) { diff --git a/sys/arch/i386/pci/pci_machdep.h b/sys/arch/i386/pci/pci_machdep.h index 853792de17d..dcc0f1fa42d 100644 --- a/sys/arch/i386/pci/pci_machdep.h +++ b/sys/arch/i386/pci/pci_machdep.h @@ -1,4 +1,4 @@ -/* $OpenBSD: pci_machdep.h,v 1.19 2010/06/29 22:08:28 jordan Exp $ */ +/* $OpenBSD: pci_machdep.h,v 1.20 2010/12/04 17:06:31 miod Exp $ */ /* $NetBSD: pci_machdep.h,v 1.7 1997/06/06 23:29:18 thorpej Exp $ */ /* @@ -88,6 +88,7 @@ void pci_attach_hook(struct device *, struct device *, struct pcibus_attach_args *); int pci_bus_maxdevs(pci_chipset_tag_t, int); pcitag_t pci_make_tag(pci_chipset_tag_t, int, int, int); +int pci_conf_size(pci_chipset_tag_t, pcitag_t); pcireg_t pci_conf_read(pci_chipset_tag_t, pcitag_t, int); void pci_conf_write(pci_chipset_tag_t, pcitag_t, int, pcireg_t); |