|
|
1.1 root 1: /*
2: * tboot.c -- tertiary boot
3: * This is invoked by the secondary boot to do all the things we can't
4: * do in just 512 bytes.
5: *
6: * Includes an interpreter for builtin commands. Just type "info" or "dir"
7: * to get disk information, or a directory listing of "/".
8: *
9: * Can load an image up to 1 gigabyte in length. Segments can be as
10: * big as the whole file.
11: *
12: * La Monte H. Yarroll <[email protected]>, September 1991
13: */
14:
15: #include <sys/types.h>
16: #include <sys/typed.h>
17:
18: #define MAIN
19: #include "tboot.h"
20: #undef MAIN
21:
22:
23: /* Potentially communicated information from an earlier tboot. */
24: TYPED_SPACE(boot_gift, 8192, T_FIFO_SIC); /* Static In-Core FIFO. */
25:
26: main()
27: {
28: char cmd_line[BLOCK]; /* Command typed at prompt. */
29:
30: sys_base = DEF_SYS_BASE; /* Load the kernel here. */
31: sys_base_set = FALSE;
32: want_monitor = FALSE; /* Don't invoke mini-monitor before execution. */
33: verbose_flag = FALSE; /* Don't be verbose. */
34:
35: puts("\r\nCOHERENT Tertiary boot Version 1.2.6\r\n");
36:
37: /*
38: * If autoboot exists, give the user a chance to abort and then
39: * try to run it.
40: */
41: if (0 != namei("autoboot")) {
42: puts("Press <SPACE> to abort boot.\r\n");
43: if( !wait_for_keystroke(WAIT_DELAY, (int) ' ') ) {
44: interpret("autoboot");
45: }
46: }
47:
48: puts("If installing COHERENT, please type \"begin\".\r\n");
49:
50: for (;;) {
51: puts("? ");
52: gets(cmd_line, BLOCK);
53: puts("\r\n");
54: sanity_check("Main command loop");
55:
56: interpret(cmd_line);
57: } /* forever */
58:
59: puts("Unreachable code in main().\r\n");
60: }
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.