提交 307b0c24 编写于 作者: B bellard

update to latest Bochs bios - added PCI BIOS real mode 'get irq routing options' function


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1793 c046a42c-6fe2-441c-8c8c-71466251a162
上级 61b94156
无法预览此类型文件
Index: rombios.c Index: rombios.c
=================================================================== ===================================================================
RCS file: /cvsroot/bochs/bochs/bios/rombios.c,v RCS file: /cvsroot/bochs/bochs/bios/rombios.c,v
retrieving revision 1.130 retrieving revision 1.160
diff -u -w -r1.130 rombios.c diff -u -w -r1.160 rombios.c
--- rombios.c 13 Feb 2005 08:47:30 -0000 1.130 --- rombios.c 25 Jan 2006 17:51:49 -0000 1.160
+++ rombios.c 9 Feb 2006 21:49:38 -0000 +++ rombios.c 2 Apr 2006 18:29:51 -0000
@@ -8570,7 +8570,10 @@ @@ -1816,6 +1816,7 @@
use32 386 {
#define APM_PROT32 printf(BX_APPNAME" BIOS - build: %s\n%s\nOptions: ",
#include "apmbios.S" BIOS_BUILD_DATE, bios_cvs_version_string);
+ +#if 0
use16 386 printf(
+#define APM_PROT16 #ifdef BX_APM
+#include "apmbios.S" "apmbios "
@@ -1827,6 +1828,9 @@
"eltorito "
#endif
"\n\n");
+#else
+ printf("apmbios pcibios eltorito \n\n");
+#endif
}
#define APM_REAL //--------------------------------------------------------------------------
#include "apmbios.S" @@ -8713,6 +8717,7 @@
@@ -8611,6 +8614,7 @@
mov al, #0x80 mov al, #0x80
bios32_end: bios32_end:
popf popf
...@@ -24,7 +31,7 @@ diff -u -w -r1.130 rombios.c ...@@ -24,7 +31,7 @@ diff -u -w -r1.130 rombios.c
retf retf
.align 16 .align 16
@@ -8721,17 +8725,17 @@ @@ -8823,17 +8828,17 @@
pci_pro_fail: pci_pro_fail:
pop edi pop edi
pop esi pop esi
...@@ -44,50 +51,75 @@ diff -u -w -r1.130 rombios.c ...@@ -44,50 +51,75 @@ diff -u -w -r1.130 rombios.c
retf retf
pci_pro_select_reg: pci_pro_select_reg:
Index: apmbios.S @@ -8971,7 +8976,7 @@
=================================================================== jmp pci_real_ok
RCS file: /cvsroot/bochs/bochs/bios/apmbios.S,v pci_real_f0d: ;; write configuration dword
retrieving revision 1.1 cmp al, #0x0d
diff -u -w -r1.1 apmbios.S - jne pci_real_unknown
--- apmbios.S 20 Jun 2004 18:27:09 -0000 1.1 + jne pci_real_f0e
+++ apmbios.S 9 Feb 2006 21:49:38 -0000 call pci_real_select_reg
@@ -1,6 +1,9 @@ push dx
// APM BIOS support for the Bochs BIOS mov dx, #0x0cfc
// Copyright (C) 2004 Fabrice Bellard @@ -8979,6 +8984,46 @@
// out dx, eax
+// 16-bit interface activation pop dx
+// Copyright (C) 2005 Struan Bartlett jmp pci_real_ok
+// +pci_real_f0e: ;; get irq routing options
// This library is free software; you can redistribute it and/or + cmp al, #0x0e
// modify it under the terms of the GNU Lesser General Public + jne pci_real_unknown
// License as published by the Free Software Foundation; either + SEG ES
@@ -111,13 +114,28 @@ + cmp word ptr [di], #pci_routing_table_structure_end - pci_routing_table_structure_start
mov bl, #0x4d // 'M' + jb pci_real_too_small
// bit 0 : 16 bit interface supported + SEG ES
// bit 1 : 32 bit interface supported + mov word ptr [di], #pci_routing_table_structure_end - pci_routing_table_structure_start
- mov cx, #0x2 + pushf
+ mov cx, #0x3 + push ds
jmp APMSYM(ok) + push es
+ push cx
;----------------- + push si
; APM real mode interface connect + push di
APMSYM(01): + cld
cmp al, #0x01 + mov si, #pci_routing_table_structure_start
+ jne APMSYM(02) + push cs
+ jmp APMSYM(ok) + pop ds
+ + SEG ES
+;----------------- + mov cx, [di+2]
+; APM 16 bit protected mode interface connect + SEG ES
+APMSYM(02): + mov es, [di+4]
+ cmp al, #0x02 + mov di, cx
+ jne APMSYM(03) + mov cx, #pci_routing_table_structure_end - pci_routing_table_structure_start
+ 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
+ +
+ mov bx, #_apm16_entry pci_real_unknown:
+ mov ah, #0x81
+ mov ax, #0xf000 // 16 bit code segment base pci_real_fail:
+ mov si, #0xfff0 // 16 bit code segment size @@ -9019,6 +9064,7 @@
+ mov cx, #0xf000 // data segment address dw 0,0 ;; Miniport data
+ mov di, #0xfff0 // data segment length db 0,0,0,0,0,0,0,0,0,0,0 ;; reserved
jne APMSYM(03) db 0x07 ;; checksum
jmp APMSYM(ok) +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:
pci_irq_list:
db 11, 10, 9, 5;
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册