diff --git a/include/minix/com.h b/include/minix/com.h index d1c1ee3fc..e1b4513db 100644 --- a/include/minix/com.h +++ b/include/minix/com.h @@ -702,8 +702,6 @@ #define VM_MAP_PHYS (VM_RQ_BASE+15) #define VM_UNMAP_PHYS (VM_RQ_BASE+16) -# define VMUP_EP m1_i1 -# define VMUP_VADDR m1_p1 /* To VM: map in cache block by FS */ #define VM_MAPCACHEPAGE (VM_RQ_BASE+26) diff --git a/include/minix/ipc.h b/include/minix/ipc.h index 15bc6203a..6b2e52905 100644 --- a/include/minix/ipc.h +++ b/include/minix/ipc.h @@ -1856,6 +1856,13 @@ typedef struct { } mess_lsys_vm_map_phys; _ASSERT_MSG_SIZE(mess_lsys_vm_map_phys); +typedef struct { + endpoint_t ep; + void *vaddr; + uint8_t padding[48]; +} mess_lsys_vm_unmap_phys; +_ASSERT_MSG_SIZE(mess_lsys_vm_unmap_phys); + typedef struct { endpoint_t m_source; /* who sent the message */ int m_type; /* what kind of message is it */ @@ -2093,6 +2100,7 @@ typedef struct { mess_lc_ipc_semop m_lc_ipc_semop; mess_lc_vm_brk m_lc_vm_brk; mess_lsys_vm_map_phys m_lsys_vm_map_phys; + mess_lsys_vm_unmap_phys m_lsys_vm_unmap_phys; mess_vfs_lchardriver_cancel m_vfs_lchardriver_cancel; mess_vfs_lchardriver_openclose m_vfs_lchardriver_openclose; diff --git a/lib/libsys/vm_map_phys.c b/lib/libsys/vm_map_phys.c index bd1e183e1..1635c0e6e 100644 --- a/lib/libsys/vm_map_phys.c +++ b/lib/libsys/vm_map_phys.c @@ -29,8 +29,8 @@ vm_unmap_phys(endpoint_t who, void *vaddr, size_t len) message m; memset(&m, 0, sizeof(m)); - m.VMUP_EP = who; - m.VMUP_VADDR = vaddr; + m.m_lsys_vm_unmap_phys.ep = who; + m.m_lsys_vm_unmap_phys.vaddr = vaddr; return _taskcall(VM_PROC_NR, VM_UNMAP_PHYS, &m); } diff --git a/servers/vm/mmap.c b/servers/vm/mmap.c index dcdbf44b2..d6cc1cda8 100644 --- a/servers/vm/mmap.c +++ b/servers/vm/mmap.c @@ -496,7 +496,7 @@ int do_munmap(message *m) endpoint_t target = SELF; if(m->m_type == VM_UNMAP_PHYS) { - target = m->VMUP_EP; + target = m->m_lsys_vm_unmap_phys.ep; } else if(m->m_type == VM_SHM_UNMAP) { target = m->m_lc_vm_shm_unmap.forwhom; } @@ -511,7 +511,7 @@ int do_munmap(message *m) vmp = &vmproc[n]; if(m->m_type == VM_UNMAP_PHYS) { - addr = (vir_bytes) m->VMUP_VADDR; + addr = (vir_bytes) m->m_lsys_vm_unmap_phys.vaddr; } else if(m->m_type == VM_SHM_UNMAP) { addr = (vir_bytes) m->m_lc_vm_shm_unmap.addr; } else addr = (vir_bytes) m->VMUM_ADDR;