From owner-p4-projects@FreeBSD.ORG Wed Apr 5 00:37:56 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 0F32516A423; Wed, 5 Apr 2006 00:37:56 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A487516A401 for ; Wed, 5 Apr 2006 00:37:55 +0000 (UTC) (envelope-from jmg@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id A897043D62 for ; Wed, 5 Apr 2006 00:37:52 +0000 (GMT) (envelope-from jmg@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k350bqag075376 for ; Wed, 5 Apr 2006 00:37:52 GMT (envelope-from jmg@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k350bq17075367 for perforce@freebsd.org; Wed, 5 Apr 2006 00:37:52 GMT (envelope-from jmg@freebsd.org) Date: Wed, 5 Apr 2006 00:37:52 GMT Message-Id: <200604050037.k350bq17075367@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jmg@freebsd.org using -f From: John-Mark Gurney To: Perforce Change Reviews Cc: Subject: PERFORCE change 94652 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Apr 2006 00:37:56 -0000 http://perforce.freebsd.org/chv.cgi?CH=94652 Change 94652 by jmg@jmg_arlene on 2006/04/05 00:37:00 make compile.. pulling in ofw_pci_if.m for a define for ranges... make asi fetch/store work make hv_pci.c compile... Affected files ... .. //depot/projects/kmacy_sun4v/src/sys/conf/files.sun4v#11 edit .. //depot/projects/kmacy_sun4v/src/sys/sun4v/include/bus.h#6 edit .. //depot/projects/kmacy_sun4v/src/sys/sun4v/include/cpufunc.h#6 edit .. //depot/projects/kmacy_sun4v/src/sys/sun4v/sun4v/hv_pci.c#20 edit Differences ... ==== //depot/projects/kmacy_sun4v/src/sys/conf/files.sun4v#11 (text+ko) ==== @@ -52,6 +52,7 @@ eeprom sbus sun4v/sun4v/gdb_machdep.c optional gdb sun4v/sun4v/hv_pci.c optional pci +sparc64/pci/ofw_pci_if.m optional pci # XXX hvcons should be optional sun4v/sun4v/hvcons.c standard sun4v/sun4v/hcall.S standard ==== //depot/projects/kmacy_sun4v/src/sys/sun4v/include/bus.h#6 (text+ko) ==== ==== //depot/projects/kmacy_sun4v/src/sys/sun4v/include/cpufunc.h#6 (text+ko) ==== @@ -116,7 +116,7 @@ #define lduwa(va, asi) LD_GENERIC(va, asi, lduwa, u_int) #define ldxa(va, asi) LD_GENERIC(va, asi, ldxa, u_long) -#if 1 +#if 0 #define STNC_GEN(tp, o) \ static __inline void \ o ## _nc(caddr_t va, int asi, tp val) \ ==== //depot/projects/kmacy_sun4v/src/sys/sun4v/sun4v/hv_pci.c#20 (text+ko) ==== @@ -38,23 +38,23 @@ #include #include #include +#include #include #include #include -#include #include #include #include #include +#include #include #include "pcib_if.h" -#include #define SUN4V_REG_SPEC2CFG_HDL(x) ((x >> 32) & ~(0xfull << 28)) /* * XXX - should get this through the bus, but Sun overloaded the reg OFW @@ -146,7 +146,7 @@ uint64_t reg, nreg; int br[2]; int n, type; - int i, nrange, rid; + int i, nrange; sc = device_get_softc(dev); @@ -163,7 +163,7 @@ sc->hs_busnum = br[0]; /* Setup the HyperVisor devhandle for this bus */ -#if 1 +#if 0 if (OF_getprop(node, "reg", &cell, sizeof cell) == -1) panic("%s: OF_getprop failed.", __func__); sc->hs_devhandle = cell & 0xfffffff; @@ -214,8 +214,8 @@ *btp = (bus_space_tag_t)malloc(sizeof **btp, M_DEVBUF, M_WAITOK|M_ZERO); - btp->bst_parent = &nexus_bustag; - btp->bst_type = type; + (*btp)->bst_parent = &nexus_bustag; + (*btp)->bst_type = type; } device_add_child(dev, "pci", -1); @@ -383,21 +383,21 @@ bus_space_handle_t bh; int needactivate; - sc = device_get_softc(dev); + sc = device_get_softc(bus); needactivate = flags & RF_ACTIVE; flags &= ~RF_ACTIVE; switch (type) { case SYS_RES_MEMORY: - rm = &sc->sc_pci_mem_rman; - bt = sc->sc_pci_memt; - bh = sc->sc_pci_memh; + rm = &sc->hs_pci_mem_rman; + bt = sc->hs_pci_memt; + bh = sc->hs_pci_memh; break; case SYS_RES_IOPORT: - rm = &sc->sc_pci_io_rman; - bt = sc->sc_pci_iot; - bh = sc->sc_pci_ioh; + rm = &sc->hs_pci_io_rman; + bt = sc->hs_pci_iot; + bh = sc->hs_pci_ioh; break; default: return (NULL); @@ -425,6 +425,7 @@ hvpci_activate_resource(device_t bus, device_t child, int type, int rid, struct resource *r) { +#if 0 void *p; int error; @@ -440,6 +441,9 @@ rman_set_virtual(r, p); } return (rman_activate_resource(r)); +#else + return (ENXIO); +#endif } static int