[SeaBIOS] [PATCH] Ignore AHCI NPORTS

Vladimir 'φ-coder/phcoder' Serbinenko phcoder at gmail.com
Tue Mar 4 00:35:00 CET 2014


On Easynote LM85 under both coreboot and vendor BIOS NPORTS is 3, yet
port 4 is used for CD-ROM. NPORTS is RO on this chipset and has same
value on vendor BIOS as well, so it's not a coreboot bug.
Linux does essentially the same, by increasing nports variable if bits
in PI are set above nports-1. GRUB ignores PI since this problem was
detected.

diff --git a/src/hw/ahci.c b/src/hw/ahci.c
index ff5d5f9..3193d81 100644
--- a/src/hw/ahci.c
+++ b/src/hw/ahci.c
@@ -601,7 +601,7 @@ ahci_controller_setup(struct pci_device *pci)
     dprintf(2, "AHCI: cap 0x%x, ports_impl 0x%x\n",
             ctrl->caps, ctrl->ports);

-    max = ctrl->caps & 0x1f;
+    max = 0x1f;
     for (pnr = 0; pnr <= max; pnr++) {
         if (!(ctrl->ports & (1 << pnr)))
             continue;





-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 274 bytes
Desc: OpenPGP digital signature
URL: <http://www.seabios.org/pipermail/seabios/attachments/20140304/f5ab51e0/attachment.sig>


More information about the SeaBIOS mailing list