Revision a7e6f8ba pc-bios/bios.diff
b/pc-bios/bios.diff | ||
---|---|---|
1 |
diff -ruN --exclude Makefile bios.org/acpi-dsdt.dsl bios/acpi-dsdt.dsl |
|
2 |
--- bios.org/acpi-dsdt.dsl 1970-01-01 01:00:00.000000000 +0100 |
|
3 |
+++ bios/acpi-dsdt.dsl 2006-09-24 20:27:54.000000000 +0200 |
|
4 |
@@ -0,0 +1,559 @@ |
|
5 |
+/* |
|
6 |
+ * QEMU ACPI DSDT ASL definition |
|
7 |
+ * |
|
8 |
+ * Copyright (c) 2006 Fabrice Bellard |
|
9 |
+ * |
|
10 |
+ * This library is free software; you can redistribute it and/or |
|
11 |
+ * modify it under the terms of the GNU Lesser General Public |
|
12 |
+ * License version 2 as published by the Free Software Foundation. |
|
13 |
+ * |
|
14 |
+ * This library is distributed in the hope that it will be useful, |
|
15 |
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
16 |
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
|
17 |
+ * Lesser General Public License for more details. |
|
18 |
+ * |
|
19 |
+ * You should have received a copy of the GNU Lesser General Public |
|
20 |
+ * License along with this library; if not, write to the Free Software |
|
21 |
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|
22 |
+ */ |
|
23 |
+DefinitionBlock ( |
|
24 |
+ "acpi-dsdt.aml", // Output Filename |
|
25 |
+ "DSDT", // Signature |
|
26 |
+ 0x01, // DSDT Compliance Revision |
|
27 |
+ "QEMU", // OEMID |
|
28 |
+ "QEMUDSDT", // TABLE ID |
|
29 |
+ 0x1 // OEM Revision |
|
30 |
+ ) |
|
31 |
+{ |
|
32 |
+ Scope (\) |
|
33 |
+ { |
|
34 |
+ /* CMOS memory access */ |
|
35 |
+ OperationRegion (CMS, SystemIO, 0x70, 0x02) |
|
36 |
+ Field (CMS, ByteAcc, NoLock, Preserve) |
|
37 |
+ { |
|
38 |
+ CMSI, 8, |
|
39 |
+ CMSD, 8 |
|
40 |
+ } |
|
41 |
+ Method (CMRD, 1, NotSerialized) |
|
42 |
+ { |
|
43 |
+ Store (Arg0, CMSI) |
|
44 |
+ Store (CMSD, Local0) |
|
45 |
+ Return (Local0) |
|
46 |
+ } |
|
47 |
+ |
|
48 |
+ /* Debug Output */ |
|
49 |
+ OperationRegion (DBG, SystemIO, 0xb044, 0x04) |
|
50 |
+ Field (DBG, DWordAcc, NoLock, Preserve) |
|
51 |
+ { |
|
52 |
+ DBGL, 32, |
|
53 |
+ } |
|
54 |
+ } |
|
55 |
+ |
|
56 |
+ |
|
57 |
+ /* PCI Bus definition */ |
|
58 |
+ Scope(\_SB) { |
|
59 |
+ Device(PCI0) { |
|
60 |
+ Name (_HID, EisaId ("PNP0A03")) |
|
61 |
+ Name (_ADR, 0x00) |
|
62 |
+ Name (_UID, 1) |
|
63 |
+ Name(_PRT, Package() { |
|
64 |
+ /* PCI IRQ routing table, example from ACPI 2.0a specification, |
|
65 |
+ section 6.2.8.1 */ |
|
66 |
+ /* Note: we provide the same info as the PCI routing |
|
67 |
+ table of the Bochs BIOS */ |
|
68 |
+ |
|
69 |
+ // PCI Slot 0 |
|
70 |
+ Package() {0x0000ffff, 0, LNKD, 0}, |
|
71 |
+ Package() {0x0000ffff, 1, LNKA, 0}, |
|
72 |
+ Package() {0x0000ffff, 2, LNKB, 0}, |
|
73 |
+ Package() {0x0000ffff, 3, LNKC, 0}, |
|
74 |
+ |
|
75 |
+ // PCI Slot 1 |
|
76 |
+ Package() {0x0001ffff, 0, LNKA, 0}, |
|
77 |
+ Package() {0x0001ffff, 1, LNKB, 0}, |
|
78 |
+ Package() {0x0001ffff, 2, LNKC, 0}, |
|
79 |
+ Package() {0x0001ffff, 3, LNKD, 0}, |
|
80 |
+ |
|
81 |
+ // PCI Slot 2 |
|
82 |
+ Package() {0x0002ffff, 0, LNKB, 0}, |
|
83 |
+ Package() {0x0002ffff, 1, LNKC, 0}, |
|
84 |
+ Package() {0x0002ffff, 2, LNKD, 0}, |
|
85 |
+ Package() {0x0002ffff, 3, LNKA, 0}, |
|
86 |
+ |
|
87 |
+ // PCI Slot 3 |
|
88 |
+ Package() {0x0003ffff, 0, LNKC, 0}, |
|
89 |
+ Package() {0x0003ffff, 1, LNKD, 0}, |
|
90 |
+ Package() {0x0003ffff, 2, LNKA, 0}, |
|
91 |
+ Package() {0x0003ffff, 3, LNKB, 0}, |
|
92 |
+ |
|
93 |
+ // PCI Slot 4 |
|
94 |
+ Package() {0x0004ffff, 0, LNKD, 0}, |
|
95 |
+ Package() {0x0004ffff, 1, LNKA, 0}, |
|
96 |
+ Package() {0x0004ffff, 2, LNKB, 0}, |
|
97 |
+ Package() {0x0004ffff, 3, LNKC, 0}, |
|
98 |
+ |
|
99 |
+ // PCI Slot 5 |
|
100 |
+ Package() {0x0005ffff, 0, LNKA, 0}, |
|
101 |
+ Package() {0x0005ffff, 1, LNKB, 0}, |
|
102 |
+ Package() {0x0005ffff, 2, LNKC, 0}, |
|
103 |
+ Package() {0x0005ffff, 3, LNKD, 0}, |
|
104 |
+ }) |
|
105 |
+ |
|
106 |
+ Method (_CRS, 0, NotSerialized) |
|
107 |
+ { |
|
108 |
+ Name (MEMP, ResourceTemplate () |
|
109 |
+ { |
|
110 |
+ WordBusNumber (ResourceProducer, MinFixed, MaxFixed, PosDecode, |
|
111 |
+ 0x0000, // Address Space Granularity |
|
112 |
+ 0x0000, // Address Range Minimum |
|
113 |
+ 0x00FF, // Address Range Maximum |
|
114 |
+ 0x0000, // Address Translation Offset |
|
115 |
+ 0x0100, // Address Length |
|
116 |
+ ,, ) |
|
117 |
+ IO (Decode16, |
|
118 |
+ 0x0CF8, // Address Range Minimum |
|
119 |
+ 0x0CF8, // Address Range Maximum |
|
120 |
+ 0x01, // Address Alignment |
|
121 |
+ 0x08, // Address Length |
|
122 |
+ ) |
|
123 |
+ WordIO (ResourceProducer, MinFixed, MaxFixed, PosDecode, EntireRange, |
|
124 |
+ 0x0000, // Address Space Granularity |
|
125 |
+ 0x0000, // Address Range Minimum |
|
126 |
+ 0x0CF7, // Address Range Maximum |
|
127 |
+ 0x0000, // Address Translation Offset |
|
128 |
+ 0x0CF8, // Address Length |
|
129 |
+ ,, , TypeStatic) |
|
130 |
+ WordIO (ResourceProducer, MinFixed, MaxFixed, PosDecode, EntireRange, |
|
131 |
+ 0x0000, // Address Space Granularity |
|
132 |
+ 0x0D00, // Address Range Minimum |
|
133 |
+ 0xFFFF, // Address Range Maximum |
|
134 |
+ 0x0000, // Address Translation Offset |
|
135 |
+ 0xF300, // Address Length |
|
136 |
+ ,, , TypeStatic) |
|
137 |
+ DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed, Cacheable, ReadWrite, |
|
138 |
+ 0x00000000, // Address Space Granularity |
|
139 |
+ 0x000A0000, // Address Range Minimum |
|
140 |
+ 0x000BFFFF, // Address Range Maximum |
|
141 |
+ 0x00000000, // Address Translation Offset |
|
142 |
+ 0x00020000, // Address Length |
|
143 |
+ ,, , AddressRangeMemory, TypeStatic) |
|
144 |
+ DWordMemory (ResourceProducer, PosDecode, MinNotFixed, MaxFixed, NonCacheable, ReadWrite, |
|
145 |
+ 0x00000000, // Address Space Granularity |
|
146 |
+ 0x00000000, // Address Range Minimum |
|
147 |
+ 0xFEBFFFFF, // Address Range Maximum |
|
148 |
+ 0x00000000, // Address Translation Offset |
|
149 |
+ 0x00000000, // Address Length |
|
150 |
+ ,, MEMF, AddressRangeMemory, TypeStatic) |
|
151 |
+ }) |
|
152 |
+ CreateDWordField (MEMP, \_SB.PCI0._CRS.MEMF._MIN, PMIN) |
|
153 |
+ CreateDWordField (MEMP, \_SB.PCI0._CRS.MEMF._MAX, PMAX) |
|
154 |
+ CreateDWordField (MEMP, \_SB.PCI0._CRS.MEMF._LEN, PLEN) |
|
155 |
+ /* compute available RAM */ |
|
156 |
+ Add(CMRD(0x34), ShiftLeft(CMRD(0x35), 8), Local0) |
|
157 |
+ ShiftLeft(Local0, 16, Local0) |
|
158 |
+ Add(Local0, 0x1000000, Local0) |
|
159 |
+ /* update field of last region */ |
|
160 |
+ Store(Local0, PMIN) |
|
161 |
+ Subtract (PMAX, PMIN, PLEN) |
|
162 |
+ Increment (PLEN) |
|
163 |
+ Return (MEMP) |
|
164 |
+ } |
|
165 |
+ } |
|
166 |
+ } |
|
167 |
+ |
|
168 |
+ Scope(\_SB.PCI0) { |
|
169 |
+ |
|
170 |
+ /* PIIX3 ISA bridge */ |
|
171 |
+ Device (ISA) { |
|
172 |
+ Name (_ADR, 0x00010000) |
|
173 |
+ |
|
174 |
+ /* PIIX PCI to ISA irq remapping */ |
|
175 |
+ OperationRegion (P40C, PCI_Config, 0x60, 0x04) |
|
176 |
+ |
|
177 |
+ |
|
178 |
+ /* Keyboard seems to be important for WinXP install */ |
|
179 |
+ Device (KBD) |
|
180 |
+ { |
|
181 |
+ Name (_HID, EisaId ("PNP0303")) |
|
182 |
+ Method (_STA, 0, NotSerialized) |
|
183 |
+ { |
|
184 |
+ Return (0x0f) |
|
185 |
+ } |
|
186 |
+ |
|
187 |
+ Method (_CRS, 0, NotSerialized) |
|
188 |
+ { |
|
189 |
+ Name (TMP, ResourceTemplate () |
|
190 |
+ { |
|
191 |
+ IO (Decode16, |
|
192 |
+ 0x0060, // Address Range Minimum |
|
193 |
+ 0x0060, // Address Range Maximum |
|
194 |
+ 0x01, // Address Alignment |
|
195 |
+ 0x01, // Address Length |
|
196 |
+ ) |
|
197 |
+ IO (Decode16, |
|
198 |
+ 0x0064, // Address Range Minimum |
|
199 |
+ 0x0064, // Address Range Maximum |
|
200 |
+ 0x01, // Address Alignment |
|
201 |
+ 0x01, // Address Length |
|
202 |
+ ) |
|
203 |
+ IRQNoFlags () |
|
204 |
+ {1} |
|
205 |
+ }) |
|
206 |
+ Return (TMP) |
|
207 |
+ } |
|
208 |
+ } |
|
209 |
+ |
|
210 |
+ /* PS/2 mouse */ |
|
211 |
+ Device (MOU) |
|
212 |
+ { |
|
213 |
+ Name (_HID, EisaId ("PNP0F13")) |
|
214 |
+ Method (_STA, 0, NotSerialized) |
|
215 |
+ { |
|
216 |
+ Return (0x0f) |
|
217 |
+ } |
|
218 |
+ |
|
219 |
+ Method (_CRS, 0, NotSerialized) |
|
220 |
+ { |
|
221 |
+ Name (TMP, ResourceTemplate () |
|
222 |
+ { |
|
223 |
+ IRQNoFlags () {12} |
|
224 |
+ }) |
|
225 |
+ Return (TMP) |
|
226 |
+ } |
|
227 |
+ } |
|
228 |
+ |
|
229 |
+ /* PS/2 floppy controller */ |
|
230 |
+ Device (FDC0) |
|
231 |
+ { |
|
232 |
+ Name (_HID, EisaId ("PNP0700")) |
|
233 |
+ Method (_STA, 0, NotSerialized) |
|
234 |
+ { |
|
235 |
+ Return (0x0F) |
|
236 |
+ } |
|
237 |
+ Method (_CRS, 0, NotSerialized) |
|
238 |
+ { |
|
239 |
+ Name (BUF0, ResourceTemplate () |
|
240 |
+ { |
|
241 |
+ IO (Decode16, 0x03F2, 0x03F2, 0x00, 0x04) |
|
242 |
+ IO (Decode16, 0x03F7, 0x03F7, 0x00, 0x01) |
|
243 |
+ IRQNoFlags () {6} |
|
244 |
+ DMA (Compatibility, NotBusMaster, Transfer8) {2} |
|
245 |
+ }) |
|
246 |
+ Return (BUF0) |
|
247 |
+ } |
|
248 |
+ } |
|
249 |
+ |
|
250 |
+ /* Parallel port */ |
|
251 |
+ Device (LPT) |
|
252 |
+ { |
|
253 |
+ Name (_HID, EisaId ("PNP0400")) |
|
254 |
+ Method (_STA, 0, NotSerialized) |
|
255 |
+ { |
|
256 |
+ Store (\_SB.PCI0.PX13.DRSA, Local0) |
|
257 |
+ And (Local0, 0x80000000, Local0) |
|
258 |
+ If (LEqual (Local0, 0)) |
|
259 |
+ { |
|
260 |
+ Return (0x00) |
|
261 |
+ } |
|
262 |
+ Else |
|
263 |
+ { |
|
264 |
+ Return (0x0F) |
|
265 |
+ } |
|
266 |
+ } |
|
267 |
+ Method (_CRS, 0, NotSerialized) |
|
268 |
+ { |
|
269 |
+ Name (BUF0, ResourceTemplate () |
|
270 |
+ { |
|
271 |
+ IO (Decode16, 0x0378, 0x0378, 0x08, 0x08) |
|
272 |
+ IRQNoFlags () {7} |
|
273 |
+ }) |
|
274 |
+ Return (BUF0) |
|
275 |
+ } |
|
276 |
+ } |
|
277 |
+ |
|
278 |
+ /* Serial Ports */ |
|
279 |
+ Device (COM1) |
|
280 |
+ { |
|
281 |
+ Name (_HID, EisaId ("PNP0501")) |
|
282 |
+ Name (_UID, 0x01) |
|
283 |
+ Method (_STA, 0, NotSerialized) |
|
284 |
+ { |
|
285 |
+ Store (\_SB.PCI0.PX13.DRSC, Local0) |
|
286 |
+ And (Local0, 0x08000000, Local0) |
|
287 |
+ If (LEqual (Local0, 0)) |
|
288 |
+ { |
|
289 |
+ Return (0x00) |
|
290 |
+ } |
|
291 |
+ Else |
|
292 |
+ { |
|
293 |
+ Return (0x0F) |
|
294 |
+ } |
|
295 |
+ } |
|
296 |
+ Method (_CRS, 0, NotSerialized) |
|
297 |
+ { |
|
298 |
+ Name (BUF0, ResourceTemplate () |
|
299 |
+ { |
|
300 |
+ IO (Decode16, 0x03F8, 0x03F8, 0x00, 0x08) |
|
301 |
+ IRQNoFlags () {4} |
|
302 |
+ }) |
|
303 |
+ Return (BUF0) |
|
304 |
+ } |
|
305 |
+ } |
|
306 |
+ |
|
307 |
+ Device (COM2) |
|
308 |
+ { |
|
309 |
+ Name (_HID, EisaId ("PNP0501")) |
|
310 |
+ Name (_UID, 0x02) |
|
311 |
+ Method (_STA, 0, NotSerialized) |
|
312 |
+ { |
|
313 |
+ Store (\_SB.PCI0.PX13.DRSC, Local0) |
|
314 |
+ And (Local0, 0x80000000, Local0) |
|
315 |
+ If (LEqual (Local0, 0)) |
|
316 |
+ { |
|
317 |
+ Return (0x00) |
|
318 |
+ } |
|
319 |
+ Else |
|
320 |
+ { |
|
321 |
+ Return (0x0F) |
|
322 |
+ } |
|
323 |
+ } |
|
324 |
+ Method (_CRS, 0, NotSerialized) |
|
325 |
+ { |
|
326 |
+ Name (BUF0, ResourceTemplate () |
|
327 |
+ { |
|
328 |
+ IO (Decode16, 0x02F8, 0x02F8, 0x00, 0x08) |
|
329 |
+ IRQNoFlags () {3} |
|
330 |
+ }) |
|
331 |
+ Return (BUF0) |
|
332 |
+ } |
|
333 |
+ } |
|
334 |
+ } |
|
335 |
+ |
|
336 |
+ /* PIIX4 PM */ |
|
337 |
+ Device (PX13) { |
|
338 |
+ Name (_ADR, 0x00010003) |
|
339 |
+ |
|
340 |
+ OperationRegion (P13C, PCI_Config, 0x5c, 0x24) |
|
341 |
+ Field (P13C, DWordAcc, NoLock, Preserve) |
|
342 |
+ { |
|
343 |
+ DRSA, 32, |
|
344 |
+ DRSB, 32, |
|
345 |
+ DRSC, 32, |
|
346 |
+ DRSE, 32, |
|
347 |
+ DRSF, 32, |
|
348 |
+ DRSG, 32, |
|
349 |
+ DRSH, 32, |
|
350 |
+ DRSI, 32, |
|
351 |
+ DRSJ, 32 |
|
352 |
+ } |
|
353 |
+ } |
|
354 |
+ } |
|
355 |
+ |
|
356 |
+ /* PCI IRQs */ |
|
357 |
+ Scope(\_SB) { |
|
358 |
+ Field (\_SB.PCI0.ISA.P40C, ByteAcc, NoLock, Preserve) |
|
359 |
+ { |
|
360 |
+ PRQ0, 8, |
|
361 |
+ PRQ1, 8, |
|
362 |
+ PRQ2, 8, |
|
363 |
+ PRQ3, 8 |
|
364 |
+ } |
|
365 |
+ |
|
366 |
+ Device(LNKA){ |
|
367 |
+ Name(_HID, EISAID("PNP0C0F")) // PCI interrupt link |
|
368 |
+ Name(_UID, 1) |
|
369 |
+ Name(_PRS, ResourceTemplate(){ |
|
370 |
+ IRQ (Level, ActiveLow, Shared) |
|
371 |
+ {3,4,5,6,7,9,10,11,12} |
|
372 |
+ }) |
|
373 |
+ Method (_STA, 0, NotSerialized) |
|
374 |
+ { |
|
375 |
+ Store (0x0B, Local0) |
|
376 |
+ If (And (0x80, PRQ0, Local1)) |
|
377 |
+ { |
|
378 |
+ Store (0x09, Local0) |
|
379 |
+ } |
|
380 |
+ Return (Local0) |
|
381 |
+ } |
|
382 |
+ Method (_DIS, 0, NotSerialized) |
|
383 |
+ { |
|
384 |
+ Or (PRQ0, 0x80, PRQ0) |
|
385 |
+ } |
|
386 |
+ Method (_CRS, 0, NotSerialized) |
|
387 |
+ { |
|
388 |
+ Name (PRR0, ResourceTemplate () |
|
389 |
+ { |
|
390 |
+ IRQ (Level, ActiveLow, Shared) |
|
391 |
+ {1} |
|
392 |
+ }) |
|
393 |
+ CreateWordField (PRR0, 0x01, TMP) |
|
394 |
+ Store (PRQ0, Local0) |
|
395 |
+ If (LLess (Local0, 0x80)) |
|
396 |
+ { |
|
397 |
+ ShiftLeft (One, Local0, TMP) |
|
398 |
+ } |
|
399 |
+ Else |
|
400 |
+ { |
|
401 |
+ Store (Zero, TMP) |
|
402 |
+ } |
|
403 |
+ Return (PRR0) |
|
404 |
+ } |
|
405 |
+ Method (_SRS, 1, NotSerialized) |
|
406 |
+ { |
|
407 |
+ CreateWordField (Arg0, 0x01, TMP) |
|
408 |
+ FindSetRightBit (TMP, Local0) |
|
409 |
+ Decrement (Local0) |
|
410 |
+ Store (Local0, PRQ0) |
|
411 |
+ } |
|
412 |
+ } |
|
413 |
+ Device(LNKB){ |
|
414 |
+ Name(_HID, EISAID("PNP0C0F")) // PCI interrupt link |
|
415 |
+ Name(_UID, 2) |
|
416 |
+ Name(_PRS, ResourceTemplate(){ |
|
417 |
+ IRQ (Level, ActiveLow, Shared) |
|
418 |
+ {3,4,5,6,7,9,10,11,12} |
|
419 |
+ }) |
|
420 |
+ Method (_STA, 0, NotSerialized) |
|
421 |
+ { |
|
422 |
+ Store (0x0B, Local0) |
|
423 |
+ If (And (0x80, PRQ1, Local1)) |
|
424 |
+ { |
|
425 |
+ Store (0x09, Local0) |
|
426 |
+ } |
|
427 |
+ Return (Local0) |
|
428 |
+ } |
|
429 |
+ Method (_DIS, 0, NotSerialized) |
|
430 |
+ { |
|
431 |
+ Or (PRQ1, 0x80, PRQ1) |
|
432 |
+ } |
|
433 |
+ Method (_CRS, 0, NotSerialized) |
|
434 |
+ { |
|
435 |
+ Name (PRR0, ResourceTemplate () |
|
436 |
+ { |
|
437 |
+ IRQ (Level, ActiveLow, Shared) |
|
438 |
+ {1} |
|
439 |
+ }) |
|
440 |
+ CreateWordField (PRR0, 0x01, TMP) |
|
441 |
+ Store (PRQ1, Local0) |
|
442 |
+ If (LLess (Local0, 0x80)) |
|
443 |
+ { |
|
444 |
+ ShiftLeft (One, Local0, TMP) |
|
445 |
+ } |
|
446 |
+ Else |
|
447 |
+ { |
|
448 |
+ Store (Zero, TMP) |
|
449 |
+ } |
|
450 |
+ Return (PRR0) |
|
451 |
+ } |
|
452 |
+ Method (_SRS, 1, NotSerialized) |
|
453 |
+ { |
|
454 |
+ CreateWordField (Arg0, 0x01, TMP) |
|
455 |
+ FindSetRightBit (TMP, Local0) |
|
456 |
+ Decrement (Local0) |
|
457 |
+ Store (Local0, PRQ1) |
|
458 |
+ } |
|
459 |
+ } |
|
460 |
+ Device(LNKC){ |
|
461 |
+ Name(_HID, EISAID("PNP0C0F")) // PCI interrupt link |
|
462 |
+ Name(_UID, 3) |
|
463 |
+ Name(_PRS, ResourceTemplate(){ |
|
464 |
+ IRQ (Level, ActiveLow, Shared) |
|
465 |
+ {3,4,5,6,7,9,10,11,12} |
|
466 |
+ }) |
|
467 |
+ Method (_STA, 0, NotSerialized) |
|
468 |
+ { |
|
469 |
+ Store (0x0B, Local0) |
|
470 |
+ If (And (0x80, PRQ2, Local1)) |
|
471 |
+ { |
|
472 |
+ Store (0x09, Local0) |
|
473 |
+ } |
|
474 |
+ Return (Local0) |
|
475 |
+ } |
|
476 |
+ Method (_DIS, 0, NotSerialized) |
|
477 |
+ { |
|
478 |
+ Or (PRQ2, 0x80, PRQ2) |
|
479 |
+ } |
|
480 |
+ Method (_CRS, 0, NotSerialized) |
|
481 |
+ { |
|
482 |
+ Name (PRR0, ResourceTemplate () |
|
483 |
+ { |
|
484 |
+ IRQ (Level, ActiveLow, Shared) |
|
485 |
+ {1} |
|
486 |
+ }) |
|
487 |
+ CreateWordField (PRR0, 0x01, TMP) |
|
488 |
+ Store (PRQ2, Local0) |
|
489 |
+ If (LLess (Local0, 0x80)) |
|
490 |
+ { |
|
491 |
+ ShiftLeft (One, Local0, TMP) |
|
492 |
+ } |
|
493 |
+ Else |
|
494 |
+ { |
|
495 |
+ Store (Zero, TMP) |
|
496 |
+ } |
|
497 |
+ Return (PRR0) |
|
498 |
+ } |
|
499 |
+ Method (_SRS, 1, NotSerialized) |
|
500 |
+ { |
|
501 |
+ CreateWordField (Arg0, 0x01, TMP) |
|
502 |
+ FindSetRightBit (TMP, Local0) |
|
503 |
+ Decrement (Local0) |
|
504 |
+ Store (Local0, PRQ2) |
|
505 |
+ } |
|
506 |
+ } |
|
507 |
+ Device(LNKD){ |
|
508 |
+ Name(_HID, EISAID("PNP0C0F")) // PCI interrupt link |
|
509 |
+ Name(_UID, 4) |
|
510 |
+ Name(_PRS, ResourceTemplate(){ |
|
511 |
+ IRQ (Level, ActiveLow, Shared) |
|
512 |
+ {3,4,5,6,7,9,10,11,12} |
|
513 |
+ }) |
|
514 |
+ Method (_STA, 0, NotSerialized) |
|
515 |
+ { |
|
516 |
+ Store (0x0B, Local0) |
|
517 |
+ If (And (0x80, PRQ3, Local1)) |
|
518 |
+ { |
|
519 |
+ Store (0x09, Local0) |
|
520 |
+ } |
|
521 |
+ Return (Local0) |
|
522 |
+ } |
|
523 |
+ Method (_DIS, 0, NotSerialized) |
|
524 |
+ { |
|
525 |
+ Or (PRQ3, 0x80, PRQ3) |
|
526 |
+ } |
|
527 |
+ Method (_CRS, 0, NotSerialized) |
|
528 |
+ { |
|
529 |
+ Name (PRR0, ResourceTemplate () |
|
530 |
+ { |
|
531 |
+ IRQ (Level, ActiveLow, Shared) |
|
532 |
+ {1} |
|
533 |
+ }) |
|
534 |
+ CreateWordField (PRR0, 0x01, TMP) |
|
535 |
+ Store (PRQ3, Local0) |
|
536 |
+ If (LLess (Local0, 0x80)) |
|
537 |
+ { |
|
538 |
+ ShiftLeft (One, Local0, TMP) |
|
539 |
+ } |
|
540 |
+ Else |
|
541 |
+ { |
|
542 |
+ Store (Zero, TMP) |
|
543 |
+ } |
|
544 |
+ Return (PRR0) |
|
545 |
+ } |
|
546 |
+ Method (_SRS, 1, NotSerialized) |
|
547 |
+ { |
|
548 |
+ CreateWordField (Arg0, 0x01, TMP) |
|
549 |
+ FindSetRightBit (TMP, Local0) |
|
550 |
+ Decrement (Local0) |
|
551 |
+ Store (Local0, PRQ3) |
|
552 |
+ } |
|
553 |
+ } |
|
554 |
+ } |
|
555 |
+ |
|
556 |
+ /* S5 = power off state */ |
|
557 |
+ Name (_S5, Package (4) { |
|
558 |
+ 0x00, // PM1a_CNT.SLP_TYP |
|
559 |
+ 0x00, // PM2a_CNT.SLP_TYP |
|
560 |
+ 0x00, // reserved |
|
561 |
+ 0x00, // reserved |
|
562 |
+ }) |
|
563 |
+} |
|
564 |
diff -ruN --exclude Makefile bios.org/acpi-dsdt.hex bios/acpi-dsdt.hex |
|
565 |
--- bios.org/acpi-dsdt.hex 1970-01-01 01:00:00.000000000 +0100 |
|
566 |
+++ bios/acpi-dsdt.hex 2006-09-24 20:27:54.000000000 +0200 |
|
567 |
@@ -0,0 +1,278 @@ |
|
568 |
+/* |
|
569 |
+ * |
|
570 |
+ * Intel ACPI Component Architecture |
|
571 |
+ * ASL Optimizing Compiler version 20060421 [Apr 29 2006] |
|
572 |
+ * Copyright (C) 2000 - 2006 Intel Corporation |
|
573 |
+ * Supports ACPI Specification Revision 3.0a |
|
574 |
+ * |
|
575 |
+ * Compilation of "/usr/local/home/bellard/qemu-current/hw/acpi-dsdt.dsl" - Wed Jun 14 20:09:53 2006 |
|
576 |
+ * |
|
577 |
+ * C source code output |
|
578 |
+ * |
|
579 |
+ */ |
|
580 |
+unsigned char AmlCode[] = |
|
581 |
+{ |
|
582 |
+ 0x44,0x53,0x44,0x54,0x32,0x08,0x00,0x00, /* 00000000 "DSDT2..." */ |
|
583 |
+ 0x01,0x5B,0x51,0x45,0x4D,0x55,0x00,0x00, /* 00000008 ".[QEMU.." */ |
|
584 |
+ 0x51,0x45,0x4D,0x55,0x44,0x53,0x44,0x54, /* 00000010 "QEMUDSDT" */ |
|
585 |
+ 0x01,0x00,0x00,0x00,0x49,0x4E,0x54,0x4C, /* 00000018 "....INTL" */ |
|
586 |
+ 0x21,0x04,0x06,0x20,0x10,0x4F,0x04,0x5C, /* 00000020 "!.. .O.\" */ |
|
587 |
+ 0x00,0x5B,0x80,0x43,0x4D,0x53,0x5F,0x01, /* 00000028 ".[.CMS_." */ |
|
588 |
+ 0x0A,0x70,0x0A,0x02,0x5B,0x81,0x10,0x43, /* 00000030 ".p..[..C" */ |
|
589 |
+ 0x4D,0x53,0x5F,0x01,0x43,0x4D,0x53,0x49, /* 00000038 "MS_.CMSI" */ |
|
590 |
+ 0x08,0x43,0x4D,0x53,0x44,0x08,0x14,0x14, /* 00000040 ".CMSD..." */ |
|
591 |
+ 0x43,0x4D,0x52,0x44,0x01,0x70,0x68,0x43, /* 00000048 "CMRD.phC" */ |
|
592 |
+ 0x4D,0x53,0x49,0x70,0x43,0x4D,0x53,0x44, /* 00000050 "MSIpCMSD" */ |
|
593 |
+ 0x60,0xA4,0x60,0x5B,0x80,0x44,0x42,0x47, /* 00000058 "`.`[.DBG" */ |
|
594 |
+ 0x5F,0x01,0x0B,0x44,0xB0,0x0A,0x04,0x5B, /* 00000060 "_..D...[" */ |
|
595 |
+ 0x81,0x0B,0x44,0x42,0x47,0x5F,0x03,0x44, /* 00000068 "..DBG_.D" */ |
|
596 |
+ 0x42,0x47,0x4C,0x20,0x10,0x4E,0x25,0x5F, /* 00000070 "BGL .N%_" */ |
|
597 |
+ 0x53,0x42,0x5F,0x5B,0x82,0x46,0x25,0x50, /* 00000078 "SB_[.F%P" */ |
|
598 |
+ 0x43,0x49,0x30,0x08,0x5F,0x48,0x49,0x44, /* 00000080 "CI0._HID" */ |
|
599 |
+ 0x0C,0x41,0xD0,0x0A,0x03,0x08,0x5F,0x41, /* 00000088 ".A...._A" */ |
|
600 |
+ 0x44,0x52,0x00,0x08,0x5F,0x55,0x49,0x44, /* 00000090 "DR.._UID" */ |
|
601 |
+ 0x01,0x08,0x5F,0x50,0x52,0x54,0x12,0x47, /* 00000098 ".._PRT.G" */ |
|
602 |
+ 0x15,0x18,0x12,0x0B,0x04,0x0B,0xFF,0xFF, /* 000000A0 "........" */ |
|
603 |
+ 0x00,0x4C,0x4E,0x4B,0x44,0x00,0x12,0x0B, /* 000000A8 ".LNKD..." */ |
|
604 |
+ 0x04,0x0B,0xFF,0xFF,0x01,0x4C,0x4E,0x4B, /* 000000B0 ".....LNK" */ |
|
605 |
+ 0x41,0x00,0x12,0x0C,0x04,0x0B,0xFF,0xFF, /* 000000B8 "A......." */ |
|
606 |
+ 0x0A,0x02,0x4C,0x4E,0x4B,0x42,0x00,0x12, /* 000000C0 "..LNKB.." */ |
|
607 |
+ 0x0C,0x04,0x0B,0xFF,0xFF,0x0A,0x03,0x4C, /* 000000C8 ".......L" */ |
|
608 |
+ 0x4E,0x4B,0x43,0x00,0x12,0x0D,0x04,0x0C, /* 000000D0 "NKC....." */ |
|
609 |
+ 0xFF,0xFF,0x01,0x00,0x00,0x4C,0x4E,0x4B, /* 000000D8 ".....LNK" */ |
|
610 |
+ 0x41,0x00,0x12,0x0D,0x04,0x0C,0xFF,0xFF, /* 000000E0 "A......." */ |
|
611 |
+ 0x01,0x00,0x01,0x4C,0x4E,0x4B,0x42,0x00, /* 000000E8 "...LNKB." */ |
|
612 |
+ 0x12,0x0E,0x04,0x0C,0xFF,0xFF,0x01,0x00, /* 000000F0 "........" */ |
|
613 |
+ 0x0A,0x02,0x4C,0x4E,0x4B,0x43,0x00,0x12, /* 000000F8 "..LNKC.." */ |
|
614 |
+ 0x0E,0x04,0x0C,0xFF,0xFF,0x01,0x00,0x0A, /* 00000100 "........" */ |
|
615 |
+ 0x03,0x4C,0x4E,0x4B,0x44,0x00,0x12,0x0D, /* 00000108 ".LNKD..." */ |
|
616 |
+ 0x04,0x0C,0xFF,0xFF,0x02,0x00,0x00,0x4C, /* 00000110 ".......L" */ |
|
617 |
+ 0x4E,0x4B,0x42,0x00,0x12,0x0D,0x04,0x0C, /* 00000118 "NKB....." */ |
|
618 |
+ 0xFF,0xFF,0x02,0x00,0x01,0x4C,0x4E,0x4B, /* 00000120 ".....LNK" */ |
|
619 |
+ 0x43,0x00,0x12,0x0E,0x04,0x0C,0xFF,0xFF, /* 00000128 "C......." */ |
|
620 |
+ 0x02,0x00,0x0A,0x02,0x4C,0x4E,0x4B,0x44, /* 00000130 "....LNKD" */ |
|
621 |
+ 0x00,0x12,0x0E,0x04,0x0C,0xFF,0xFF,0x02, /* 00000138 "........" */ |
|
622 |
+ 0x00,0x0A,0x03,0x4C,0x4E,0x4B,0x41,0x00, /* 00000140 "...LNKA." */ |
|
623 |
+ 0x12,0x0D,0x04,0x0C,0xFF,0xFF,0x03,0x00, /* 00000148 "........" */ |
|
624 |
+ 0x00,0x4C,0x4E,0x4B,0x43,0x00,0x12,0x0D, /* 00000150 ".LNKC..." */ |
|
625 |
+ 0x04,0x0C,0xFF,0xFF,0x03,0x00,0x01,0x4C, /* 00000158 ".......L" */ |
|
626 |
+ 0x4E,0x4B,0x44,0x00,0x12,0x0E,0x04,0x0C, /* 00000160 "NKD....." */ |
|
627 |
+ 0xFF,0xFF,0x03,0x00,0x0A,0x02,0x4C,0x4E, /* 00000168 "......LN" */ |
|
628 |
+ 0x4B,0x41,0x00,0x12,0x0E,0x04,0x0C,0xFF, /* 00000170 "KA......" */ |
|
629 |
+ 0xFF,0x03,0x00,0x0A,0x03,0x4C,0x4E,0x4B, /* 00000178 ".....LNK" */ |
|
630 |
+ 0x42,0x00,0x12,0x0D,0x04,0x0C,0xFF,0xFF, /* 00000180 "B......." */ |
|
631 |
+ 0x04,0x00,0x00,0x4C,0x4E,0x4B,0x44,0x00, /* 00000188 "...LNKD." */ |
|
632 |
+ 0x12,0x0D,0x04,0x0C,0xFF,0xFF,0x04,0x00, /* 00000190 "........" */ |
|
633 |
+ 0x01,0x4C,0x4E,0x4B,0x41,0x00,0x12,0x0E, /* 00000198 ".LNKA..." */ |
|
634 |
+ 0x04,0x0C,0xFF,0xFF,0x04,0x00,0x0A,0x02, /* 000001A0 "........" */ |
|
635 |
+ 0x4C,0x4E,0x4B,0x42,0x00,0x12,0x0E,0x04, /* 000001A8 "LNKB...." */ |
|
636 |
+ 0x0C,0xFF,0xFF,0x04,0x00,0x0A,0x03,0x4C, /* 000001B0 ".......L" */ |
|
637 |
+ 0x4E,0x4B,0x43,0x00,0x12,0x0D,0x04,0x0C, /* 000001B8 "NKC....." */ |
|
638 |
+ 0xFF,0xFF,0x05,0x00,0x00,0x4C,0x4E,0x4B, /* 000001C0 ".....LNK" */ |
|
639 |
+ 0x41,0x00,0x12,0x0D,0x04,0x0C,0xFF,0xFF, /* 000001C8 "A......." */ |
|
640 |
+ 0x05,0x00,0x01,0x4C,0x4E,0x4B,0x42,0x00, /* 000001D0 "...LNKB." */ |
|
641 |
+ 0x12,0x0E,0x04,0x0C,0xFF,0xFF,0x05,0x00, /* 000001D8 "........" */ |
|
642 |
+ 0x0A,0x02,0x4C,0x4E,0x4B,0x43,0x00,0x12, /* 000001E0 "..LNKC.." */ |
|
643 |
+ 0x0E,0x04,0x0C,0xFF,0xFF,0x05,0x00,0x0A, /* 000001E8 "........" */ |
|
644 |
+ 0x03,0x4C,0x4E,0x4B,0x44,0x00,0x14,0x4C, /* 000001F0 ".LNKD..L" */ |
|
645 |
+ 0x0D,0x5F,0x43,0x52,0x53,0x00,0x08,0x4D, /* 000001F8 "._CRS..M" */ |
|
646 |
+ 0x45,0x4D,0x50,0x11,0x42,0x07,0x0A,0x6E, /* 00000200 "EMP.B..n" */ |
|
647 |
+ 0x88,0x0D,0x00,0x02,0x0C,0x00,0x00,0x00, /* 00000208 "........" */ |
|
648 |
+ 0x00,0x00,0xFF,0x00,0x00,0x00,0x00,0x01, /* 00000210 "........" */ |
|
649 |
+ 0x47,0x01,0xF8,0x0C,0xF8,0x0C,0x01,0x08, /* 00000218 "G......." */ |
|
650 |
+ 0x88,0x0D,0x00,0x01,0x0C,0x03,0x00,0x00, /* 00000220 "........" */ |
|
651 |
+ 0x00,0x00,0xF7,0x0C,0x00,0x00,0xF8,0x0C, /* 00000228 "........" */ |
|
652 |
+ 0x88,0x0D,0x00,0x01,0x0C,0x03,0x00,0x00, /* 00000230 "........" */ |
|
653 |
+ 0x00,0x0D,0xFF,0xFF,0x00,0x00,0x00,0xF3, /* 00000238 "........" */ |
|
654 |
+ 0x87,0x17,0x00,0x00,0x0C,0x03,0x00,0x00, /* 00000240 "........" */ |
|
655 |
+ 0x00,0x00,0x00,0x00,0x0A,0x00,0xFF,0xFF, /* 00000248 "........" */ |
|
656 |
+ 0x0B,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000250 "........" */ |
|
657 |
+ 0x02,0x00,0x87,0x17,0x00,0x00,0x08,0x01, /* 00000258 "........" */ |
|
658 |
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000260 "........" */ |
|
659 |
+ 0xFF,0xFF,0xBF,0xFE,0x00,0x00,0x00,0x00, /* 00000268 "........" */ |
|
660 |
+ 0x00,0x00,0x00,0x00,0x79,0x00,0x8A,0x4D, /* 00000270 "....y..M" */ |
|
661 |
+ 0x45,0x4D,0x50,0x0A,0x5C,0x50,0x4D,0x49, /* 00000278 "EMP.\PMI" */ |
|
662 |
+ 0x4E,0x8A,0x4D,0x45,0x4D,0x50,0x0A,0x60, /* 00000280 "N.MEMP.`" */ |
|
663 |
+ 0x50,0x4D,0x41,0x58,0x8A,0x4D,0x45,0x4D, /* 00000288 "PMAX.MEM" */ |
|
664 |
+ 0x50,0x0A,0x68,0x50,0x4C,0x45,0x4E,0x72, /* 00000290 "P.hPLENr" */ |
|
665 |
+ 0x43,0x4D,0x52,0x44,0x0A,0x34,0x79,0x43, /* 00000298 "CMRD.4yC" */ |
|
666 |
+ 0x4D,0x52,0x44,0x0A,0x35,0x0A,0x08,0x00, /* 000002A0 "MRD.5..." */ |
|
667 |
+ 0x60,0x79,0x60,0x0A,0x10,0x60,0x72,0x60, /* 000002A8 "`y`..`r`" */ |
|
668 |
+ 0x0C,0x00,0x00,0x00,0x01,0x60,0x70,0x60, /* 000002B0 ".....`p`" */ |
|
669 |
+ 0x50,0x4D,0x49,0x4E,0x74,0x50,0x4D,0x41, /* 000002B8 "PMINtPMA" */ |
|
670 |
+ 0x58,0x50,0x4D,0x49,0x4E,0x50,0x4C,0x45, /* 000002C0 "XPMINPLE" */ |
|
671 |
+ 0x4E,0x75,0x50,0x4C,0x45,0x4E,0xA4,0x4D, /* 000002C8 "NuPLEN.M" */ |
|
672 |
+ 0x45,0x4D,0x50,0x10,0x42,0x26,0x2E,0x5F, /* 000002D0 "EMP.B&._" */ |
|
673 |
+ 0x53,0x42,0x5F,0x50,0x43,0x49,0x30,0x5B, /* 000002D8 "SB_PCI0[" */ |
|
674 |
+ 0x82,0x43,0x20,0x49,0x53,0x41,0x5F,0x08, /* 000002E0 ".C ISA_." */ |
|
675 |
+ 0x5F,0x41,0x44,0x52,0x0C,0x00,0x00,0x01, /* 000002E8 "_ADR...." */ |
|
676 |
+ 0x00,0x5B,0x80,0x50,0x34,0x30,0x43,0x02, /* 000002F0 ".[.P40C." */ |
|
677 |
+ 0x0A,0x60,0x0A,0x04,0x5B,0x82,0x44,0x04, /* 000002F8 ".`..[.D." */ |
|
678 |
+ 0x4B,0x42,0x44,0x5F,0x08,0x5F,0x48,0x49, /* 00000300 "KBD_._HI" */ |
|
679 |
+ 0x44,0x0C,0x41,0xD0,0x03,0x03,0x14,0x09, /* 00000308 "D.A....." */ |
|
680 |
+ 0x5F,0x53,0x54,0x41,0x00,0xA4,0x0A,0x0F, /* 00000310 "_STA...." */ |
|
681 |
+ 0x14,0x29,0x5F,0x43,0x52,0x53,0x00,0x08, /* 00000318 ".)_CRS.." */ |
|
682 |
+ 0x54,0x4D,0x50,0x5F,0x11,0x18,0x0A,0x15, /* 00000320 "TMP_...." */ |
|
683 |
+ 0x47,0x01,0x60,0x00,0x60,0x00,0x01,0x01, /* 00000328 "G.`.`..." */ |
|
684 |
+ 0x47,0x01,0x64,0x00,0x64,0x00,0x01,0x01, /* 00000330 "G.d.d..." */ |
|
685 |
+ 0x22,0x02,0x00,0x79,0x00,0xA4,0x54,0x4D, /* 00000338 ""..y..TM" */ |
|
686 |
+ 0x50,0x5F,0x5B,0x82,0x33,0x4D,0x4F,0x55, /* 00000340 "P_[.3MOU" */ |
|
687 |
+ 0x5F,0x08,0x5F,0x48,0x49,0x44,0x0C,0x41, /* 00000348 "_._HID.A" */ |
|
688 |
+ 0xD0,0x0F,0x13,0x14,0x09,0x5F,0x53,0x54, /* 00000350 "....._ST" */ |
|
689 |
+ 0x41,0x00,0xA4,0x0A,0x0F,0x14,0x19,0x5F, /* 00000358 "A......_" */ |
|
690 |
+ 0x43,0x52,0x53,0x00,0x08,0x54,0x4D,0x50, /* 00000360 "CRS..TMP" */ |
|
691 |
+ 0x5F,0x11,0x08,0x0A,0x05,0x22,0x00,0x10, /* 00000368 "_....".." */ |
|
692 |
+ 0x79,0x00,0xA4,0x54,0x4D,0x50,0x5F,0x5B, /* 00000370 "y..TMP_[" */ |
|
693 |
+ 0x82,0x47,0x04,0x46,0x44,0x43,0x30,0x08, /* 00000378 ".G.FDC0." */ |
|
694 |
+ 0x5F,0x48,0x49,0x44,0x0C,0x41,0xD0,0x07, /* 00000380 "_HID.A.." */ |
|
695 |
+ 0x00,0x14,0x09,0x5F,0x53,0x54,0x41,0x00, /* 00000388 "..._STA." */ |
|
696 |
+ 0xA4,0x0A,0x0F,0x14,0x2C,0x5F,0x43,0x52, /* 00000390 "....,_CR" */ |
|
697 |
+ 0x53,0x00,0x08,0x42,0x55,0x46,0x30,0x11, /* 00000398 "S..BUF0." */ |
|
698 |
+ 0x1B,0x0A,0x18,0x47,0x01,0xF2,0x03,0xF2, /* 000003A0 "...G...." */ |
|
699 |
+ 0x03,0x00,0x04,0x47,0x01,0xF7,0x03,0xF7, /* 000003A8 "...G...." */ |
|
700 |
+ 0x03,0x00,0x01,0x22,0x40,0x00,0x2A,0x04, /* 000003B0 "..."@.*." */ |
|
701 |
+ 0x00,0x79,0x00,0xA4,0x42,0x55,0x46,0x30, /* 000003B8 ".y..BUF0" */ |
|
702 |
+ 0x5B,0x82,0x4B,0x05,0x4C,0x50,0x54,0x5F, /* 000003C0 "[.K.LPT_" */ |
|
703 |
+ 0x08,0x5F,0x48,0x49,0x44,0x0C,0x41,0xD0, /* 000003C8 "._HID.A." */ |
|
704 |
+ 0x04,0x00,0x14,0x28,0x5F,0x53,0x54,0x41, /* 000003D0 "...(_STA" */ |
|
705 |
+ 0x00,0x70,0x5E,0x5E,0x5E,0x2E,0x50,0x58, /* 000003D8 ".p^^^.PX" */ |
|
706 |
+ 0x31,0x33,0x44,0x52,0x53,0x41,0x60,0x7B, /* 000003E0 "13DRSA`{" */ |
|
707 |
+ 0x60,0x0C,0x00,0x00,0x00,0x80,0x60,0xA0, /* 000003E8 "`.....`." */ |
|
708 |
+ 0x06,0x93,0x60,0x00,0xA4,0x00,0xA1,0x04, /* 000003F0 "..`....." */ |
|
709 |
+ 0xA4,0x0A,0x0F,0x14,0x21,0x5F,0x43,0x52, /* 000003F8 "....!_CR" */ |
|
710 |
+ 0x53,0x00,0x08,0x42,0x55,0x46,0x30,0x11, /* 00000400 "S..BUF0." */ |
|
711 |
+ 0x10,0x0A,0x0D,0x47,0x01,0x78,0x03,0x78, /* 00000408 "...G.x.x" */ |
|
712 |
+ 0x03,0x08,0x08,0x22,0x80,0x00,0x79,0x00, /* 00000410 "..."..y." */ |
|
713 |
+ 0xA4,0x42,0x55,0x46,0x30,0x5B,0x82,0x41, /* 00000418 ".BUF0[.A" */ |
|
714 |
+ 0x06,0x43,0x4F,0x4D,0x31,0x08,0x5F,0x48, /* 00000420 ".COM1._H" */ |
|
715 |
+ 0x49,0x44,0x0C,0x41,0xD0,0x05,0x01,0x08, /* 00000428 "ID.A...." */ |
|
716 |
+ 0x5F,0x55,0x49,0x44,0x01,0x14,0x28,0x5F, /* 00000430 "_UID..(_" */ |
|
717 |
+ 0x53,0x54,0x41,0x00,0x70,0x5E,0x5E,0x5E, /* 00000438 "STA.p^^^" */ |
|
718 |
+ 0x2E,0x50,0x58,0x31,0x33,0x44,0x52,0x53, /* 00000440 ".PX13DRS" */ |
|
719 |
+ 0x43,0x60,0x7B,0x60,0x0C,0x00,0x00,0x00, /* 00000448 "C`{`...." */ |
|
720 |
+ 0x08,0x60,0xA0,0x06,0x93,0x60,0x00,0xA4, /* 00000450 ".`...`.." */ |
|
721 |
+ 0x00,0xA1,0x04,0xA4,0x0A,0x0F,0x14,0x21, /* 00000458 ".......!" */ |
|
722 |
+ 0x5F,0x43,0x52,0x53,0x00,0x08,0x42,0x55, /* 00000460 "_CRS..BU" */ |
|
723 |
+ 0x46,0x30,0x11,0x10,0x0A,0x0D,0x47,0x01, /* 00000468 "F0....G." */ |
|
724 |
+ 0xF8,0x03,0xF8,0x03,0x00,0x08,0x22,0x10, /* 00000470 "......"." */ |
|
725 |
+ 0x00,0x79,0x00,0xA4,0x42,0x55,0x46,0x30, /* 00000478 ".y..BUF0" */ |
|
726 |
+ 0x5B,0x82,0x42,0x06,0x43,0x4F,0x4D,0x32, /* 00000480 "[.B.COM2" */ |
|
727 |
+ 0x08,0x5F,0x48,0x49,0x44,0x0C,0x41,0xD0, /* 00000488 "._HID.A." */ |
|
728 |
+ 0x05,0x01,0x08,0x5F,0x55,0x49,0x44,0x0A, /* 00000490 "..._UID." */ |
|
729 |
+ 0x02,0x14,0x28,0x5F,0x53,0x54,0x41,0x00, /* 00000498 "..(_STA." */ |
|
730 |
+ 0x70,0x5E,0x5E,0x5E,0x2E,0x50,0x58,0x31, /* 000004A0 "p^^^.PX1" */ |
|
731 |
+ 0x33,0x44,0x52,0x53,0x43,0x60,0x7B,0x60, /* 000004A8 "3DRSC`{`" */ |
|
732 |
+ 0x0C,0x00,0x00,0x00,0x80,0x60,0xA0,0x06, /* 000004B0 ".....`.." */ |
|
733 |
+ 0x93,0x60,0x00,0xA4,0x00,0xA1,0x04,0xA4, /* 000004B8 ".`......" */ |
|
734 |
+ 0x0A,0x0F,0x14,0x21,0x5F,0x43,0x52,0x53, /* 000004C0 "...!_CRS" */ |
|
735 |
+ 0x00,0x08,0x42,0x55,0x46,0x30,0x11,0x10, /* 000004C8 "..BUF0.." */ |
|
736 |
+ 0x0A,0x0D,0x47,0x01,0xF8,0x02,0xF8,0x02, /* 000004D0 "..G....." */ |
|
737 |
+ 0x00,0x08,0x22,0x08,0x00,0x79,0x00,0xA4, /* 000004D8 ".."..y.." */ |
|
738 |
+ 0x42,0x55,0x46,0x30,0x5B,0x82,0x40,0x05, /* 000004E0 "BUF0[.@." */ |
|
739 |
+ 0x50,0x58,0x31,0x33,0x08,0x5F,0x41,0x44, /* 000004E8 "PX13._AD" */ |
|
740 |
+ 0x52,0x0C,0x03,0x00,0x01,0x00,0x5B,0x80, /* 000004F0 "R.....[." */ |
|
741 |
+ 0x50,0x31,0x33,0x43,0x02,0x0A,0x5C,0x0A, /* 000004F8 "P13C..\." */ |
|
742 |
+ 0x24,0x5B,0x81,0x33,0x50,0x31,0x33,0x43, /* 00000500 "$[.3P13C" */ |
|
743 |
+ 0x03,0x44,0x52,0x53,0x41,0x20,0x44,0x52, /* 00000508 ".DRSA DR" */ |
|
744 |
+ 0x53,0x42,0x20,0x44,0x52,0x53,0x43,0x20, /* 00000510 "SB DRSC " */ |
|
745 |
+ 0x44,0x52,0x53,0x45,0x20,0x44,0x52,0x53, /* 00000518 "DRSE DRS" */ |
|
746 |
+ 0x46,0x20,0x44,0x52,0x53,0x47,0x20,0x44, /* 00000520 "F DRSG D" */ |
|
747 |
+ 0x52,0x53,0x48,0x20,0x44,0x52,0x53,0x49, /* 00000528 "RSH DRSI" */ |
|
748 |
+ 0x20,0x44,0x52,0x53,0x4A,0x20,0x10,0x4F, /* 00000530 " DRSJ .O" */ |
|
749 |
+ 0x2E,0x5F,0x53,0x42,0x5F,0x5B,0x81,0x24, /* 00000538 "._SB_[.$" */ |
|
750 |
+ 0x2F,0x03,0x50,0x43,0x49,0x30,0x49,0x53, /* 00000540 "/.PCI0IS" */ |
|
751 |
+ 0x41,0x5F,0x50,0x34,0x30,0x43,0x01,0x50, /* 00000548 "A_P40C.P" */ |
|
752 |
+ 0x52,0x51,0x30,0x08,0x50,0x52,0x51,0x31, /* 00000550 "RQ0.PRQ1" */ |
|
753 |
+ 0x08,0x50,0x52,0x51,0x32,0x08,0x50,0x52, /* 00000558 ".PRQ2.PR" */ |
|
754 |
+ 0x51,0x33,0x08,0x5B,0x82,0x4E,0x0A,0x4C, /* 00000560 "Q3.[.N.L" */ |
|
755 |
+ 0x4E,0x4B,0x41,0x08,0x5F,0x48,0x49,0x44, /* 00000568 "NKA._HID" */ |
|
756 |
+ 0x0C,0x41,0xD0,0x0C,0x0F,0x08,0x5F,0x55, /* 00000570 ".A...._U" */ |
|
757 |
+ 0x49,0x44,0x01,0x08,0x5F,0x50,0x52,0x53, /* 00000578 "ID.._PRS" */ |
|
758 |
+ 0x11,0x09,0x0A,0x06,0x23,0xF8,0x1E,0x18, /* 00000580 "....#..." */ |
|
759 |
+ 0x79,0x00,0x14,0x1A,0x5F,0x53,0x54,0x41, /* 00000588 "y..._STA" */ |
|
760 |
+ 0x00,0x70,0x0A,0x0B,0x60,0xA0,0x0D,0x7B, /* 00000590 ".p..`..{" */ |
|
761 |
+ 0x0A,0x80,0x50,0x52,0x51,0x30,0x61,0x70, /* 00000598 "..PRQ0ap" */ |
|
762 |
+ 0x0A,0x09,0x60,0xA4,0x60,0x14,0x11,0x5F, /* 000005A0 "..`.`.._" */ |
|
763 |
+ 0x44,0x49,0x53,0x00,0x7D,0x50,0x52,0x51, /* 000005A8 "DIS.}PRQ" */ |
|
764 |
+ 0x30,0x0A,0x80,0x50,0x52,0x51,0x30,0x14, /* 000005B0 "0..PRQ0." */ |
|
765 |
+ 0x3F,0x5F,0x43,0x52,0x53,0x00,0x08,0x50, /* 000005B8 "?_CRS..P" */ |
|
766 |
+ 0x52,0x52,0x30,0x11,0x09,0x0A,0x06,0x23, /* 000005C0 "RR0....#" */ |
|
767 |
+ 0x02,0x00,0x18,0x79,0x00,0x8B,0x50,0x52, /* 000005C8 "...y..PR" */ |
|
768 |
+ 0x52,0x30,0x01,0x54,0x4D,0x50,0x5F,0x70, /* 000005D0 "R0.TMP_p" */ |
|
769 |
+ 0x50,0x52,0x51,0x30,0x60,0xA0,0x0C,0x95, /* 000005D8 "PRQ0`..." */ |
|
770 |
+ 0x60,0x0A,0x80,0x79,0x01,0x60,0x54,0x4D, /* 000005E0 "`..y.`TM" */ |
|
771 |
+ 0x50,0x5F,0xA1,0x07,0x70,0x00,0x54,0x4D, /* 000005E8 "P_..p.TM" */ |
|
772 |
+ 0x50,0x5F,0xA4,0x50,0x52,0x52,0x30,0x14, /* 000005F0 "P_.PRR0." */ |
|
773 |
+ 0x1B,0x5F,0x53,0x52,0x53,0x01,0x8B,0x68, /* 000005F8 "._SRS..h" */ |
|
774 |
+ 0x01,0x54,0x4D,0x50,0x5F,0x82,0x54,0x4D, /* 00000600 ".TMP_.TM" */ |
|
775 |
+ 0x50,0x5F,0x60,0x76,0x60,0x70,0x60,0x50, /* 00000608 "P_`v`p`P" */ |
|
776 |
+ 0x52,0x51,0x30,0x5B,0x82,0x4F,0x0A,0x4C, /* 00000610 "RQ0[.O.L" */ |
|
777 |
+ 0x4E,0x4B,0x42,0x08,0x5F,0x48,0x49,0x44, /* 00000618 "NKB._HID" */ |
|
778 |
+ 0x0C,0x41,0xD0,0x0C,0x0F,0x08,0x5F,0x55, /* 00000620 ".A...._U" */ |
|
779 |
+ 0x49,0x44,0x0A,0x02,0x08,0x5F,0x50,0x52, /* 00000628 "ID..._PR" */ |
|
780 |
+ 0x53,0x11,0x09,0x0A,0x06,0x23,0xF8,0x1E, /* 00000630 "S....#.." */ |
|
781 |
+ 0x18,0x79,0x00,0x14,0x1A,0x5F,0x53,0x54, /* 00000638 ".y..._ST" */ |
|
782 |
+ 0x41,0x00,0x70,0x0A,0x0B,0x60,0xA0,0x0D, /* 00000640 "A.p..`.." */ |
|
783 |
+ 0x7B,0x0A,0x80,0x50,0x52,0x51,0x31,0x61, /* 00000648 "{..PRQ1a" */ |
|
784 |
+ 0x70,0x0A,0x09,0x60,0xA4,0x60,0x14,0x11, /* 00000650 "p..`.`.." */ |
|
785 |
+ 0x5F,0x44,0x49,0x53,0x00,0x7D,0x50,0x52, /* 00000658 "_DIS.}PR" */ |
|
786 |
+ 0x51,0x31,0x0A,0x80,0x50,0x52,0x51,0x31, /* 00000660 "Q1..PRQ1" */ |
|
787 |
+ 0x14,0x3F,0x5F,0x43,0x52,0x53,0x00,0x08, /* 00000668 ".?_CRS.." */ |
|
788 |
+ 0x50,0x52,0x52,0x30,0x11,0x09,0x0A,0x06, /* 00000670 "PRR0...." */ |
|
789 |
+ 0x23,0x02,0x00,0x18,0x79,0x00,0x8B,0x50, /* 00000678 "#...y..P" */ |
|
790 |
+ 0x52,0x52,0x30,0x01,0x54,0x4D,0x50,0x5F, /* 00000680 "RR0.TMP_" */ |
|
791 |
+ 0x70,0x50,0x52,0x51,0x31,0x60,0xA0,0x0C, /* 00000688 "pPRQ1`.." */ |
|
792 |
+ 0x95,0x60,0x0A,0x80,0x79,0x01,0x60,0x54, /* 00000690 ".`..y.`T" */ |
|
793 |
+ 0x4D,0x50,0x5F,0xA1,0x07,0x70,0x00,0x54, /* 00000698 "MP_..p.T" */ |
|
794 |
+ 0x4D,0x50,0x5F,0xA4,0x50,0x52,0x52,0x30, /* 000006A0 "MP_.PRR0" */ |
|
795 |
+ 0x14,0x1B,0x5F,0x53,0x52,0x53,0x01,0x8B, /* 000006A8 ".._SRS.." */ |
|
796 |
+ 0x68,0x01,0x54,0x4D,0x50,0x5F,0x82,0x54, /* 000006B0 "h.TMP_.T" */ |
|
797 |
+ 0x4D,0x50,0x5F,0x60,0x76,0x60,0x70,0x60, /* 000006B8 "MP_`v`p`" */ |
|
798 |
+ 0x50,0x52,0x51,0x31,0x5B,0x82,0x4F,0x0A, /* 000006C0 "PRQ1[.O." */ |
|
799 |
+ 0x4C,0x4E,0x4B,0x43,0x08,0x5F,0x48,0x49, /* 000006C8 "LNKC._HI" */ |
|
800 |
+ 0x44,0x0C,0x41,0xD0,0x0C,0x0F,0x08,0x5F, /* 000006D0 "D.A...._" */ |
|
801 |
+ 0x55,0x49,0x44,0x0A,0x03,0x08,0x5F,0x50, /* 000006D8 "UID..._P" */ |
|
802 |
+ 0x52,0x53,0x11,0x09,0x0A,0x06,0x23,0xF8, /* 000006E0 "RS....#." */ |
|
803 |
+ 0x1E,0x18,0x79,0x00,0x14,0x1A,0x5F,0x53, /* 000006E8 "..y..._S" */ |
|
804 |
+ 0x54,0x41,0x00,0x70,0x0A,0x0B,0x60,0xA0, /* 000006F0 "TA.p..`." */ |
|
805 |
+ 0x0D,0x7B,0x0A,0x80,0x50,0x52,0x51,0x32, /* 000006F8 ".{..PRQ2" */ |
|
806 |
+ 0x61,0x70,0x0A,0x09,0x60,0xA4,0x60,0x14, /* 00000700 "ap..`.`." */ |
|
807 |
+ 0x11,0x5F,0x44,0x49,0x53,0x00,0x7D,0x50, /* 00000708 "._DIS.}P" */ |
|
808 |
+ 0x52,0x51,0x32,0x0A,0x80,0x50,0x52,0x51, /* 00000710 "RQ2..PRQ" */ |
|
809 |
+ 0x32,0x14,0x3F,0x5F,0x43,0x52,0x53,0x00, /* 00000718 "2.?_CRS." */ |
|
810 |
+ 0x08,0x50,0x52,0x52,0x30,0x11,0x09,0x0A, /* 00000720 ".PRR0..." */ |
|
811 |
+ 0x06,0x23,0x02,0x00,0x18,0x79,0x00,0x8B, /* 00000728 ".#...y.." */ |
|
812 |
+ 0x50,0x52,0x52,0x30,0x01,0x54,0x4D,0x50, /* 00000730 "PRR0.TMP" */ |
|
813 |
+ 0x5F,0x70,0x50,0x52,0x51,0x32,0x60,0xA0, /* 00000738 "_pPRQ2`." */ |
|
814 |
+ 0x0C,0x95,0x60,0x0A,0x80,0x79,0x01,0x60, /* 00000740 "..`..y.`" */ |
|
815 |
+ 0x54,0x4D,0x50,0x5F,0xA1,0x07,0x70,0x00, /* 00000748 "TMP_..p." */ |
|
816 |
+ 0x54,0x4D,0x50,0x5F,0xA4,0x50,0x52,0x52, /* 00000750 "TMP_.PRR" */ |
|
817 |
+ 0x30,0x14,0x1B,0x5F,0x53,0x52,0x53,0x01, /* 00000758 "0.._SRS." */ |
|
818 |
+ 0x8B,0x68,0x01,0x54,0x4D,0x50,0x5F,0x82, /* 00000760 ".h.TMP_." */ |
|
819 |
+ 0x54,0x4D,0x50,0x5F,0x60,0x76,0x60,0x70, /* 00000768 "TMP_`v`p" */ |
|
820 |
+ 0x60,0x50,0x52,0x51,0x32,0x5B,0x82,0x4F, /* 00000770 "`PRQ2[.O" */ |
|
821 |
+ 0x0A,0x4C,0x4E,0x4B,0x44,0x08,0x5F,0x48, /* 00000778 ".LNKD._H" */ |
|
822 |
+ 0x49,0x44,0x0C,0x41,0xD0,0x0C,0x0F,0x08, /* 00000780 "ID.A...." */ |
|
823 |
+ 0x5F,0x55,0x49,0x44,0x0A,0x04,0x08,0x5F, /* 00000788 "_UID..._" */ |
|
824 |
+ 0x50,0x52,0x53,0x11,0x09,0x0A,0x06,0x23, /* 00000790 "PRS....#" */ |
|
825 |
+ 0xF8,0x1E,0x18,0x79,0x00,0x14,0x1A,0x5F, /* 00000798 "...y..._" */ |
|
826 |
+ 0x53,0x54,0x41,0x00,0x70,0x0A,0x0B,0x60, /* 000007A0 "STA.p..`" */ |
|
827 |
+ 0xA0,0x0D,0x7B,0x0A,0x80,0x50,0x52,0x51, /* 000007A8 "..{..PRQ" */ |
|
828 |
+ 0x33,0x61,0x70,0x0A,0x09,0x60,0xA4,0x60, /* 000007B0 "3ap..`.`" */ |
|
829 |
+ 0x14,0x11,0x5F,0x44,0x49,0x53,0x00,0x7D, /* 000007B8 ".._DIS.}" */ |
|
830 |
+ 0x50,0x52,0x51,0x33,0x0A,0x80,0x50,0x52, /* 000007C0 "PRQ3..PR" */ |
|
831 |
+ 0x51,0x33,0x14,0x3F,0x5F,0x43,0x52,0x53, /* 000007C8 "Q3.?_CRS" */ |
|
832 |
+ 0x00,0x08,0x50,0x52,0x52,0x30,0x11,0x09, /* 000007D0 "..PRR0.." */ |
|
833 |
+ 0x0A,0x06,0x23,0x02,0x00,0x18,0x79,0x00, /* 000007D8 "..#...y." */ |
|
834 |
+ 0x8B,0x50,0x52,0x52,0x30,0x01,0x54,0x4D, /* 000007E0 ".PRR0.TM" */ |
|
835 |
+ 0x50,0x5F,0x70,0x50,0x52,0x51,0x33,0x60, /* 000007E8 "P_pPRQ3`" */ |
|
836 |
+ 0xA0,0x0C,0x95,0x60,0x0A,0x80,0x79,0x01, /* 000007F0 "...`..y." */ |
|
837 |
+ 0x60,0x54,0x4D,0x50,0x5F,0xA1,0x07,0x70, /* 000007F8 "`TMP_..p" */ |
|
838 |
+ 0x00,0x54,0x4D,0x50,0x5F,0xA4,0x50,0x52, /* 00000800 ".TMP_.PR" */ |
|
839 |
+ 0x52,0x30,0x14,0x1B,0x5F,0x53,0x52,0x53, /* 00000808 "R0.._SRS" */ |
|
840 |
+ 0x01,0x8B,0x68,0x01,0x54,0x4D,0x50,0x5F, /* 00000810 "..h.TMP_" */ |
|
841 |
+ 0x82,0x54,0x4D,0x50,0x5F,0x60,0x76,0x60, /* 00000818 ".TMP_`v`" */ |
|
842 |
+ 0x70,0x60,0x50,0x52,0x51,0x33,0x08,0x5F, /* 00000820 "p`PRQ3._" */ |
|
843 |
+ 0x53,0x35,0x5F,0x12,0x06,0x04,0x00,0x00, /* 00000828 "S5_....." */ |
|
844 |
+ 0x00,0x00, |
|
845 |
+}; |
|
846 |
Binary files bios.org/BIOS-bochs-latest and bios/BIOS-bochs-latest differ |
|
847 |
diff -ruN --exclude Makefile bios.org/Makefile.in bios/Makefile.in |
|
848 |
--- bios.org/Makefile.in 2006-01-13 18:36:27.000000000 +0100 |
|
849 |
+++ bios/Makefile.in 2006-09-24 21:37:05.000000000 +0200 |
|
850 |
@@ -61,7 +61,8 @@ |
|
1 |
Index: BIOS-bochs-latest |
|
2 |
=================================================================== |
|
3 |
RCS file: /cvsroot/bochs/bochs/bios/BIOS-bochs-latest,v |
|
4 |
retrieving revision 1.133 |
|
5 |
diff -u -w -r1.133 BIOS-bochs-latest |
|
6 |
Binary files /tmp/cvsrjjP5I and BIOS-bochs-latest differ |
|
7 |
Index: rombios.c |
|
8 |
=================================================================== |
|
9 |
RCS file: /cvsroot/bochs/bochs/bios/rombios.c,v |
|
10 |
retrieving revision 1.170 |
|
11 |
diff -u -w -r1.170 rombios.c |
|
12 |
--- rombios.c 30 Sep 2006 11:22:53 -0000 1.170 |
|
13 |
+++ rombios.c 1 Oct 2006 16:03:53 -0000 |
|
14 |
@@ -4115,7 +4115,7 @@ |
|
15 |
case 3: |
|
16 |
set_e820_range(ES, regs.u.r16.di, |
|
17 |
0x00100000L, |
|
18 |
- extended_memory_size - 0x10000L, 1); |
|
19 |
+ extended_memory_size - ACPI_DATA_SIZE, 1); |
|
20 |
regs.u.r32.ebx = 4; |
|
21 |
regs.u.r32.eax = 0x534D4150; |
|
22 |
regs.u.r32.ecx = 0x14; |
|
23 |
@@ -4124,7 +4124,7 @@ |
|
24 |
break; |
|
25 |
case 4: |
|
26 |
set_e820_range(ES, regs.u.r16.di, |
|
27 |
- extended_memory_size - 0x10000L, |
|
28 |
+ extended_memory_size - ACPI_DATA_SIZE, |
|
29 |
extended_memory_size, 3); // ACPI RAM |
|
30 |
regs.u.r32.ebx = 5; |
|
31 |
regs.u.r32.eax = 0x534D4150; |
|
32 |
@@ -8723,7 +8723,7 @@ |
|
33 |
|
|
34 |
.align 16 |
|
35 |
bios32_entry_point: |
|
36 |
- pushf |
|
37 |
+ pushfd |
|
38 |
cmp eax, #0x49435024 ;; "$PCI" |
|
39 |
jne unknown_service |
|
40 |
mov eax, #0x80000000 |
|
41 |
@@ -8750,12 +8750,12 @@ |
|
42 |
#ifdef BX_QEMU |
|
43 |
and dword ptr[esp+8],0xfffffffc ;; reset CS.RPL for kqemu |
|
44 |
#endif |
|
45 |
- popf |
|
46 |
+ popfd |
|
47 |
retf |
|
851 | 48 |
|
852 |
clean: |
|
853 |
@RMCOMMAND@ *.o *.a *.s _rombios*_.c rombios*.txt rombios*.sym |
|
854 |
- @RMCOMMAND@ usage biossums |
|
855 |
+ @RMCOMMAND@ usage biossums rombios16.bin |
|
856 |
+ @RMCOMMAND@ rombios32.bin rombios32.out pad tmp32.bin |
|
49 |
.align 16 |
|
50 |
pcibios_protected: |
|
51 |
- pushf |
|
52 |
+ pushfd |
|
53 |
cli |
|
54 |
push esi |
|
55 |
push edi |
|
56 |
@@ -8864,7 +8864,7 @@ |
|
57 |
#ifdef BX_QEMU |
|
58 |
and dword ptr[esp+8],0xfffffffc ;; reset CS.RPL for kqemu |
|
59 |
#endif |
|
60 |
- popf |
|
61 |
+ popfd |
|
62 |
stc |
|
63 |
retf |
|
64 |
pci_pro_ok: |
|
65 |
@@ -8874,7 +8874,7 @@ |
|
66 |
#ifdef BX_QEMU |
|
67 |
and dword ptr[esp+8],0xfffffffc ;; reset CS.RPL for kqemu |
|
68 |
#endif |
|
69 |
- popf |
|
70 |
+ popfd |
|
71 |
clc |
|
72 |
retf |
|
857 | 73 |
|
858 |
dist-clean: clean |
|
859 |
@RMCOMMAND@ Makefile |
|
860 |
@@ -69,15 +70,40 @@ |
|
861 |
bios-clean: |
|
862 |
@RMCOMMAND@ BIOS-bochs-* |
|
74 |
Index: rombios.h |
|
75 |
=================================================================== |
|
76 |
RCS file: /cvsroot/bochs/bochs/bios/rombios.h,v |
|
77 |
retrieving revision 1.1 |
|
78 |
diff -u -w -r1.1 rombios.h |
|
79 |
--- rombios.h 30 Sep 2006 11:22:53 -0000 1.1 |
|
80 |
+++ rombios.h 1 Oct 2006 16:03:54 -0000 |
|
81 |
@@ -19,7 +19,7 @@ |
|
82 |
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
|
863 | 83 |
|
864 |
-BIOS-bochs-latest: rombios.c apmbios.S biossums |
|
865 |
+rombios16.bin: rombios.c apmbios.S biossums |
|
866 |
$(GCC) $(BIOS_BUILD_DATE) -E -P $< > _rombios_.c |
|
867 |
$(BCC) -o rombios.s -C-c -D__i86__ -0 -S _rombios_.c |
|
868 |
sed -e 's/^\.text//' -e 's/^\.data//' rombios.s > _rombios_.s |
|
869 |
$(AS86) _rombios_.s -b tmp.bin -u- -w- -g -0 -j -O -l rombios.txt |
|
870 |
-perl ${srcdir}/makesym.perl < rombios.txt > rombios.sym |
|
871 |
- mv tmp.bin BIOS-bochs-latest |
|
872 |
- ./biossums BIOS-bochs-latest |
|
873 |
+ mv tmp.bin rombios16.bin |
|
874 |
+ ./biossums rombios16.bin |
|
875 |
rm -f _rombios_.s |
|
84 |
/* define it to include QEMU specific code */ |
|
85 |
-//#define BX_QEMU |
|
86 |
+#define BX_QEMU |
|
876 | 87 |
|
88 |
#define BX_ROMBIOS32 1 |
|
89 |
#define DEBUG_ROMBIOS 0 |
|
90 |
@@ -48,3 +48,7 @@ |
|
91 |
#endif |
|
92 |
#define BX_INFO(format, p...) bios_printf(BIOS_PRINTF_INFO, format, ##p) |
|
93 |
#define BX_PANIC(format, p...) bios_printf(BIOS_PRINTF_DEBHALT, format, ##p) |
|
877 | 94 |
+ |
878 |
+rombios32.bin: rombios32.out pad |
|
879 |
+ objcopy -O binary $< tmp32.bin |
|
880 |
+ ./pad < tmp32.bin > $@ 65536 0xff |
|
881 |
+ |
|
882 |
+rombios32.out: rombios32start.o rombios32.o rombios32.ld |
|
883 |
+ ld -o $@ -T rombios32.ld rombios32start.o rombios32.o |
|
884 |
+ |
|
885 |
+rombios32.o: rombios32.c acpi-dsdt.hex |
|
886 |
+ $(GCC) -O2 -Wall -c -o $@ $< |
|
887 |
+ |
|
888 |
+ifeq ("1", "0") |
|
889 |
+acpi-dsdt.hex: acpi-dsdt.dsl |
|
890 |
+ iasl -tc -p $@ $< |
|
891 |
+endif |
|
892 |
+ |
|
893 |
+rombios32start.o: rombios32start.S |
|
894 |
+ $(GCC) -c -o $@ $< |
|
895 |
+ |
|
896 |
+BIOS-bochs-latest: rombios16.bin rombios32.bin |
|
897 |
+ cat rombios32.bin rombios16.bin > $@ |
|
898 |
+ |
|
899 |
+pad: pad.c |
|
900 |
+ $(GCC) -o $@ $< |
|
901 |
+ |
|
902 |
biossums: biossums.c |
|
903 |
$(GCC) -o biossums biossums.c |
|
904 |
diff -ruN --exclude Makefile bios.org/pad.c bios/pad.c |
|
905 |
--- bios.org/pad.c 1970-01-01 01:00:00.000000000 +0100 |
|
906 |
+++ bios/pad.c 2006-09-24 20:22:58.000000000 +0200 |
|
907 |
@@ -0,0 +1,20 @@ |
|
908 |
+#include <stdlib.h> |
|
909 |
+#include <stdio.h> |
|
910 |
+ |
|
911 |
+int main(int argc, char **argv) |
|
912 |
+{ |
|
913 |
+ int len, val, i, c; |
|
914 |
+ |
|
915 |
+ len = strtol(argv[1], NULL, 0); |
|
916 |
+ val = strtol(argv[2], NULL, 0); |
|
917 |
+ for(i = 0 ; i < len; i++) { |
|
918 |
+ c = getchar(); |
|
919 |
+ if (c == EOF) |
|
920 |
+ break; |
|
921 |
+ putchar(c); |
|
922 |
+ } |
|
923 |
+ for( ; i < len; i++) { |
|
924 |
+ putchar(val); |
|
925 |
+ } |
|
926 |
+ return 0; |
|
927 |
+} |
|
928 |
diff -ruN --exclude Makefile bios.org/rombios32.c bios/rombios32.c |
|
929 |
--- bios.org/rombios32.c 1970-01-01 01:00:00.000000000 +0100 |
|
930 |
+++ bios/rombios32.c 2006-09-24 21:29:27.000000000 +0200 |
|
931 |
@@ -0,0 +1,1324 @@ |
|
95 |
+#define ACPI_DATA_SIZE 0x00010000L |
|
96 |
+#define PM_IO_BASE 0xb000 |
|
97 |
+#define CPU_COUNT_ADDR 0xf000 |
|
98 |
Index: rombios32.c |
|
99 |
=================================================================== |
|
100 |
RCS file: /cvsroot/bochs/bochs/bios/rombios32.c,v |
|
101 |
retrieving revision 1.4 |
|
102 |
diff -u -w -r1.4 rombios32.c |
|
103 |
--- rombios32.c 30 Sep 2006 11:22:53 -0000 1.4 |
|
104 |
+++ rombios32.c 1 Oct 2006 16:03:54 -0000 |
|
105 |
@@ -55,13 +55,10 @@ |
|
106 |
|
|
107 |
#define APIC_ENABLED 0x0100 |
|
108 |
|
|
109 |
-#define CPU_COUNT_ADDR 0xf000 |
|
110 |
#define AP_BOOT_ADDR 0x10000 |
|
111 |
|
|
112 |
#define MPTABLE_MAX_SIZE 0x00002000 |
|
113 |
-#define ACPI_DATA_SIZE 0x00010000 |
|
114 |
#define SMI_CMD_IO_ADDR 0xb2 |
|
115 |
-#define PM_IO_BASE 0xb000 |
|
116 |
|
|
117 |
#define BIOS_TMP_STORAGE 0x00030000 /* 64 KB used to copy the BIOS to shadow RAM */ |
|
118 |
|
|
119 |
@@ -354,12 +351,14 @@ |
|
120 |
|
|
121 |
void delay_ms(int n) |
|
122 |
{ |
|
123 |
- int i, j, r1, r2; |
|
124 |
+ int i, j; |
|
125 |
for(i = 0; i < n; i++) { |
|
126 |
-#if BX_QEMU |
|
127 |
+#ifdef BX_QEMU |
|
128 |
/* approximative ! */ |
|
129 |
for(j = 0; j < 1000000; j++); |
|
130 |
#else |
|
131 |
+ { |
|
132 |
+ int r1, r2; |
|
133 |
j = 66; |
|
134 |
r1 = inb(0x61) & 0x10; |
|
135 |
do { |
|
136 |
@@ -369,6 +368,7 @@ |
|
137 |
r1 = r2; |
|
138 |
} |
|
139 |
} while (j > 0); |
|
140 |
+ } |
|
141 |
#endif |
|
142 |
} |
|
143 |
} |
|
144 |
Index: rombios32start.S |
|
145 |
=================================================================== |
|
146 |
RCS file: /cvsroot/bochs/bochs/bios/rombios32start.S,v |
|
147 |
retrieving revision 1.1 |
|
148 |
diff -u -w -r1.1 rombios32start.S |
|
149 |
--- rombios32start.S 28 Sep 2006 18:56:20 -0000 1.1 |
|
150 |
+++ rombios32start.S 1 Oct 2006 16:03:54 -0000 |
|
151 |
@@ -1,3 +1,25 @@ |
|
152 |
+///////////////////////////////////////////////////////////////////////// |
|
153 |
+// $Id: bios.diff,v 1.15 2006-10-01 16:08:15 bellard Exp $ |
|
154 |
+///////////////////////////////////////////////////////////////////////// |
|
155 |
+// |
|
932 | 156 |
+// 32 bit Bochs BIOS init code |
933 | 157 |
+// Copyright (C) 2006 Fabrice Bellard |
934 | 158 |
+// |
... | ... | |
945 | 169 |
+// You should have received a copy of the GNU Lesser General Public |
946 | 170 |
+// License along with this library; if not, write to the Free Software |
947 | 171 |
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
948 |
+#include <stdarg.h> |
|
949 |
+#include <stddef.h> |
|
950 |
+ |
|
951 |
+typedef signed char int8_t; |
|
952 |
+typedef short int16_t; |
|
953 |
+typedef int int32_t; |
|
954 |
+typedef long long int64_t; |
|
955 |
+typedef unsigned char uint8_t; |
|
956 |
+typedef unsigned short uint16_t; |
|
957 |
+typedef unsigned int uint32_t; |
|
958 |
+typedef unsigned long long uint64_t; |
|
959 |
+ |
|
960 |
+/* if true, put the MP float table and ACPI RSDT in EBDA and the MP |
|
961 |
+ table in RAM. Unfortunately, Linux has bugs with that, so we prefer |
|
962 |
+ to modify the BIOS in shadow RAM */ |
|
963 |
+//#define BX_USE_EBDA_TABLES |
|
964 |
+ |
|
965 |
+/* define it if the (emulated) hardware supports SMM mode */ |
|
966 |
+#define BX_USE_SMM |
|
967 |
+ |
|
968 |
+#define BX_INFO(fmt, args...) bios_printf(0, fmt, ## args); |
|
969 |
+ |
|
970 |
+#define INFO_PORT 0x402 |
|
971 |
+ |
|
972 |
+#define cpuid(index, eax, ebx, ecx, edx) \ |
|
973 |
+ asm volatile ("cpuid" \ |
|
974 |
+ : "=a" (eax), "=b" (ebx), "=c" (ecx), "=d" (edx) \ |
|
975 |
+ : "0" (index)) |
|
976 |
+ |
|
977 |
+#define CPUID_APIC (1 << 9) |
|
978 |
+ |
|
979 |
+#define APIC_BASE ((uint8_t *)0xfee00000) |
|
980 |
+#define APIC_ICR_LOW 0x300 |
|
981 |
+#define APIC_SVR 0x0F0 |
|
982 |
+#define APIC_ID 0x020 |
|
983 |
+#define APIC_LVT3 0x370 |
|
984 |
+ |
|
985 |
+#define APIC_ENABLED 0x0100 |
|
986 |
+ |
|
987 |
+#define CPU_COUNT_ADDR 0xf000 |
|
988 |
+#define AP_BOOT_ADDR 0x10000 |
|
989 |
+ |
|
990 |
+#define MPTABLE_MAX_SIZE 0x00002000 |
|
991 |
+#define ACPI_DATA_SIZE 0x00010000 |
|
992 |
+#define SMI_CMD_IO_ADDR 0xb2 |
|
993 |
+#define PM_IO_BASE 0xb000 |
|
994 |
+ |
|
995 |
+#define BIOS_TMP_STORAGE 0x00030000 /* 64 KB used to copy the BIOS to shadow RAM */ |
|
996 |
+ |
|
997 |
+static inline void outl(int addr, int val) |
|
998 |
+{ |
|
999 |
+ asm volatile ("outl %1, %w0" : : "d" (addr), "a" (val)); |
|
1000 |
+} |
|
1001 |
+ |
|
1002 |
+static inline void outw(int addr, int val) |
|
1003 |
+{ |
|
1004 |
+ asm volatile ("outw %w1, %w0" : : "d" (addr), "a" (val)); |
|
1005 |
+} |
|
1006 |
+ |
|
1007 |
+static inline void outb(int addr, int val) |
|
1008 |
+{ |
|
1009 |
+ asm volatile ("outb %b1, %w0" : : "d" (addr), "a" (val)); |
|
1010 |
+} |
|
1011 |
+ |
|
1012 |
+static inline uint32_t inl(int addr) |
|
1013 |
+{ |
|
1014 |
+ uint32_t val; |
|
1015 |
+ asm volatile ("inl %w1, %0" : "=a" (val) : "d" (addr)); |
|
1016 |
+ return val; |
|
1017 |
+} |
|
1018 |
+ |
|
1019 |
+static inline uint16_t inw(int addr) |
|
1020 |
+{ |
|
1021 |
+ uint16_t val; |
|
1022 |
+ asm volatile ("inw %w1, %w0" : "=a" (val) : "d" (addr)); |
|
1023 |
+ return val; |
|
1024 |
+} |
|
1025 |
+ |
|
1026 |
+static inline uint8_t inb(int addr) |
|
1027 |
+{ |
|
1028 |
+ uint8_t val; |
|
1029 |
+ asm volatile ("inb %w1, %b0" : "=a" (val) : "d" (addr)); |
|
1030 |
+ return val; |
|
1031 |
+} |
|
1032 |
+ |
|
1033 |
+static inline void writel(void *addr, uint32_t val) |
|
1034 |
+{ |
|
1035 |
+ *(volatile uint32_t *)addr = val; |
|
1036 |
+} |
|
1037 |
+ |
|
1038 |
+static inline void writew(void *addr, uint16_t val) |
|
1039 |
+{ |
|
1040 |
+ *(volatile uint16_t *)addr = val; |
|
1041 |
+} |
|
1042 |
+ |
|
1043 |
+static inline void writeb(void *addr, uint8_t val) |
|
1044 |
+{ |
|
1045 |
+ *(volatile uint8_t *)addr = val; |
|
1046 |
+} |
|
1047 |
+ |
|
1048 |
+static inline uint32_t readl(const void *addr) |
|
1049 |
+{ |
|
1050 |
+ return *(volatile const uint32_t *)addr; |
|
1051 |
+} |
|
1052 |
+ |
|
1053 |
+static inline uint16_t readw(const void *addr) |
|
1054 |
+{ |
|
1055 |
+ return *(volatile const uint16_t *)addr; |
|
1056 |
+} |
|
1057 |
+ |
|
1058 |
+static inline uint8_t readb(const void *addr) |
|
1059 |
+{ |
|
1060 |
+ return *(volatile const uint8_t *)addr; |
|
1061 |
+} |
|
1062 |
+ |
|
1063 |
+static inline void putc(int c) |
|
1064 |
+{ |
|
1065 |
+ outb(INFO_PORT, c); |
|
1066 |
+} |
|
1067 |
+ |
|
1068 |
+static inline int isdigit(int c) |
|
1069 |
+{ |
|
1070 |
+ return c >= '0' && c <= '9'; |
|
1071 |
+} |
|
1072 |
+ |
|
1073 |
+void *memset(void *d1, int val, size_t len) |
|
1074 |
+{ |
|
1075 |
+ uint8_t *d = d1; |
|
1076 |
+ |
|
1077 |
+ while (len--) { |
|
1078 |
+ *d++ = val; |
|
1079 |
+ } |
|
1080 |
+ return d1; |
|
1081 |
+} |
|
1082 |
+ |
|
1083 |
+void *memcpy(void *d1, const void *s1, size_t len) |
|
1084 |
+{ |
|
1085 |
+ uint8_t *d = d1; |
|
1086 |
+ const uint8_t *s = s1; |
|
1087 |
+ |
|
1088 |
+ while (len--) { |
|
1089 |
+ *d++ = *s++; |
|
1090 |
+ } |
|
1091 |
+ return d1; |
|
1092 |
+} |
|
1093 |
+ |
|
1094 |
+void *memmove(void *d1, const void *s1, size_t len) |
|
1095 |
+{ |
|
1096 |
+ uint8_t *d = d1; |
|
1097 |
+ const uint8_t *s = s1; |
|
1098 |
+ |
|
1099 |
+ if (d <= s) { |
|
1100 |
+ while (len--) { |
|
1101 |
+ *d++ = *s++; |
|
1102 |
+ } |
|
1103 |
+ } else { |
|
1104 |
+ d += len; |
|
1105 |
+ s += len; |
|
1106 |
+ while (len--) { |
|
1107 |
+ *--d = *--s; |
|
1108 |
+ } |
|
1109 |
+ } |
|
1110 |
+ return d1; |
|
1111 |
+} |
|
1112 |
+ |
|
1113 |
+size_t strlen(const char *s) |
|
1114 |
+{ |
|
1115 |
+ const char *s1; |
|
1116 |
+ for(s1 = s; *s1 != '\0'; s1++); |
|
1117 |
+ return s1 - s; |
|
1118 |
+} |
|
1119 |
+ |
|
1120 |
+/* from BSD ppp sources */ |
|
1121 |
+int vsnprintf(char *buf, int buflen, const char *fmt, va_list args) |
|
1122 |
+{ |
|
1123 |
+ int c, i, n; |
|
1124 |
+ int width, prec, fillch; |
|
1125 |
+ int base, len, neg; |
|
1126 |
+ unsigned long val = 0; |
|
1127 |
+ const char *f; |
|
1128 |
+ char *str, *buf0; |
|
1129 |
+ char num[32]; |
|
1130 |
+ static const char hexchars[] = "0123456789abcdef"; |
|
1131 |
+ |
|
1132 |
+ buf0 = buf; |
|
1133 |
+ --buflen; |
|
1134 |
+ while (buflen > 0) { |
|
1135 |
+ for (f = fmt; *f != '%' && *f != 0; ++f) |
|
1136 |
+ ; |
|
1137 |
+ if (f > fmt) { |
|
1138 |
+ len = f - fmt; |
|
1139 |
+ if (len > buflen) |
|
1140 |
+ len = buflen; |
|
1141 |
+ memcpy(buf, fmt, len); |
|
1142 |
+ buf += len; |
|
1143 |
+ buflen -= len; |
|
1144 |
+ fmt = f; |
|
1145 |
+ } |
|
1146 |
+ if (*fmt == 0) |
|
1147 |
+ break; |
|
1148 |
+ c = *++fmt; |
|
1149 |
+ width = prec = 0; |
|
1150 |
+ fillch = ' '; |
|
1151 |
+ if (c == '0') { |
|
1152 |
+ fillch = '0'; |
|
1153 |
+ c = *++fmt; |
|
1154 |
+ } |
|
1155 |
+ if (c == '*') { |
|
1156 |
+ width = va_arg(args, int); |
|
1157 |
+ c = *++fmt; |
|
1158 |
+ } else { |
|
1159 |
+ while (isdigit(c)) { |
|
1160 |
+ width = width * 10 + c - '0'; |
|
1161 |
+ c = *++fmt; |
|
1162 |
+ } |
|
1163 |
+ } |
|
1164 |
+ if (c == '.') { |
|
1165 |
+ c = *++fmt; |
|
1166 |
+ if (c == '*') { |
|
1167 |
+ prec = va_arg(args, int); |
|
1168 |
+ c = *++fmt; |
|
1169 |
+ } else { |
|
1170 |
+ while (isdigit(c)) { |
|
1171 |
+ prec = prec * 10 + c - '0'; |
|
1172 |
+ c = *++fmt; |
|
1173 |
+ } |
|
1174 |
+ } |
|
1175 |
+ } |
|
1176 |
+ /* modifiers */ |
|
1177 |
+ switch(c) { |
|
1178 |
+ case 'l': |
|
1179 |
+ c = *++fmt; |
|
1180 |
+ break; |
|
1181 |
+ default: |
|
1182 |
+ break; |
|
1183 |
+ } |
|
1184 |
+ str = 0; |
|
1185 |
+ base = 0; |
|
1186 |
+ neg = 0; |
|
1187 |
+ ++fmt; |
|
1188 |
+ switch (c) { |
|
1189 |
+ case 'd': |
|
1190 |
+ i = va_arg(args, int); |
|
1191 |
+ if (i < 0) { |
|
1192 |
+ neg = 1; |
|
1193 |
+ val = -i; |
|
1194 |
+ } else |
|
1195 |
+ val = i; |
|
1196 |
+ base = 10; |
|
1197 |
+ break; |
|
1198 |
+ case 'o': |
|
1199 |
+ val = va_arg(args, unsigned int); |
|
1200 |
+ base = 8; |
|
1201 |
+ break; |
|
1202 |
+ case 'x': |
|
1203 |
+ case 'X': |
|
1204 |
+ val = va_arg(args, unsigned int); |
|
1205 |
+ base = 16; |
|
1206 |
+ break; |
|
1207 |
+ case 'p': |
|
1208 |
+ val = (unsigned long) va_arg(args, void *); |
|
1209 |
+ base = 16; |
|
1210 |
+ neg = 2; |
|
1211 |
+ break; |
|
1212 |
+ case 's': |
|
1213 |
+ str = va_arg(args, char *); |
|
1214 |
+ break; |
|
1215 |
+ case 'c': |
|
1216 |
+ num[0] = va_arg(args, int); |
|
1217 |
+ num[1] = 0; |
|
1218 |
+ str = num; |
|
1219 |
+ break; |
|
1220 |
+ default: |
|
1221 |
+ *buf++ = '%'; |
|
1222 |
+ if (c != '%') |
|
1223 |
+ --fmt; /* so %z outputs %z etc. */ |
|
1224 |
+ --buflen; |
|
1225 |
+ continue; |
|
1226 |
+ } |
|
1227 |
+ if (base != 0) { |
|
1228 |
+ str = num + sizeof(num); |
|
1229 |
+ *--str = 0; |
|
1230 |
+ while (str > num + neg) { |
|
1231 |
+ *--str = hexchars[val % base]; |
|
1232 |
+ val = val / base; |
|
1233 |
+ if (--prec <= 0 && val == 0) |
|
1234 |
+ break; |
|
1235 |
+ } |
|
1236 |
+ switch (neg) { |
|
1237 |
+ case 1: |
|
1238 |
+ *--str = '-'; |
|
1239 |
+ break; |
|
1240 |
+ case 2: |
|
1241 |
+ *--str = 'x'; |
|
1242 |
+ *--str = '0'; |
|
1243 |
+ break; |
|
1244 |
+ } |
|
1245 |
+ len = num + sizeof(num) - 1 - str; |
|
1246 |
+ } else { |
|
1247 |
+ len = strlen(str); |
|
1248 |
+ if (prec > 0 && len > prec) |
|
1249 |
+ len = prec; |
|
1250 |
+ } |
|
1251 |
+ if (width > 0) { |
|
1252 |
+ if (width > buflen) |
|
1253 |
+ width = buflen; |
|
1254 |
+ if ((n = width - len) > 0) { |
|
1255 |
+ buflen -= n; |
|
1256 |
+ for (; n > 0; --n) |
|
1257 |
+ *buf++ = fillch; |
|
1258 |
+ } |
|
1259 |
+ } |
|
1260 |
+ if (len > buflen) |
|
1261 |
+ len = buflen; |
|
1262 |
+ memcpy(buf, str, len); |
|
1263 |
+ buf += len; |
|
1264 |
+ buflen -= len; |
|
1265 |
+ } |
|
1266 |
+ *buf = 0; |
|
1267 |
+ return buf - buf0; |
|
1268 |
+} |
|
1269 |
+ |
|
1270 |
+void bios_printf(int flags, const char *fmt, ...) |
|
1271 |
+{ |
|
1272 |
+ va_list ap; |
|
1273 |
+ char buf[1024]; |
|
1274 |
+ const char *s; |
|
1275 |
+ |
|
1276 |
+ va_start(ap, fmt); |
|
1277 |
+ vsnprintf(buf, sizeof(buf), fmt, ap); |
|
1278 |
+ s = buf; |
|
1279 |
+ while (*s) |
|
1280 |
+ putc(*s++); |
|
1281 |
+ va_end(ap); |
|
1282 |
+} |
|
1283 |
+ |
|
1284 |
+/* approximative ! */ |
|
1285 |
+void delay_ms(int n) |
|
1286 |
+{ |
|
1287 |
+ int i, j; |
|
1288 |
+ for(i = 0; i < n; i++) { |
|
1289 |
+ for(j = 0; j < 1000000; j++); |
|
1290 |
+ } |
|
1291 |
+} |
|
1292 |
+ |
|
1293 |
+int smp_cpus; |
|
1294 |
+uint32_t cpuid_features; |
|
1295 |
+uint32_t cpuid_ext_features; |
|
1296 |
+unsigned long ram_size; |
|
1297 |
+#ifdef BX_USE_EBDA_TABLES |
|
1298 |
+unsigned long ebda_cur_addr; |
|
1299 |
+#endif |
|
1300 |
+int acpi_enabled; |
|
1301 |
+uint32_t pm_io_base; |
|
1302 |
+int pm_sci_int; |
|
1303 |
+unsigned long bios_table_cur_addr; |
|
1304 |
+unsigned long bios_table_end_addr; |
|
1305 |
+ |
|
1306 |
+void cpu_probe(void) |
|
1307 |
+{ |
|
1308 |
+ uint32_t eax, ebx, ecx, edx; |
|
1309 |
+ cpuid(1, eax, ebx, ecx, edx); |
|
1310 |
+ cpuid_features = edx; |
|
1311 |
+ cpuid_ext_features = ecx; |
|
1312 |
+} |
|
1313 |
+ |
|
1314 |
+static int cmos_readb(int addr) |
|
1315 |
+{ |
|
1316 |
+ outb(0x70, addr); |
|
1317 |
+ return inb(0x71); |
|
1318 |
+} |
|
1319 |
+ |
|
1320 |
+void ram_probe(void) |
|
1321 |
+{ |
|
1322 |
+ ram_size = (cmos_readb(0x34) | (cmos_readb(0x35) << 8)) * 65536 + |
|
1323 |
+ 16 * 1024 * 1024; |
|
1324 |
+#ifdef BX_USE_EBDA_TABLES |
|
1325 |
+ ebda_cur_addr = ((*(uint16_t *)(0x40e)) << 4) + 0x380; |
|
1326 |
+#endif |
|
1327 |
+ BX_INFO("ram_size=0x%08lx\n"); |
|
1328 |
+} |
|
1329 |
+ |
|
1330 |
+/****************************************************/ |
|
1331 |
+/* SMP probe */ |
|
1332 |
+ |
|
1333 |
+extern uint8_t smp_ap_boot_code_start; |
|
1334 |
+extern uint8_t smp_ap_boot_code_end; |
|
1335 |
+ |
|
1336 |
+/* find the number of CPUs by launching a SIPI to them */ |
|
1337 |
+void smp_probe(void) |
|
1338 |
+{ |
|
1339 |
+ uint32_t val, sipi_vector; |
|
1340 |
+ |
|
1341 |
+ smp_cpus = 1; |
|
1342 |
+ if (cpuid_features & CPUID_APIC) { |
|
1343 |
+ |
|
1344 |
+ /* enable local APIC */ |
|
1345 |
+ val = readl(APIC_BASE + APIC_SVR); |
|
1346 |
+ val |= APIC_ENABLED; |
Also available in: Unified diff