Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/alpha Attach "agp" to the AMD-751 PCI host controll...



details:   https://anonhg.NetBSD.org/src/rev/f78c8f4980d6
branches:  trunk
changeset: 514970:f78c8f4980d6
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Sat Sep 15 04:33:37 2001 +0000

description:
Attach "agp" to the AMD-751 PCI host controller (Alpha UP1000/UP1100).

diffstat:

 sys/arch/alpha/conf/ALPHA       |  14 +++++++++---
 sys/arch/alpha/conf/GENERIC     |  12 +++++++++-
 sys/arch/alpha/conf/files.alpha |   6 +++-
 sys/arch/alpha/pci/irongate.c   |  45 ++++++++++++++++++++++++++++++++++++----
 4 files changed, 64 insertions(+), 13 deletions(-)

diffs (217 lines):

diff -r 5113ef3de3c4 -r f78c8f4980d6 sys/arch/alpha/conf/ALPHA
--- a/sys/arch/alpha/conf/ALPHA Sat Sep 15 04:31:40 2001 +0000
+++ b/sys/arch/alpha/conf/ALPHA Sat Sep 15 04:33:37 2001 +0000
@@ -1,10 +1,10 @@
-# $NetBSD: ALPHA,v 1.152 2001/08/22 15:39:04 hubertf Exp $
+# $NetBSD: ALPHA,v 1.153 2001/09/15 04:33:38 thorpej Exp $
 #
 # Alpha kernel with all the options you'd want, and more.
 
 include        "arch/alpha/conf/std.alpha"
 
-ident          "ALPHA-$Revision: 1.152 $"
+ident          "ALPHA-$Revision: 1.153 $"
 
 maxusers 32
 
@@ -58,6 +58,7 @@
 file-system    UMAPFS          # User-mapping file system layer
 file-system    PROCFS          # Process file system (/proc)
 file-system    UNION           # union file system
+file-system    CODA            # CODA distributed file system
 
 # File system options
 options        QUOTA           # User and group quotas for the FFS
@@ -68,8 +69,8 @@
 # Networking options
 options        INET            # Internet protocol suite
 options        INET6           # IPV6
-#options       IPSEC           # IP security
-#options       IPSEC_ESP       # IP security (encryption part; define w/IPSEC)
+options        IPSEC           # IP security
+options        IPSEC_ESP       # IP security (encryption part; define w/IPSEC)
 #options       IPSEC_DEBUG     # debug for IP security
 options        NS              # Xerox NS protocol suite
 options        ISO,TPIP,EON    # ISO protocol suite
@@ -226,6 +227,9 @@
 pci*   at      tsp?
 pci*   at      ttwopci?
 
+# AGP support
+agp*   at      irongate?
+
 # PCI devices
 adv*   at      pci? dev ? function ?           # AdvanSys SCSI
 adw*   at      pci? dev ? function ?           # AdvanSys Wide SCSI
@@ -513,3 +517,5 @@
 pseudo-device  sequencer       1       # MIDI sequencer
 pseudo-device  rnd                     # /dev/random and in-kernel generator
 #options       RND_COM                 # use "com" randomness too
+# a pseudo device needed for Coda      # also needs CODA (above)
+pseudo-device  vcoda           4       # coda minicache <-> venus comm.
diff -r 5113ef3de3c4 -r f78c8f4980d6 sys/arch/alpha/conf/GENERIC
--- a/sys/arch/alpha/conf/GENERIC       Sat Sep 15 04:31:40 2001 +0000
+++ b/sys/arch/alpha/conf/GENERIC       Sat Sep 15 04:33:37 2001 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: GENERIC,v 1.192 2001/09/01 21:52:23 atatat Exp $
+# $NetBSD: GENERIC,v 1.193 2001/09/15 04:33:37 thorpej Exp $
 #
 # Generic Alpha kernel.  Enough to get booted, etc., but not much more.
 #
@@ -6,7 +6,7 @@
 
 include        "arch/alpha/conf/std.alpha"
 
-#ident                 "GENERIC-$Revision: 1.192 $"
+#ident                 "GENERIC-$Revision: 1.193 $"
 
 maxusers 32
 
@@ -41,6 +41,11 @@
 #makeoptions   DEBUG="-g"
 #makeoptions   DEBUGLIST="pattern1 pattern2 ..."
 
+#options       KGDB                    # Remote kernel GDB support
+#options       "KGDB_DEVNAME=\"com\""  # device to use for KGDB
+#options       KGDB_DEVADDR=0x2f8      # at this address
+#options       KGDB_DEVRATE=57600      # at this comm. rate
+
 # File systems
 file-system    FFS             # Fast file system
 file-system    MFS             # Memory-based file system
@@ -206,6 +211,9 @@
 pci*   at      tsp?
 pci*   at      ttwopci?
 
+# AGP support
+agp*   at      irongate?
+
 # PCI devices
 adv*   at      pci? dev ? function ?           # AdvanSys SCSI
 adw*   at      pci? dev ? function ?           # AdvanSys Wide SCSI
diff -r 5113ef3de3c4 -r f78c8f4980d6 sys/arch/alpha/conf/files.alpha
--- a/sys/arch/alpha/conf/files.alpha   Sat Sep 15 04:31:40 2001 +0000
+++ b/sys/arch/alpha/conf/files.alpha   Sat Sep 15 04:33:37 2001 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: files.alpha,v 1.142 2001/08/23 01:16:52 nisimura Exp $
+# $NetBSD: files.alpha,v 1.143 2001/09/15 04:33:38 thorpej Exp $
 #
 # alpha-specific configuration info
 
