File vgabios-work-around-network-install-failure.patch of Package qemu.313

From: Bruce Rogers <brogers@suse.com>
Date: Thu, 4 Sep 2014 14:29:05 -0600
Subject: [PATCH] vgabios: work around network install failure
References: bnc#893892

Signed-off-by: Bruce Rogers <brogers@suse.com>
---
 roms/seabios/vgasrc/vbe.c |   11 +++++++++++
 1 file changed, 11 insertions(+)

--- a/roms/seabios/vgasrc/vbe.c
+++ b/roms/seabios/vgasrc/vbe.c
@@ -197,6 +197,17 @@ vbe_104f01(struct bregs *regs)
         SET_FARVAR(seg, info->linear_alpha_size, a_size);
         SET_FARVAR(seg, info->linear_alpha_pos, a_pos);
     }
+    if (!CONFIG_VGA_CIRRUS) {
+        // The following useless looking code was developed to get around
+        // what appears to be a failure in older linux guest's x86emu emulation
+        // of real mode int 10 calls. I haven't fully validated that it isn't
+        // some strange miscompilation of seavgabios, but either way, it solves
+        // the problem.
+        int i;
+        for (i = 0; i < 3; i++)
+            if (GET_FARVAR(seg, ((char *)info)[i]) != 0)
+                break;
+    }
 
     regs->ax = 0x004f;
 }
openSUSE Build Service is sponsored by