On Wed, Apr 16, 2014 at 06:17:45PM +0200, Gerd Hoffmann wrote:
--- a/src/hw/ata.c +++ b/src/hw/ata.c
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);
Ah. I think that should go in. If we need it, we better make sure it is enabled instead of expecting someone else to do it. It's more robust, even if it should not be needed in theory.
That patch also makes CONFIG_ATA_DMA=y on CONFIG_QEMU=y builds work.
On CONFIG_QEMU=y, pciinit.c turns those bits on, so it isn't needed in ata.c. On real hardware coreboot used to enable those bits, as I used to use CONFIG_ATA_DMA=y on my boards. (Recently, all my boards have AHCI, so I use that instead and I'm not sure I can retest on real hardware.)
In any case, I guess there is no harm in doing the above. It's just odd that coreboot doesn't turn it on. That said, CONFIG_ATA_DMA is very fragile and it may be worth just removing at some point.