minor cleanup
This commit is contained in:
parent
ac86f5bb49
commit
9e72241374
@ -141,7 +141,6 @@ int lin_lin_copy(struct proc *srcproc, vir_bytes srclinaddr,
|
|||||||
int procslot;
|
int procslot;
|
||||||
NOREC_ENTER(linlincopy);
|
NOREC_ENTER(linlincopy);
|
||||||
|
|
||||||
FIXME("lin_lin_copy requires big pages");
|
|
||||||
vmassert(vm_running);
|
vmassert(vm_running);
|
||||||
vmassert(!catch_pagefaults);
|
vmassert(!catch_pagefaults);
|
||||||
vmassert(nfreepdes >= 3);
|
vmassert(nfreepdes >= 3);
|
||||||
|
@ -80,6 +80,7 @@ _PROTOTYPE( int _memcpy_k, (void *dst, void *src, size_t n) );
|
|||||||
_PROTOTYPE( int _memcpy_k_fault, (void) );
|
_PROTOTYPE( int _memcpy_k_fault, (void) );
|
||||||
_PROTOTYPE( u32_t read_cr3, (void) );
|
_PROTOTYPE( u32_t read_cr3, (void) );
|
||||||
_PROTOTYPE( void reload_cr3, (void) );
|
_PROTOTYPE( void reload_cr3, (void) );
|
||||||
|
_PROTOTYPE( void phys_memset, (phys_bytes ph, u32_t c, phys_bytes bytes) );
|
||||||
|
|
||||||
/* protect.c */
|
/* protect.c */
|
||||||
_PROTOTYPE( void prot_init, (void) );
|
_PROTOTYPE( void prot_init, (void) );
|
||||||
|
@ -137,6 +137,21 @@ PUBLIC void do_ser_debug()
|
|||||||
ser_debug(c);
|
ser_debug(c);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
PRIVATE void ser_dump_queues(void)
|
||||||
|
{
|
||||||
|
int q;
|
||||||
|
for(q = 0; q < NR_SCHED_QUEUES; q++) {
|
||||||
|
struct proc *p;
|
||||||
|
if(rdy_head[q])
|
||||||
|
printf("%2d: ", q);
|
||||||
|
for(p = rdy_head[q]; p; p = p->p_nextready) {
|
||||||
|
printf("%s / %d ", p->p_name, p->p_endpoint);
|
||||||
|
}
|
||||||
|
printf("\n");
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
PRIVATE void ser_debug(int c)
|
PRIVATE void ser_debug(int c)
|
||||||
{
|
{
|
||||||
int u = 0;
|
int u = 0;
|
||||||
@ -228,20 +243,6 @@ PRIVATE void printslot(struct proc *pp, int level)
|
|||||||
printslot(depproc, level+1);
|
printslot(depproc, level+1);
|
||||||
}
|
}
|
||||||
|
|
||||||
PUBLIC void ser_dump_queues()
|
|
||||||
{
|
|
||||||
int q;
|
|
||||||
for(q = 0; q < NR_SCHED_QUEUES; q++) {
|
|
||||||
struct proc *p;
|
|
||||||
if(rdy_head[q])
|
|
||||||
printf("%2d: ", q);
|
|
||||||
for(p = rdy_head[q]; p; p = p->p_nextready) {
|
|
||||||
printf("%s / %d ", p->p_name, p->p_endpoint);
|
|
||||||
}
|
|
||||||
printf("\n");
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
PUBLIC void ser_dump_proc()
|
PUBLIC void ser_dump_proc()
|
||||||
{
|
{
|
||||||
|
@ -48,8 +48,7 @@
|
|||||||
if(varname) { \
|
if(varname) { \
|
||||||
minix_panic(#varname " recursive enter", __LINE__); \
|
minix_panic(#varname " recursive enter", __LINE__); \
|
||||||
} \
|
} \
|
||||||
varname = 1; \
|
varname = 1;
|
||||||
FIXME(#varname " recursion check enabled");
|
|
||||||
|
|
||||||
#define NOREC_RETURN(varname, v) do { \
|
#define NOREC_RETURN(varname, v) do { \
|
||||||
if(!varname) \
|
if(!varname) \
|
||||||
|
@ -97,8 +97,6 @@ PRIVATE int QueueMess(endpoint_t ep, vir_bytes msg_lin, struct proc *dst)
|
|||||||
vmassert(!(dst->p_misc_flags & MF_DELIVERMSG));
|
vmassert(!(dst->p_misc_flags & MF_DELIVERMSG));
|
||||||
vmassert(dst->p_delivermsg_lin);
|
vmassert(dst->p_delivermsg_lin);
|
||||||
vmassert(isokendpt(ep, &k));
|
vmassert(isokendpt(ep, &k));
|
||||||
FIXME("copy messages directly if in memory");
|
|
||||||
FIXME("possibly also msgcopy specific function");
|
|
||||||
|
|
||||||
if(INMEMORY(dst)) {
|
if(INMEMORY(dst)) {
|
||||||
PHYS_COPY_CATCH(msg_lin, dst->p_delivermsg_lin,
|
PHYS_COPY_CATCH(msg_lin, dst->p_delivermsg_lin,
|
||||||
@ -120,12 +118,6 @@ PRIVATE int QueueMess(endpoint_t ep, vir_bytes msg_lin, struct proc *dst)
|
|||||||
dst->p_delivermsg.m_source = ep;
|
dst->p_delivermsg.m_source = ep;
|
||||||
dst->p_misc_flags |= MF_DELIVERMSG;
|
dst->p_misc_flags |= MF_DELIVERMSG;
|
||||||
|
|
||||||
#if 0
|
|
||||||
if(INMEMORY(dst)) {
|
|
||||||
delivermsg(dst);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
NOREC_RETURN(queuemess, OK);
|
NOREC_RETURN(queuemess, OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -621,7 +613,6 @@ int flags;
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Found acceptable message. Copy it and update status. */
|
/* Found acceptable message. Copy it and update status. */
|
||||||
FIXME("message copied twice here");
|
|
||||||
vmassert(!(caller_ptr->p_misc_flags & MF_DELIVERMSG));
|
vmassert(!(caller_ptr->p_misc_flags & MF_DELIVERMSG));
|
||||||
QueueMess((*xpp)->p_endpoint,
|
QueueMess((*xpp)->p_endpoint,
|
||||||
vir2phys(&(*xpp)->p_sendmsg), caller_ptr);
|
vir2phys(&(*xpp)->p_sendmsg), caller_ptr);
|
||||||
@ -743,6 +734,8 @@ size_t size;
|
|||||||
|
|
||||||
if(!(linaddr = umap_local(caller_ptr, D, (vir_bytes) table,
|
if(!(linaddr = umap_local(caller_ptr, D, (vir_bytes) table,
|
||||||
size * sizeof(*table)))) {
|
size * sizeof(*table)))) {
|
||||||
|
printf("mini_senda: umap_local failed; 0x%lx len 0x%lx\n",
|
||||||
|
table, size * sizeof(*table));
|
||||||
return EFAULT;
|
return EFAULT;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -32,12 +32,8 @@ register message *m_ptr; /* pointer to request message */
|
|||||||
rp = proc_addr(proc);
|
rp = proc_addr(proc);
|
||||||
|
|
||||||
if(rp->p_misc_flags & MF_DELIVERMSG) {
|
if(rp->p_misc_flags & MF_DELIVERMSG) {
|
||||||
printf("%s / %d has MF_DELIVERMSG on during exec - clearing.\n",
|
|
||||||
rp->p_name, rp->p_endpoint);
|
|
||||||
#if 1
|
|
||||||
rp->p_misc_flags &= ~MF_DELIVERMSG;
|
rp->p_misc_flags &= ~MF_DELIVERMSG;
|
||||||
rp->p_delivermsg_lin = 0;
|
rp->p_delivermsg_lin = 0;
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Save command name for debugging, ps(1) output, etc. */
|
/* Save command name for debugging, ps(1) output, etc. */
|
||||||
|
@ -408,8 +408,6 @@ struct memory *chunks; /* list of free memory chunks */
|
|||||||
}
|
}
|
||||||
|
|
||||||
CHECKHOLES;
|
CHECKHOLES;
|
||||||
|
|
||||||
FIXME("below 16MB allocation not done");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*===========================================================================*
|
/*===========================================================================*
|
||||||
|
@ -262,14 +262,11 @@ PRIVATE void vm_init(void)
|
|||||||
* mapping. VM has its own pagetable,
|
* mapping. VM has its own pagetable,
|
||||||
* don't check it.
|
* don't check it.
|
||||||
*/
|
*/
|
||||||
printf("VM: not giving %d its own pt\n",
|
|
||||||
vmp->vm_endpoint);
|
|
||||||
if(!(vmp->vm_flags & VMF_HASPT)) {
|
if(!(vmp->vm_flags & VMF_HASPT)) {
|
||||||
pt_check(vmp);
|
pt_check(vmp);
|
||||||
}
|
}
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
printf("VM: giving %d its own pt\n", vmp->vm_endpoint);
|
|
||||||
|
|
||||||
old_stack =
|
old_stack =
|
||||||
vmp->vm_arch.vm_seg[S].mem_vir +
|
vmp->vm_arch.vm_seg[S].mem_vir +
|
||||||
|
Loading…
x
Reference in New Issue
Block a user