From: Tomas Hruby Date: Tue, 18 May 2010 13:51:46 +0000 (+0000) Subject: boot image - no need for entry point X-Git-Tag: v3.1.7~50 X-Git-Url: http://zhaoyanbai.com/repos/%22http:/www.isc.org/icons/zlib_tech.html?a=commitdiff_plain;h=dcc81d73e870c85d2cdec65c5bba7f7e7877bf72;p=minix.git boot image - no need for entry point - removes the initial_pc from struct boot_image. It is always set to 0 and RS uses a.out headers. --- diff --git a/kernel/main.c b/kernel/main.c index f00dc602e..efe242c89 100644 --- a/kernel/main.c +++ b/kernel/main.c @@ -180,7 +180,7 @@ PUBLIC void main(void) * is different from that of other processes because tasks can * access I/O; this is not allowed to less-privileged processes */ - rp->p_reg.pc = (reg_t) ip->initial_pc; + rp->p_reg.pc = 0; /* we cannot start anything else */ rp->p_reg.psw = (iskerneln(proc_nr)) ? INIT_TASK_PSW : INIT_PSW; /* Initialize the server stack pointer. Take it down one word diff --git a/kernel/table.c b/kernel/table.c index 97a319c36..a8d7a0846 100644 --- a/kernel/table.c +++ b/kernel/table.c @@ -65,25 +65,25 @@ PUBLIC char *t_stack[TOT_STACK_SPACE / sizeof(char *)]; */ PUBLIC struct boot_image image[] = { -/* process nr, pc, flags, qs, queue, stack, name */ -{IDLE, NULL, 0, 0, 0, IDL_S, "idle" }, -{CLOCK, NULL, 0, 0, 0, IDL_S, "clock" }, -{SYSTEM, NULL, 0, 0, 0, IDL_S, "system"}, -{HARDWARE, 0, 0, 8, TASK_Q, HRD_S, "kernel"}, +/* process nr, flags, qs, queue, stack, name */ +{IDLE, 0, 0, 0, IDL_S, "idle" }, +{CLOCK, 0, 0, 0, IDL_S, "clock" }, +{SYSTEM, 0, 0, 0, IDL_S, "system"}, +{HARDWARE, 0, 0, 0, IDL_S, "kernel"}, -{DS_PROC_NR, 0, BVM_F, 4, 4, 0, "ds" }, -{RS_PROC_NR, 0, 0, 4, 4, 0, "rs" }, +{DS_PROC_NR, BVM_F, 4, 4, 0, "ds" }, +{RS_PROC_NR, 0, 4, 4, 0, "rs" }, -{PM_PROC_NR, 0, 0, 32, 4, 0, "pm" }, -{SCHED_PROC_NR, 0, 0, 32, 4, 0, "sched" }, -{FS_PROC_NR, 0, 0, 32, 5, 0, "vfs" }, -{MEM_PROC_NR, 0, BVM_F, 4, 3, 0, "memory"}, -{LOG_PROC_NR, 0, BVM_F, 4, 2, 0, "log" }, -{TTY_PROC_NR, 0, BVM_F, 4, 1, 0, "tty" }, -{MFS_PROC_NR, 0, BVM_F, 32, 5, 0, "mfs" }, -{VM_PROC_NR, 0, 0, 32, 2, 0, "vm" }, -{PFS_PROC_NR, 0, BVM_F, 32, 5, 0, "pfs" }, -{INIT_PROC_NR, 0, BVM_F, 8, USER_Q, 0, "init" }, +{PM_PROC_NR, 0, 32, 4, 0, "pm" }, +{SCHED_PROC_NR, 0, 32, 4, 0, "sched" }, +{FS_PROC_NR, 0, 32, 5, 0, "vfs" }, +{MEM_PROC_NR, BVM_F, 4, 3, 0, "memory"}, +{LOG_PROC_NR, BVM_F, 4, 2, 0, "log" }, +{TTY_PROC_NR, BVM_F, 4, 1, 0, "tty" }, +{MFS_PROC_NR, BVM_F, 32, 5, 0, "mfs" }, +{VM_PROC_NR, 0, 32, 2, 0, "vm" }, +{PFS_PROC_NR, BVM_F, 32, 5, 0, "pfs" }, +{INIT_PROC_NR, BVM_F, 8, USER_Q, 0, "init" }, }; /* Verify the size of the system image table at compile time. Also verify that diff --git a/kernel/type.h b/kernel/type.h index 706a068d9..a63603c6d 100644 --- a/kernel/type.h +++ b/kernel/type.h @@ -4,8 +4,6 @@ #include #include -typedef _PROTOTYPE( void task_t, (void) ); - /* Process table and system property related types. */ typedef int proc_nr_t; /* process table entry number */ typedef short sys_id_t; /* system process index */ @@ -15,7 +13,6 @@ typedef struct { /* bitmap for system indexes */ struct boot_image { proc_nr_t proc_nr; /* process number to use */ - task_t *initial_pc; /* start function for tasks */ int flags; /* process flags */ unsigned char quantum; /* quantum (tick count) */ int priority; /* scheduling priority */ diff --git a/servers/is/dmp_kernel.c b/servers/is/dmp_kernel.c index aceb7778a..65ac691c0 100644 --- a/servers/is/dmp_kernel.c +++ b/servers/is/dmp_kernel.c @@ -220,11 +220,11 @@ PUBLIC void image_dmp() return; } printf("Image table dump showing all processes included in system image.\n"); - printf("---name- -nr- ----pc- flags -qs- -queue- -stack-\n"); + printf("---name- -nr- flags -qs- -queue- -stack-\n"); for (m=0; mproc_name, ip->proc_nr, (long)ip->initial_pc, + printf("%8s %4d %5s %4d %7d %7lu\n", + ip->proc_name, ip->proc_nr, boot_flags_str(ip->flags), ip->quantum, ip->priority, ip->stksize); } printf("\n");