static void sys_unmap_wrap(struct x86_exregs *regs) { L4_Word_t control = regs->eax; /* TODO: pass utcb to sys_unmap()? */ void *utcb = thread_get_utcb(get_current_thread()); if((control & 0x3f) > 0) L4_VREG(utcb, L4_TCR_MR(0)) = regs->esi; sys_unmap(control); regs->esi = L4_VREG(utcb, L4_TCR_MR(0)); }
/** * ixmem_free_pages - frees 2MB pages * @addr: the start address * @nrpages: the number of pages */ void ix_free_pages(void *addr, int nrpages) { sys_unmap(addr, nrpages, PGSIZE_2MB); }