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)