From: Lionel Sambuc Date: Wed, 21 May 2014 14:59:30 +0000 (+0200) Subject: Message type for SYS_IOPENABLE X-Git-Tag: v3.3.0~225 X-Git-Url: http://zhaoyanbai.com/repos/Bv9ARM.ch03.html?a=commitdiff_plain;h=05f155c0a964110e9ef14af795737c0159bdc861;p=minix.git Message type for SYS_IOPENABLE Change-Id: I8b089c30c7f9ae75e404f63495bbb199d583f1cd --- diff --git a/include/minix/com.h b/include/minix/com.h index 1e9a9ba19..12b01271f 100644 --- a/include/minix/com.h +++ b/include/minix/com.h @@ -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 */ diff --git a/include/minix/ipc.h b/include/minix/ipc.h index c3c7053cc..c5c823e85 100644 --- a/include/minix/ipc.h +++ b/include/minix/ipc.h @@ -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; diff --git a/kernel/arch/i386/do_iopenable.c b/kernel/arch/i386/do_iopenable.c index 680be3b86..97a39e7e5 100644 --- a/kernel/arch/i386/do_iopenable.c +++ b/kernel/arch/i386/do_iopenable.c @@ -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 @@ -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); diff --git a/lib/libsys/arch/i386/sys_eniop.c b/lib/libsys/arch/i386/sys_eniop.c index ca0681b44..da1be418e 100644 --- a/lib/libsys/arch/i386/sys_eniop.c +++ b/lib/libsys/arch/i386/sys_eniop.c @@ -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); }