Commit 307b0c24de782119953a9dd12c4b0ece0313dea6

Authored by bellard
1 parent 61b94156

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
pc-bios/bios.bin
No preview for this file type
pc-bios/bios.diff
1 1 Index: rombios.c
2 2 ===================================================================
3 3 RCS file: /cvsroot/bochs/bochs/bios/rombios.c,v
4   -retrieving revision 1.130
5   -diff -u -w -r1.130 rombios.c
6   ---- rombios.c 13 Feb 2005 08:47:30 -0000 1.130
7   -+++ rombios.c 9 Feb 2006 21:49:38 -0000
8   -@@ -8570,7 +8570,10 @@
9   - use32 386
10   - #define APM_PROT32
11   - #include "apmbios.S"
12   -+
13   - use16 386
14   -+#define APM_PROT16
15   -+#include "apmbios.S"
  4 +retrieving revision 1.160
  5 +diff -u -w -r1.160 rombios.c
  6 +--- rombios.c 25 Jan 2006 17:51:49 -0000 1.160
  7 ++++ rombios.c 2 Apr 2006 18:29:51 -0000
  8 +@@ -1816,6 +1816,7 @@
  9 + {
  10 + printf(BX_APPNAME" BIOS - build: %s\n%s\nOptions: ",
  11 + BIOS_BUILD_DATE, bios_cvs_version_string);
  12 ++#if 0
  13 + printf(
  14 + #ifdef BX_APM
  15 + "apmbios "
  16 +@@ -1827,6 +1828,9 @@
  17 + "eltorito "
  18 + #endif
  19 + "\n\n");
  20 ++#else
  21 ++ printf("apmbios pcibios eltorito \n\n");
  22 ++#endif
  23 + }
16 24  
17   - #define APM_REAL
18   - #include "apmbios.S"
19   -@@ -8611,6 +8614,7 @@
  25 + //--------------------------------------------------------------------------
  26 +@@ -8713,6 +8717,7 @@
20 27 mov al, #0x80
21 28 bios32_end:
22 29 popf
... ... @@ -24,7 +31,7 @@ diff -u -w -r1.130 rombios.c
24 31 retf
25 32  
26 33 .align 16
27   -@@ -8721,17 +8725,17 @@
  34 +@@ -8823,17 +8828,17 @@
28 35 pci_pro_fail:
29 36 pop edi
30 37 pop esi
... ... @@ -44,50 +51,75 @@ diff -u -w -r1.130 rombios.c
44 51 retf
45 52  
46 53 pci_pro_select_reg:
47   -Index: apmbios.S
48   -===================================================================
49   -RCS file: /cvsroot/bochs/bochs/bios/apmbios.S,v
50   -retrieving revision 1.1
51   -diff -u -w -r1.1 apmbios.S
52   ---- apmbios.S 20 Jun 2004 18:27:09 -0000 1.1
53   -+++ apmbios.S 9 Feb 2006 21:49:38 -0000
54   -@@ -1,6 +1,9 @@
55   - // APM BIOS support for the Bochs BIOS
56   - // Copyright (C) 2004 Fabrice Bellard
57   - //
58   -+// 16-bit interface activation
59   -+// Copyright (C) 2005 Struan Bartlett
60   -+//
61   - // This library is free software; you can redistribute it and/or
62   - // modify it under the terms of the GNU Lesser General Public
63   - // License as published by the Free Software Foundation; either
64   -@@ -111,13 +114,28 @@
65   - mov bl, #0x4d // 'M'
66   - // bit 0 : 16 bit interface supported
67   - // bit 1 : 32 bit interface supported
68   -- mov cx, #0x2
69   -+ mov cx, #0x3
70   - jmp APMSYM(ok)
71   -
72   - ;-----------------
73   - ; APM real mode interface connect
74   - APMSYM(01):
75   - cmp al, #0x01
76   -+ jne APMSYM(02)
77   -+ jmp APMSYM(ok)
78   -+
79   -+;-----------------
80   -+; APM 16 bit protected mode interface connect
81   -+APMSYM(02):
82   -+ cmp al, #0x02
83   -+ jne APMSYM(03)
  54 +@@ -8971,7 +8976,7 @@
  55 + jmp pci_real_ok
  56 + pci_real_f0d: ;; write configuration dword
  57 + cmp al, #0x0d
  58 +- jne pci_real_unknown
  59 ++ jne pci_real_f0e
  60 + call pci_real_select_reg
  61 + push dx
  62 + mov dx, #0x0cfc
  63 +@@ -8979,6 +8984,46 @@
  64 + out dx, eax
  65 + pop dx
  66 + jmp pci_real_ok
  67 ++pci_real_f0e: ;; get irq routing options
  68 ++ cmp al, #0x0e
  69 ++ jne pci_real_unknown
  70 ++ SEG ES
  71 ++ cmp word ptr [di], #pci_routing_table_structure_end - pci_routing_table_structure_start
  72 ++ jb pci_real_too_small
  73 ++ SEG ES
  74 ++ mov word ptr [di], #pci_routing_table_structure_end - pci_routing_table_structure_start
  75 ++ pushf
  76 ++ push ds
  77 ++ push es
  78 ++ push cx
  79 ++ push si
  80 ++ push di
  81 ++ cld
  82 ++ mov si, #pci_routing_table_structure_start
  83 ++ push cs
  84 ++ pop ds
  85 ++ SEG ES
  86 ++ mov cx, [di+2]
  87 ++ SEG ES
  88 ++ mov es, [di+4]
  89 ++ mov di, cx
  90 ++ mov cx, #pci_routing_table_structure_end - pci_routing_table_structure_start
  91 ++ rep
  92 ++ movsb
  93 ++ pop di
  94 ++ pop si
  95 ++ pop cx
  96 ++ pop es
  97 ++ pop ds
  98 ++ popf
  99 ++ mov bx, #(1 << 9) | (1 << 11) ;; irq 9 and 11 are used
  100 ++ jmp pci_real_ok
  101 ++pci_real_too_small:
  102 ++ SEG ES
  103 ++ mov word ptr [di], #pci_routing_table_structure_end - pci_routing_table_structure_start
  104 ++ mov ah, #0x89
  105 ++ jmp pci_real_fail
84 106 +
85   -+ mov bx, #_apm16_entry
86   -+
87   -+ mov ax, #0xf000 // 16 bit code segment base
88   -+ mov si, #0xfff0 // 16 bit code segment size
89   -+ mov cx, #0xf000 // data segment address
90   -+ mov di, #0xfff0 // data segment length
91   - jne APMSYM(03)
92   - jmp APMSYM(ok)
  107 + pci_real_unknown:
  108 + mov ah, #0x81
  109 + pci_real_fail:
  110 +@@ -9019,6 +9064,7 @@
  111 + dw 0,0 ;; Miniport data
  112 + db 0,0,0,0,0,0,0,0,0,0,0 ;; reserved
  113 + db 0x07 ;; checksum
  114 ++pci_routing_table_structure_start:
  115 + ;; first slot entry PCI-to-ISA (embedded)
  116 + db 0 ;; pci bus number
  117 + db 0x08 ;; pci device number (bit 7-3)
  118 +@@ -9097,6 +9143,7 @@
  119 + dw 0xdef8 ;; IRQ bitmap INTD#
  120 + db 5 ;; physical slot (0 = embedded)
  121 + db 0 ;; reserved
  122 ++pci_routing_table_structure_end:
93 123  
  124 + pci_irq_list:
  125 + db 11, 10, 9, 5;
... ...