* Note, this will onl
*/
vm_offset_t
-io_map(vm_offset_t phys_addr, vm_size_t size, unsigned int flags)
+io_map(vm_map_offset_t phys_addr, vm_size_t size, unsigned int flags)
{
vm_offset_t start;
- int i;
- unsigned int j, mflags;
+ vm_size_t i;
+ unsigned int mflags;
vm_page_t m;
mflags = mmFlgBlock | mmFlgUseAttr | (flags & VM_MEM_GUARDED) | ((flags & VM_MEM_NOT_CACHEABLE) >> 1); /* Convert to our mapping_make flags */
mflags, /* Map with requested cache mode */
(size >> 12), VM_PROT_READ|VM_PROT_WRITE);
- return (start + (phys_addr & PAGE_MASK)); /* Pass back the physical address */
+ return (start + (phys_addr & PAGE_MASK)); /* Pass back the virtual address */
} else {
* Allocate and map memory for devices before the VM system comes alive.
*/
-vm_offset_t io_map_spec(vm_offset_t phys_addr, vm_size_t size, unsigned int flags)
+vm_offset_t io_map_spec(vm_map_offset_t phys_addr, vm_size_t size, unsigned int flags)
{
vm_offset_t start;
unsigned int mflags;