[SeaBIOS] [PATCH 0/7] vgabios improvements

Kevin O'Connor kevin at koconnor.net
Wed Apr 16 17:36:15 CEST 2014


On Tue, Apr 15, 2014 at 07:52:47AM +0200, Gerd Hoffmann wrote:
>   Hi,
> 
> > Oddly, I can't boot from a hard drive (-hda) when I use the
> > coreboot/seabios I built though.  It keeps failing at "Booting from
> > Hard Disk...".
> 
> I see that with my builds too, but only with -vga std (where coreboot
> vgabios is used).  Same bios image with -vga cirrus works fine.  So it
> seems this is triggered by the coreboot vgabios too.

I tracked down the failures I was seeing - my coreboot builds had
CONFIG_ATA_DMA enabled and that doesn't work with coreboot on qemu.
For some reason, coreboot doesn't enable the memory or io bits in the
pci config space.  The seabios patch below fixes it for me, but I'm
not sure if seabios is the right place to fix it.  In any case, I
think I'll just stop using CONFIG_ATA_DMA for my coreboot builds.

-Kevin


--- a/src/hw/ata.c
+++ b/src/hw/ata.c
@@ -950,7 +950,7 @@ init_pciata(struct pci_device *pci, u8 prog_if)
         u32 bar = pci_config_readl(bdf, PCI_BASE_ADDRESS_4);
         if (bar & PCI_BASE_ADDRESS_SPACE_IO) {
             master = bar & PCI_BASE_ADDRESS_IO_MASK;
-            pci_config_maskw(bdf, PCI_COMMAND, 0, PCI_COMMAND_MASTER);
+            pci_config_maskw(bdf, PCI_COMMAND, 0, PCI_COMMAND_MASTER | PCI_COMMAND_IO | PCI_COMMAND_MEMORY);
         }
     }
 



More information about the SeaBIOS mailing list