Index: alpha/alpha/mem.c =================================================================== RCS file: /home/ncvs/src/sys/alpha/alpha/mem.c,v retrieving revision 1.43 diff -u -r1.43 mem.c --- alpha/alpha/mem.c 3 Mar 2003 12:15:38 -0000 1.43 +++ alpha/alpha/mem.c 22 Mar 2003 04:34:23 -0000 @@ -218,7 +218,7 @@ * instead of going through read/write * \*******************************************************/ static int -memmmap(dev_t dev, vm_offset_t offset, vm_offset_t *paddr, int prot) +memmmap(dev_t dev, vm_offset_t offset, vm_paddr_t *paddr, int prot) { /* * /dev/mem is the only one that makes sense through this Index: alpha/include/_types.h =================================================================== RCS file: /home/ncvs/src/sys/alpha/include/_types.h,v retrieving revision 1.3 diff -u -r1.3 _types.h --- alpha/include/_types.h 8 Feb 2003 20:37:54 -0000 1.3 +++ alpha/include/_types.h 22 Mar 2003 04:34:23 -0000 @@ -89,6 +89,7 @@ typedef __uint64_t __u_register_t; typedef __uint64_t __vm_offset_t; typedef __int64_t __vm_ooffset_t; +typedef __uint64_t __vm_paddr_t; typedef __uint64_t __vm_pindex_t; typedef __uint64_t __vm_size_t; Index: arm/include/_types.h =================================================================== RCS file: /home/ncvs/src/sys/arm/include/_types.h,v retrieving revision 1.2 diff -u -r1.2 _types.h --- arm/include/_types.h 23 Aug 2002 16:49:04 -0000 1.2 +++ arm/include/_types.h 22 Mar 2003 04:34:23 -0000 @@ -95,6 +95,7 @@ typedef __uint32_t __u_register_t; typedef __uint32_t __vm_offset_t; typedef __int64_t __vm_ooffset_t; +typedef __uint32_t __vm_paddr_t; typedef __uint64_t __vm_pindex_t; typedef __uint32_t __vm_size_t; Index: dev/aic7xxx/aic7xxx.c =================================================================== RCS file: /home/ncvs/src/sys/dev/aic7xxx/aic7xxx.c,v retrieving revision 1.88 diff -u -r1.88 aic7xxx.c --- dev/aic7xxx/aic7xxx.c 20 Jan 2003 20:44:55 -0000 1.88 +++ dev/aic7xxx/aic7xxx.c 22 Mar 2003 04:34:23 -0000 @@ -4600,7 +4600,9 @@ /* DMA tag for mapping buffers into device visible space. */ if (ahc_dma_tag_create(ahc, ahc->parent_dmat, /*alignment*/1, /*boundary*/BUS_SPACE_MAXADDR_32BIT + 1, - /*lowaddr*/BUS_SPACE_MAXADDR, + /*lowaddr*/ahc->flags & AHC_39BIT_ADDRESSING + ? (bus_addr_t)0x7FFFFFFFFFULL + : BUS_SPACE_MAXADDR_32BIT, /*highaddr*/BUS_SPACE_MAXADDR, /*filter*/NULL, /*filterarg*/NULL, /*maxsize*/(AHC_NSEG - 1) * PAGE_SIZE, Index: dev/aic7xxx/aic7xxx_osm.c =================================================================== RCS file: /home/ncvs/src/sys/dev/aic7xxx/aic7xxx_osm.c,v retrieving revision 1.31 diff -u -r1.31 aic7xxx_osm.c --- dev/aic7xxx/aic7xxx_osm.c 30 Nov 2002 19:08:58 -0000 1.31 +++ dev/aic7xxx/aic7xxx_osm.c 22 Mar 2003 04:34:23 -0000 @@ -1386,7 +1386,8 @@ panic("ahc_setup_data - Transfer size " "larger than can device max"); - seg.ds_addr = (bus_addr_t)csio->data_ptr; + seg.ds_addr = + (bus_addr_t)(vm_offset_t)csio->data_ptr; seg.ds_len = csio->dxfer_len; ahc_execute_scb(scb, &seg, 1, 0); } Index: dev/bktr/bktr_os.c =================================================================== RCS file: /home/ncvs/src/sys/dev/bktr/bktr_os.c,v retrieving revision 1.33 diff -u -r1.33 bktr_os.c --- dev/bktr/bktr_os.c 3 Mar 2003 12:15:41 -0000 1.33 +++ dev/bktr/bktr_os.c 22 Mar 2003 04:34:23 -0000 @@ -749,7 +749,7 @@ * */ 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; Index: dev/drm/drm_vm.h =================================================================== RCS file: /home/ncvs/src/sys/dev/drm/drm_vm.h,v retrieving revision 1.4 diff -u -r1.4 drm_vm.h --- dev/drm/drm_vm.h 9 Mar 2003 02:08:28 -0000 1.4 +++ dev/drm/drm_vm.h 22 Mar 2003 04:34:23 -0000 @@ -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 @@ } #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) Index: dev/ed/if_ed.c =================================================================== RCS file: /home/ncvs/src/sys/dev/ed/if_ed.c,v retrieving revision 1.215 diff -u -r1.215 if_ed.c --- dev/ed/if_ed.c 19 Feb 2003 05:47:03 -0000 1.215 +++ dev/ed/if_ed.c 22 Mar 2003 04:34:23 -0000 @@ -568,7 +568,7 @@ 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 @@ 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); } Index: dev/ed/if_ed_cbus.c =================================================================== RCS file: /home/ncvs/src/sys/dev/ed/if_ed_cbus.c,v retrieving revision 1.7 diff -u -r1.7 if_ed_cbus.c --- dev/ed/if_ed_cbus.c 24 Feb 2003 14:32:27 -0000 1.7 +++ dev/ed/if_ed_cbus.c 23 Mar 2003 14:41:16 -0000 @@ -939,7 +939,7 @@ 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); @@ -1173,7 +1173,7 @@ 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); Index: dev/em/if_em.c =================================================================== RCS file: /home/ncvs/src/sys/dev/em/if_em.c,v retrieving revision 1.20 diff -u -r1.20 if_em.c --- dev/em/if_em.c 21 Mar 2003 21:47:30 -0000 1.20 +++ dev/em/if_em.c 22 Mar 2003 04:34:23 -0000 @@ -328,7 +328,8 @@ /* Allocate Transmit Descriptor ring */ if (!(adapter->tx_desc_base = (struct em_tx_desc *) - contigmalloc(tsize, M_DEVBUF, M_NOWAIT, 0, ~0, PAGE_SIZE, 0))) { + contigmalloc(tsize, M_DEVBUF, M_NOWAIT, 0, 0xffffffff, + PAGE_SIZE, 0))) { printf("em%d: Unable to allocate TxDescriptor memory\n", adapter->unit); em_free_pci_resources(adapter); @@ -341,7 +342,8 @@ /* Allocate Receive Descriptor ring */ if (!(adapter->rx_desc_base = (struct em_rx_desc *) - contigmalloc(rsize, M_DEVBUF, M_NOWAIT, 0, ~0, PAGE_SIZE, 0))) { + contigmalloc(rsize, M_DEVBUF, M_NOWAIT, 0, 0xffffffff, + PAGE_SIZE, 0))) { printf("em%d: Unable to allocate rx_desc memory\n", adapter->unit); em_free_pci_resources(adapter); Index: dev/fb/fb.c =================================================================== RCS file: /home/ncvs/src/sys/dev/fb/fb.c,v retrieving revision 1.25 diff -u -r1.25 fb.c --- dev/fb/fb.c 3 Mar 2003 12:15:42 -0000 1.25 +++ dev/fb/fb.c 22 Mar 2003 04:34:23 -0000 @@ -498,7 +498,7 @@ } 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; Index: dev/fb/fbreg.h =================================================================== RCS file: /home/ncvs/src/sys/dev/fb/fbreg.h,v retrieving revision 1.12 diff -u -r1.12 fbreg.h --- dev/fb/fbreg.h 25 Feb 2003 03:21:19 -0000 1.12 +++ dev/fb/fbreg.h 22 Mar 2003 04:34:23 -0000 @@ -82,7 +82,7 @@ #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, Index: dev/fb/vga.c =================================================================== RCS file: /home/ncvs/src/sys/dev/fb/vga.c,v retrieving revision 1.23 diff -u -r1.23 vga.c --- dev/fb/vga.c 18 Mar 2003 08:45:21 -0000 1.23 +++ dev/fb/vga.c 22 Mar 2003 04:34:24 -0000 @@ -2449,7 +2449,7 @@ * 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) Index: dev/gfb/gfb_pci.c =================================================================== RCS file: /home/ncvs/src/sys/dev/gfb/gfb_pci.c,v retrieving revision 1.5 diff -u -r1.5 gfb_pci.c --- dev/gfb/gfb_pci.c 25 Feb 2003 03:21:19 -0000 1.5 +++ dev/gfb/gfb_pci.c 22 Mar 2003 04:34:24 -0000 @@ -313,7 +313,7 @@ } 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; Index: dev/sound/pcm/dsp.c =================================================================== RCS file: /home/ncvs/src/sys/dev/sound/pcm/dsp.c,v retrieving revision 1.61 diff -u -r1.61 dsp.c --- dev/sound/pcm/dsp.c 3 Mar 2003 12:15:46 -0000 1.61 +++ dev/sound/pcm/dsp.c 22 Mar 2003 04:34:24 -0000 @@ -986,7 +986,7 @@ } 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; Index: dev/syscons/syscons.c =================================================================== RCS file: /home/ncvs/src/sys/dev/syscons/syscons.c,v retrieving revision 1.399 diff -u -r1.399 syscons.c --- dev/syscons/syscons.c 3 Mar 2003 16:24:44 -0000 1.399 +++ dev/syscons/syscons.c 22 Mar 2003 04:34:24 -0000 @@ -3365,7 +3365,7 @@ } 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; Index: dev/tdfx/tdfx_pci.c =================================================================== RCS file: /home/ncvs/src/sys/dev/tdfx/tdfx_pci.c,v retrieving revision 1.25 diff -u -r1.25 tdfx_pci.c --- dev/tdfx/tdfx_pci.c 3 Mar 2003 12:15:47 -0000 1.25 +++ dev/tdfx/tdfx_pci.c 22 Mar 2003 04:34:24 -0000 @@ -434,7 +434,7 @@ } 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 Index: i386/acpica/acpi_wakeup.c =================================================================== RCS file: /home/ncvs/src/sys/i386/acpica/acpi_wakeup.c,v retrieving revision 1.17 diff -u -r1.17 acpi_wakeup.c --- i386/acpica/acpi_wakeup.c 4 Dec 2002 18:40:39 -0000 1.17 +++ i386/acpica/acpi_wakeup.c 22 Mar 2003 04:34:24 -0000 @@ -181,7 +181,7 @@ acpi_sleep_machdep(struct acpi_softc *sc, int state) { ACPI_STATUS status; - vm_offset_t oldphys; + vm_paddr_t oldphys; struct pmap *pm; vm_page_t page; static vm_page_t opage = NULL; Index: i386/i386/busdma_machdep.c =================================================================== RCS file: /home/ncvs/src/sys/i386/i386/busdma_machdep.c,v retrieving revision 1.37 diff -u -r1.37 busdma_machdep.c --- i386/i386/busdma_machdep.c 20 Mar 2003 19:45:26 -0000 1.37 +++ i386/i386/busdma_machdep.c 22 Mar 2003 04:34:24 -0000 @@ -100,7 +100,7 @@ static void init_bounce_pages(void *dummy); static int alloc_bounce_pages(bus_dma_tag_t dmat, u_int numpages); static int reserve_bounce_pages(bus_dma_tag_t dmat, bus_dmamap_t map); -static vm_offset_t add_bounce_page(bus_dma_tag_t dmat, bus_dmamap_t map, +static bus_addr_t add_bounce_page(bus_dma_tag_t dmat, bus_dmamap_t map, vm_offset_t vaddr, bus_size_t size); static void free_bounce_page(bus_dma_tag_t dmat, struct bounce_page *bpage); static __inline int run_filter(bus_dma_tag_t dmat, bus_addr_t paddr); @@ -158,8 +158,9 @@ newtag->parent = parent; newtag->alignment = alignment; newtag->boundary = boundary; - newtag->lowaddr = trunc_page((vm_offset_t)lowaddr) + (PAGE_SIZE - 1); - newtag->highaddr = trunc_page((vm_offset_t)highaddr) + (PAGE_SIZE - 1); + newtag->lowaddr = trunc_page((vm_paddr_t)lowaddr) + (PAGE_SIZE - 1); + newtag->highaddr = trunc_page((vm_paddr_t)highaddr) + + (PAGE_SIZE - 1); newtag->filter = filter; newtag->filterarg = filterarg; newtag->maxsize = maxsize; @@ -191,7 +192,8 @@ atomic_add_int(&parent->ref_count, 1); } - if (newtag->lowaddr < ptoa(Maxmem) && (flags & BUS_DMA_ALLOCNOW) != 0) { + if (newtag->lowaddr < ptoa((vm_paddr_t)Maxmem) && + (flags & BUS_DMA_ALLOCNOW) != 0) { /* Must bounce */ if (lowaddr > bounce_lowaddr) { @@ -262,7 +264,7 @@ error = 0; - if (dmat->lowaddr < ptoa(Maxmem)) { + if (dmat->lowaddr < ptoa((vm_paddr_t)Maxmem)) { /* Must bounce */ int maxpages; @@ -344,7 +346,8 @@ /* If we succeed, no mapping/bouncing will be required */ *mapp = NULL; - if ((size <= PAGE_SIZE) && dmat->lowaddr >= ptoa(Maxmem)) { + if ((size <= PAGE_SIZE) && + dmat->lowaddr >= ptoa((vm_paddr_t)Maxmem)) { *vaddr = malloc(size, M_DEVBUF, (flags & BUS_DMA_NOWAIT) ? M_NOWAIT : M_WAITOK); } else { @@ -386,7 +389,7 @@ */ if (map != NULL) panic("bus_dmamem_free: Invalid map freed\n"); - if ((size <= PAGE_SIZE) && dmat->lowaddr >= ptoa(Maxmem)) + if ((size <= PAGE_SIZE) && dmat->lowaddr >= ptoa((vm_paddr_t)Maxmem)) free(vaddr, M_DEVBUF); else { mtx_lock(&Giant); @@ -412,7 +415,7 @@ void *callback_arg, int flags) { vm_offset_t vaddr; - vm_offset_t paddr; + vm_paddr_t paddr; #ifdef __GNUC__ bus_dma_segment_t dm_segments[dmat->nsegments]; #else @@ -421,7 +424,7 @@ bus_dma_segment_t *sg; int seg; int error; - vm_offset_t nextpaddr; + vm_paddr_t nextpaddr; if (map == NULL) map = &nobounce_dmamap; @@ -431,7 +434,8 @@ * If we are being called during a callback, pagesneeded will * be non-zero, so we can avoid doing the work twice. */ - if (dmat->lowaddr < ptoa(Maxmem) && map->pagesneeded == 0) { + if (dmat->lowaddr < ptoa((vm_paddr_t)Maxmem) && + map->pagesneeded == 0) { vm_offset_t vendaddr; /* @@ -626,7 +630,7 @@ #endif int nsegs, error; - KASSERT(dmat->lowaddr >= ptoa(Maxmem) || map != NULL, + KASSERT(dmat->lowaddr >= ptoa((vm_paddr_t)Maxmem) || map != NULL, ("bus_dmamap_load_mbuf: No support for bounce pages!")); KASSERT(m0->m_flags & M_PKTHDR, ("bus_dmamap_load_mbuf: no packet header")); @@ -682,7 +686,7 @@ struct iovec *iov; struct thread *td = NULL; - KASSERT(dmat->lowaddr >= ptoa(Maxmem) || map != NULL, + KASSERT(dmat->lowaddr >= ptoa((vm_paddr_t)Maxmem) || map != NULL, ("bus_dmamap_load_uio: No support for bounce pages!")); resid = uio->uio_resid; @@ -846,7 +850,7 @@ return (pages); } -static vm_offset_t +static bus_addr_t add_bounce_page(bus_dma_tag_t dmat, bus_dmamap_t map, vm_offset_t vaddr, bus_size_t size) { Index: i386/i386/elan-mmcr.c =================================================================== RCS file: /home/ncvs/src/sys/i386/i386/elan-mmcr.c,v retrieving revision 1.13 diff -u -r1.13 elan-mmcr.c --- i386/i386/elan-mmcr.c 3 Mar 2003 12:15:49 -0000 1.13 +++ i386/i386/elan-mmcr.c 22 Mar 2003 04:34:24 -0000 @@ -304,7 +304,7 @@ } static int -elan_mmap(dev_t dev, vm_offset_t offset, vm_offset_t *paddr, int nprot) +elan_mmap(dev_t dev, vm_offset_t offset, vm_paddr_t *paddr, int nprot) { if (minor(dev) != ELAN_MMCR) Index: i386/i386/machdep.c =================================================================== RCS file: /home/ncvs/src/sys/i386/i386/machdep.c,v retrieving revision 1.554 diff -u -r1.554 machdep.c --- i386/i386/machdep.c 20 Feb 2003 05:35:52 -0000 1.554 +++ i386/i386/machdep.c 23 Mar 2003 14:59:22 -0000 @@ -170,7 +170,7 @@ long Maxmem = 0; -vm_offset_t phys_avail[10]; +vm_paddr_t phys_avail[10]; /* must be 2 less so 0 0 can signal end of chunks */ #define PHYS_AVAIL_ARRAY_END ((sizeof(phys_avail) / sizeof(vm_offset_t)) - 2) @@ -197,8 +197,8 @@ #ifdef PERFMON perfmon_init(); #endif - printf("real memory = %u (%u MB)\n", ptoa(Maxmem), - ptoa(Maxmem) / 1048576); + printf("real memory = %ju (%ju MB)\n", ptoa((uintmax_t)Maxmem), + ptoa((uintmax_t)Maxmem) / 1048576); /* * Display any holes after the first chunk of extended memory. */ @@ -207,19 +207,22 @@ printf("Physical memory chunk(s):\n"); for (indx = 0; phys_avail[indx + 1] != 0; indx += 2) { - unsigned int size1; + vm_paddr_t size; - size1 = phys_avail[indx + 1] - phys_avail[indx]; - printf("0x%08x - 0x%08x, %u bytes (%u pages)\n", - phys_avail[indx], phys_avail[indx + 1] - 1, size1, - size1 / PAGE_SIZE); + size = phys_avail[indx + 1] - phys_avail[indx]; + printf( + "0x%016jx - 0x%016jx, %ju bytes (%ju pages)\n", + (uintmax_t)phys_avail[indx], + (uintmax_t)phys_avail[indx + 1] - 1, + (uintmax_t)size, (uintmax_t)size / PAGE_SIZE); } } vm_ksubmap_init(&kmi); - printf("avail memory = %u (%u MB)\n", ptoa(cnt.v_free_count), - ptoa(cnt.v_free_count) / 1048576); + printf("avail memory = %ju (%ju MB)\n", + ptoa((uintmax_t)cnt.v_free_count), + ptoa((uintmax_t)cnt.v_free_count) / 1048576); /* * Set up buffers, so they can be used to read disk labels. @@ -1463,6 +1466,8 @@ * * Total memory size may be set by the kernel environment variable * hw.physmem or the compile-time define MAXMEM. + * + * XXX first should be vm_paddr_t. */ static void getmemsize(int first) @@ -1472,7 +1477,7 @@ u_int basemem, extmem; struct vm86frame vmf; struct vm86context vmc; - vm_offset_t pa, physmap[PHYSMAP_SIZE]; + vm_paddr_t pa, physmap[PHYSMAP_SIZE]; pt_entry_t *pte; char *cp; struct bios_smap *smap; @@ -1559,12 +1564,8 @@ if (i || vmf.vmf_eax != SMAP_SIG) break; if (boothowto & RB_VERBOSE) - printf("SMAP type=%02x base=%08x %08x len=%08x %08x\n", - smap->type, - *(u_int32_t *)((char *)&smap->base + 4), - (u_int32_t)smap->base, - *(u_int32_t *)((char *)&smap->length + 4), - (u_int32_t)smap->length); + printf("SMAP type=%02x base=%016llx len=%016llx\n", + smap->type, smap->base, smap->length); if (smap->type != 0x01) goto next_run; @@ -1742,7 +1743,7 @@ * extend the last memory segment to the new limit. */ if (atop(physmap[physmap_idx + 1]) < Maxmem) - physmap[physmap_idx + 1] = ptoa(Maxmem); + physmap[physmap_idx + 1] = ptoa((vm_paddr_t)Maxmem); /* call pmap initialization to make new kernel address space */ pmap_bootstrap(first, 0); @@ -1761,9 +1762,9 @@ * round up the start address and round down the end address. */ for (i = 0; i <= physmap_idx; i += 2) { - vm_offset_t end; + vm_paddr_t end; - end = ptoa(Maxmem); + end = ptoa((vm_paddr_t)Maxmem); if (physmap[i + 1] < end) end = trunc_page(physmap[i + 1]); for (pa = round_page(physmap[i]); pa < end; pa += PAGE_SIZE) { Index: i386/i386/mem.c =================================================================== RCS file: /home/ncvs/src/sys/i386/i386/mem.c,v retrieving revision 1.104 diff -u -r1.104 mem.c --- i386/i386/mem.c 3 Mar 2003 12:15:49 -0000 1.104 +++ i386/i386/mem.c 22 Mar 2003 04:34:24 -0000 @@ -211,7 +211,7 @@ * instead of going through read/write * \*******************************************************/ static int -memmmap(dev_t dev, vm_offset_t offset, vm_offset_t *paddr, int prot) +memmmap(dev_t dev, vm_offset_t offset, vm_paddr_t *paddr, int prot) { switch (minor(dev)) { Index: i386/i386/mp_machdep.c =================================================================== RCS file: /home/ncvs/src/sys/i386/i386/mp_machdep.c,v retrieving revision 1.204 diff -u -r1.204 mp_machdep.c --- i386/i386/mp_machdep.c 4 Mar 2003 20:24:53 -0000 1.204 +++ i386/i386/mp_machdep.c 22 Mar 2003 04:34:24 -0000 @@ -2576,7 +2576,7 @@ if (PCPU_GET(cpuid) != apic_id) { printf("SMP: cpuid = %d\n", PCPU_GET(cpuid)); printf("SMP: apic_id = %d\n", apic_id); - printf("PTD[MPPTDI] = %p\n", (void *)PTD[MPPTDI]); + printf("PTD[MPPTDI] = %#jx\n", (uintmax_t)PTD[MPPTDI]); panic("cpuid mismatch! boom!!"); } Index: i386/i386/pmap.c =================================================================== RCS file: /home/ncvs/src/sys/i386/i386/pmap.c,v retrieving revision 1.397 diff -u -r1.397 pmap.c --- i386/i386/pmap.c 12 Mar 2003 07:38:37 -0000 1.397 +++ i386/i386/pmap.c 22 Mar 2003 04:37:07 -0000 @@ -154,8 +154,8 @@ static struct pmaplist allpmaps; static struct mtx allpmaps_lock; -vm_offset_t avail_start; /* PA of first available physical page */ -vm_offset_t avail_end; /* PA of last available physical page */ +vm_paddr_t avail_start; /* PA of first available physical page */ +vm_paddr_t avail_end; /* PA of last available physical page */ vm_offset_t virtual_avail; /* VA of first avail page (after kernel bss) */ vm_offset_t virtual_end; /* VA of last avail page (end of kernel AS) */ static boolean_t pmap_initialized = FALSE; /* Has pmap_init completed? */ @@ -288,8 +288,8 @@ */ void pmap_bootstrap(firstaddr, loadaddr) - vm_offset_t firstaddr; - vm_offset_t loadaddr; + vm_paddr_t firstaddr; + vm_paddr_t loadaddr; { vm_offset_t va; pt_entry_t *pte; @@ -515,7 +515,7 @@ */ void pmap_init(phys_start, phys_end) - vm_offset_t phys_start, phys_end; + vm_paddr_t phys_start, phys_end; { int i; int initial_pvs; @@ -842,12 +842,12 @@ * Extract the physical page address associated * with the given map/virtual_address pair. */ -vm_offset_t +vm_paddr_t pmap_extract(pmap, va) register pmap_t pmap; vm_offset_t va; { - vm_offset_t rtval; /* XXX FIXME */ + vm_paddr_t rtval; vm_offset_t pdirindex; if (pmap == 0) @@ -878,7 +878,7 @@ * Note: not SMP coherent. */ PMAP_INLINE void -pmap_kenter(vm_offset_t va, vm_offset_t pa) +pmap_kenter(vm_offset_t va, vm_paddr_t pa) { pt_entry_t *pte; @@ -912,7 +912,7 @@ * region. */ vm_offset_t -pmap_map(vm_offset_t *virt, vm_offset_t start, vm_offset_t end, int prot) +pmap_map(vm_offset_t *virt, vm_paddr_t start, vm_paddr_t end, int prot) { vm_offset_t va, sva; @@ -1295,7 +1295,7 @@ register struct pmap *pmap; { vm_page_t ptdpg[NPGPTD]; - vm_offset_t pa; + vm_paddr_t pa; int i; /* @@ -1376,7 +1376,8 @@ pmap_t pmap; unsigned ptepindex; { - vm_offset_t pteva, ptepa; /* XXXPA */ + vm_paddr_t ptepa; + vm_offset_t pteva; vm_page_t m; /* @@ -1559,7 +1560,7 @@ { struct pmap *pmap; int s; - vm_offset_t ptppaddr; + vm_paddr_t ptppaddr; vm_page_t nkpg; pd_entry_t newpdir; @@ -2044,9 +2045,9 @@ pmap_enter(pmap_t pmap, vm_offset_t va, vm_page_t m, vm_prot_t prot, boolean_t wired) { - vm_offset_t pa; + vm_paddr_t pa; register pt_entry_t *pte; - vm_offset_t opa; + vm_paddr_t opa; pt_entry_t origpte, newpte; vm_page_t mpte; @@ -2086,8 +2087,8 @@ * Page Directory table entry not valid, we need a new PT page */ if (pte == NULL) { - panic("pmap_enter: invalid page directory, pdir=%p, va=0x%x\n", - (void *)pmap->pm_pdir[PTDPTDI], va); + panic("pmap_enter: invalid page directory pdir=%#jx, va=%#x\n", + (uintmax_t)pmap->pm_pdir[PTDPTDI], va); } pa = VM_PAGE_TO_PHYS(m) & PG_FRAME; @@ -2219,7 +2220,7 @@ pmap_enter_quick(pmap_t pmap, vm_offset_t va, vm_page_t m, vm_page_t mpte) { pt_entry_t *pte; - vm_offset_t pa; + vm_paddr_t pa; /* * In the case that a page table page is not @@ -2960,11 +2961,11 @@ m = PHYS_TO_VM_PAGE(tpte); KASSERT(m->phys_addr == (tpte & PG_FRAME), - ("vm_page_t %p phys_addr mismatch %08x %08x", - m, m->phys_addr, tpte)); + ("vm_page_t %p phys_addr mismatch %016jx %016jx", + m, (uintmax_t)m->phys_addr, (uintmax_t)tpte)); KASSERT(m < &vm_page_array[vm_page_array_size], - ("pmap_remove_pages: bad tpte %x", tpte)); + ("pmap_remove_pages: bad tpte %#jx", (uintmax_t)tpte)); pv->pv_pmap->pm_stats.resident_count--; @@ -3231,7 +3232,7 @@ */ void * pmap_mapdev(pa, size) - vm_offset_t pa; + vm_paddr_t pa; vm_size_t size; { vm_offset_t va, tmpva, offset; @@ -3293,7 +3294,7 @@ } if ((pte = *ptep) != 0) { - vm_offset_t pa; + vm_paddr_t pa; val = MINCORE_INCORE; if ((pte & PG_MANAGED) == 0) @@ -3455,7 +3456,7 @@ pmap_t pm; { int i, j; - vm_offset_t va; + vm_paddr_t va; pt_entry_t *ptep; if (pm == kernel_pmap) @@ -3477,7 +3478,7 @@ void pmap_pvdump(pa) - vm_offset_t pa; + vm_paddr_t pa; { pv_entry_t pv; vm_page_t m; Index: i386/i386/vm86.c =================================================================== RCS file: /home/ncvs/src/sys/i386/i386/vm86.c,v retrieving revision 1.53 diff -u -r1.53 vm86.c --- i386/i386/vm86.c 19 Feb 2003 05:47:22 -0000 1.53 +++ i386/i386/vm86.c 22 Mar 2003 04:34:24 -0000 @@ -599,7 +599,7 @@ struct vm86context *vmc; { pt_entry_t *pte = (pt_entry_t *)vm86paddr; - u_int page; + vm_paddr_t page; int i, entry, retval; mtx_lock(&vm86_lock); Index: i386/i386/vm_machdep.c =================================================================== RCS file: /home/ncvs/src/sys/i386/i386/vm_machdep.c,v retrieving revision 1.202 diff -u -r1.202 vm_machdep.c --- i386/i386/vm_machdep.c 23 Feb 2003 21:19:59 -0000 1.202 +++ i386/i386/vm_machdep.c 22 Mar 2003 04:34:24 -0000 @@ -405,15 +405,15 @@ /* * Convert kernel VA to physical address */ -u_long +vm_paddr_t kvtop(void *addr) { - vm_offset_t va; + vm_paddr_t pa; - va = pmap_kextract((vm_offset_t)addr); - if (va == 0) + pa = pmap_kextract((vm_offset_t)addr); + if (pa == 0) panic("kvtop: zero page frame"); - return((int)va); + return (pa); } /* Index: i386/include/_types.h =================================================================== RCS file: /home/ncvs/src/sys/i386/include/_types.h,v retrieving revision 1.5 diff -u -r1.5 _types.h --- i386/include/_types.h 8 Feb 2003 20:37:54 -0000 1.5 +++ i386/include/_types.h 23 Mar 2003 14:59:56 -0000 @@ -102,6 +102,7 @@ typedef __uint32_t __u_register_t; typedef __uint32_t __vm_offset_t; typedef __int64_t __vm_ooffset_t; +typedef __uint32_t __vm_paddr_t; typedef __uint64_t __vm_pindex_t; typedef __uint32_t __vm_size_t; Index: i386/include/md_var.h =================================================================== RCS file: /home/ncvs/src/sys/i386/include/md_var.h,v retrieving revision 1.59 diff -u -r1.59 md_var.h --- i386/include/md_var.h 22 Jan 2003 18:18:45 -0000 1.59 +++ i386/include/md_var.h 22 Mar 2003 04:34:24 -0000 @@ -96,7 +96,7 @@ void i686_pagezero(void *addr); void init_AMD_Elan_sc520(void); int is_physical_memory(vm_offset_t addr); -u_long kvtop(void *addr); +vm_paddr_t kvtop(void *addr); void setidt(int idx, alias_for_inthand_t *func, int typ, int dpl, int selec); void swi_vm(void *); int user_dbreg_trap(void); Index: i386/include/param.h =================================================================== RCS file: /home/ncvs/src/sys/i386/include/param.h,v retrieving revision 1.66 diff -u -r1.66 param.h --- i386/include/param.h 23 Feb 2003 21:20:00 -0000 1.66 +++ i386/include/param.h 22 Mar 2003 04:42:57 -0000 @@ -127,14 +127,14 @@ */ #define trunc_page(x) ((x) & ~PAGE_MASK) #define round_page(x) (((x) + PAGE_MASK) & ~PAGE_MASK) -#define trunc_4mpage(x) ((unsigned)(x) & ~PDRMASK) -#define round_4mpage(x) ((((unsigned)(x)) + PDRMASK) & ~PDRMASK) +#define trunc_4mpage(x) ((x) & ~PDRMASK) +#define round_4mpage(x) ((((x)) + PDRMASK) & ~PDRMASK) -#define atop(x) ((unsigned)(x) >> PAGE_SHIFT) -#define ptoa(x) ((unsigned)(x) << PAGE_SHIFT) +#define atop(x) ((x) >> PAGE_SHIFT) +#define ptoa(x) ((x) << PAGE_SHIFT) -#define i386_btop(x) ((unsigned)(x) >> PAGE_SHIFT) -#define i386_ptob(x) ((unsigned)(x) << PAGE_SHIFT) +#define i386_btop(x) ((x) >> PAGE_SHIFT) +#define i386_ptob(x) ((x) << PAGE_SHIFT) #define pgtok(x) ((x) * (PAGE_SIZE / 1024)) Index: i386/include/pmap.h =================================================================== RCS file: /home/ncvs/src/sys/i386/include/pmap.h,v retrieving revision 1.89 diff -u -r1.89 pmap.h --- i386/include/pmap.h 16 Mar 2003 04:16:03 -0000 1.89 +++ i386/include/pmap.h 22 Mar 2003 04:34:24 -0000 @@ -70,7 +70,7 @@ /* Our various interpretations of the above */ #define PG_W PG_AVAIL1 /* "Wired" pseudoflag */ #define PG_MANAGED PG_AVAIL2 -#define PG_FRAME (~PAGE_MASK) +#define PG_FRAME (~((vm_paddr_t)PAGE_MASK)) #define PG_PROT (PG_RW|PG_U) /* all protection bits . */ #define PG_N (PG_NC_PWT|PG_NC_PCD) /* Non-cacheable */ @@ -168,10 +168,11 @@ * Extract the physical page address associated * kernel virtual address. */ -static __inline vm_offset_t +static __inline vm_paddr_t pmap_kextract(vm_offset_t va) { - vm_offset_t pa; + vm_paddr_t pa; + if ((pa = (vm_offset_t) PTD[va >> PDRSHIFT]) & PG_PS) { pa = (pa & ~(NBPDR - 1)) | (va & (NBPDR - 1)); } else { @@ -237,19 +238,19 @@ extern caddr_t CADDR1; extern pt_entry_t *CMAP1; -extern vm_offset_t avail_end; -extern vm_offset_t avail_start; +extern vm_paddr_t avail_end; +extern vm_paddr_t avail_start; extern vm_offset_t clean_eva; extern vm_offset_t clean_sva; -extern vm_offset_t phys_avail[]; +extern vm_paddr_t phys_avail[]; extern char *ptvmmap; /* poor name! */ extern vm_offset_t virtual_avail; extern vm_offset_t virtual_end; -void pmap_bootstrap(vm_offset_t, vm_offset_t); -void pmap_kenter(vm_offset_t va, vm_offset_t pa); +void pmap_bootstrap(vm_paddr_t, vm_paddr_t); +void pmap_kenter(vm_offset_t va, vm_paddr_t pa); void pmap_kremove(vm_offset_t); -void *pmap_mapdev(vm_offset_t, vm_size_t); +void *pmap_mapdev(vm_paddr_t, vm_size_t); void pmap_unmapdev(vm_offset_t, vm_size_t); pt_entry_t *pmap_pte(pmap_t, vm_offset_t) __pure2; void pmap_set_opt(void); Index: i386/isa/isa_dma.c =================================================================== RCS file: /home/ncvs/src/sys/i386/isa/isa_dma.c,v retrieving revision 1.12 diff -u -r1.12 isa_dma.c --- i386/isa/isa_dma.c 29 Apr 2002 07:43:14 -0000 1.12 +++ i386/isa/isa_dma.c 22 Mar 2003 04:34:24 -0000 @@ -213,7 +213,7 @@ void isa_dmastart(int flags, caddr_t addr, u_int nbytes, int chan) { - vm_offset_t phys; + vm_paddr_t phys; int waport; caddr_t newaddr; @@ -373,7 +373,8 @@ static int isa_dmarangecheck(caddr_t va, u_int length, int chan) { - vm_offset_t phys, priorpage = 0, endva; + vm_paddr_t phys, priorpage = 0; + vm_offset_t endva; u_int dma_pgmsk = (chan & 4) ? ~(128*1024-1) : ~(64*1024-1); GIANT_REQUIRED; Index: i386/isa/spigot.c =================================================================== RCS file: /home/ncvs/src/sys/i386/isa/spigot.c,v retrieving revision 1.57 diff -u -r1.57 spigot.c --- i386/isa/spigot.c 3 Mar 2003 12:15:49 -0000 1.57 +++ i386/isa/spigot.c 22 Mar 2003 04:34:24 -0000 @@ -268,7 +268,7 @@ } static int -spigot_mmap(dev_t dev, vm_offset_t offset, vm_offset_t *paddr, int nprot) +spigot_mmap(dev_t dev, vm_offset_t offset, vm_paddr_t *paddr, int nprot) { struct spigot_softc *ss = (struct spigot_softc *)&spigot_softc[0]; Index: i386/isa/pcvt/pcvt_drv.c =================================================================== RCS file: /home/ncvs/src/sys/i386/isa/pcvt/pcvt_drv.c,v retrieving revision 1.76 diff -u -r1.76 pcvt_drv.c --- i386/isa/pcvt/pcvt_drv.c 3 Mar 2003 16:24:46 -0000 1.76 +++ i386/isa/pcvt/pcvt_drv.c 22 Mar 2003 04:34:24 -0000 @@ -417,7 +417,7 @@ * driver mmap *---------------------------------------------------------------------------*/ static int -pcvt_mmap(dev_t dev, vm_offset_t offset, vm_offset_t *paddr, int nprot) +pcvt_mmap(dev_t dev, vm_offset_t offset, vm_paddr_t *paddr, int nprot) { if (offset > 0x20000 - PAGE_SIZE) return -1; Index: i4b/layer1/isic/i4b_tel_s016.c =================================================================== RCS file: /home/ncvs/src/sys/i4b/layer1/isic/i4b_tel_s016.c,v retrieving revision 1.6 diff -u -r1.6 i4b_tel_s016.c --- i4b/layer1/isic/i4b_tel_s016.c 2 Sep 2002 00:52:08 -0000 1.6 +++ i4b/layer1/isic/i4b_tel_s016.c 22 Mar 2003 04:34:24 -0000 @@ -220,7 +220,7 @@ break; default: - printf("isic%d: Error, invalid memory address 0x%lx for Teles S0/16!\n", + printf("isic%d: Error, invalid memory address 0x%x for Teles S0/16!\n", unit, kvtop(sc->sc_vmem_addr)); isic_detach_common(dev); return(ENXIO); Index: i4b/layer1/isic/i4b_tel_s08.c =================================================================== RCS file: /home/ncvs/src/sys/i4b/layer1/isic/i4b_tel_s08.c,v retrieving revision 1.6 diff -u -r1.6 i4b_tel_s08.c --- i4b/layer1/isic/i4b_tel_s08.c 2 Sep 2002 00:52:08 -0000 1.6 +++ i4b/layer1/isic/i4b_tel_s08.c 22 Mar 2003 04:34:24 -0000 @@ -181,7 +181,7 @@ if((kvtop(sc->sc_vmem_addr) < 0xa0000) || (kvtop(sc->sc_vmem_addr) > 0xdf000)) { - printf("isic%d: Error, mem addr 0x%lx outside 0xA0000-0xDF000 for Teles S0/8!\n", + printf("isic%d: Error, mem addr 0x%x outside 0xA0000-0xDF000 for Teles S0/8!\n", unit, kvtop(sc->sc_vmem_addr)); bus_release_resource(dev,SYS_RES_MEMORY, sc->sc_resources.mem_rid, Index: ia64/ia64/mem.c =================================================================== RCS file: /home/ncvs/src/sys/ia64/ia64/mem.c,v retrieving revision 1.12 diff -u -r1.12 mem.c --- ia64/ia64/mem.c 3 Mar 2003 12:15:50 -0000 1.12 +++ ia64/ia64/mem.c 22 Mar 2003 04:34:24 -0000 @@ -217,7 +217,7 @@ * instead of going through read/write * \*******************************************************/ static int -memmmap(dev_t dev, vm_offset_t offset, vm_offset_t *paddr, int prot) +memmmap(dev_t dev, vm_offset_t offset, vm_paddr_t *paddr, int prot) { /* * /dev/mem is the only one that makes sense through this Index: ia64/include/_types.h =================================================================== RCS file: /home/ncvs/src/sys/ia64/include/_types.h,v retrieving revision 1.5 diff -u -r1.5 _types.h --- ia64/include/_types.h 8 Feb 2003 20:37:54 -0000 1.5 +++ ia64/include/_types.h 22 Mar 2003 04:34:24 -0000 @@ -89,6 +89,7 @@ typedef __uint64_t __u_register_t; typedef __uint64_t __vm_offset_t; typedef __int64_t __vm_ooffset_t; +typedef __uint64_t __vm_paddr_t; typedef __uint64_t __vm_pindex_t; typedef __uint64_t __vm_size_t; Index: isa/vga_isa.c =================================================================== RCS file: /home/ncvs/src/sys/isa/vga_isa.c,v retrieving revision 1.22 diff -u -r1.22 vga_isa.c --- isa/vga_isa.c 3 Mar 2003 12:15:51 -0000 1.22 +++ isa/vga_isa.c 22 Mar 2003 04:34:24 -0000 @@ -191,7 +191,7 @@ } static int -isavga_mmap(dev_t dev, vm_offset_t offset, vm_offset_t *paddr, int prot) +isavga_mmap(dev_t dev, vm_offset_t offset, vm_paddr_t *paddr, int prot) { return vga_mmap(dev, VGA_SOFTC(VGA_UNIT(dev)), offset, paddr, prot); } Index: kern/subr_devstat.c =================================================================== RCS file: /home/ncvs/src/sys/kern/subr_devstat.c,v retrieving revision 1.42 diff -u -r1.42 subr_devstat.c --- kern/subr_devstat.c 18 Mar 2003 23:32:27 -0000 1.42 +++ kern/subr_devstat.c 22 Mar 2003 04:34:24 -0000 @@ -452,7 +452,7 @@ static MALLOC_DEFINE(M_DEVSTAT, "devstat", "Device statistics"); static int -devstat_mmap(dev_t dev, vm_offset_t offset, vm_offset_t *paddr, int nprot) +devstat_mmap(dev_t dev, vm_offset_t offset, vm_paddr_t *paddr, int nprot) { struct statspage *spp; Index: kern/subr_xxx.c =================================================================== RCS file: /home/ncvs/src/sys/kern/subr_xxx.c,v retrieving revision 1.23 diff -u -r1.23 subr_xxx.c --- kern/subr_xxx.c 3 Mar 2003 16:24:46 -0000 1.23 +++ kern/subr_xxx.c 22 Mar 2003 04:34:24 -0000 @@ -135,7 +135,7 @@ nommap(dev, offset, paddr, nprot) dev_t dev; vm_offset_t offset; - vm_offset_t *paddr; + vm_paddr_t *paddr; int nprot; { Index: kern/sys_pipe.c =================================================================== RCS file: /home/ncvs/src/sys/kern/sys_pipe.c,v retrieving revision 1.132 diff -u -r1.132 sys_pipe.c --- kern/sys_pipe.c 19 Feb 2003 05:47:25 -0000 1.132 +++ kern/sys_pipe.c 22 Mar 2003 04:34:24 -0000 @@ -620,7 +620,8 @@ { u_int size; int i; - vm_offset_t addr, endaddr, paddr; + vm_offset_t addr, endaddr; + vm_paddr_t paddr; GIANT_REQUIRED; PIPE_LOCK_ASSERT(wpipe, MA_NOTOWNED); Index: kern/uipc_cow.c =================================================================== RCS file: /home/ncvs/src/sys/kern/uipc_cow.c,v retrieving revision 1.10 diff -u -r1.10 uipc_cow.c --- kern/uipc_cow.c 18 Mar 2003 18:27:33 -0000 1.10 +++ kern/uipc_cow.c 22 Mar 2003 04:34:24 -0000 @@ -104,7 +104,7 @@ { struct sf_buf *sf; vm_page_t pp; - vm_offset_t pa; + vm_paddr_t pa; struct iovec *iov; struct vmspace *vmspace; struct vm_map *map; Index: kern/uipc_jumbo.c =================================================================== RCS file: /home/ncvs/src/sys/kern/uipc_jumbo.c,v retrieving revision 1.5 diff -u -r1.5 uipc_jumbo.c --- kern/uipc_jumbo.c 20 Feb 2003 03:26:11 -0000 1.5 +++ kern/uipc_jumbo.c 22 Mar 2003 04:34:24 -0000 @@ -212,7 +212,7 @@ jumbo_pg_free(vm_offset_t addr) { struct jumbo_kmap *entry; - vm_offset_t paddr; + vm_paddr_t paddr; vm_page_t pg; paddr = pmap_kextract((vm_offset_t)addr); Index: kern/vfs_bio.c =================================================================== RCS file: /home/ncvs/src/sys/kern/vfs_bio.c,v retrieving revision 1.379 diff -u -r1.379 vfs_bio.c --- kern/vfs_bio.c 18 Mar 2003 08:45:23 -0000 1.379 +++ kern/vfs_bio.c 22 Mar 2003 04:34:24 -0000 @@ -3622,7 +3622,7 @@ vmapbuf(struct buf *bp) { caddr_t addr, kva; - vm_offset_t pa; + vm_paddr_t pa; int pidx, i; struct vm_page *m; struct pmap *pmap = &curproc->p_vmspace->vm_pmap; Index: kern/vfs_subr.c =================================================================== RCS file: /home/ncvs/src/sys/kern/vfs_subr.c,v retrieving revision 1.437 diff -u -r1.437 vfs_subr.c --- kern/vfs_subr.c 13 Mar 2003 07:22:53 -0000 1.437 +++ kern/vfs_subr.c 22 Mar 2003 04:34:24 -0000 @@ -457,7 +457,7 @@ vntblinit(void *dummy __unused) { - desiredvnodes = maxproc + cnt.v_page_count / 4; + desiredvnodes = maxproc + cnt.v_page_count / 16; minvnodes = desiredvnodes / 4; mtx_init(&mountlist_mtx, "mountlist", NULL, MTX_DEF); mtx_init(&mntvnode_mtx, "mntvnode", NULL, MTX_DEF); Index: pc98/i386/machdep.c =================================================================== RCS file: /home/ncvs/src/sys/pc98/i386/machdep.c,v retrieving revision 1.308 diff -u -r1.308 machdep.c --- pc98/i386/machdep.c 23 Feb 2003 13:26:21 -0000 1.308 +++ pc98/i386/machdep.c 23 Mar 2003 14:59:31 -0000 @@ -190,7 +190,7 @@ int Maxmem_under16M = 0; #endif -vm_offset_t phys_avail[10]; +vm_paddr_t phys_avail[10]; /* must be 2 less so 0 0 can signal end of chunks */ #define PHYS_AVAIL_ARRAY_END ((sizeof(phys_avail) / sizeof(vm_offset_t)) - 2) @@ -217,8 +217,8 @@ #ifdef PERFMON perfmon_init(); #endif - printf("real memory = %u (%u MB)\n", ptoa(Maxmem), - ptoa(Maxmem) / 1048576); + printf("real memory = %ju (%ju MB)\n", ptoa((uintmax_t)Maxmem), + ptoa((uintmax_t)Maxmem) / 1048576); /* * Display any holes after the first chunk of extended memory. */ @@ -227,19 +227,22 @@ printf("Physical memory chunk(s):\n"); for (indx = 0; phys_avail[indx + 1] != 0; indx += 2) { - unsigned int size1; + vm_paddr_t size; - size1 = phys_avail[indx + 1] - phys_avail[indx]; - printf("0x%08x - 0x%08x, %u bytes (%u pages)\n", - phys_avail[indx], phys_avail[indx + 1] - 1, size1, - size1 / PAGE_SIZE); + size = phys_avail[indx + 1] - phys_avail[indx]; + printf( + "0x%016jx - 0x%016jx, %ju bytes (%ju pages)\n", + (uintmax_t)phys_avail[indx], + (uintmax_t)phys_avail[indx + 1] - 1, + (uintmax_t)size, (uintmax_t)size / PAGE_SIZE); } } vm_ksubmap_init(&kmi); - printf("avail memory = %u (%u MB)\n", ptoa(cnt.v_free_count), - ptoa(cnt.v_free_count) / 1048576); + printf("avail memory = %ju (%ju MB)\n", + ptoa((uintmax_t)cnt.v_free_count), + ptoa((uintmax_t)cnt.v_free_count) / 1048576); /* * Set up buffers, so they can be used to read disk labels. @@ -1483,6 +1486,8 @@ * * Total memory size may be set by the kernel environment variable * hw.physmem or the compile-time define MAXMEM. + * + * XXX first should be vm_paddr_t. */ static void getmemsize(int first) @@ -1498,7 +1503,7 @@ u_int basemem, extmem; struct vm86frame vmf; struct vm86context vmc; - vm_offset_t pa, physmap[PHYSMAP_SIZE]; + vm_paddr_t pa, physmap[PHYSMAP_SIZE]; pt_entry_t *pte; char *cp; struct bios_smap *smap; @@ -1592,12 +1597,8 @@ if (i || vmf.vmf_eax != SMAP_SIG) break; if (boothowto & RB_VERBOSE) - printf("SMAP type=%02x base=%08x %08x len=%08x %08x\n", - smap->type, - *(u_int32_t *)((char *)&smap->base + 4), - (u_int32_t)smap->base, - *(u_int32_t *)((char *)&smap->length + 4), - (u_int32_t)smap->length); + printf("SMAP type=%02x base=%016llx len=%016llx\n", + smap->type, smap->base, smap->length); if (smap->type != 0x01) goto next_run; @@ -1810,7 +1811,7 @@ * extend the last memory segment to the new limit. */ if (atop(physmap[physmap_idx + 1]) < Maxmem) - physmap[physmap_idx + 1] = ptoa(Maxmem); + physmap[physmap_idx + 1] = ptoa((vm_paddr_t)Maxmem); /* call pmap initialization to make new kernel address space */ pmap_bootstrap(first, 0); @@ -1829,9 +1830,9 @@ * round up the start address and round down the end address. */ for (i = 0; i <= physmap_idx; i += 2) { - vm_offset_t end; + vm_paddr_t end; - end = ptoa(Maxmem); + end = ptoa((vm_paddr_t)Maxmem); if (physmap[i + 1] < end) end = trunc_page(physmap[i + 1]); for (pa = round_page(physmap[i]); pa < end; pa += PAGE_SIZE) { Index: pc98/pc98/pc98gdc.c =================================================================== RCS file: /home/ncvs/src/sys/pc98/pc98/pc98gdc.c,v retrieving revision 1.35 diff -u -r1.35 pc98gdc.c --- pc98/pc98/pc98gdc.c 3 Mar 2003 12:15:53 -0000 1.35 +++ pc98/pc98/pc98gdc.c 22 Mar 2003 04:34:24 -0000 @@ -392,7 +392,7 @@ } static int -gdcmmap(dev_t dev, vm_offset_t offset, vm_offset_t *paddr, int prot) +gdcmmap(dev_t dev, vm_offset_t offset, vm_paddr_t *paddr, int prot) { gdc_softc_t *sc; Index: pc98/pc98/syscons.c =================================================================== RCS file: /home/ncvs/src/sys/pc98/pc98/syscons.c,v retrieving revision 1.187 diff -u -r1.187 syscons.c --- pc98/pc98/syscons.c 9 Mar 2003 10:18:15 -0000 1.187 +++ pc98/pc98/syscons.c 22 Mar 2003 04:34:24 -0000 @@ -3384,7 +3384,7 @@ } 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; Index: pci/agp.c =================================================================== RCS file: /home/ncvs/src/sys/pci/agp.c,v retrieving revision 1.28 diff -u -r1.28 agp.c --- pci/agp.c 3 Mar 2003 12:15:53 -0000 1.28 +++ pci/agp.c 22 Mar 2003 04:34:24 -0000 @@ -716,7 +716,7 @@ } 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); Index: pci/meteor.c =================================================================== RCS file: /home/ncvs/src/sys/pci/meteor.c,v retrieving revision 1.60 diff -u -r1.60 meteor.c --- pci/meteor.c 3 Mar 2003 12:15:54 -0000 1.60 +++ pci/meteor.c 22 Mar 2003 04:34:24 -0000 @@ -2102,7 +2102,7 @@ } int -meteor_mmap(dev_t dev, vm_offset_t offset, vm_offset_t *paddr, int nprot) +meteor_mmap(dev_t dev, vm_offset_t offset, vm_paddr_t *paddr, int nprot) { int unit; Index: pci/xrpu.c =================================================================== RCS file: /home/ncvs/src/sys/pci/xrpu.c,v retrieving revision 1.29 diff -u -r1.29 xrpu.c --- pci/xrpu.c 3 Mar 2003 12:15:54 -0000 1.29 +++ pci/xrpu.c 22 Mar 2003 04:34:24 -0000 @@ -129,7 +129,7 @@ } static int -xrpu_mmap(dev_t dev, vm_offset_t offset, vm_offset_t *paddr, int nprot) +xrpu_mmap(dev_t dev, vm_offset_t offset, vm_paddr_t *paddr, int nprot) { struct softc *sc = dev->si_drv1; if (offset >= 0x1000000) Index: powerpc/include/_types.h =================================================================== RCS file: /home/ncvs/src/sys/powerpc/include/_types.h,v retrieving revision 1.4 diff -u -r1.4 _types.h --- powerpc/include/_types.h 8 Feb 2003 20:37:55 -0000 1.4 +++ powerpc/include/_types.h 22 Mar 2003 04:34:24 -0000 @@ -102,6 +102,7 @@ typedef __uint32_t __u_register_t; typedef __uint32_t __vm_offset_t; typedef __int64_t __vm_ooffset_t; +typedef __uint32_t __vm_paddr_t; typedef __uint64_t __vm_pindex_t; typedef __uint32_t __vm_size_t; Index: sparc64/include/_types.h =================================================================== RCS file: /home/ncvs/src/sys/sparc64/include/_types.h,v retrieving revision 1.3 diff -u -r1.3 _types.h --- sparc64/include/_types.h 8 Feb 2003 20:37:55 -0000 1.3 +++ sparc64/include/_types.h 22 Mar 2003 04:34:24 -0000 @@ -89,6 +89,7 @@ typedef __uint64_t __u_register_t; typedef __uint64_t __vm_offset_t; typedef __int64_t __vm_ooffset_t; +typedef __uint64_t __vm_paddr_t; typedef __uint64_t __vm_pindex_t; typedef __uint64_t __vm_size_t; Index: sys/conf.h =================================================================== RCS file: /home/ncvs/src/sys/sys/conf.h,v retrieving revision 1.171 diff -u -r1.171 conf.h --- sys/conf.h 9 Mar 2003 10:29:20 -0000 1.171 +++ sys/conf.h 22 Mar 2003 04:34:24 -0000 @@ -154,7 +154,7 @@ typedef int d_write_t(dev_t dev, struct uio *uio, int ioflag); typedef int d_poll_t(dev_t dev, int events, struct thread *td); typedef int d_kqfilter_t(dev_t dev, struct knote *kn); -typedef int d_mmap_t(dev_t dev, vm_offset_t offset, vm_offset_t *paddr, +typedef int d_mmap_t(dev_t dev, vm_offset_t offset, vm_paddr_t *paddr, int nprot); typedef int l_open_t(dev_t dev, struct tty *tp); Index: sys/jumbo.h =================================================================== RCS file: /home/ncvs/src/sys/sys/jumbo.h,v retrieving revision 1.3 diff -u -r1.3 jumbo.h --- sys/jumbo.h 6 Jul 2002 02:44:15 -0000 1.3 +++ sys/jumbo.h 22 Mar 2003 04:46:11 -0000 @@ -46,7 +46,7 @@ pg = PHYS_TO_VM_PAGE(pa); pg->flags &= ~PG_BUSY; - return (caddr_t)(ptoa(pg->pindex) + jumbo_basekva); + return (caddr_t)(ptoa((vm_offset_t)pg->pindex) + jumbo_basekva); } int jumbo_vm_init(void); Index: sys/malloc.h =================================================================== RCS file: /home/ncvs/src/sys/sys/malloc.h,v retrieving revision 1.73 diff -u -r1.73 malloc.h --- sys/malloc.h 10 Mar 2003 19:39:53 -0000 1.73 +++ sys/malloc.h 22 Mar 2003 04:34:24 -0000 @@ -103,7 +103,7 @@ /* XXX struct malloc_type is unused for contig*(). */ void contigfree(void *addr, unsigned long size, struct malloc_type *type); void *contigmalloc(unsigned long size, struct malloc_type *type, int flags, - unsigned long low, unsigned long high, unsigned long alignment, + vm_paddr_t low, vm_paddr_t high, unsigned long alignment, unsigned long boundary); void free(void *addr, struct malloc_type *type); void *malloc(unsigned long size, struct malloc_type *type, int flags); Index: sys/types.h =================================================================== RCS file: /home/ncvs/src/sys/sys/types.h,v retrieving revision 1.81 diff -u -r1.81 types.h --- sys/types.h 1 Mar 2003 16:51:40 -0000 1.81 +++ sys/types.h 22 Mar 2003 04:34:24 -0000 @@ -243,6 +243,7 @@ typedef __vm_offset_t vm_offset_t; typedef __vm_ooffset_t vm_ooffset_t; +typedef __vm_paddr_t vm_paddr_t; typedef __vm_pindex_t vm_pindex_t; typedef __vm_size_t vm_size_t; Index: vm/device_pager.c =================================================================== RCS file: /home/ncvs/src/sys/vm/device_pager.c,v retrieving revision 1.62 diff -u -r1.62 device_pager.c --- vm/device_pager.c 25 Feb 2003 03:21:22 -0000 1.62 +++ vm/device_pager.c 22 Mar 2003 04:34:24 -0000 @@ -74,7 +74,7 @@ static uma_zone_t fakepg_zone; -static vm_page_t dev_pager_getfake(vm_offset_t); +static vm_page_t dev_pager_getfake(vm_paddr_t); static void dev_pager_putfake(vm_page_t); struct pagerops devicepagerops = { @@ -107,7 +107,8 @@ d_mmap_t *mapfunc; vm_object_t object; unsigned int npages; - vm_offset_t off, paddr; + vm_paddr_t paddr; + vm_offset_t off; /* * Offset should be page aligned. @@ -202,7 +203,7 @@ int reqpage; { vm_pindex_t offset; - vm_offset_t paddr; + vm_paddr_t paddr; vm_page_t page; dev_t dev; int i, ret; @@ -262,7 +263,7 @@ static vm_page_t dev_pager_getfake(paddr) - vm_offset_t paddr; + vm_paddr_t paddr; { vm_page_t m; Index: vm/pmap.h =================================================================== RCS file: /home/ncvs/src/sys/vm/pmap.h,v retrieving revision 1.55 diff -u -r1.55 pmap.h --- vm/pmap.h 16 Mar 2003 04:16:03 -0000 1.55 +++ vm/pmap.h 22 Mar 2003 04:34:24 -0000 @@ -61,7 +61,7 @@ * any improvements or extensions that they make and grant Carnegie the * rights to redistribute these changes. * - * $FreeBSD: src/sys/vm/pmap.h,v 1.55 2003/03/16 04:16:03 jake Exp $ + * $FreeBSD: src/sys/vm/pmap.h,v 1.54 2003/02/25 03:21:22 mux Exp $ */ /* @@ -106,12 +106,12 @@ void pmap_copy_page(vm_page_t, vm_page_t); void pmap_enter(pmap_t, vm_offset_t, vm_page_t, vm_prot_t, boolean_t); -vm_offset_t pmap_extract(pmap_t pmap, vm_offset_t va); +vm_paddr_t pmap_extract(pmap_t pmap, vm_offset_t va); void pmap_growkernel(vm_offset_t); -void pmap_init(vm_offset_t, vm_offset_t); +void pmap_init(vm_paddr_t, vm_paddr_t); boolean_t pmap_is_modified(vm_page_t m); boolean_t pmap_ts_referenced(vm_page_t m); -vm_offset_t pmap_map(vm_offset_t *, vm_offset_t, vm_offset_t, int); +vm_offset_t pmap_map(vm_offset_t *, vm_paddr_t, vm_paddr_t, int); void pmap_object_init_pt(pmap_t pmap, vm_offset_t addr, vm_object_t object, vm_pindex_t pindex, vm_offset_t size, int pagelimit); Index: vm/vm_contig.c =================================================================== RCS file: /home/ncvs/src/sys/vm/vm_contig.c,v retrieving revision 1.14 diff -u -r1.14 vm_contig.c --- vm/vm_contig.c 23 Dec 2002 20:39:15 -0000 1.14 +++ vm/vm_contig.c 22 Mar 2003 04:34:24 -0000 @@ -132,14 +132,15 @@ unsigned long size, /* should be size_t here and for malloc() */ struct malloc_type *type, int flags, - unsigned long low, - unsigned long high, + vm_paddr_t low, + vm_paddr_t high, unsigned long alignment, unsigned long boundary, vm_map_t map) { int i, s, start; - vm_offset_t addr, phys, tmp_addr; + vm_paddr_t phys; + vm_offset_t addr, tmp_addr; int pass; vm_page_t pga = vm_page_array; @@ -264,8 +265,8 @@ unsigned long size, /* should be size_t here and for malloc() */ struct malloc_type *type, int flags, - unsigned long low, - unsigned long high, + vm_paddr_t low, + vm_paddr_t high, unsigned long alignment, unsigned long boundary) { @@ -288,8 +289,8 @@ vm_offset_t vm_page_alloc_contig( vm_offset_t size, - vm_offset_t low, - vm_offset_t high, + vm_paddr_t low, + vm_paddr_t high, vm_offset_t alignment) { vm_offset_t ret; Index: vm/vm_extern.h =================================================================== RCS file: /home/ncvs/src/sys/vm/vm_extern.h,v retrieving revision 1.60 diff -u -r1.60 vm_extern.h --- vm/vm_extern.h 21 Jan 2003 11:34:57 -0000 1.60 +++ vm/vm_extern.h 22 Mar 2003 04:34:25 -0000 @@ -80,7 +80,7 @@ void vm_forkproc(struct thread *, struct proc *, struct thread *, int); void vm_waitproc(struct proc *); int vm_mmap(vm_map_t, vm_offset_t *, vm_size_t, vm_prot_t, vm_prot_t, int, void *, vm_ooffset_t); -vm_offset_t vm_page_alloc_contig(vm_offset_t, vm_offset_t, vm_offset_t, vm_offset_t); +vm_offset_t vm_page_alloc_contig(vm_offset_t, vm_paddr_t, vm_paddr_t, vm_offset_t); void vm_set_page_size(void); struct vmspace *vmspace_alloc(vm_offset_t, vm_offset_t); struct vmspace *vmspace_fork(struct vmspace *); Index: vm/vm_fault.c =================================================================== RCS file: /home/ncvs/src/sys/vm/vm_fault.c,v retrieving revision 1.163 diff -u -r1.163 vm_fault.c --- vm/vm_fault.c 8 Mar 2003 06:58:18 -0000 1.163 +++ vm/vm_fault.c 22 Mar 2003 04:34:25 -0000 @@ -981,7 +981,8 @@ vm_map_t map; vm_offset_t start, end; { - vm_offset_t va, pa; + vm_paddr_t pa; + vm_offset_t va; pmap_t pmap; pmap = vm_map_pmap(map); @@ -993,7 +994,7 @@ */ for (va = start; va < end; va += PAGE_SIZE) { pa = pmap_extract(pmap, va); - if (pa != (vm_offset_t) 0) { + if (pa != 0) { pmap_change_wiring(pmap, va, FALSE); vm_page_lock_queues(); vm_page_unwire(PHYS_TO_VM_PAGE(pa), 1); Index: vm/vm_object.c =================================================================== RCS file: /home/ncvs/src/sys/vm/vm_object.c,v retrieving revision 1.260 diff -u -r1.260 vm_object.c --- vm/vm_object.c 18 Mar 2003 08:45:25 -0000 1.260 +++ vm/vm_object.c 22 Mar 2003 04:34:25 -0000 @@ -1980,7 +1980,7 @@ TAILQ_FOREACH(object, &vm_object_list, object_list) { vm_pindex_t idx, fidx; vm_pindex_t osize; - vm_offset_t pa = -1, padiff; + vm_paddr_t pa = -1, padiff; int rcount; vm_page_t m; Index: vm/vm_page.c =================================================================== RCS file: /home/ncvs/src/sys/vm/vm_page.c,v retrieving revision 1.243 diff -u -r1.243 vm_page.c --- vm/vm_page.c 19 Mar 2003 00:34:43 -0000 1.243 +++ vm/vm_page.c 22 Mar 2003 04:34:25 -0000 @@ -163,18 +163,20 @@ vm_page_startup(vm_offset_t starta, vm_offset_t enda, vm_offset_t vaddr) { vm_offset_t mapped; - vm_size_t npages, page_range; - vm_offset_t new_end; + vm_size_t npages; + vm_paddr_t page_range; + vm_paddr_t new_end; int i; - vm_offset_t pa; + vm_paddr_t pa; int nblocks; - vm_offset_t last_pa; + vm_paddr_t last_pa; /* the biggest memory array is the second group of pages */ - vm_offset_t end; - vm_offset_t biggestone, biggestsize; + vm_paddr_t end; + vm_paddr_t biggestsize; + int biggestone; - vm_offset_t total; + vm_paddr_t total; vm_size_t bootpages; total = 0; @@ -189,7 +191,7 @@ } for (i = 0; phys_avail[i + 1]; i += 2) { - vm_size_t size = phys_avail[i + 1] - phys_avail[i]; + vm_paddr_t size = phys_avail[i + 1] - phys_avail[i]; if (size > biggestsize) { biggestone = i; Index: vm/vm_page.h =================================================================== RCS file: /home/ncvs/src/sys/vm/vm_page.h,v retrieving revision 1.117 diff -u -r1.117 vm_page.h --- vm/vm_page.h 19 Dec 2002 07:23:46 -0000 1.117 +++ vm/vm_page.h 22 Mar 2003 04:34:25 -0000 @@ -116,7 +116,7 @@ vm_object_t object; /* which object am I in (O,P)*/ vm_pindex_t pindex; /* offset into object (O,P) */ - vm_offset_t phys_addr; /* physical address of page */ + vm_paddr_t phys_addr; /* physical address of page */ struct md_page md; /* machine dependant stuff */ u_short queue; /* page queue index */ u_short flags, /* see below */ @@ -335,7 +335,7 @@ void vm_page_wakeup(vm_page_t m); void vm_pageq_init(void); -vm_page_t vm_pageq_add_new_page(vm_offset_t pa); +vm_page_t vm_pageq_add_new_page(vm_paddr_t pa); void vm_pageq_enqueue(int queue, vm_page_t m); void vm_pageq_remove_nowakeup(vm_page_t m); void vm_pageq_remove(vm_page_t m); Index: vm/vm_pageq.c =================================================================== RCS file: /home/ncvs/src/sys/vm/vm_pageq.c,v retrieving revision 1.8 diff -u -r1.8 vm_pageq.c --- vm/vm_pageq.c 16 Feb 2003 06:36:48 -0000 1.8 +++ vm/vm_pageq.c 22 Mar 2003 04:34:25 -0000 @@ -90,7 +90,7 @@ * Must be called at splhigh(). */ vm_page_t -vm_pageq_add_new_page(vm_offset_t pa) +vm_pageq_add_new_page(vm_paddr_t pa) { vm_page_t m; Index: x86_64/include/_types.h =================================================================== RCS file: /home/ncvs/src/sys/x86_64/include/_types.h,v retrieving revision 1.2 diff -u -r1.2 _types.h --- x86_64/include/_types.h 23 Aug 2002 16:49:06 -0000 1.2 +++ x86_64/include/_types.h 22 Mar 2003 04:34:25 -0000 @@ -87,6 +87,7 @@ typedef __uint64_t __u_register_t; typedef __uint64_t __vm_offset_t; typedef __int64_t __vm_ooffset_t; +typedef __uint64_t __vm_paddr_t; typedef __uint64_t __vm_pindex_t; typedef __uint64_t __vm_size_t;