9 vm_map_phys(endpoint_t who
, void *phaddr
, size_t len
)
14 memset(&m
, 0, sizeof(m
));
15 m
.m_lsys_vm_map_phys
.ep
= who
;
16 m
.m_lsys_vm_map_phys
.phaddr
= (phys_bytes
)phaddr
;
17 m
.m_lsys_vm_map_phys
.len
= len
;
19 r
= _taskcall(VM_PROC_NR
, VM_MAP_PHYS
, &m
);
21 if (r
!= OK
) return MAP_FAILED
;
23 r
= sef_llvm_add_special_mem_region(m
.m_lsys_vm_map_phys
.reply
,
26 printf("vm_map_phys: add_special_mem_region failed: %d\n", r
);
29 return m
.m_lsys_vm_map_phys
.reply
;
33 vm_unmap_phys(endpoint_t who
, void *vaddr
, size_t len
)
38 memset(&m
, 0, sizeof(m
));
39 m
.m_lsys_vm_unmap_phys
.ep
= who
;
40 m
.m_lsys_vm_unmap_phys
.vaddr
= vaddr
;
42 r
= _taskcall(VM_PROC_NR
, VM_UNMAP_PHYS
, &m
);
46 r
= sef_llvm_del_special_mem_region_by_addr(vaddr
);
48 printf("vm_map_phys: del_special_mem_region failed: %d\n", r
);