From: Philip Homburg Date: Fri, 27 Jan 2006 13:02:02 +0000 (+0000) Subject: I/O, memory and IRQ resource control interface. X-Git-Tag: v3.1.2a~410 X-Git-Url: http://zhaoyanbai.com/repos/%22http:/www.isc.org/static/style.css?a=commitdiff_plain;h=8036f12f47839f394a9a123a13f5bc9228d7388c;p=minix.git I/O, memory and IRQ resource control interface. --- diff --git a/include/minix/com.h b/include/minix/com.h index ed8ea1ca2..c65757642 100755 --- a/include/minix/com.h +++ b/include/minix/com.h @@ -279,6 +279,13 @@ #define NR_SYS_CALLS 31 /* number of system calls */ +/* Subfunctions for SYS_PRIVCTL */ +#define SYS_PRIV_INIT 1 /* Initialize a privilege structure */ +#define SYS_PRIV_ADD_IO 2 /* Add I/O range (struct io_range) */ +#define SYS_PRIV_ADD_MEM 3 /* Add memory range (struct mem_range) + */ +#define SYS_PRIV_ADD_IRQ 4 /* Add IRQ */ + /* Field names for SYS_MEMSET, SYS_SEGCTL. */ #define MEM_PTR m2_p1 /* base */ #define MEM_COUNT m2_l1 /* count */ @@ -393,7 +400,7 @@ #define T_CHILD_STIME m4_l4 /* sys time consumed by process' children */ #define T_BOOT_TICKS m4_l5 /* number of clock ticks since boot time */ -/* Field names for SYS_TRACE, SYS_SVRCTL. */ +/* Field names for SYS_TRACE, SYS_PRIVCTL. */ #define CTL_PROC_NR m2_i1 /* process number of the caller */ #define CTL_REQUEST m2_i2 /* server control request */ #define CTL_MM_PRIV m2_i3 /* privilege as seen by PM */ diff --git a/include/minix/syslib.h b/include/minix/syslib.h index 6fc16bf21..794330fd4 100755 --- a/include/minix/syslib.h +++ b/include/minix/syslib.h @@ -34,7 +34,7 @@ _PROTOTYPE( int sys_newmap, (int proc, struct mem_map *ptr)); _PROTOTYPE( int sys_exit, (int proc)); _PROTOTYPE( int sys_trace, (int req, int proc, long addr, long *data_p)); -_PROTOTYPE( int sys_svrctl, (int proc, int req, int priv,vir_bytes argp)); +_PROTOTYPE( int sys_privctl, (int proc, int req, int i, void *p)); _PROTOTYPE( int sys_nice, (int proc, int priority)); _PROTOTYPE( int sys_int86, (struct reg86u *reg86p)); diff --git a/include/minix/type.h b/include/minix/type.h index 8c2603356..ab8801588 100755 --- a/include/minix/type.h +++ b/include/minix/type.h @@ -134,4 +134,16 @@ struct machine { int vdu_vga; }; +struct io_range +{ + unsigned ior_base; /* Lowest I/O port in range */ + unsigned ior_limit; /* Highest I/O port in range */ +}; + +struct mem_range +{ + phys_bytes mr_base; /* Lowest memory address in range */ + phys_bytes mr_limit; /* Highest memory address in range */ +}; + #endif /* _TYPE_H */