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 4 retrieving revision 1.108
5 5 diff -u -w -r1.108 rombios.c
6 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 8 @@ -2254,6 +2254,7 @@
9 9 type = read_byte(get_SS(),buffer+1) & 0x1f;
10 10 removable = (read_byte(get_SS(),buffer+0) & 0x80) ? 1 : 0;
... ... @@ -58,7 +58,35 @@ diff -u -w -r1.108 rombios.c
58 58 }
59 59  
60 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 90 cmp al, #0x08
63 91 jne pci_pro_f09
64 92 call pci_pro_select_reg
... ... @@ -128,7 +156,7 @@ diff -u -w -r1.108 rombios.c
128 156 jmp pci_pro_ok
129 157 pci_pro_unknown:
130 158 mov ah, #0x81
131   -@@ -8468,6 +8495,7 @@
  159 +@@ -8468,6 +8500,7 @@
132 160 retf
133 161  
134 162 pci_pro_select_reg:
... ... @@ -136,7 +164,7 @@ diff -u -w -r1.108 rombios.c
136 164 mov eax, #0x800000
137 165 mov ax, bx
138 166 shl eax, #8
139   -@@ -8476,6 +8504,7 @@
  167 +@@ -8476,6 +8509,7 @@
140 168 and al, #0xfc
141 169 mov dx, #0x0cf8
142 170 out dx, eax
... ... @@ -144,7 +172,7 @@ diff -u -w -r1.108 rombios.c
144 172 ret
145 173  
146 174 use16 386
147   -@@ -8536,57 +8565,69 @@
  175 +@@ -8536,57 +8570,69 @@
148 176 cmp al, #0x08
149 177 jne pci_real_f09
150 178 call pci_real_select_reg
... ... @@ -214,7 +242,7 @@ diff -u -w -r1.108 rombios.c
214 242 jmp pci_real_ok
215 243 pci_real_unknown:
216 244 mov ah, #0x81
217   -@@ -8599,6 +8640,7 @@
  245 +@@ -8599,6 +8645,7 @@
218 246 ret
219 247  
220 248 pci_real_select_reg:
... ... @@ -222,7 +250,7 @@ diff -u -w -r1.108 rombios.c
222 250 mov eax, #0x800000
223 251 mov ax, bx
224 252 shl eax, #8
225   -@@ -8607,6 +8649,7 @@
  253 +@@ -8607,6 +8654,7 @@
226 254 and al, #0xfc
227 255 mov dx, #0x0cf8
228 256 out dx, eax
... ...