@@ -240,6 +240,7 @@
 #
 
 include "dev/pci/files.pci"    # XXX some ISA devs are 'at pci' too.
+include "dev/pci/files.agp"
 include "dev/isa/files.isa"
 
 #
@@ -344,7 +345,7 @@
 file   arch/alpha/pci/dwlpx_dma.c      dwlpx
 file   arch/alpha/pci/dwlpx_pci.c      dwlpx
 
-device irongate: pcibus, isadma_bounce
+device irongate: pcibus, agpbus, agp_amd, isadma_bounce
 attach irongate at mainbus
 file   arch/alpha/pci/irongate.c               irongate
 file   arch/alpha/pci/irongate_bus_io.c        irongate
@@ -436,6 +437,7 @@
 #
 
 file   arch/alpha/pci/pci_machdep.c    pci
+file   arch/alpha/pci/agp_machdep.c    agp
 
 device sio: isabus, alpha_shared_intr, cy82c693
 attach sio at pci
diff -r 5113ef3de3c4 -r f78c8f4980d6 sys/arch/alpha/pci/irongate.c
--- a/sys/arch/alpha/pci/irongate.c     Sat Sep 15 04:31:40 2001 +0000
+++ b/sys/arch/alpha/pci/irongate.c     Sat Sep 15 04:33:37 2001 +0000
@@ -1,11 +1,11 @@
-/* $NetBSD: irongate.c,v 1.3 2000/11/29 06:29:10 thorpej Exp $ */
+/* $NetBSD: irongate.c,v 1.4 2001/09/15 04:33:39 thorpej Exp $ */
 
 /*-
- * Copyright (c) 2000 The NetBSD Foundation, Inc.
+ * Copyright (c) 2000, 2001 The NetBSD Foundation, Inc.
  * All rights reserved.
  *
  * This code is derived from software contributed to The NetBSD Foundation
- * by Jason R. Thorpe.
+ * by Jason R. Thorpe of Wasabi Systems, Inc.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -40,7 +40,7 @@
 
 #include <sys/cdefs.h>
 
-__KERNEL_RCSID(0, "$NetBSD: irongate.c,v 1.3 2000/11/29 06:29:10 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: irongate.c,v 1.4 2001/09/15 04:33:39 thorpej Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -55,6 +55,7 @@
 #include <dev/isa/isavar.h>
 #include <dev/pci/pcireg.h>
 #include <dev/pci/pcivar.h>
+#include <dev/pci/agpvar.h>
 
 #include <alpha/pci/irongatereg.h>
 #include <alpha/pci/irongatevar.h>
@@ -141,6 +142,8 @@
        struct irongate_softc *sc = (void *) self;
        struct irongate_config *icp;
        struct pcibus_attach_args pba;
+       struct agpbus_attach_args apa;
+       pcitag_t tag;
 
        /* Note that we've attached the chipset; can't have 2 Irongates. */
        irongate_found = 1;
@@ -174,6 +177,37 @@
                panic("irongate_attach: shouldn't be here, really...");
        }
 
+       tag = pci_make_tag(&icp->ic_pc, 0, IRONGATE_PCIHOST_DEV, 0);
+
+       pba.pba_busname = "pci";
+       pba.pba_iot = &icp->ic_iot;
+       pba.pba_memt = &icp->ic_memt;
+       pba.pba_dmat =
+           alphabus_dma_get_tag(&icp->ic_dmat_pci, ALPHA_BUS_PCI);
+       pba.pba_pc = &icp->ic_pc;
+       pba.pba_bus = 0;
+       pba.pba_flags = PCI_FLAGS_IO_ENABLED | PCI_FLAGS_MEM_ENABLED |
+           PCI_FLAGS_MRL_OKAY | PCI_FLAGS_MRM_OKAY | PCI_FLAGS_MWI_OKAY;
+
+       if (pci_get_capability(&icp->ic_pc, tag, PCI_CAP_AGP,
+           NULL, NULL) != 0) {
+               apa.apa_busname = "agp";
+               apa.apa_pci_args.pa_iot = pba.pba_iot;
+               apa.apa_pci_args.pa_memt = pba.pba_memt;
+               apa.apa_pci_args.pa_pc = pba.pba_pc;
+               apa.apa_pci_args.pa_bus = pba.pba_bus;
+               apa.apa_pci_args.pa_device = IRONGATE_PCIHOST_DEV;
+               apa.apa_pci_args.pa_function = 0;
+               apa.apa_pci_args.pa_tag = tag;
+               apa.apa_pci_args.pa_id =
+                   irongate_conf_read0(icp, tag, PCI_ID_REG);
+               apa.apa_pci_args.pa_class =
+                   irongate_conf_read0(icp, tag, PCI_CLASS_REG);
+               apa.apa_pci_args.pa_flags = pba.pba_flags;
+
+               config_found(self, &apa, irongate_print);
+       }
+
        pba.pba_busname = "pci";
        pba.pba_iot = &icp->ic_iot;
        pba.pba_memt = &icp->ic_memt;
@@ -194,7 +228,8 @@
        /* Only PCIs can attach to Irongates; easy. */
        if (pnp != NULL)
                printf("%s at %s", pba->pba_busname, pnp);
-       printf(" bus %d", pba->pba_bus);
+       if (strcmp(pba->pba_busname, "pci") == 0)
+               printf(" bus %d", pba->pba_bus);
        return (UNCONF);
 }
 



Home | Main Index | Thread Index | Old Index