minix/lib/other/_vm_set_priv.c
Ben Gras 7e73260cf5 - enable remembering of device memory ranges set by PCI and
told to kernel
  - makes VM ask the kernel if a certain process is allowed
    to map in a range of physical memory (VM rounds it to page
    boundaries afterwards - but it's impossible to map anything
    smaller otherwise so I assume this is safe, i.e. there won't
    be anything else in that page; certainly no regular memory)
  - VM permission check cleanup (no more hardcoded calls, less
    hardcoded logic, more readable main loop), a loose end left
    by GQ
  - remove do_copy warning, as the ipc server triggers this but
    it's no more harmful than the special cases already excluded
    explicitly (VFS, PM, etc).
2009-11-03 11:12:23 +00:00

12 lines
225 B
C

#include <lib.h>
#define vm_set_priv _vm_set_priv
#include <unistd.h>
PUBLIC int vm_set_priv(int nr, void *buf)
{
message m;
m.VM_RS_NR = nr;
m.VM_RS_BUF = (long) buf;
return _syscall(VM_PROC_NR, VM_RS_SET_PRIV, &m);
}