Index: rombios.c
===================================================================
RCS file: /cvsroot/bochs/bochs/bios/rombios.c,v
-retrieving revision 1.160
-diff -u -w -r1.160 rombios.c
---- rombios.c 25 Jan 2006 17:51:49 -0000 1.160
-+++ rombios.c 2 Apr 2006 18:29:51 -0000
-@@ -1816,6 +1816,7 @@
- {
- printf(BX_APPNAME" BIOS - build: %s\n%s\nOptions: ",
- BIOS_BUILD_DATE, bios_cvs_version_string);
-+#if 0
- printf(
- #ifdef BX_APM
- "apmbios "
-@@ -1827,6 +1828,9 @@
- "eltorito "
- #endif
- "\n\n");
-+#else
-+ printf("apmbios pcibios eltorito \n\n");
-+#endif
- }
-
- //--------------------------------------------------------------------------
-@@ -8713,6 +8717,7 @@
- mov al, #0x80
- bios32_end:
- popf
-+ and dword ptr[esp+4],0xfffffffc ;; reset CS.RPL for kqemu
- retf
-
- .align 16
-@@ -8823,17 +8828,17 @@
- pci_pro_fail:
- pop edi
- pop esi
-- sti
- popf
- stc
-+ and dword ptr[esp+4],0xfffffffc ;; reset CS.RPL for kqemu
- retf
- pci_pro_ok:
- xor ah, ah
- pop edi
- pop esi
-- sti
- popf
- clc
-+ and dword ptr[esp+4],0xfffffffc ;; reset CS.RPL for kqemu
- retf
+retrieving revision 1.174
+diff -u -w -r1.174 rombios.c
+--- rombios.c 17 Oct 2006 16:48:05 -0000 1.174
++++ rombios.c 8 Feb 2007 21:57:48 -0000
+@@ -9472,6 +9472,14 @@
+ mov eax, #0x00040000
+ call eax
- pci_pro_select_reg:
-@@ -8971,7 +8976,7 @@
- jmp pci_real_ok
- pci_real_f0d: ;; write configuration dword
- cmp al, #0x0d
-- jne pci_real_unknown
-+ jne pci_real_f0e
- call pci_real_select_reg
- push dx
- mov dx, #0x0cfc
-@@ -8979,6 +8984,46 @@
- out dx, eax
- pop dx
- jmp pci_real_ok
-+pci_real_f0e: ;; get irq routing options
-+ cmp al, #0x0e
-+ jne pci_real_unknown
-+ SEG ES
-+ cmp word ptr [di], #pci_routing_table_structure_end - pci_routing_table_structure_start
-+ jb pci_real_too_small
-+ SEG ES
-+ mov word ptr [di], #pci_routing_table_structure_end - pci_routing_table_structure_start
-+ pushf
-+ push ds
-+ push es
-+ push cx
-+ push si
-+ push di
-+ cld
-+ mov si, #pci_routing_table_structure_start
-+ push cs
-+ pop ds
-+ SEG ES
-+ mov cx, [di+2]
-+ SEG ES
-+ mov es, [di+4]
-+ mov di, cx
-+ mov cx, #pci_routing_table_structure_end - pci_routing_table_structure_start
++ ;; reset the memory (some boot loaders such as syslinux suppose
++ ;; that the memory is set to zero)
++ mov edi, #0x00040000
++ mov ecx, #0x40000 / 4
++ xor eax, eax
+ rep
-+ movsb
-+ pop di
-+ pop si
-+ pop cx
-+ pop es
-+ pop ds
-+ popf
-+ mov bx, #(1 << 9) | (1 << 11) ;; irq 9 and 11 are used
-+ jmp pci_real_ok
-+pci_real_too_small:
-+ SEG ES
-+ mov word ptr [di], #pci_routing_table_structure_end - pci_routing_table_structure_start
-+ mov ah, #0x89
-+ jmp pci_real_fail
++ stosd
+
- pci_real_unknown:
- mov ah, #0x81
- pci_real_fail:
-@@ -9019,6 +9064,7 @@
- dw 0,0 ;; Miniport data
- db 0,0,0,0,0,0,0,0,0,0,0 ;; reserved
- db 0x07 ;; checksum
-+pci_routing_table_structure_start:
- ;; first slot entry PCI-to-ISA (embedded)
- db 0 ;; pci bus number
- db 0x08 ;; pci device number (bit 7-3)
-@@ -9097,6 +9143,7 @@
- dw 0xdef8 ;; IRQ bitmap INTD#
- db 5 ;; physical slot (0 = embedded)
- db 0 ;; reserved
-+pci_routing_table_structure_end:
+ ;; return to 16 bit protected mode first
+ db 0xea
+ dd rombios32_10
+Index: rombios.h
+===================================================================
+RCS file: /cvsroot/bochs/bochs/bios/rombios.h,v
+retrieving revision 1.3
+diff -u -w -r1.3 rombios.h
+--- rombios.h 3 Oct 2006 20:27:30 -0000 1.3
++++ rombios.h 8 Feb 2007 21:57:48 -0000
+@@ -19,7 +19,7 @@
+ // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
+ /* define it to include QEMU specific code */
+-//#define BX_QEMU
++#define BX_QEMU
- pci_irq_list:
- db 11, 10, 9, 5;
+ #ifndef LEGACY
+ # define BX_ROMBIOS32 1
+Index: rombios32.c
+===================================================================
+RCS file: /cvsroot/bochs/bochs/bios/rombios32.c,v
+retrieving revision 1.8
+diff -u -w -r1.8 rombios32.c
+--- rombios32.c 3 Oct 2006 20:27:30 -0000 1.8
++++ rombios32.c 8 Feb 2007 21:57:48 -0000
+@@ -852,6 +852,11 @@
+ int ioapic_id, i, len;
+ int mp_config_table_size;
+
++#ifdef BX_QEMU
++ if (smp_cpus <= 1)
++ return;
++#endif
++
+ #ifdef BX_USE_EBDA_TABLES
+ mp_config_table = (uint8_t *)(ram_size - ACPI_DATA_SIZE - MPTABLE_MAX_SIZE);
+ #else