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:
parent
b09bcf6779
commit
dcc81d73e8
4 changed files with 21 additions and 24 deletions
|
@ -180,7 +180,7 @@ PUBLIC void main(void)
|
||||||
* is different from that of other processes because tasks can
|
* is different from that of other processes because tasks can
|
||||||
* access I/O; this is not allowed to less-privileged processes
|
* 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;
|
rp->p_reg.psw = (iskerneln(proc_nr)) ? INIT_TASK_PSW : INIT_PSW;
|
||||||
|
|
||||||
/* Initialize the server stack pointer. Take it down one word
|
/* Initialize the server stack pointer. Take it down one word
|
||||||
|
|
|
@ -65,25 +65,25 @@ PUBLIC char *t_stack[TOT_STACK_SPACE / sizeof(char *)];
|
||||||
*/
|
*/
|
||||||
|
|
||||||
PUBLIC struct boot_image image[] = {
|
PUBLIC struct boot_image image[] = {
|
||||||
/* process nr, pc, flags, qs, queue, stack, name */
|
/* process nr, flags, qs, queue, stack, name */
|
||||||
{IDLE, NULL, 0, 0, 0, IDL_S, "idle" },
|
{IDLE, 0, 0, 0, IDL_S, "idle" },
|
||||||
{CLOCK, NULL, 0, 0, 0, IDL_S, "clock" },
|
{CLOCK, 0, 0, 0, IDL_S, "clock" },
|
||||||
{SYSTEM, NULL, 0, 0, 0, IDL_S, "system"},
|
{SYSTEM, 0, 0, 0, IDL_S, "system"},
|
||||||
{HARDWARE, 0, 0, 8, TASK_Q, HRD_S, "kernel"},
|
{HARDWARE, 0, 0, 0, IDL_S, "kernel"},
|
||||||
|
|
||||||
{DS_PROC_NR, 0, BVM_F, 4, 4, 0, "ds" },
|
{DS_PROC_NR, BVM_F, 4, 4, 0, "ds" },
|
||||||
{RS_PROC_NR, 0, 0, 4, 4, 0, "rs" },
|
{RS_PROC_NR, 0, 4, 4, 0, "rs" },
|
||||||
|
|
||||||
{PM_PROC_NR, 0, 0, 32, 4, 0, "pm" },
|
{PM_PROC_NR, 0, 32, 4, 0, "pm" },
|
||||||
{SCHED_PROC_NR, 0, 0, 32, 4, 0, "sched" },
|
{SCHED_PROC_NR, 0, 32, 4, 0, "sched" },
|
||||||
{FS_PROC_NR, 0, 0, 32, 5, 0, "vfs" },
|
{FS_PROC_NR, 0, 32, 5, 0, "vfs" },
|
||||||
{MEM_PROC_NR, 0, BVM_F, 4, 3, 0, "memory"},
|
{MEM_PROC_NR, BVM_F, 4, 3, 0, "memory"},
|
||||||
{LOG_PROC_NR, 0, BVM_F, 4, 2, 0, "log" },
|
{LOG_PROC_NR, BVM_F, 4, 2, 0, "log" },
|
||||||
{TTY_PROC_NR, 0, BVM_F, 4, 1, 0, "tty" },
|
{TTY_PROC_NR, BVM_F, 4, 1, 0, "tty" },
|
||||||
{MFS_PROC_NR, 0, BVM_F, 32, 5, 0, "mfs" },
|
{MFS_PROC_NR, BVM_F, 32, 5, 0, "mfs" },
|
||||||
{VM_PROC_NR, 0, 0, 32, 2, 0, "vm" },
|
{VM_PROC_NR, 0, 32, 2, 0, "vm" },
|
||||||
{PFS_PROC_NR, 0, BVM_F, 32, 5, 0, "pfs" },
|
{PFS_PROC_NR, BVM_F, 32, 5, 0, "pfs" },
|
||||||
{INIT_PROC_NR, 0, BVM_F, 8, USER_Q, 0, "init" },
|
{INIT_PROC_NR, BVM_F, 8, USER_Q, 0, "init" },
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Verify the size of the system image table at compile time. Also verify that
|
/* Verify the size of the system image table at compile time. Also verify that
|
||||||
|
|
|
@ -4,8 +4,6 @@
|
||||||
#include <minix/com.h>
|
#include <minix/com.h>
|
||||||
#include <machine/interrupt.h>
|
#include <machine/interrupt.h>
|
||||||
|
|
||||||
typedef _PROTOTYPE( void task_t, (void) );
|
|
||||||
|
|
||||||
/* Process table and system property related types. */
|
/* Process table and system property related types. */
|
||||||
typedef int proc_nr_t; /* process table entry number */
|
typedef int proc_nr_t; /* process table entry number */
|
||||||
typedef short sys_id_t; /* system process index */
|
typedef short sys_id_t; /* system process index */
|
||||||
|
@ -15,7 +13,6 @@ typedef struct { /* bitmap for system indexes */
|
||||||
|
|
||||||
struct boot_image {
|
struct boot_image {
|
||||||
proc_nr_t proc_nr; /* process number to use */
|
proc_nr_t proc_nr; /* process number to use */
|
||||||
task_t *initial_pc; /* start function for tasks */
|
|
||||||
int flags; /* process flags */
|
int flags; /* process flags */
|
||||||
unsigned char quantum; /* quantum (tick count) */
|
unsigned char quantum; /* quantum (tick count) */
|
||||||
int priority; /* scheduling priority */
|
int priority; /* scheduling priority */
|
||||||
|
|
|
@ -220,11 +220,11 @@ PUBLIC void image_dmp()
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
printf("Image table dump showing all processes included in system image.\n");
|
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++) {
|
for (m=0; m<NR_BOOT_PROCS; m++) {
|
||||||
ip = &image[m];
|
ip = &image[m];
|
||||||
printf("%8s %4d %7lu %5s %4d %7d %7lu\n",
|
printf("%8s %4d %5s %4d %7d %7lu\n",
|
||||||
ip->proc_name, ip->proc_nr, (long)ip->initial_pc,
|
ip->proc_name, ip->proc_nr,
|
||||||
boot_flags_str(ip->flags), ip->quantum, ip->priority, ip->stksize);
|
boot_flags_str(ip->flags), ip->quantum, ip->priority, ip->stksize);
|
||||||
}
|
}
|
||||||
printf("\n");
|
printf("\n");
|
||||||
|
|
Loading…
Reference in a new issue