This source file includes following definitions.
- init_me
1
2
3
4
5
6
7 #include <asm/openprom.h>
8 #include <asm/oplib.h>
9 #include <asm/vac-ops.h>
10
11 #include "imperical.h"
12
13 #define DEBUG_INIT_ME
14
15 unsigned int nwindows;
16 unsigned int nwindowsm1;
17 unsigned int pac_or_vac;
18 unsigned int pvac_size;
19 unsigned int pvac_linesize;
20 unsigned int pac_size;
21 int num_segmaps;
22 int num_contexts;
23 unsigned int BOGOMIPS;
24 unsigned int BOGOMIPS_WCACHE;
25 unsigned int delay_factor;
26
27 extern int prom_node_root;
28 void (*printk)(const char *str, ...);
29
30 void init_me(void)
31 {
32 unsigned int grrr;
33
34 printk = romvec->pv_printf;
35 prom_node_root = prom_nextnode(0);
36 prom_getprop(prom_node_root, "mmu-npmg", &num_segmaps,
37 sizeof(unsigned int));
38
39 pvac_size = prom_getint_default(prom_node_root, "vac-size", 65536);
40
41 pvac_linesize = prom_getint_default(prom_node_root, "vac-linesize", 16);
42
43 grrr = prom_getint_default(prom_node_root, "mips-on", 0);
44 if(!grrr) {
45 grrr = prom_getint_default(prom_node_root, "clock-frequency", 0);
46 if(grrr > 15000000 && grrr < 100000000) {
47 BOGOMIPS = 3;
48 BOGOMIPS_WCACHE = grrr / 1000000;
49 } else {
50 BOGOMIPS = DEF_BOGO;
51 BOGOMIPS_WCACHE = DEF_BOGO;
52 }
53 } else (BOGOMIPS_WCACHE = grrr,
54 BOGOMIPS = prom_getint(prom_node_root, "mips-off"));
55
56 #ifdef DEBUG_INIT_ME
57 (*(romvec->pv_printf))("\nBOGOMIPS %d\n", (int) BOGOMIPS);
58 (*(romvec->pv_printf))("BOGOMIPS_WCACHE %d\n", (int) BOGOMIPS_WCACHE);
59 (*(romvec->pv_printf))("pvac_size %d\n", (int) pvac_size);
60 (*(romvec->pv_printf))("pvac_linesize %d\n", (int) pvac_linesize);
61 (*(romvec->pv_printf))("num_segmaps %d\n", (int) num_segmaps);
62 #endif
63
64 delay_factor = (BOGOMIPS > 3) ? ((BOGOMIPS - 2) >> 1) : 11;
65
66 (*(romvec->pv_printf))("\nLILO: \n");
67 return;
68 }