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. */
extern struct boot_image image[]; /* system image processes */
extern char *t_stack[]; /* task stack space */
extern struct segdesc_s gdt[]; /* global descriptor table */
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 */
phys_clicks text_base;
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 */
size_t argsz; /* size of arguments passed to crtso on stack */
@ -141,17 +140,11 @@ PUBLIC int main(void)
proc_init();
/* Set up proc table entries for processes in boot image. The stacks of the
* kernel tasks are initialized to an array in data space. The stacks
/* Set up proc table entries for processes in boot image. The stacks
* 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
* 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.
* the stack pointer is set to the end of the data segment.
*/
/* Task stacks. */
ktsb = (reg_t) t_stack;
for (i=0; i < NR_BOOT_PROCS; ++i) {
int schedulable_proc;
proc_nr_t proc_nr;
@ -226,12 +219,6 @@ PUBLIC int main(void)
}
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 */
} else {
hdrindex = 1 + i-NR_TASKS; /* system/user processes */

View file

@ -34,17 +34,6 @@
#include "ipc.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 BVM_F (PROC_FULLVM) /* boot processes with VM */
#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
* to prioritize ping messages periodically delivered to system processes.
*
* Each entry provides the process number, flags, quantum size, scheduling
* queue, and a name for the process table. The initial program counter and
* stack size is also provided for kernel tasks.
*
* Note: the quantum size must be positive in all cases!
* Each entry provides the process number, flags, and a name for the process
* table.
*/
PUBLIC struct boot_image image[] = {
/* process nr, flags, stack, name */
{IDLE, 0, IDL_S, "idle" },
{CLOCK, 0, IDL_S, "clock" },
{SYSTEM, 0, IDL_S, "system"},
{HARDWARE, 0, HRD_S, "kernel"},
/* process nr, flags, name */
{IDLE, 0, "idle" },
{CLOCK, 0, "clock" },
{SYSTEM, 0, "system"},
{HARDWARE, 0, "kernel"},
{DS_PROC_NR, BVM_F, 0, "ds" },
{RS_PROC_NR, 0, 0, "rs" },
{DS_PROC_NR, BVM_F, "ds" },
{RS_PROC_NR, 0, "rs" },
{PM_PROC_NR, OVM_F, 0, "pm" },
{SCHED_PROC_NR,OVM_F, 0, "sched" },
{VFS_PROC_NR, OVM_F, 0, "vfs" },
{MEM_PROC_NR, BVM_F, 0, "memory"},
{LOG_PROC_NR, BVM_F, 0, "log" },
{TTY_PROC_NR, BVM_F, 0, "tty" },
{MFS_PROC_NR, BVM_F, 0, "mfs" },
{VM_PROC_NR, 0, 0, "vm" },
{PFS_PROC_NR, BVM_F, 0, "pfs" },
{INIT_PROC_NR, BVM_F, 0, "init" },
{PM_PROC_NR, OVM_F, "pm" },
{SCHED_PROC_NR,OVM_F, "sched" },
{VFS_PROC_NR, OVM_F, "vfs" },
{MEM_PROC_NR, BVM_F, "memory"},
{LOG_PROC_NR, BVM_F, "log" },
{TTY_PROC_NR, BVM_F, "tty" },
{MFS_PROC_NR, BVM_F, "mfs" },
{VM_PROC_NR, 0, "vm" },
{PFS_PROC_NR, BVM_F, "pfs" },
{INIT_PROC_NR, BVM_F, "init" },
};
/* 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 {
proc_nr_t proc_nr; /* process number to use */
int flags; /* process flags */
int stksize; /* stack size for tasks */
char proc_name[P_NAME_LEN]; /* name in process table */
endpoint_t endpoint; /* endpoint number when started */
};

View file

@ -223,9 +223,9 @@ PUBLIC void image_dmp()
printf("---name- -nr- flags -stack-\n");
for (m=0; m<NR_BOOT_PROCS; m++) {
ip = &image[m];
printf("%8s %4d %5s %7d\n",
printf("%8s %4d %5s\n",
ip->proc_name, ip->proc_nr,
boot_flags_str(ip->flags), ip->stksize);
boot_flags_str(ip->flags));
}
printf("\n");
}