From fb9f9444588d2f7f1af9692499b3953432151e64 Mon Sep 17 00:00:00 2001 From: bellard Date: Sat, 22 May 2004 16:27:00 +0000 Subject: [PATCH] PCI BIOS fixes git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@843 c046a42c-6fe2-441c-8c8c-71466251a162 --- pc-bios/bios.bin | Bin 65536 -> 65536 bytes pc-bios/bios.diff | 174 +++++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 173 insertions(+), 1 deletion(-) diff --git a/pc-bios/bios.bin b/pc-bios/bios.bin index 7d87cb03c1763ebad26a78210f666b2cf76f7da3..6c27175144c3fc711228aba5037b1b7428c0d6dd 100644 GIT binary patch delta 575 zcmYk2K}g$B9L8VLh>f;uw}`9rGGxQUpm-VT$Vu@u@Q@)$?*7MMu+xK`)`U7|&JnGL z9R!CrH*B#I4-$JR>%qw`!gg4zuot=-Jq)5Px_=V8dP&0f@xGVePtycV6TS>DXKI8H znWtlRH7Op#E+Mc-2>XsHSglxNyiDVey&|;B+3~Y!m;}8^IQp}&;H>#)qjZq1@Plf=9+Hx2e*~4)ZWE~^ketHJkO=_b7zS=+^$Klj)n6uTQbkC6I}m4j6e%W delta 549 zcmYMv!Ask46bJBM(uj>F+9=NU=3ztFVF>Nm1_2LVyi7fN5eL5i;KziqHK8B|c8hlP zFc^cei;B=vMs|?cgT)@ygJa+hs|x#t=ps8sTdePwmhO_k_nY_fK87I~hO{%D&;B5U z=pudY))VqEd?y5U31Rz~g40y4UR0?HxjRC8yiK0Xz!aDbBG6x@6>pu-#%YQbcxBx} z?koo8UQ@YTb-lN|lxdQ^>6T(t!WCGqzo_@o0k)9kCI1mdvwA;$z+QGgZ|_>I{`H^g z3NA`_o6aJu3W1-}Ra`XM*<)1$zqe#I;Nwkg;sRe`?HeHmUiZ`e9S8GIi+~(HY=RRi zK?UaQ^oQwe22c<3G3q(~Gr@!KO0>(I9`oLlnW;#9ZXJN@B}yy)GQu_Xnpn4p?wI{0 z1Z(V76pB3LtT~jb$Z9XeU=p1g)4QV?g&QBEQDfu(XE|jAaVi^%W+SasGH)sq7h%QL z3n`&eoG*NRW{+)*6@{ZOT0AT}%Od+%wzum~hU;Y~6xnInVKH`sPmvwkLH$(77i(wl hRB7l@aA<2A$>P%W;DE4Y)4Ox&q@AtV*R4U}(>+of1e^c> diff --git a/pc-bios/bios.diff b/pc-bios/bios.diff index 1ed70484c8..dee62e012a 100644 --- a/pc-bios/bios.diff +++ b/pc-bios/bios.diff @@ -4,7 +4,7 @@ RCS file: /cvsroot/bochs/bochs/bios/rombios.c,v retrieving revision 1.108 diff -u -w -r1.108 rombios.c --- rombios.c 9 Feb 2004 16:48:50 -0000 1.108 -+++ rombios.c 16 May 2004 15:16:57 -0000 ++++ rombios.c 22 May 2004 15:47:51 -0000 @@ -2254,6 +2254,7 @@ type = read_byte(get_SS(),buffer+1) & 0x1f; removable = (read_byte(get_SS(),buffer+0) & 0x80) ? 1 : 0; @@ -58,3 +58,175 @@ diff -u -w -r1.108 rombios.c } package_count = mouse_flags_2 & 0x07; +@@ -8401,57 +8416,69 @@ + cmp al, #0x08 + jne pci_pro_f09 + call pci_pro_select_reg ++ push edx + mov dx, di + and dx, #0x03 + add dx, #0x0cfc + in al, dx ++ pop edx + mov cl, al + jmp pci_pro_ok + pci_pro_f09: ;; read configuration word + cmp al, #0x09 + jne pci_pro_f0a + call pci_pro_select_reg ++ push edx + mov dx, di + and dx, #0x02 + add dx, #0x0cfc + in ax, dx ++ pop edx + mov cx, ax + jmp pci_pro_ok + pci_pro_f0a: ;; read configuration dword + cmp al, #0x0a + jne pci_pro_f0b + call pci_pro_select_reg ++ push edx + mov dx, #0x0cfc + in eax, dx ++ pop edx + mov ecx, eax + jmp pci_pro_ok + pci_pro_f0b: ;; write configuration byte + cmp al, #0x0b + jne pci_pro_f0c + call pci_pro_select_reg ++ push edx + mov dx, di + and dx, #0x03 + add dx, #0x0cfc + mov al, cl + out dx, al ++ pop edx + jmp pci_pro_ok + pci_pro_f0c: ;; write configuration word + cmp al, #0x0c + jne pci_pro_f0d + call pci_pro_select_reg ++ push edx + mov dx, di + and dx, #0x02 + add dx, #0x0cfc + mov ax, cx + out dx, ax ++ pop edx + jmp pci_pro_ok + pci_pro_f0d: ;; write configuration dword + cmp al, #0x0d + jne pci_pro_unknown + call pci_pro_select_reg ++ push edx + mov dx, #0x0cfc + mov eax, ecx + out dx, eax ++ pop edx + jmp pci_pro_ok + pci_pro_unknown: + mov ah, #0x81 +@@ -8468,6 +8495,7 @@ + retf + + pci_pro_select_reg: ++ push edx + mov eax, #0x800000 + mov ax, bx + shl eax, #8 +@@ -8476,6 +8504,7 @@ + and al, #0xfc + mov dx, #0x0cf8 + out dx, eax ++ pop edx + ret + + use16 386 +@@ -8536,57 +8565,69 @@ + cmp al, #0x08 + jne pci_real_f09 + call pci_real_select_reg ++ push dx + mov dx, di + and dx, #0x03 + add dx, #0x0cfc + in al, dx ++ pop dx + mov cl, al + jmp pci_real_ok + pci_real_f09: ;; read configuration word + cmp al, #0x09 + jne pci_real_f0a + call pci_real_select_reg ++ push dx + mov dx, di + and dx, #0x02 + add dx, #0x0cfc + in ax, dx ++ pop dx + mov cx, ax + jmp pci_real_ok + pci_real_f0a: ;; read configuration dword + cmp al, #0x0a + jne pci_real_f0b + call pci_real_select_reg ++ push dx + mov dx, #0x0cfc + in eax, dx ++ pop dx + mov ecx, eax + jmp pci_real_ok + pci_real_f0b: ;; write configuration byte + cmp al, #0x0b + jne pci_real_f0c + call pci_real_select_reg ++ push dx + mov dx, di + and dx, #0x03 + add dx, #0x0cfc + mov al, cl + out dx, al ++ pop dx + jmp pci_real_ok + pci_real_f0c: ;; write configuration word + cmp al, #0x0c + jne pci_real_f0d + call pci_real_select_reg ++ push dx + mov dx, di + and dx, #0x02 + add dx, #0x0cfc + mov ax, cx + out dx, ax ++ pop dx + jmp pci_real_ok + pci_real_f0d: ;; write configuration dword + cmp al, #0x0d + jne pci_real_unknown + call pci_real_select_reg ++ push dx + mov dx, #0x0cfc + mov eax, ecx + out dx, eax ++ pop dx + jmp pci_real_ok + pci_real_unknown: + mov ah, #0x81 +@@ -8599,6 +8640,7 @@ + ret + + pci_real_select_reg: ++ push dx + mov eax, #0x800000 + mov ax, bx + shl eax, #8 +@@ -8607,6 +8649,7 @@ + and al, #0xfc + mov dx, #0x0cf8 + out dx, eax ++ pop dx + ret + + .align 16 -- GitLab