diff options
author | jake <jake@FreeBSD.org> | 2003-03-25 00:07:06 +0000 |
---|---|---|
committer | jake <jake@FreeBSD.org> | 2003-03-25 00:07:06 +0000 |
commit | 783ae539c3e44d35afb500b405ff986b3033bc4a (patch) | |
tree | 553401a4d58eb98b1e208a82c3ba2c32b848a225 /sys/dev | |
parent | 0079e3d786d0b0a2647229d3498a426a039a5016 (diff) | |
download | FreeBSD-src-783ae539c3e44d35afb500b405ff986b3033bc4a.zip FreeBSD-src-783ae539c3e44d35afb500b405ff986b3033bc4a.tar.gz |
- Add vm_paddr_t, a physical address type. This is required for systems
where physical addresses larger than virtual addresses, such as i386s
with PAE.
- Use this to represent physical addresses in the MI vm system and in the
i386 pmap code. This also changes the paddr parameter to d_mmap_t.
- Fix printf formats to handle physical addresses >4G in the i386 memory
detection code, and due to kvtop returning vm_paddr_t instead of u_long.
Note that this is a name change only; vm_paddr_t is still the same as
vm_offset_t on all currently supported platforms.
Sponsored by: DARPA, Network Associates Laboratories
Discussed with: re, phk (cdevsw change)
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/agp/agp.c | 2 | ||||
-rw-r--r-- | sys/dev/bktr/bktr_os.c | 2 | ||||
-rw-r--r-- | sys/dev/drm/drm_vm.h | 4 | ||||
-rw-r--r-- | sys/dev/ed/if_ed.c | 4 | ||||
-rw-r--r-- | sys/dev/ed/if_ed_cbus.c | 8 | ||||
-rw-r--r-- | sys/dev/fb/fb.c | 2 | ||||
-rw-r--r-- | sys/dev/fb/fbreg.h | 2 | ||||
-rw-r--r-- | sys/dev/fb/vga.c | 2 | ||||
-rw-r--r-- | sys/dev/gfb/gfb_pci.c | 2 | ||||
-rw-r--r-- | sys/dev/sound/pcm/dsp.c | 2 | ||||
-rw-r--r-- | sys/dev/syscons/syscons.c | 2 | ||||
-rw-r--r-- | sys/dev/tdfx/tdfx_pci.c | 2 |
12 files changed, 17 insertions, 17 deletions
diff --git a/sys/dev/agp/agp.c b/sys/dev/agp/agp.c index 8c59946..5ff2446 100644 --- a/sys/dev/agp/agp.c +++ b/sys/dev/agp/agp.c @@ -716,7 +716,7 @@ agp_ioctl(dev_t kdev, u_long cmd, caddr_t data, int fflag, struct thread *td) } static int -agp_mmap(dev_t kdev, vm_offset_t offset, vm_offset_t *paddr, int prot) +agp_mmap(dev_t kdev, vm_offset_t offset, vm_paddr_t *paddr, int prot) { device_t dev = KDEV2DEV(kdev); struct agp_softc *sc = device_get_softc(dev); diff --git a/sys/dev/bktr/bktr_os.c b/sys/dev/bktr/bktr_os.c index c088510..22b1458 100644 --- a/sys/dev/bktr/bktr_os.c +++ b/sys/dev/bktr/bktr_os.c @@ -749,7 +749,7 @@ bktr_ioctl( dev_t dev, ioctl_cmd_t cmd, caddr_t arg, int flag, struct thread *td * */ static int -bktr_mmap( dev_t dev, vm_offset_t offset, vm_offset_t *paddr, int nprot ) +bktr_mmap( dev_t dev, vm_offset_t offset, vm_paddr_t *paddr, int nprot ) { int unit; bktr_ptr_t bktr; diff --git a/sys/dev/drm/drm_vm.h b/sys/dev/drm/drm_vm.h index a2ea15d..40fcb7b 100644 --- a/sys/dev/drm/drm_vm.h +++ b/sys/dev/drm/drm_vm.h @@ -3,7 +3,7 @@ */ #if defined(__FreeBSD__) && __FreeBSD_version >= 500102 -static int DRM(dma_mmap)(dev_t kdev, vm_offset_t offset, vm_offset_t *paddr, +static int DRM(dma_mmap)(dev_t kdev, vm_offset_t offset, vm_paddr_t *paddr, int prot) #elif defined(__FreeBSD__) static int DRM(dma_mmap)(dev_t kdev, vm_offset_t offset, int prot) @@ -32,7 +32,7 @@ static paddr_t DRM(dma_mmap)(dev_t kdev, vm_offset_t offset, int prot) } #if defined(__FreeBSD__) && __FreeBSD_version >= 500102 -int DRM(mmap)(dev_t kdev, vm_offset_t offset, vm_offset_t *paddr, +int DRM(mmap)(dev_t kdev, vm_offset_t offset, vm_paddr_t *paddr, int prot) #elif defined(__FreeBSD__) int DRM(mmap)(dev_t kdev, vm_offset_t offset, int prot) diff --git a/sys/dev/ed/if_ed.c b/sys/dev/ed/if_ed.c index 8d1c849..c84daf3 100644 --- a/sys/dev/ed/if_ed.c +++ b/sys/dev/ed/if_ed.c @@ -568,7 +568,7 @@ ed_probe_WD80x3_generic(dev, flags, intr_vals) for (i = 0; i < memsize; ++i) { if (sc->mem_start[i]) { - device_printf(dev, "failed to clear shared memory at %lx - check configuration\n", + device_printf(dev, "failed to clear shared memory at %x - check configuration\n", kvtop(sc->mem_start + i)); /* @@ -903,7 +903,7 @@ ed_probe_3Com(dev, port_rid, flags) for (i = 0; i < memsize; ++i) if (sc->mem_start[i]) { - device_printf(dev, "failed to clear shared memory at %lx - check configuration\n", + device_printf(dev, "failed to clear shared memory at %x - check configuration\n", kvtop(sc->mem_start + i)); return (ENXIO); } diff --git a/sys/dev/ed/if_ed_cbus.c b/sys/dev/ed/if_ed_cbus.c index b3be8d5..624c2da 100644 --- a/sys/dev/ed/if_ed_cbus.c +++ b/sys/dev/ed/if_ed_cbus.c @@ -939,7 +939,7 @@ ed_probe_SIC98(dev, port_rid, flags) for (i = 0; i < sc->mem_size; i++) { if (sc->mem_start[i]) { device_printf(dev, "failed to clear shared memory " - "at %lx - check configuration\n", + "at %x - check configuration\n", kvtop(sc->mem_start + i)); return (ENXIO); @@ -1112,7 +1112,7 @@ ed_probe_CNET98(dev, port_rid, flags) /* Check window area address */ tmp_s = kvtop(sc->mem_start) >> 12; if (tmp_s < 0x80) { - device_printf(dev, "Please change window address(0x%lx)\n", + device_printf(dev, "Please change window address(0x%x)\n", kvtop(sc->mem_start)); return (ENXIO); } @@ -1121,7 +1121,7 @@ ed_probe_CNET98(dev, port_rid, flags) tmp = rman_get_start(sc->port_res) >> 12; if ((tmp_s <= tmp) && (tmp < (tmp_s + 4))) { device_printf(dev, "Please change iobase address(0x%lx) " - "or window address(0x%lx)\n", + "or window address(0x%x)\n", rman_get_start(sc->port_res), kvtop(sc->mem_start)); return (ENXIO); } @@ -1173,7 +1173,7 @@ ed_probe_CNET98(dev, port_rid, flags) for (i = 0; i < sc->mem_size; i++) { if (sc->mem_start[i]) { device_printf(dev, "failed to clear shared memory " - "at %lx - check configuration\n", + "at %x - check configuration\n", kvtop(sc->mem_start + i)); return (ENXIO); diff --git a/sys/dev/fb/fb.c b/sys/dev/fb/fb.c index 073ffd8..8dd9da8 100644 --- a/sys/dev/fb/fb.c +++ b/sys/dev/fb/fb.c @@ -498,7 +498,7 @@ fbioctl(dev_t dev, u_long cmd, caddr_t arg, int flag, struct thread *td) } static int -fbmmap(dev_t dev, vm_offset_t offset, vm_offset_t *paddr, int nprot) +fbmmap(dev_t dev, vm_offset_t offset, vm_paddr_t *paddr, int nprot) { int unit; diff --git a/sys/dev/fb/fbreg.h b/sys/dev/fb/fbreg.h index ce9869e..c607337 100644 --- a/sys/dev/fb/fbreg.h +++ b/sys/dev/fb/fbreg.h @@ -82,7 +82,7 @@ typedef int vi_blank_display_t(video_adapter_t *adp, int mode); #define V_DISPLAY_SUSPEND 3 */ typedef int vi_mmap_t(video_adapter_t *adp, vm_offset_t offset, - vm_offset_t *paddr, int prot); + vm_paddr_t *paddr, int prot); typedef int vi_ioctl_t(video_adapter_t *adp, u_long cmd, caddr_t data); typedef int vi_clear_t(video_adapter_t *adp); typedef int vi_fill_rect_t(video_adapter_t *adp, int val, int x, int y, diff --git a/sys/dev/fb/vga.c b/sys/dev/fb/vga.c index 358bc32..410b1f5 100644 --- a/sys/dev/fb/vga.c +++ b/sys/dev/fb/vga.c @@ -2449,7 +2449,7 @@ vga_blank_display(video_adapter_t *adp, int mode) * all adapters */ static int -vga_mmap_buf(video_adapter_t *adp, vm_offset_t offset, vm_offset_t *paddr, +vga_mmap_buf(video_adapter_t *adp, vm_offset_t offset, vm_paddr_t *paddr, int prot) { if (adp->va_info.vi_flags & V_INFO_LINEAR) diff --git a/sys/dev/gfb/gfb_pci.c b/sys/dev/gfb/gfb_pci.c index 904f536..5fc9f42 100644 --- a/sys/dev/gfb/gfb_pci.c +++ b/sys/dev/gfb/gfb_pci.c @@ -313,7 +313,7 @@ pcigfb_ioctl(dev_t dev, u_long cmd, caddr_t arg, int flag, struct thread *td) } int -pcigfb_mmap(dev_t dev, vm_offset_t offset, vm_offset_t *paddr, int prot) +pcigfb_mmap(dev_t dev, vm_offset_t offset, vm_paddr_t *paddr, int prot) { struct gfb_softc *sc; diff --git a/sys/dev/sound/pcm/dsp.c b/sys/dev/sound/pcm/dsp.c index 838028c..65ff150 100644 --- a/sys/dev/sound/pcm/dsp.c +++ b/sys/dev/sound/pcm/dsp.c @@ -986,7 +986,7 @@ dsp_poll(dev_t i_dev, int events, struct thread *td) } static int -dsp_mmap(dev_t i_dev, vm_offset_t offset, vm_offset_t *paddr, int nprot) +dsp_mmap(dev_t i_dev, vm_offset_t offset, vm_paddr_t *paddr, int nprot) { struct pcm_channel *wrch = NULL, *rdch = NULL, *c; intrmask_t s; diff --git a/sys/dev/syscons/syscons.c b/sys/dev/syscons/syscons.c index 88c59e8..e966885 100644 --- a/sys/dev/syscons/syscons.c +++ b/sys/dev/syscons/syscons.c @@ -3365,7 +3365,7 @@ next_code: } static int -scmmap(dev_t dev, vm_offset_t offset, vm_offset_t *paddr, int nprot) +scmmap(dev_t dev, vm_offset_t offset, vm_paddr_t *paddr, int nprot) { scr_stat *scp; diff --git a/sys/dev/tdfx/tdfx_pci.c b/sys/dev/tdfx/tdfx_pci.c index 6349751..74d3824 100644 --- a/sys/dev/tdfx/tdfx_pci.c +++ b/sys/dev/tdfx/tdfx_pci.c @@ -434,7 +434,7 @@ tdfx_close(dev_t dev, int fflag, int devtype, struct thread *td) } static int -tdfx_mmap(dev_t dev, vm_offset_t offset, vm_offset_t *paddr, int nprot) +tdfx_mmap(dev_t dev, vm_offset_t offset, vm_paddr_t *paddr, int nprot) { /* * mmap(2) is called by a user process to request that an area of memory |