[vgabios/f18] Ensure PCIR is aligned to 4 bytes

bonzini bonzini at fedoraproject.org
Fri Mar 8 08:25:57 UTC 2013


commit ddfd4f91a7fed7539380921fc9a172386a7cb1bb
Author: Paolo Bonzini <pbonzini at redhat.com>
Date:   Fri Mar 8 09:25:20 2013 +0100

    Ensure PCIR is aligned to 4 bytes

 0008-vgabios-Ensure-pcir4-is-aligned.patch |   19 +++++++++++++++++++
 vgabios.spec                               |   14 ++++++++++----
 2 files changed, 29 insertions(+), 4 deletions(-)
---
diff --git a/0008-vgabios-Ensure-pcir4-is-aligned.patch b/0008-vgabios-Ensure-pcir4-is-aligned.patch
new file mode 100644
index 0000000..65db57c
--- /dev/null
+++ b/0008-vgabios-Ensure-pcir4-is-aligned.patch
@@ -0,0 +1,19 @@
+From: David Woodhouse <dwmw2 at infradead.org>
+Subject: [PATCH] Ensure PCIR is aligned to 4 bytes
+
+The PCI Firmware Specification apparently requires that the PCI Data
+Structure be DWORD-aligned. The implementation in OVMF also requires
+this, so vgabios ROMs don't work there. With this fixed, I can now
+initialise the VGA ROM from EFI, and EFI can display using INT 10h
+services.
+
+--- vgabios-0.6c/vgabios.c.orig 2013-01-20 11:33:36.138548472 -0600
++++ vgabios-0.6c/vgabios.c      2013-01-20 11:36:26.060270163 -0600
+@@ -204,6 +204,7 @@ vgabios_website:
+ .byte  0x00
+ 
+ #ifdef PCIBIOS
++.align 4 // DWORD alignment required by PCI Firmware Specification
+ vgabios_pci_data:
+ .ascii "PCIR"
+ #ifdef CIRRUS
diff --git a/vgabios.spec b/vgabios.spec
index 7ab3ac9..14b5df3 100644
--- a/vgabios.spec
+++ b/vgabios.spec
@@ -1,6 +1,6 @@
 Name:		vgabios
 Version:	0.6c
-Release:	6%{?dist}
+Release:	7%{?dist}
 Summary:	LGPL implementation of a vga video bios
 
 Group:		Applications/Emulators		
@@ -10,10 +10,12 @@ Source0:	http://savannah.gnu.org/download/%{name}/%{name}-%{version}.tgz
 Patch01:		0001-Makefile-cleanup.patch
 Patch02:		0002-Add-defines-for-PCI-IDs.patch
 Patch03:		0003-Add-qemu-stdvga-pci-bios.patch
-Patch04:		0004-update-pci_get_lfb_addr-for-vmware-vga.patch 
-Patch05:		0005-Add-qemu-vmware-vga-pci-bios.patch 
-Patch06:		0006-Add-qemu-qxl-vga-pci-bios.patch 
+Patch04:		0004-update-pci_get_lfb_addr-for-vmware-vga.patch
+Patch05:		0005-Add-qemu-vmware-vga-pci-bios.patch
+Patch06:		0006-Add-qemu-qxl-vga-pci-bios.patch
 Patch07:                0007-vgabios-int10-0x11xx.patch
+Patch08:                0008-vgabios-Ensure-pcir4-is-aligned.patch
+
 BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
 BuildRequires:	dev86
@@ -35,6 +37,7 @@ emulators. It is not intended for use in real cards.
 %patch05 -p1
 %patch06 -p1
 %patch07 -p1
+%patch08 -p1
 
 %build 
 make clean
@@ -69,6 +72,9 @@ rm -rf $RPM_BUILD_ROOT
 
 
 %changelog
+* Thu Jan 10 2013 Paolo Bonzini <pbonzini at redhat.com> - 0.6c-7
+- Ensure PCIR is aligned to 4 bytes
+
 * Thu Jan 10 2013 Paolo Bonzini <pbonzini at redhat.com> - 0.6c-6
 - Complete implementation for int 10h AH=11h
 


More information about the scm-commits mailing list