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.
This commit is contained in:
Tomas Hruby 2010-05-18 13:51:46 +00:00
parent b09bcf6779
commit dcc81d73e8
4 changed files with 21 additions and 24 deletions

View file

@ -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

View file

@ -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

View file

@ -4,8 +4,6 @@
#include <minix/com.h>
#include <machine/interrupt.h>
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 */

View file

@ -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; m<NR_BOOT_PROCS; m++) {
ip = &image[m];
printf("%8s %4d %7lu %5s %4d %7d %7lu\n",
ip->proc_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");