I’m trying to enable SATA hotplug (in OS) feature on my board. And one of my attempts is to run AHCI option rom from original BIOS.

I use coreboot/seabios bundle with seabios responsible for option ROM execution. And I stuck with a problem, that seabios doesn’t want to run ROM on SATA controllers cause of pci->have_driver check:

 

optionroms.c

ššššššš // Find and deploy PCI roms.

ššššššš struct pci_device *pci;

ššššššš foreachpci(pci) {

ššššššššššš if (pci->class == PCI_CLASS_DISPLAY_VGA || pci->have_driver)

ššššššššššššššš continue;

ššššššššššš init_pcirom(pci, 0, sources);

ššššššš }

 

 

 

ata.c:

….

// Handle controllers on an ATA PCI device.

static void

init_pciata(struct pci_device *pci, u8 prog_if)

{

ššš pci->have_driver = 1;

….

 

 

 

So, what is a proper way to run roms like AHCI on SATA controllers?

(in my case SATA controller is embedded device in southbridge)