Without /dev/boot ...
This commit is contained in:
parent
375f6f8754
commit
1ae4d41d0d
5 changed files with 31 additions and 24 deletions
|
@ -64,7 +64,7 @@
|
|||
/* Include or exclude an image of /dev/boot in the boot image.
|
||||
* Please update the makefile in /usr/src/tools/ as well.
|
||||
*/
|
||||
#define ENABLE_BOOTDEV 1
|
||||
#define ENABLE_BOOTDEV 0 /* load image of /dev/boot at boot time */
|
||||
|
||||
/* DMA_SECTORS may be increased to speed up DMA based drivers. */
|
||||
#define DMA_SECTORS 1 /* DMA buffer size (must be >= 1) */
|
||||
|
|
|
@ -72,15 +72,15 @@ PUBLIC struct boot_image image[] = {
|
|||
{ CLOCK, clock_task, TASK_F, 0, TASK_Q, TASK_S, TASK_T, 0, "CLOCK" },
|
||||
{ SYSTEM, sys_task, TASK_F, 0, TASK_Q, TASK_S, TASK_T, 0, "SYSTEM" },
|
||||
{ HARDWARE, 0, TASK_F, 0, TASK_Q, HRDW_S, 0, 0, "KERNEL" },
|
||||
{ PM_PROC_NR, 0, SERV_F, 16, 3, 0, SERV_T, SERV_M, "PM" },
|
||||
{ FS_PROC_NR, 0, SERV_F, 16, 4, 0, SERV_T, SERV_M, "FS" },
|
||||
{ SM_PROC_NR, 0, SERV_F, 16, 3, 0, SERV_T, SYST_M, "SM" },
|
||||
{ TTY_PROC_NR, 0, SERV_F, 16, 1, 0, SERV_T, SYST_M, "TTY" },
|
||||
{ MEM_PROC_NR, 0, SERV_F, 16, 2, 0, SERV_T, DRIV_M, "MEMORY" },
|
||||
{ LOG_PROC_NR, 0, SERV_F, 16, 2, 0, SERV_T, SYST_M, "LOG" },
|
||||
{ AT_PROC_NR, 0, SERV_F, 16, 2, 0, SERV_T, DRIV_M, "AT_WINI" },
|
||||
{ BIOS_PROC_NR, 0, SERV_F, 16, 2, 0, SERV_T, SYST_M, "BIOS" },
|
||||
{ INIT_PROC_NR, 0, USER_F, 8, USER_Q, 0, USER_T, USER_M, "INIT" },
|
||||
{ PM_PROC_NR, 0, SERV_F, 16, 3, 0, SERV_T, SERV_M, "pm" },
|
||||
{ FS_PROC_NR, 0, SERV_F, 16, 4, 0, SERV_T, SERV_M, "fs" },
|
||||
{ SM_PROC_NR, 0, SERV_F, 16, 3, 0, SERV_T, SYST_M, "sm" },
|
||||
{ TTY_PROC_NR, 0, SERV_F, 16, 1, 0, SERV_T, SYST_M, "tty" },
|
||||
{ MEM_PROC_NR, 0, SERV_F, 16, 2, 0, SERV_T, DRIV_M, "memory" },
|
||||
{ LOG_PROC_NR, 0, SERV_F, 16, 2, 0, SERV_T, SYST_M, "log" },
|
||||
{ AT_PROC_NR, 0, SERV_F, 16, 2, 0, SERV_T, DRIV_M, "boot" },
|
||||
{ BIOS_PROC_NR, 0, SERV_F, 16, 2, 0, SERV_T, SYST_M, "bios" },
|
||||
{ INIT_PROC_NR, 0, USER_F, 8, USER_Q, 0, USER_T, USER_M, "init" },
|
||||
};
|
||||
|
||||
/* Verify the size of the system image table at compile time. If the number
|
||||
|
|
|
@ -120,8 +120,7 @@ PUBLIC void map_controllers()
|
|||
{
|
||||
/* Map drivers to controllers and update the dmap table to that selection.
|
||||
* For each controller, the environment variable set by the boot monitor is
|
||||
* analyzed to see what type of Winchester disk is attached. Then, the name
|
||||
* of the driver that handles the device is looked up in the local drivertab.
|
||||
* analyzed to see what type of Winchester disk is attached.
|
||||
* Finally, the process number of the driver is looked up, and, if found, is
|
||||
* installed in the dmap table.
|
||||
*/
|
||||
|
@ -134,8 +133,8 @@ PUBLIC void map_controllers()
|
|||
char wini_type[8];
|
||||
char proc_name[8];
|
||||
} drivertab[] = {
|
||||
{ "at", "AT_WINI" }, /* AT Winchester */
|
||||
{ "bios", "BIOS" },
|
||||
{ "at", "boot" }, /* AT Winchester */
|
||||
{ "bios", "bios" }, /* BIOS Winchester */
|
||||
{ "esdi", "..." },
|
||||
{ "xt", "..." },
|
||||
{ "aha1540", "..." },
|
||||
|
@ -144,12 +143,15 @@ PUBLIC void map_controllers()
|
|||
};
|
||||
|
||||
for (c=0; c < NR_CTRLRS; c++) {
|
||||
|
||||
/* See if there is a mapping for this controller. */
|
||||
ctrlr_nr[1] = '0' + c;
|
||||
if ((s = get_mon_param(ctrlr_nr, ctrlr_type, 8)) != OK) {
|
||||
if (s != ESRCH)
|
||||
panic(__FILE__,"couldn't get monitor param", s);
|
||||
if (s != ESRCH) panic(__FILE__,"couldn't get monitor param", s);
|
||||
continue;
|
||||
}
|
||||
|
||||
/* If there is a mapping, look up the driver with the given name. */
|
||||
for (dp = drivertab;
|
||||
dp < drivertab + sizeof(drivertab)/sizeof(drivertab[0]); dp++) {
|
||||
if (strcmp(ctrlr_type, dp->wini_type) == 0) { /* found driver name */
|
||||
|
|
|
@ -191,6 +191,7 @@ PRIVATE void pm_init()
|
|||
if (OK != (s=sys_getimage(image)))
|
||||
panic(__FILE__,"PM: warning, couldn't get image table: %d\n", s);
|
||||
procs_in_use = 0; /* start populating table */
|
||||
printf("Builing process table:"); /* show what's happening */
|
||||
for (ip = &image[0]; ip < &image[NR_BOOT_PROCS]; ip++) {
|
||||
if (ip->proc_nr >= 0) { /* task have negative nrs */
|
||||
procs_in_use += 1; /* found user process */
|
||||
|
@ -228,8 +229,10 @@ PRIVATE void pm_init()
|
|||
mess.PR_PID = rmp->mp_pid;
|
||||
if (OK != (s=send(FS_PROC_NR, &mess)))
|
||||
panic(__FILE__,"PM can't sync up with FS", s);
|
||||
printf(" %s", ip->proc_name); /* display process name */
|
||||
}
|
||||
}
|
||||
printf(".\n"); /* last process done */
|
||||
|
||||
/* Override some details. PM is somewhat special. */
|
||||
mproc[PM_PROC_NR].mp_pid = PM_PID; /* magically override pid */
|
||||
|
@ -252,11 +255,13 @@ PRIVATE void pm_init()
|
|||
}
|
||||
|
||||
/* Initialize tables to all physical memory and print memory information. */
|
||||
printf("Parsing memory:");
|
||||
mem_init(mem_chunks, &free_clicks);
|
||||
total_clicks = minix_clicks + free_clicks;
|
||||
printf("Memory size=%uK ", click_to_round_k(total_clicks));
|
||||
printf("System services=%uK ", click_to_round_k(minix_clicks));
|
||||
printf("Available=%uK\n\n", click_to_round_k(free_clicks));
|
||||
printf(" total=%uK", click_to_round_k(total_clicks));
|
||||
printf(" system=%uK", click_to_round_k(minix_clicks));
|
||||
printf(" available=%uK", click_to_round_k(free_clicks));
|
||||
printf(".\n\n");
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@ PROGRAMS= ../kernel/kernel \
|
|||
../drivers/at_wini/at_wini \
|
||||
../drivers/bios_wini/bios_wini \
|
||||
../servers/init/init \
|
||||
bootdev.img
|
||||
# bootdev.img
|
||||
|
||||
usage:
|
||||
@echo " " >&2
|
||||
|
|
Loading…
Reference in a new issue