From: Brett Gordon Date: Mon, 22 Jun 2015 13:41:04 +0000 (-0400) Subject: p_top must be set in process.c as well for bank16k X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=3f73d93b8b6d8270c7e4e227ffccf6648cf971c8;p=FUZIX.git p_top must be set in process.c as well for bank16k I'm not exactly sure, but I think I found a bug in the bank16k implementation. When ptab_alloc() calls pagemap_alloc(), p_top is not set yet. pagemap_alloc, then proceeds to assign only one bank to the new processes. Assuming normal copy forking, should p_top be set to the parent's p_top *before* calling pagemap_alloc() ? This fix seems to make my coco3 UDATA mods start working --- diff --git a/Kernel/process.c b/Kernel/process.c index b9a46709..0020d74a 100644 --- a/Kernel/process.c +++ b/Kernel/process.c @@ -272,6 +272,7 @@ ptptr ptab_alloc(void) && p->p_pid == nextpid) newp->p_pid = 0; /* try again */ } + newp->p_top = udata.u_top; if (pagemap_alloc(newp) == 0) { newp->p_status = P_FORKING; nproc++;