From owner-p4-projects@FreeBSD.ORG Mon Oct 11 21:44:11 2004 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 25DA916A4D1; Mon, 11 Oct 2004 21:44:11 +0000 (GMT) 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 DFB7E16A4CE for ; Mon, 11 Oct 2004 21:44:10 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id C610643D39 for ; Mon, 11 Oct 2004 21:44:10 +0000 (GMT) (envelope-from peter@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.11/8.12.11) with ESMTP id i9BLiAv9094252 for ; Mon, 11 Oct 2004 21:44:10 GMT (envelope-from peter@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.11/8.12.11/Submit) id i9BLiA8I094249 for perforce@freebsd.org; Mon, 11 Oct 2004 21:44:10 GMT (envelope-from peter@freebsd.org) Date: Mon, 11 Oct 2004 21:44:10 GMT Message-Id: <200410112144.i9BLiA8I094249@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to peter@freebsd.org using -f From: Peter Wemm To: Perforce Change Reviews Subject: PERFORCE change 63019 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Oct 2004 21:44:11 -0000 http://perforce.freebsd.org/chv.cgi?CH=63019 Change 63019 by peter@peter_daintree on 2004/10/11 21:43:50 integ -I -b i386_hammer Affected files ... .. //depot/projects/hammer/sys/amd64/acpica/acpi_machdep.c#19 integrate .. //depot/projects/hammer/sys/amd64/include/acpica_machdep.h#13 integrate .. //depot/projects/hammer/sys/amd64/isa/pbio.c#2 integrate .. //depot/projects/hammer/sys/amd64/pci/pci_bus.c#23 integrate Differences ... ==== //depot/projects/hammer/sys/amd64/acpica/acpi_machdep.c#19 (text+ko) ==== ==== //depot/projects/hammer/sys/amd64/include/acpica_machdep.h#13 (text+ko) ==== ==== //depot/projects/hammer/sys/amd64/isa/pbio.c#2 (text+ko) ==== @@ -29,7 +29,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/i386/isa/pbio.c,v 1.4 2004/10/10 03:26:20 imp Exp $"); +__FBSDID("$FreeBSD: src/sys/i386/isa/pbio.c,v 1.5 2004/10/11 00:58:24 imp Exp $"); #include #include @@ -113,7 +113,6 @@ * One of these per allocated device */ struct pbio_softc { - int iobase; /* I/O base */ struct portdata pd[PBIO_NPORTS];/* Per port data */ int iomode; /* Virtualized I/O mode port value */ /* The real port is write-only */ @@ -186,7 +185,7 @@ /* Set all ports to output */ pboutb(scp, PBIO_CFG, 0x80); printf("pbio val(CFG: 0x%03x)=0x%02x (should be 0x80)\n", - iobase, pbinb(scp, PBIO_CFG)); + rman_get_start(scp->res), pbinb(scp, PBIO_CFG)); pboutb(scp, PBIO_PORTA, 0xa5); val = pbinb(scp, PBIO_PORTA); printf("pbio val=0x%02x (should be 0xa5)\n", val); @@ -221,7 +220,6 @@ int i; int rid; struct pbio_softc *sc; - int flags, i, iobase, rid, unit; sc = device_get_softc(dev); unit = device_get_unit(dev); @@ -403,7 +401,7 @@ pbiowrite(struct cdev *dev, struct uio *uio, int ioflag) { struct pbio_softc *scp; - int i, iobase, port, ret, towrite, unit; + int i, port, ret, towrite, unit; char val, oval; unit = UNIT(dev); ==== //depot/projects/hammer/sys/amd64/pci/pci_bus.c#23 (text+ko) ==== @@ -35,6 +35,7 @@ #include #include #include +#include #include #include @@ -263,6 +264,16 @@ return ENOENT; } +SYSCTL_DECL(_hw_pci); + +static int legacy_host_mem_start = 0x80000000; +/* No TUNABLE_ULONG :-( */ +TUNABLE_INT("hw.pci.host_mem_start", &legacy_host_mem_start); +SYSCTL_INT(_hw_pci, OID_AUTO, host_mem_start, CTLFLAG_RDTUN, + &legacy_host_mem_start, 0x80000000, + "Limit the host bridge memory to being above this address. Must be\n\ +set at boot via a tunable."); + static struct resource * legacy_pcib_alloc_resource(device_t dev, device_t child, int type, int *rid, u_long start, u_long end, u_long count, u_int flags) @@ -275,9 +286,12 @@ * found to do it. This is typically only used on older laptops * that don't have pci busses behind pci bridge, so assuming > 32MB * is liekly OK. + * + * However, this can cause problems for other chipsets, so we make + * this tunable by hw.pci.host_mem_start. */ if (type == SYS_RES_MEMORY && start == 0UL && end == ~0UL) - start = 0xfe000000; + start = legacy_host_mem_start; return (bus_generic_alloc_resource(dev, child, type, rid, start, end, count, flags)); }