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