Wed Nov 25 19:46:19 2009 UTC ()
Fix build of kernels without PCI support like "GENERIC_TINY".


(tron)
diff -r1.46 -r1.47 src/sys/arch/x86/x86/x86_autoconf.c

cvs diff -r1.46 -r1.47 src/sys/arch/x86/x86/x86_autoconf.c (expand / switch to unified diff)

--- src/sys/arch/x86/x86/x86_autoconf.c 2009/11/06 23:10:22 1.46
+++ src/sys/arch/x86/x86/x86_autoconf.c 2009/11/25 19:46:19 1.47
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: x86_autoconf.c,v 1.46 2009/11/06 23:10:22 dyoung Exp $ */ 1/* $NetBSD: x86_autoconf.c,v 1.47 2009/11/25 19:46:19 tron Exp $ */
2 2
3/*- 3/*-
4 * Copyright (c) 1990 The Regents of the University of California. 4 * Copyright (c) 1990 The Regents of the University of California.
5 * All rights reserved. 5 * All rights reserved.
6 * 6 *
7 * This code is derived from software contributed to Berkeley by 7 * This code is derived from software contributed to Berkeley by
8 * William Jolitz. 8 * William Jolitz.
9 * 9 *
10 * Redistribution and use in source and binary forms, with or without 10 * Redistribution and use in source and binary forms, with or without
11 * modification, are permitted provided that the following conditions 11 * modification, are permitted provided that the following conditions
12 * are met: 12 * are met:
13 * 1. Redistributions of source code must retain the above copyright 13 * 1. Redistributions of source code must retain the above copyright
14 * notice, this list of conditions and the following disclaimer. 14 * notice, this list of conditions and the following disclaimer.
@@ -25,27 +25,27 @@ @@ -25,27 +25,27 @@
25 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 25 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
26 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 26 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
27 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 27 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
28 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 28 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
29 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 29 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
30 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 30 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
31 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 31 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
32 * SUCH DAMAGE. 32 * SUCH DAMAGE.
33 * 33 *
34 * @(#)autoconf.c 7.1 (Berkeley) 5/9/91 34 * @(#)autoconf.c 7.1 (Berkeley) 5/9/91
35 */ 35 */
36 36
37#include <sys/cdefs.h> 37#include <sys/cdefs.h>
38__KERNEL_RCSID(0, "$NetBSD: x86_autoconf.c,v 1.46 2009/11/06 23:10:22 dyoung Exp $"); 38__KERNEL_RCSID(0, "$NetBSD: x86_autoconf.c,v 1.47 2009/11/25 19:46:19 tron Exp $");
39 39
40#include <sys/param.h> 40#include <sys/param.h>
41#include <sys/systm.h> 41#include <sys/systm.h>
42#include <sys/device.h> 42#include <sys/device.h>
43#include <sys/disklabel.h> 43#include <sys/disklabel.h>
44#include <sys/conf.h> 44#include <sys/conf.h>
45#include <sys/malloc.h> 45#include <sys/malloc.h>
46#include <sys/vnode.h> 46#include <sys/vnode.h>
47#include <sys/fcntl.h> 47#include <sys/fcntl.h>
48#include <sys/disk.h> 48#include <sys/disk.h>
49#include <sys/proc.h> 49#include <sys/proc.h>
50#include <sys/md5.h> 50#include <sys/md5.h>
51#include <sys/kauth.h> 51#include <sys/kauth.h>
@@ -57,31 +57,35 @@ __KERNEL_RCSID(0, "$NetBSD: x86_autoconf @@ -57,31 +57,35 @@ __KERNEL_RCSID(0, "$NetBSD: x86_autoconf
57#include "pci.h" 57#include "pci.h"
58#include "genfb.h" 58#include "genfb.h"
59#include "wsdisplay.h" 59#include "wsdisplay.h"
60#include "opt_vga.h" 60#include "opt_vga.h"
61 61
62#ifdef VGA_POST 62#ifdef VGA_POST
63#include <x86/vga_post.h> 63#include <x86/vga_post.h>
64#endif 64#endif
65#include <dev/isa/isavar.h> 65#include <dev/isa/isavar.h>
66#if NPCI > 0 66#if NPCI > 0
67#include <dev/pci/pcivar.h> 67#include <dev/pci/pcivar.h>
68#endif 68#endif
69#include <dev/wsfb/genfbvar.h> 69#include <dev/wsfb/genfbvar.h>
 70#if NPCI > 0
70#include <dev/pci/genfb_pcivar.h> 71#include <dev/pci/genfb_pcivar.h>
 72#endif
71#include <dev/ic/vgareg.h> 73#include <dev/ic/vgareg.h>
72 74
 75#if NPCI > 0
73static struct genfb_colormap_callback gfb_cb; 76static struct genfb_colormap_callback gfb_cb;
74static struct genfb_pmf_callback pmf_cb; 77static struct genfb_pmf_callback pmf_cb;
 78#endif
75#ifdef VGA_POST 79#ifdef VGA_POST
76static struct vga_post *vga_posth = NULL; 80static struct vga_post *vga_posth = NULL;
77#endif 81#endif
78 82
79struct disklist *x86_alldisks; 83struct disklist *x86_alldisks;
80int x86_ndisks; 84int x86_ndisks;
81 85
82#if NPCI > 0 86#if NPCI > 0
83static void 87static void
84x86_genfb_set_mapreg(void *opaque, int index, int r, int g, int b) 88x86_genfb_set_mapreg(void *opaque, int index, int r, int g, int b)
85{ 89{
86 outb(0x3c0 + VGA_DAC_ADDRW, index); 90 outb(0x3c0 + VGA_DAC_ADDRW, index);
87 outb(0x3c0 + VGA_DAC_PALETTE, (uint8_t)r >> 2); 91 outb(0x3c0 + VGA_DAC_PALETTE, (uint8_t)r >> 2);