This source file includes following definitions.
- get_cpuinfo
- bios32_init
- find_end_of_memory
- setup_arch
- sys_ioperm
- builtin_ramdisk_init
1
2
3
4
5
6
7
8
9
10
11
12 #include <linux/errno.h>
13 #include <linux/sched.h>
14 #include <linux/kernel.h>
15 #include <linux/mm.h>
16 #include <linux/stddef.h>
17 #include <linux/unistd.h>
18 #include <linux/ptrace.h>
19 #include <linux/malloc.h>
20 #include <linux/ldt.h>
21 #include <linux/user.h>
22 #include <linux/a.out.h>
23 #include <linux/tty.h>
24
25 #include <asm/pgtable.h>
26 extern PTE *Hash;
27 extern unsigned long Hash_size, Hash_mask;
28
29 char sda_root[] = "root=/dev/sda1";
30
31 unsigned char aux_device_present;
32 int get_cpuinfo(char *buffer)
33 {
34 }
35
36
37
38
39
40 struct screen_info screen_info = {
41 0, 0,
42 0, 0,
43 0,
44 0,
45 80,
46 0,0,0,
47 25
48 };
49
50 unsigned long bios32_init(unsigned long memory_start, unsigned long memory_end)
51 {
52 return memory_start;
53 }
54
55 unsigned long find_end_of_memory(void)
56 {
57 unsigned char dram_size = inb(0x0804);
58 unsigned long total;
59 _printk("DRAM Size = %x\n", dram_size);
60 _printk("Config registers = %x/%x/%x\n", inb(0x0800), inb(0x0801), inb(0x0802));
61 switch (dram_size & 0x07)
62 {
63 case 0:
64 total = 0x08000000;
65 break;
66 case 1:
67 total = 0x02000000;
68 break;
69 case 2:
70 total = 0x00800000;
71 break;
72 case 3:
73 total = 0x00400000;
74 break;
75 case 4:
76 total = 0x10000000;
77 break;
78 case 5:
79 total = 0x04000000;
80 break;
81 case 6:
82 total = 0x01000000;
83 break;
84 case 7:
85 total = 0x04000000;
86 break;
87 }
88 switch ((dram_size>>4) & 0x07)
89 {
90 case 0:
91 total += 0x08000000;
92 break;
93 case 1:
94 total += 0x02000000;
95 break;
96 case 2:
97 total += 0x00800000;
98 break;
99 case 3:
100 total += 0x00000000;
101 break;
102 case 4:
103 total += 0x10000000;
104 break;
105 case 5:
106 total += 0x04000000;
107 break;
108 case 6:
109 total += 0x01000000;
110 break;
111 case 7:
112 total += 0x00000000;
113 break;
114 }
115 _printk("register total = %08X\n", total);
116 total = 0x01000000;
117
118
119 if (total < 0x01000000)
120 {
121 Hash_size = HASH_TABLE_SIZE_64K;
122 Hash_mask = HASH_TABLE_MASK_64K;
123 } else
124 {
125 Hash_size = HASH_TABLE_SIZE_128K;
126 Hash_mask = HASH_TABLE_MASK_128K;
127 }
128 Hash = (PTE *)((total-Hash_size)+KERNELBASE);
129 bzero(Hash, Hash_size);
130 return ((unsigned long)Hash);
131 }
132
133 int size_memory;
134
135 #define DEFAULT_ROOT_DEVICE 0x0200
136
137 void setup_arch(char **cmdline_p,
138 unsigned long * memory_start_p, unsigned long * memory_end_p)
139 {
140
141 extern int _end;
142 extern char cmd_line[];
143
144 ROOT_DEV = DEFAULT_ROOT_DEVICE;
145 aux_device_present = 0xaa;
146 *cmdline_p = cmd_line;
147 *memory_start_p = (unsigned long) &_end;
148 *memory_end_p = (unsigned long *)Hash;
149 size_memory = *memory_end_p - KERNELBASE;
150
151
152
153
154 }
155
156 asmlinkage int sys_ioperm(unsigned long from, unsigned long num, int on)
157 {
158 return -EIO;
159 }
160
161 extern char builtin_ramdisk_image;
162 extern long builtin_ramdisk_size;
163
164 void
165 builtin_ramdisk_init(void)
166 {
167 if (ROOT_DEV == DEFAULT_ROOT_DEVICE)
168 {
169 rd_preloaded_init(&builtin_ramdisk_image, builtin_ramdisk_size);
170 }
171 }
172