From 53429270408e554c3738afc2b6008017e7819e7f Mon Sep 17 00:00:00 2001 From: Matthieu Herrb Date: Sat, 23 Jun 2001 03:30:39 +0000 Subject: PCI bus configuration userland access from FreeBSD. Will be used by XFree86 on powerpc (works on i386 too, but its not currently used). --- sys/arch/powerpc/conf/GENERIC | 4 +++- sys/arch/powerpc/powerpc/conf.c | 12 +++++++++++- 2 files changed, 14 insertions(+), 2 deletions(-) (limited to 'sys/arch/powerpc') diff --git a/sys/arch/powerpc/conf/GENERIC b/sys/arch/powerpc/conf/GENERIC index 417a7dbd4c7..c4a4f11460e 100644 --- a/sys/arch/powerpc/conf/GENERIC +++ b/sys/arch/powerpc/conf/GENERIC @@ -1,4 +1,4 @@ -# $OpenBSD: GENERIC,v 1.35 2001/06/17 03:44:03 drahn Exp $ +# $OpenBSD: GENERIC,v 1.36 2001/06/23 03:30:38 matthieu Exp $ # # PPC GENERIC config file # @@ -18,6 +18,8 @@ option PCIVERBOSE option USBVERBOSE option WSEMUL_NO_DUMB +option USER_PCICONF # user-space PCI configuration + include "../../../conf/GENERIC" config bsd swap generic diff --git a/sys/arch/powerpc/powerpc/conf.c b/sys/arch/powerpc/powerpc/conf.c index eadfd8bad8d..bf20a219bf3 100644 --- a/sys/arch/powerpc/powerpc/conf.c +++ b/sys/arch/powerpc/powerpc/conf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: conf.c,v 1.20 2001/03/29 19:56:33 drahn Exp $ */ +/* $OpenBSD: conf.c,v 1.21 2001/06/23 03:30:38 matthieu Exp $ */ /* * Copyright (c) 1997 Per Fogelstrom @@ -183,6 +183,11 @@ cdev_decl(ucom); #include "wsmux.h" cdev_decl(wsmux); +#ifdef USER_PCICONF +#include "pci.h" +cdev_decl(pci); +#endif + #include "audio.h" cdev_decl(audio); @@ -267,6 +272,11 @@ struct cdevsw cdevsw[] = { cdev_mouse_init(NWSMOUSE, /* 69: mice */ wsmouse), cdev_mouse_init(NWSMUX, wsmux), /* 70: ws multiplexor */ +#ifdef USER_PCICONF + cdev_pci_init(NPCI,pci), /* 71: PCI user */ +#else + cdev_notdef(), +#endif }; int nchrdev = sizeof cdevsw / sizeof cdevsw[0]; -- cgit v1.2.3