Message type for SYS_IOPENABLE
Change-Id: I8b089c30c7f9ae75e404f63495bbb199d583f1cd
This commit is contained in:
parent
e412a58209
commit
05f155c0a9
4 changed files with 12 additions and 7 deletions
|
@ -310,9 +310,6 @@
|
|||
# define IRQ_WORD 0x200 /* word values */
|
||||
# define IRQ_LONG 0x400 /* long values */
|
||||
|
||||
/* Field names for SYS_IOPENABLE. */
|
||||
#define IOP_ENDPT m2_l1 /* target endpoint */
|
||||
|
||||
/* Field names for _UMAP, _VIRCOPY, _PHYSCOPY. */
|
||||
#define CP_SRC_ENDPT m5_i1 /* process to copy from */
|
||||
#define CP_SRC_ADDR m5_l1 /* address where data come from */
|
||||
|
|
|
@ -707,6 +707,13 @@ typedef struct {
|
|||
} mess_lsys_krn_sys_abort;
|
||||
_ASSERT_MSG_SIZE(mess_lsys_krn_sys_abort);
|
||||
|
||||
typedef struct {
|
||||
endpoint_t endpt;
|
||||
|
||||
uint8_t padding[52];
|
||||
} mess_lsys_krn_sys_iopenable;
|
||||
_ASSERT_MSG_SIZE(mess_lsys_krn_sys_iopenable);
|
||||
|
||||
typedef struct {
|
||||
int request;
|
||||
int vector;
|
||||
|
@ -1489,6 +1496,7 @@ typedef struct {
|
|||
mess_lsys_krn_schedctl m_lsys_krn_schedctl;
|
||||
mess_lsys_krn_schedule m_lsys_krn_schedule;
|
||||
mess_lsys_krn_sys_abort m_lsys_krn_sys_abort;
|
||||
mess_lsys_krn_sys_iopenable m_lsys_krn_sys_iopenable;
|
||||
mess_lsys_krn_sys_irqctl m_lsys_krn_sys_irqctl;
|
||||
mess_lsys_krn_sys_memset m_lsys_krn_sys_memset;
|
||||
mess_lsys_krn_sys_sdevio m_lsys_krn_sys_sdevio;
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* m_type: SYS_IOPENABLE
|
||||
*
|
||||
* The parameters for this system call are:
|
||||
* m2_i2: IOP_ENDPT (process to give I/O Protection Level bits)
|
||||
* m_lsys_krn_sys_iopenable.endpt (process to give I/O Protection Level bits)
|
||||
*
|
||||
* Author:
|
||||
* Jorrit N. Herder <jnherder@cs.vu.nl>
|
||||
|
@ -22,9 +22,9 @@ int do_iopenable(struct proc * caller, message * m_ptr)
|
|||
int proc_nr;
|
||||
|
||||
#if 1 /* ENABLE_USERPRIV && ENABLE_USERIOPL */
|
||||
if (m_ptr->IOP_ENDPT == SELF) {
|
||||
if (m_ptr->m_lsys_krn_sys_iopenable.endpt == SELF) {
|
||||
okendpt(caller->p_endpoint, &proc_nr);
|
||||
} else if(!isokendpt(m_ptr->IOP_ENDPT, &proc_nr))
|
||||
} else if(!isokendpt(m_ptr->m_lsys_krn_sys_iopenable.endpt, &proc_nr))
|
||||
return(EINVAL);
|
||||
enable_iop(proc_addr(proc_nr));
|
||||
return(OK);
|
||||
|
|
|
@ -7,7 +7,7 @@ int sys_enable_iop(proc_ep)
|
|||
endpoint_t proc_ep; /* number of process to allow I/O */
|
||||
{
|
||||
message m_iop;
|
||||
m_iop.IOP_ENDPT = proc_ep;
|
||||
m_iop.m_lsys_krn_sys_iopenable.endpt = proc_ep;
|
||||
return _kernel_call(SYS_IOPENABLE, &m_iop);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue