Commit e58a7c24acc72b57ae87101b936924d7d61dfe91

Authored by bellard
1 parent 777428f2

int13 cdrom 32 bit register update fix (aka FreeBSD CDROM boot)


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@850 c046a42c-6fe2-441c-8c8c-71466251a162
pc-bios/bios.bin
No preview for this file type
pc-bios/bios.diff
@@ -4,7 +4,7 @@ RCS file: /cvsroot/bochs/bochs/bios/rombios.c,v @@ -4,7 +4,7 @@ RCS file: /cvsroot/bochs/bochs/bios/rombios.c,v
4 retrieving revision 1.108 4 retrieving revision 1.108
5 diff -u -w -r1.108 rombios.c 5 diff -u -w -r1.108 rombios.c
6 --- rombios.c 9 Feb 2004 16:48:50 -0000 1.108 6 --- rombios.c 9 Feb 2004 16:48:50 -0000 1.108
7 -+++ rombios.c 22 May 2004 15:47:51 -0000 7 ++++ rombios.c 23 May 2004 15:48:52 -0000
8 @@ -2254,6 +2254,7 @@ 8 @@ -2254,6 +2254,7 @@
9 type = read_byte(get_SS(),buffer+1) & 0x1f; 9 type = read_byte(get_SS(),buffer+1) & 0x1f;
10 removable = (read_byte(get_SS(),buffer+0) & 0x80) ? 1 : 0; 10 removable = (read_byte(get_SS(),buffer+0) & 0x80) ? 1 : 0;
@@ -58,7 +58,35 @@ diff -u -w -r1.108 rombios.c @@ -58,7 +58,35 @@ diff -u -w -r1.108 rombios.c
58 } 58 }
59 59
60 package_count = mouse_flags_2 & 0x07; 60 package_count = mouse_flags_2 & 0x07;
61 -@@ -8401,57 +8416,69 @@ 61 +@@ -4833,8 +4848,10 @@
  62 + // ---------------------------------------------------------------------------
  63 +
  64 + void
  65 +-int13_cdrom(DI, SI, BP, SP, BX, DX, CX, AX, DS, ES, FLAGS)
  66 +- Bit16u DI, SI, BP, SP, BX, DX, CX, AX, DS, ES, FLAGS;
  67 ++int13_cdrom(DI, DIH, SI, SIH, BP, BPH, SP, SPH, BX, BXH, DX, DXH, CX, CXH, AX, AXH,
  68 ++ DS, ES, FLAGS)
  69 ++ Bit16u DI, DIH, SI, SIH, BP, BPH, SP, SPH, BX, BXH, DX, DXH, CX, CXH, AX, AXH,
  70 ++ DS, ES, FLAGS;
  71 + {
  72 + Bit16u ebda_seg=read_word(0x0040,0x000E);
  73 + Bit8u device, status, locks;
  74 +@@ -7692,9 +7709,12 @@
  75 + push ds
  76 + push ss
  77 + pop ds
  78 +- pusha
  79 ++ // ebx is modified: BSD 5.2.1 boot loader problem, so we save all
  80 ++ // the 32 bit registers. It should be done in all the bios or no 32
  81 ++ // bit register should be used without saving it first.
  82 ++ pushad
  83 + call _int13_cdrom
  84 +- popa
  85 ++ popad
  86 + pop ds
  87 + pop es
  88 + popf
  89 +@@ -8401,57 +8421,69 @@
62 cmp al, #0x08 90 cmp al, #0x08
63 jne pci_pro_f09 91 jne pci_pro_f09
64 call pci_pro_select_reg 92 call pci_pro_select_reg
@@ -128,7 +156,7 @@ diff -u -w -r1.108 rombios.c @@ -128,7 +156,7 @@ diff -u -w -r1.108 rombios.c
128 jmp pci_pro_ok 156 jmp pci_pro_ok
129 pci_pro_unknown: 157 pci_pro_unknown:
130 mov ah, #0x81 158 mov ah, #0x81
131 -@@ -8468,6 +8495,7 @@ 159 +@@ -8468,6 +8500,7 @@
132 retf 160 retf
133 161
134 pci_pro_select_reg: 162 pci_pro_select_reg:
@@ -136,7 +164,7 @@ diff -u -w -r1.108 rombios.c @@ -136,7 +164,7 @@ diff -u -w -r1.108 rombios.c
136 mov eax, #0x800000 164 mov eax, #0x800000
137 mov ax, bx 165 mov ax, bx
138 shl eax, #8 166 shl eax, #8
139 -@@ -8476,6 +8504,7 @@ 167 +@@ -8476,6 +8509,7 @@
140 and al, #0xfc 168 and al, #0xfc
141 mov dx, #0x0cf8 169 mov dx, #0x0cf8
142 out dx, eax 170 out dx, eax
@@ -144,7 +172,7 @@ diff -u -w -r1.108 rombios.c @@ -144,7 +172,7 @@ diff -u -w -r1.108 rombios.c
144 ret 172 ret
145 173
146 use16 386 174 use16 386
147 -@@ -8536,57 +8565,69 @@ 175 +@@ -8536,57 +8570,69 @@
148 cmp al, #0x08 176 cmp al, #0x08
149 jne pci_real_f09 177 jne pci_real_f09
150 call pci_real_select_reg 178 call pci_real_select_reg
@@ -214,7 +242,7 @@ diff -u -w -r1.108 rombios.c @@ -214,7 +242,7 @@ diff -u -w -r1.108 rombios.c
214 jmp pci_real_ok 242 jmp pci_real_ok
215 pci_real_unknown: 243 pci_real_unknown:
216 mov ah, #0x81 244 mov ah, #0x81
217 -@@ -8599,6 +8640,7 @@ 245 +@@ -8599,6 +8645,7 @@
218 ret 246 ret
219 247
220 pci_real_select_reg: 248 pci_real_select_reg:
@@ -222,7 +250,7 @@ diff -u -w -r1.108 rombios.c @@ -222,7 +250,7 @@ diff -u -w -r1.108 rombios.c
222 mov eax, #0x800000 250 mov eax, #0x800000
223 mov ax, bx 251 mov ax, bx
224 shl eax, #8 252 shl eax, #8
225 -@@ -8607,6 +8649,7 @@ 253 +@@ -8607,6 +8654,7 @@
226 and al, #0xfc 254 and al, #0xfc
227 mov dx, #0x0cf8 255 mov dx, #0x0cf8
228 out dx, eax 256 out dx, eax