Date: Mon, 11 Oct 2004 21:44:10 GMT From: Peter Wemm <peter@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 63019 for review Message-ID: <200410112144.i9BLiA8I094249@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
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 <sys/cdefs.h> -__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 <sys/param.h> #include <sys/systm.h> @@ -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 <sys/kernel.h> #include <sys/malloc.h> #include <sys/module.h> +#include <sys/sysctl.h> #include <dev/pci/pcivar.h> #include <dev/pci/pcireg.h> @@ -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)); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200410112144.i9BLiA8I094249>