Statistics
| Branch: | Revision:

root / pc-bios / bios.diff @ 1fc678cc

History | View | Annotate | Download (1.6 kB)

1 1193610e bellard
Index: rombios.c
2 1193610e bellard
===================================================================
3 1193610e bellard
RCS file: /cvsroot/bochs/bochs/bios/rombios.c,v
4 1193610e bellard
retrieving revision 1.174
5 1193610e bellard
diff -u -w -r1.174 rombios.c
6 1193610e bellard
--- rombios.c        17 Oct 2006 16:48:05 -0000        1.174
7 1193610e bellard
+++ rombios.c        8 Feb 2007 21:57:48 -0000
8 1193610e bellard
@@ -9472,6 +9472,14 @@
9 1193610e bellard
   mov eax, #0x00040000
10 1193610e bellard
   call eax
11 1193610e bellard
 
12 1193610e bellard
+  ;; reset the memory (some boot loaders such as syslinux suppose 
13 1193610e bellard
+  ;; that the memory is set to zero)
14 1193610e bellard
+  mov edi, #0x00040000
15 1193610e bellard
+  mov ecx, #0x40000 / 4
16 1193610e bellard
+  xor eax, eax
17 1193610e bellard
+  rep 
18 1193610e bellard
+    stosd
19 1193610e bellard
+
20 1193610e bellard
   ;; return to 16 bit protected mode first
21 1193610e bellard
   db 0xea
22 1193610e bellard
   dd rombios32_10
23 a7e6f8ba bellard
Index: rombios.h
24 a7e6f8ba bellard
===================================================================
25 a7e6f8ba bellard
RCS file: /cvsroot/bochs/bochs/bios/rombios.h,v
26 597a0559 bellard
retrieving revision 1.3
27 597a0559 bellard
diff -u -w -r1.3 rombios.h
28 597a0559 bellard
--- rombios.h        3 Oct 2006 20:27:30 -0000        1.3
29 1193610e bellard
+++ rombios.h        8 Feb 2007 21:57:48 -0000
30 a7e6f8ba bellard
@@ -19,7 +19,7 @@
31 a7e6f8ba bellard
 //  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301 USA
32 d4afc623 bellard
 
33 a7e6f8ba bellard
 /* define it to include QEMU specific code */
34 a7e6f8ba bellard
-//#define BX_QEMU
35 a7e6f8ba bellard
+#define BX_QEMU
36 d4afc623 bellard
 
37 597a0559 bellard
 #ifndef LEGACY
38 597a0559 bellard
 #  define BX_ROMBIOS32     1
39 a7e6f8ba bellard
Index: rombios32.c
40 a7e6f8ba bellard
===================================================================
41 a7e6f8ba bellard
RCS file: /cvsroot/bochs/bochs/bios/rombios32.c,v
42 597a0559 bellard
retrieving revision 1.8
43 597a0559 bellard
diff -u -w -r1.8 rombios32.c
44 597a0559 bellard
--- rombios32.c        3 Oct 2006 20:27:30 -0000        1.8
45 1193610e bellard
+++ rombios32.c        8 Feb 2007 21:57:48 -0000
46 597a0559 bellard
@@ -852,6 +852,11 @@
47 e3e97e7c bellard
     int ioapic_id, i, len;
48 e3e97e7c bellard
     int mp_config_table_size;
49 a7e6f8ba bellard
 
50 a7e6f8ba bellard
+#ifdef BX_QEMU
51 e3e97e7c bellard
+    if (smp_cpus <= 1)
52 e3e97e7c bellard
+        return;
53 e3e97e7c bellard
+#endif
54 d4afc623 bellard
+
55 e3e97e7c bellard
 #ifdef BX_USE_EBDA_TABLES
56 e3e97e7c bellard
     mp_config_table = (uint8_t *)(ram_size - ACPI_DATA_SIZE - MPTABLE_MAX_SIZE);
57 e3e97e7c bellard
 #else