qemu/qemu-bios-bigger-roms.patch
Mark McLoughlin 35aa5183e5 - Update to 0.10.4
- Fix yet more qcow2 corruption (#498405)
- AIO cancellation fixes (#497170)
- Fix VPC image size overflow (#491981)
- Fix oops with 2.6.25 virtio guest (#470386)
- Enable pulseaudio driver (#495964, #496627)
- Fix cpuid initialization
- Fix HPET emulation
- Fix storage hotplug error handling
- Migration fixes
- Block range checking fixes
- Make PCI config status register read-only
- Handle newer Xorg keymap names
- Don't leak memory on NIC hot-unplug
- Hook up keypad keys for qemu console emulation
- Correctly run on kernels lacking mmu notifiers
- Support DDIM option ROMs
- Fix PCI NIC error handling
- Fix in-kernel LAPIC initialization
- Fix broken e1000 PCI config space
- Drop some patches which have been upstreamed
- Drop the make-release script; we have an official tarball now
2009-05-13 08:35:55 +00:00

53 lines
728 B
Diff

diff --git a/kvm/bios/rombios.c b/kvm/bios/rombios.c
index c4f6ccd..c4bfe60 100644
--- a/kvm/bios/rombios.c
+++ b/kvm/bios/rombios.c
@@ -10196,22 +10196,43 @@ no_serial:
ret
rom_checksum:
- push ax
- push bx
- push cx
+ pusha
+ push ds
+
xor ax, ax
xor bx, bx
xor cx, cx
+ xor dx, dx
+
mov ch, [2]
shl cx, #1
+
+ jnc checksum_loop
+ xchg dx, cx
+ dec cx
+
checksum_loop:
add al, [bx]
inc bx
loop checksum_loop
+
+ test dx, dx
+ je checksum_out
+
+ add al, [bx]
+ mov cx, dx
+ mov dx, ds
+ add dh, #0x10
+ mov ds, dx
+ xor dx, dx
+ xor bx, bx
+
+ jmp checksum_loop
+
+checksum_out:
and al, #0xff
- pop cx
- pop bx
- pop ax
+ pop ds
+ popa
ret