. rename message fields to endpoint variants
. remove or optionalify some pci debugging stuff
This commit is contained in:
parent
7550304e19
commit
5d7f5fccf5
28 changed files with 41 additions and 34 deletions
|
@ -7,7 +7,7 @@ PUBLIC int sys_enable_iop(proc_nr)
|
|||
int proc_nr; /* number of process to allow I/O */
|
||||
{
|
||||
message m_iop;
|
||||
m_iop.PROC_NR = proc_nr;
|
||||
m_iop.IO_ENDPT = proc_nr;
|
||||
return _taskcall(SYSTASK, SYS_IOPENABLE, &m_iop);
|
||||
}
|
||||
|
||||
|
|
|
@ -40,7 +40,9 @@ u16_t did;
|
|||
* terminated.
|
||||
*/
|
||||
|
||||
#if DEBUG
|
||||
printf("pci_dev_name: got name %s\n", name);
|
||||
#endif
|
||||
return name;
|
||||
}
|
||||
|
||||
|
|
|
@ -26,8 +26,10 @@ u16_t *didp;
|
|||
*devindp= m.m1_i1;
|
||||
*vidp= m.m1_i2;
|
||||
*didp= m.m1_i3;
|
||||
#if DEBUG
|
||||
printf("pci_first_dev: got device %d, %04x/%04x\n",
|
||||
*devindp, *vidp, *didp);
|
||||
#endif
|
||||
return 1;
|
||||
}
|
||||
if (m.m_type != 0)
|
||||
|
|
|
@ -23,7 +23,6 @@ char *name;
|
|||
r= findproc("pci", &pci_procnr);
|
||||
if (r != 0)
|
||||
panic("pci", "pci_init1: findproc failed for 'pci'", r);
|
||||
printf("'pci' is at %d\n", pci_procnr);
|
||||
|
||||
m.m_type= BUSC_PCI_INIT;
|
||||
len= strlen(name);
|
||||
|
|
|
@ -11,7 +11,7 @@ PUBLIC int sys_abort(int how, ...)
|
|||
|
||||
va_start(ap, how);
|
||||
if ((m.ABRT_HOW = how) == RBT_MONITOR) {
|
||||
m.ABRT_MON_PROC = va_arg(ap, int);
|
||||
m.ABRT_MON_ENDPT = va_arg(ap, int);
|
||||
m.ABRT_MON_ADDR = va_arg(ap, char *);
|
||||
m.ABRT_MON_LEN = va_arg(ap, size_t);
|
||||
}
|
||||
|
|
|
@ -9,7 +9,7 @@ int proc_nr; /* process number */
|
|||
message m;
|
||||
int result;
|
||||
|
||||
m.SIG_PROC = proc_nr;
|
||||
m.SIG_ENDPT = proc_nr;
|
||||
result = _taskcall(SYSTASK, SYS_ENDKSIG, &m);
|
||||
return(result);
|
||||
}
|
||||
|
|
|
@ -3,11 +3,11 @@
|
|||
/*===========================================================================*
|
||||
* sys_enable_iop *
|
||||
*===========================================================================*/
|
||||
PUBLIC int sys_enable_iop(proc_nr)
|
||||
int proc_nr; /* number of process to allow I/O */
|
||||
PUBLIC int sys_enable_iop(proc_nr_e)
|
||||
int proc_nr_e; /* number of process to allow I/O */
|
||||
{
|
||||
message m_iop;
|
||||
m_iop.PROC_NR = proc_nr;
|
||||
m_iop.IO_ENDPT = proc_nr_e;
|
||||
return _taskcall(SYSTASK, SYS_IOPENABLE, &m_iop);
|
||||
}
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@ vir_bytes initpc;
|
|||
|
||||
message m;
|
||||
|
||||
m.PR_PROC_NR = proc;
|
||||
m.PR_ENDPT = proc;
|
||||
m.PR_STACK_PTR = ptr;
|
||||
m.PR_NAME_PTR = prog_name;
|
||||
m.PR_IP_PTR = (char *)initpc;
|
||||
|
|
|
@ -12,6 +12,6 @@ int proc; /* which process has exited */
|
|||
*/
|
||||
message m;
|
||||
|
||||
m.PR_PROC_NR = proc;
|
||||
m.PR_ENDPT = proc;
|
||||
return(_taskcall(SYSTASK, SYS_EXIT, &m));
|
||||
}
|
||||
|
|
|
@ -1,14 +1,18 @@
|
|||
#include "syslib.h"
|
||||
|
||||
PUBLIC int sys_fork(parent, child)
|
||||
PUBLIC int sys_fork(parent, child, child_endpoint)
|
||||
int parent; /* process doing the fork */
|
||||
int child; /* which proc has been created by the fork */
|
||||
int *child_endpoint;
|
||||
{
|
||||
/* A process has forked. Tell the kernel. */
|
||||
|
||||
message m;
|
||||
int r;
|
||||
|
||||
m.PR_PPROC_NR = parent;
|
||||
m.PR_PROC_NR = child;
|
||||
return(_taskcall(SYSTASK, SYS_FORK, &m));
|
||||
m.PR_ENDPT = parent;
|
||||
m.PR_SLOT = child;
|
||||
r = _taskcall(SYSTASK, SYS_FORK, &m);
|
||||
*child_endpoint = m.PR_ENDPT;
|
||||
return r;
|
||||
}
|
||||
|
|
|
@ -13,11 +13,11 @@ int len2; /* length or process nr */
|
|||
message m;
|
||||
|
||||
m.I_REQUEST = request;
|
||||
m.I_PROC_NR = SELF; /* always store values at caller */
|
||||
m.I_ENDPT = SELF; /* always store values at caller */
|
||||
m.I_VAL_PTR = ptr;
|
||||
m.I_VAL_LEN = len;
|
||||
m.I_VAL_PTR2 = ptr2;
|
||||
m.I_VAL_LEN2 = len2;
|
||||
m.I_VAL_LEN2_E = len2;
|
||||
|
||||
return(_taskcall(SYSTASK, SYS_GETINFO, &m));
|
||||
}
|
||||
|
|
|
@ -11,7 +11,7 @@ sigset_t *k_sig_map; /* return signal map here */
|
|||
int result;
|
||||
|
||||
result = _taskcall(SYSTASK, SYS_GETKSIG, &m);
|
||||
*k_proc_nr = m.SIG_PROC;
|
||||
*k_proc_nr = m.SIG_ENDPT;
|
||||
*k_sig_map = (sigset_t) m.SIG_MAP;
|
||||
return(result);
|
||||
}
|
||||
|
|
|
@ -7,7 +7,7 @@ int signr; /* signal number: 1 - 16 */
|
|||
/* A proc has to be signaled via MM. Tell the kernel. */
|
||||
message m;
|
||||
|
||||
m.SIG_PROC = proc;
|
||||
m.SIG_ENDPT = proc;
|
||||
m.SIG_NUMBER = signr;
|
||||
return(_taskcall(SYSTASK, SYS_KILL, &m));
|
||||
}
|
||||
|
|
|
@ -8,7 +8,7 @@ struct mem_map *ptr; /* pointer to new map */
|
|||
|
||||
message m;
|
||||
|
||||
m.PR_PROC_NR = proc;
|
||||
m.PR_ENDPT = proc;
|
||||
m.PR_MEM_PTR = (char *) ptr;
|
||||
return(_taskcall(SYSTASK, SYS_NEWMAP, &m));
|
||||
}
|
||||
|
|
|
@ -19,10 +19,10 @@ phys_bytes bytes; /* how many bytes */
|
|||
message copy_mess;
|
||||
|
||||
if (bytes == 0L) return(OK);
|
||||
copy_mess.CP_SRC_PROC_NR = src_proc;
|
||||
copy_mess.CP_SRC_ENDPT = src_proc;
|
||||
copy_mess.CP_SRC_SPACE = src_seg;
|
||||
copy_mess.CP_SRC_ADDR = (long) src_vir;
|
||||
copy_mess.CP_DST_PROC_NR = dst_proc;
|
||||
copy_mess.CP_DST_ENDPT = dst_proc;
|
||||
copy_mess.CP_DST_SPACE = dst_seg;
|
||||
copy_mess.CP_DST_ADDR = (long) dst_vir;
|
||||
copy_mess.CP_NR_BYTES = (long) bytes;
|
||||
|
|
|
@ -4,7 +4,7 @@ int sys_privctl(int proc, int request, int i, void *p)
|
|||
{
|
||||
message m;
|
||||
|
||||
m.CTL_PROC_NR = proc;
|
||||
m.CTL_ENDPT = proc;
|
||||
m.CTL_REQUEST = request;
|
||||
m.CTL_MM_PRIV = i;
|
||||
m.CTL_ARG_PTR = p;
|
||||
|
|
|
@ -17,7 +17,7 @@ int count; /* number of elements */
|
|||
m_io.DIO_REQUEST = req;
|
||||
m_io.DIO_TYPE = type;
|
||||
m_io.DIO_PORT = port;
|
||||
m_io.DIO_VEC_PROC = proc_nr;
|
||||
m_io.DIO_VEC_ENDPT = proc_nr;
|
||||
m_io.DIO_VEC_ADDR = buffer;
|
||||
m_io.DIO_VEC_SIZE = count;
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@ struct sigmsg *sig_ctxt; /* POSIX style handling */
|
|||
message m;
|
||||
int result;
|
||||
|
||||
m.SIG_PROC = proc_nr;
|
||||
m.SIG_ENDPT = proc_nr;
|
||||
m.SIG_CTXT_PTR = (char *) sig_ctxt;
|
||||
result = _taskcall(SYSTASK, SYS_SIGRETURN, &m);
|
||||
return(result);
|
||||
|
|
|
@ -10,7 +10,7 @@ struct sigmsg *sig_ctxt; /* POSIX style handling */
|
|||
message m;
|
||||
int result;
|
||||
|
||||
m.SIG_PROC = proc_nr;
|
||||
m.SIG_ENDPT = proc_nr;
|
||||
m.SIG_CTXT_PTR = (char *) sig_ctxt;
|
||||
result = _taskcall(SYSTASK, SYS_SIGSEND, &m);
|
||||
return(result);
|
||||
|
|
|
@ -4,7 +4,7 @@ int sys_svrctl(int proc, int request, int priv, vir_bytes argp)
|
|||
{
|
||||
message m;
|
||||
|
||||
m.CTL_PROC_NR = proc;
|
||||
m.CTL_ENDPT = proc;
|
||||
m.CTL_REQUEST = request;
|
||||
m.CTL_MM_PRIV = priv;
|
||||
m.CTL_ARG_PTR = (char *) argp;
|
||||
|
|
|
@ -8,7 +8,7 @@ clock_t ptr[5]; /* pointer to time buffer */
|
|||
message m;
|
||||
int r;
|
||||
|
||||
m.T_PROC_NR = proc;
|
||||
m.T_ENDPT = proc;
|
||||
r = _taskcall(SYSTASK, SYS_TIMES, &m);
|
||||
ptr[0] = m.T_USER_TIME;
|
||||
ptr[1] = m.T_SYSTEM_TIME;
|
||||
|
|
|
@ -7,7 +7,7 @@ long addr, *data_p;
|
|||
message m;
|
||||
int r;
|
||||
|
||||
m.CTL_PROC_NR = proc_nr;
|
||||
m.CTL_ENDPT = proc_nr;
|
||||
m.CTL_REQUEST = req;
|
||||
m.CTL_ADDRESS = addr;
|
||||
if (data_p) m.CTL_DATA = *data_p;
|
||||
|
|
|
@ -13,7 +13,7 @@ phys_bytes *phys_addr; /* placeholder for result */
|
|||
message m;
|
||||
int result;
|
||||
|
||||
m.CP_SRC_PROC_NR = proc_nr;
|
||||
m.CP_SRC_ENDPT = proc_nr;
|
||||
m.CP_SRC_SPACE = seg;
|
||||
m.CP_SRC_ADDR = vir_addr;
|
||||
m.CP_NR_BYTES = bytes;
|
||||
|
|
|
@ -18,10 +18,10 @@ phys_bytes bytes; /* how many bytes */
|
|||
message copy_mess;
|
||||
|
||||
if (bytes == 0L) return(OK);
|
||||
copy_mess.CP_SRC_PROC_NR = src_proc;
|
||||
copy_mess.CP_SRC_ENDPT = src_proc;
|
||||
copy_mess.CP_SRC_SPACE = src_seg;
|
||||
copy_mess.CP_SRC_ADDR = (long) src_vir;
|
||||
copy_mess.CP_DST_PROC_NR = dst_proc;
|
||||
copy_mess.CP_DST_ENDPT = dst_proc;
|
||||
copy_mess.CP_DST_SPACE = dst_seg;
|
||||
copy_mess.CP_DST_ADDR = (long) dst_vir;
|
||||
copy_mess.CP_NR_BYTES = (long) bytes;
|
||||
|
|
|
@ -53,7 +53,7 @@ int max_len; /* maximum length of value */
|
|||
/* Get copy of boot monitor parameters. */
|
||||
m.m_type = SYS_GETINFO;
|
||||
m.I_REQUEST = GET_MONPARAMS;
|
||||
m.I_PROC_NR = SELF;
|
||||
m.I_ENDPT = SELF;
|
||||
m.I_VAL_LEN = sizeof(mon_params);
|
||||
m.I_VAL_PTR = mon_params;
|
||||
if ((s=_taskcall(SYSTASK, SYS_GETINFO, &m)) != OK) {
|
||||
|
|
|
@ -10,7 +10,7 @@ clock_t *ticks; /* uptime in ticks */
|
|||
int s;
|
||||
|
||||
m.m_type = SYS_TIMES; /* request time information */
|
||||
m.T_PROC_NR = NONE; /* ignore process times */
|
||||
m.T_ENDPT = NONE; /* ignore process times */
|
||||
s = _taskcall(SYSTASK, SYS_TIMES, &m);
|
||||
*ticks = m.T_BOOT_TICKS;
|
||||
return(s);
|
||||
|
|
|
@ -28,7 +28,7 @@ int c;
|
|||
/* Send the buffer to this output driver. */
|
||||
m.DIAG_BUF_COUNT = buf_count;
|
||||
m.DIAG_PRINT_BUF = print_buf;
|
||||
m.DIAG_PROC_NR = SELF;
|
||||
m.DIAG_ENDPT = SELF;
|
||||
m.m_type = DIAGNOSTICS;
|
||||
(void) _sendrec(procs[p], &m);
|
||||
}
|
||||
|
|
|
@ -19,7 +19,7 @@ long ticks; /* number of ticks to wait */
|
|||
|
||||
if (ticks <= 0) return; /* check for robustness */
|
||||
|
||||
m.ALRM_PROC_NR = SELF; /* SELF means this process nr */
|
||||
m.ALRM_ENDPT = SELF; /* SELF means this process nr */
|
||||
m.ALRM_EXP_TIME = ticks; /* request message after ticks */
|
||||
m.ALRM_ABS_TIME = 0; /* ticks are relative to now */
|
||||
s = _taskcall(SYSTASK, SYS_SETALARM, &m);
|
||||
|
|
Loading…
Reference in a new issue