summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authormdodd <mdodd@FreeBSD.org>2001-12-19 08:54:29 +0000
committermdodd <mdodd@FreeBSD.org>2001-12-19 08:54:29 +0000
commit5b5d5e85fce1c8f79ca613de362330e9d6d8a183 (patch)
tree30cfe7cf057000e62769bab0eac8762c14bc0d38 /sys
parentc6b070b1734f667835308989231ba4936dbd525f (diff)
downloadFreeBSD-src-5b5d5e85fce1c8f79ca613de362330e9d6d8a183.zip
FreeBSD-src-5b5d5e85fce1c8f79ca613de362330e9d6d8a183.tar.gz
Allow retrieval of the virtual address of the AGP aperture
using agp_get_info(). MFC after: 1 week
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/agp/agp.c1
-rw-r--r--sys/dev/agp/agpvar.h1
-rw-r--r--sys/pci/agp.c1
-rw-r--r--sys/pci/agpvar.h1
4 files changed, 4 insertions, 0 deletions
diff --git a/sys/dev/agp/agp.c b/sys/dev/agp/agp.c
index a938055..b16d1ee 100644
--- a/sys/dev/agp/agp.c
+++ b/sys/dev/agp/agp.c
@@ -743,6 +743,7 @@ agp_get_info(device_t dev, struct agp_info *info)
pci_read_config(dev, agp_find_caps(dev) + AGP_STATUS, 4);
info->ai_aperture_base = rman_get_start(sc->as_aperture);
info->ai_aperture_size = rman_get_size(sc->as_aperture);
+ info->ai_aperture_va = (vm_offset_t) rman_get_virtual(sc->as_aperture);
info->ai_memory_allowed = sc->as_maxmem;
info->ai_memory_used = sc->as_allocated;
}
diff --git a/sys/dev/agp/agpvar.h b/sys/dev/agp/agpvar.h
index df3112b..0869c26 100644
--- a/sys/dev/agp/agpvar.h
+++ b/sys/dev/agp/agpvar.h
@@ -47,6 +47,7 @@ struct agp_info {
u_int32_t ai_mode;
vm_offset_t ai_aperture_base;
vm_size_t ai_aperture_size;
+ vm_offset_t ai_aperture_va;
vm_size_t ai_memory_allowed;
vm_size_t ai_memory_used;
u_int32_t ai_devid;
diff --git a/sys/pci/agp.c b/sys/pci/agp.c
index a938055..b16d1ee 100644
--- a/sys/pci/agp.c
+++ b/sys/pci/agp.c
@@ -743,6 +743,7 @@ agp_get_info(device_t dev, struct agp_info *info)
pci_read_config(dev, agp_find_caps(dev) + AGP_STATUS, 4);
info->ai_aperture_base = rman_get_start(sc->as_aperture);
info->ai_aperture_size = rman_get_size(sc->as_aperture);
+ info->ai_aperture_va = (vm_offset_t) rman_get_virtual(sc->as_aperture);
info->ai_memory_allowed = sc->as_maxmem;
info->ai_memory_used = sc->as_allocated;
}
diff --git a/sys/pci/agpvar.h b/sys/pci/agpvar.h
index df3112b..0869c26 100644
--- a/sys/pci/agpvar.h
+++ b/sys/pci/agpvar.h
@@ -47,6 +47,7 @@ struct agp_info {
u_int32_t ai_mode;
vm_offset_t ai_aperture_base;
vm_size_t ai_aperture_size;
+ vm_offset_t ai_aperture_va;
vm_size_t ai_memory_allowed;
vm_size_t ai_memory_used;
u_int32_t ai_devid;
OpenPOWER on IntegriCloud