Luckily my first guess was correct.  The following patch needs to be
applied to SeaBIOS:

commit 3c5fcec00ce1317cda56d549259550fcc018c834
Author: Kevin O'Connor <[email protected]>
Date:   Sat Oct 1 12:35:32 2011 -0400

    Fix alignment bug in pci_bios_init_root_regions().
    
    If there are no memory allocations for a given type then the "max" bar
    size is zero.  However, ALIGN_DOWN does not handle an alignment of
    zero properly.  Catch and handle the zero case.
    
    Signed-off-by: Kevin O'Connor <[email protected]>

diff --git a/src/pciinit.c b/src/pciinit.c
index a857da0..0d8758e 100644
--- a/src/pciinit.c
+++ b/src/pciinit.c
@@ -536,7 +536,7 @@ static void pci_bios_init_bus_bases(struct pci_bus *bus)
     }
 }
 
-#define ROOT_BASE(top, sum, align) ALIGN_DOWN((top)-(sum),(align))
+#define ROOT_BASE(top, sum, max) ALIGN_DOWN((top)-(sum),(max) ?: 1)
 
 static int pci_bios_init_root_regions(u32 start, u32 end)
 {


I tested this by applying this patch to seabios 0.6.2-0ubuntu2 and it
completely cures the problem.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/931371

Title:
  Seabios causing hang when adding a virtio disk

To manage notifications about this bug go to:
https://bugs.launchpad.net/linux/+bug/931371/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to