Don't map the aperture into KVA, it isn't needed.

This commit is contained in:
fvdl 2001-10-01 21:54:48 +00:00
parent db2a0203e7
commit 9706e581b2
3 changed files with 14 additions and 10 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: agp.c,v 1.10 2001/09/16 18:33:08 thorpej Exp $ */
/* $NetBSD: agp.c,v 1.11 2001/10/01 21:54:48 fvdl Exp $ */
/*-
* Copyright (c) 2000 Doug Rabson
@ -138,6 +138,8 @@ const struct agp_product {
NULL, agp_i810_attach },
{ PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_82815_FULL_HUB,
NULL, agp_i810_attach },
{ PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_82840_HB,
NULL, agp_i810_attach },
#endif
#if NAGP_INTEL > 0
@ -280,13 +282,16 @@ int
agp_map_aperture(struct pci_attach_args *pa, struct agp_softc *sc)
{
/*
* Find and map the aperture.
* Find and the aperture. Don't map it (yet), this would
* eat KVA.
*/
if (pci_mapreg_map(pa, AGP_APBASE, PCI_MAPREG_TYPE_MEM,
BUS_SPACE_MAP_LINEAR,
&sc->as_apt, &sc->as_aph, &sc->as_apaddr, &sc->as_apsize) != 0)
if (pci_mapreg_info(pa->pa_pc, pa->pa_tag, AGP_APBASE,
PCI_MAPREG_TYPE_MEM, &sc->as_apaddr, &sc->as_apsize,
&sc->as_apflags) != 0)
return ENXIO;
sc->as_apt = pa->pa_memt;
return 0;
}
@ -872,7 +877,6 @@ agp_get_info(void *devcookie, struct agp_info *info)
sc->as_capoff + AGP_STATUS);
info->ai_aperture_base = sc->as_apaddr;
info->ai_aperture_size = sc->as_apsize; /* XXXfvdl inconsistent */
info->ai_aperture_vaddr = bus_space_vaddr(sc->as_apt, sc->as_aph);
info->ai_memory_allowed = sc->as_maxmem;
info->ai_memory_used = sc->as_allocated;
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: agp_amd.c,v 1.4 2001/10/01 14:41:09 fvdl Exp $ */
/* $NetBSD: agp_amd.c,v 1.5 2001/10/01 21:54:48 fvdl Exp $ */
/*-
* Copyright (c) 2000 Doug Rabson
@ -156,6 +156,7 @@ agp_amd_match(const struct pci_attach_args *pa)
switch (PCI_PRODUCT(pa->pa_id)) {
case PCI_PRODUCT_AMD_SC751_SC:
case PCI_PRODUCT_AMD_SC762_NB:
return 1;
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: agpvar.h,v 1.3 2001/09/15 00:25:00 thorpej Exp $ */
/* $NetBSD: agpvar.h,v 1.4 2001/10/01 21:54:48 fvdl Exp $ */
/*-
* Copyright (c) 2000 Doug Rabson
@ -56,7 +56,6 @@ struct agp_info {
u_int32_t ai_mode;
bus_addr_t ai_aperture_base;
bus_size_t ai_aperture_size;
void * ai_aperture_vaddr;
vsize_t ai_memory_allowed;
vsize_t ai_memory_used;
u_int32_t ai_devid;
@ -132,10 +131,10 @@ struct agp_methods {
struct agp_softc {
struct device as_dev;
bus_space_tag_t as_apt;
bus_space_handle_t as_aph;
int as_capoff;
bus_addr_t as_apaddr;
bus_size_t as_apsize;
int as_apflags;
bus_dma_tag_t as_dmat;
u_int32_t as_maxmem; /* allocation upper bound */
u_int32_t as_allocated; /* amount allocated */