minix/lib/syslib/sys_privctl.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

25 lines
472 B
C

#include "syslib.h"
int sys_privctl(endpoint_t proc_ep, int request, void *p)
{
message m;
m.CTL_ENDPT = proc_ep;
m.CTL_REQUEST = request;
m.CTL_ARG_PTR = p;
return _taskcall(SYSTASK, SYS_PRIVCTL, &m);
}
int sys_privquery_mem(endpoint_t proc_ep, phys_bytes start, phys_bytes len)
{
message m;
m.CTL_ENDPT = proc_ep;
m.CTL_REQUEST = SYS_PRIV_QUERY_MEM;
m.CTL_PHYSSTART = start;
m.CTL_PHYSLEN = len;
return _taskcall(SYSTASK, SYS_PRIVCTL, &m);
}