Remove code for kernel task stack initialization

We no longer have kernel tasks, so this code is unnecessary
This commit is contained in:
Arun Thomas 2011-01-27 12:18:33 +00:00
parent 0874fa9321
commit 6e86430130
5 changed files with 23 additions and 52 deletions

View File

@ -74,7 +74,6 @@ EXTERN util_timingdata_t timingdata[TIMING_CATEGORIES];
/* Variables that are initialized elsewhere are just extern here. */ /* Variables that are initialized elsewhere are just extern here. */
extern struct boot_image image[]; /* system image processes */ extern struct boot_image image[]; /* system image processes */
extern char *t_stack[]; /* task stack space */
extern struct segdesc_s gdt[]; /* global descriptor table */ extern struct segdesc_s gdt[]; /* global descriptor table */
EXTERN volatile int serial_debug_active; EXTERN volatile int serial_debug_active;

View File

@ -129,7 +129,6 @@ PUBLIC int main(void)
int hdrindex; /* index to array of a.out headers */ int hdrindex; /* index to array of a.out headers */
phys_clicks text_base; phys_clicks text_base;
vir_clicks text_clicks, data_clicks, st_clicks; vir_clicks text_clicks, data_clicks, st_clicks;
reg_t ktsb; /* kernel task stack base */
struct exec e_hdr; /* for a copy of an a.out header */ struct exec e_hdr; /* for a copy of an a.out header */
size_t argsz; /* size of arguments passed to crtso on stack */ size_t argsz; /* size of arguments passed to crtso on stack */
@ -141,17 +140,11 @@ PUBLIC int main(void)
proc_init(); proc_init();
/* Set up proc table entries for processes in boot image. The stacks of the /* Set up proc table entries for processes in boot image. The stacks
* kernel tasks are initialized to an array in data space. The stacks
* of the servers have been added to the data segment by the monitor, so * of the servers have been added to the data segment by the monitor, so
* the stack pointer is set to the end of the data segment. All the * the stack pointer is set to the end of the data segment.
* processes are in low memory on the 8086. On the 386 only the kernel
* is in low memory, the rest is loaded in extended memory.
*/ */
/* Task stacks. */
ktsb = (reg_t) t_stack;
for (i=0; i < NR_BOOT_PROCS; ++i) { for (i=0; i < NR_BOOT_PROCS; ++i) {
int schedulable_proc; int schedulable_proc;
proc_nr_t proc_nr; proc_nr_t proc_nr;
@ -226,12 +219,6 @@ PUBLIC int main(void)
} }
if (iskerneln(proc_nr)) { /* part of the kernel? */ if (iskerneln(proc_nr)) { /* part of the kernel? */
if (ip->stksize > 0) { /* HARDWARE stack size is 0 */
rp->p_priv->s_stack_guard = (reg_t *) ktsb;
*rp->p_priv->s_stack_guard = STACK_GUARD;
}
ktsb += ip->stksize; /* point to high end of stack */
rp->p_reg.sp = ktsb; /* this task's initial stack ptr */
hdrindex = 0; /* all use the first a.out header */ hdrindex = 0; /* all use the first a.out header */
} else { } else {
hdrindex = 1 + i-NR_TASKS; /* system/user processes */ hdrindex = 1 + i-NR_TASKS; /* system/user processes */

View File

@ -34,17 +34,6 @@
#include "ipc.h" #include "ipc.h"
#include <minix/com.h> #include <minix/com.h>
/* Define stack sizes for the kernel tasks included in the system image. */
#define NO_STACK 0
#define SMALL_STACK (1024 * sizeof(char *))
#define IDL_S SMALL_STACK /* 3 intr, 3 temps, 4 db for Intel */
#define HRD_S NO_STACK /* dummy task, uses kernel stack */
#define TSK_S SMALL_STACK /* system and clock task */
/* Stack space for all the task stacks. Declared as (char *) to align it. */
#define TOT_STACK_SPACE (IDL_S + HRD_S + (2 * TSK_S))
PUBLIC char *t_stack[TOT_STACK_SPACE / sizeof(char *)];
/* Define boot process flags. */ /* Define boot process flags. */
#define BVM_F (PROC_FULLVM) /* boot processes with VM */ #define BVM_F (PROC_FULLVM) /* boot processes with VM */
#define OVM_F (PERF_SYS_CORE_FULLVM ? PROC_FULLVM : 0) /* critical boot #define OVM_F (PERF_SYS_CORE_FULLVM ? PROC_FULLVM : 0) /* critical boot
@ -61,33 +50,30 @@ PUBLIC char *t_stack[TOT_STACK_SPACE / sizeof(char *)];
* allow reliable asynchronous publishing of system events. RS comes right after * allow reliable asynchronous publishing of system events. RS comes right after
* to prioritize ping messages periodically delivered to system processes. * to prioritize ping messages periodically delivered to system processes.
* *
* Each entry provides the process number, flags, quantum size, scheduling * Each entry provides the process number, flags, and a name for the process
* queue, and a name for the process table. The initial program counter and * table.
* stack size is also provided for kernel tasks.
*
* Note: the quantum size must be positive in all cases!
*/ */
PUBLIC struct boot_image image[] = { PUBLIC struct boot_image image[] = {
/* process nr, flags, stack, name */ /* process nr, flags, name */
{IDLE, 0, IDL_S, "idle" }, {IDLE, 0, "idle" },
{CLOCK, 0, IDL_S, "clock" }, {CLOCK, 0, "clock" },
{SYSTEM, 0, IDL_S, "system"}, {SYSTEM, 0, "system"},
{HARDWARE, 0, HRD_S, "kernel"}, {HARDWARE, 0, "kernel"},
{DS_PROC_NR, BVM_F, 0, "ds" }, {DS_PROC_NR, BVM_F, "ds" },
{RS_PROC_NR, 0, 0, "rs" }, {RS_PROC_NR, 0, "rs" },
{PM_PROC_NR, OVM_F, 0, "pm" }, {PM_PROC_NR, OVM_F, "pm" },
{SCHED_PROC_NR,OVM_F, 0, "sched" }, {SCHED_PROC_NR,OVM_F, "sched" },
{VFS_PROC_NR, OVM_F, 0, "vfs" }, {VFS_PROC_NR, OVM_F, "vfs" },
{MEM_PROC_NR, BVM_F, 0, "memory"}, {MEM_PROC_NR, BVM_F, "memory"},
{LOG_PROC_NR, BVM_F, 0, "log" }, {LOG_PROC_NR, BVM_F, "log" },
{TTY_PROC_NR, BVM_F, 0, "tty" }, {TTY_PROC_NR, BVM_F, "tty" },
{MFS_PROC_NR, BVM_F, 0, "mfs" }, {MFS_PROC_NR, BVM_F, "mfs" },
{VM_PROC_NR, 0, 0, "vm" }, {VM_PROC_NR, 0, "vm" },
{PFS_PROC_NR, BVM_F, 0, "pfs" }, {PFS_PROC_NR, BVM_F, "pfs" },
{INIT_PROC_NR, BVM_F, 0, "init" }, {INIT_PROC_NR, BVM_F, "init" },
}; };
/* Verify the size of the system image table at compile time. /* Verify the size of the system image table at compile time.

View File

@ -14,7 +14,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 */
int flags; /* process flags */ int flags; /* process flags */
int stksize; /* stack size for tasks */
char proc_name[P_NAME_LEN]; /* name in process table */ char proc_name[P_NAME_LEN]; /* name in process table */
endpoint_t endpoint; /* endpoint number when started */ endpoint_t endpoint; /* endpoint number when started */
}; };

View File

@ -223,9 +223,9 @@ PUBLIC void image_dmp()
printf("---name- -nr- flags -stack-\n"); printf("---name- -nr- flags -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 %5s %7d\n", printf("%8s %4d %5s\n",
ip->proc_name, ip->proc_nr, ip->proc_name, ip->proc_nr,
boot_flags_str(ip->flags), ip->stksize); boot_flags_str(ip->flags));
} }
printf("\n"); printf("\n");
} }