mirror of
https://github.com/fail0verflow/switch-coreboot.git
synced 2025-05-04 01:39:18 -04:00
My Jmicron SATA card depends on the BIOS not clearing AL when setting AH.
Signed-off-by: Myles Watson <mylesgw@gmail.com> Acked-by: Myles Watson <mylesgw@gmail.com> git-svn-id: svn://svn.coreboot.org/coreboot/trunk@5784 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
This commit is contained in:
parent
6c9bc01b0e
commit
fe09fd1dac
1 changed files with 10 additions and 4 deletions
|
@ -99,7 +99,8 @@ int int1a_handler(struct eregs *regs)
|
||||||
}
|
}
|
||||||
if (dev) {
|
if (dev) {
|
||||||
unsigned short busdevfn;
|
unsigned short busdevfn;
|
||||||
regs->eax = 0;
|
regs->eax &= 0xffff00ff; /* Clear AH */
|
||||||
|
regs->eax |= PCIBIOS_SUCCESSFUL;
|
||||||
// busnum is an unsigned char;
|
// busnum is an unsigned char;
|
||||||
// devfn is an int, so we mask it off.
|
// devfn is an int, so we mask it off.
|
||||||
busdevfn = (dev->bus->secondary << 8)
|
busdevfn = (dev->bus->secondary << 8)
|
||||||
|
@ -108,7 +109,8 @@ int int1a_handler(struct eregs *regs)
|
||||||
regs->ebx = busdevfn;
|
regs->ebx = busdevfn;
|
||||||
retval = 0;
|
retval = 0;
|
||||||
} else {
|
} else {
|
||||||
regs->eax = PCIBIOS_NODEV;
|
regs->eax &= 0xffff00ff; /* Clear AH */
|
||||||
|
regs->eax |= PCIBIOS_NODEV;
|
||||||
retval = -1;
|
retval = -1;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -125,7 +127,8 @@ int int1a_handler(struct eregs *regs)
|
||||||
if (!dev) {
|
if (!dev) {
|
||||||
printk(BIOS_DEBUG, "0x%x: BAD DEVICE bus %d devfn 0x%x\n", func, bus, devfn);
|
printk(BIOS_DEBUG, "0x%x: BAD DEVICE bus %d devfn 0x%x\n", func, bus, devfn);
|
||||||
// Or are we supposed to return PCIBIOS_NODEV?
|
// Or are we supposed to return PCIBIOS_NODEV?
|
||||||
regs->eax = PCIBIOS_BADREG;
|
regs->eax &= 0xffff00ff; /* Clear AH */
|
||||||
|
regs->eax |= PCIBIOS_BADREG;
|
||||||
retval = -1;
|
retval = -1;
|
||||||
return retval;
|
return retval;
|
||||||
}
|
}
|
||||||
|
@ -160,11 +163,14 @@ int int1a_handler(struct eregs *regs)
|
||||||
printk(BIOS_DEBUG, "0x%x: bus %d devfn 0x%x reg 0x%x val 0x%x\n",
|
printk(BIOS_DEBUG, "0x%x: bus %d devfn 0x%x reg 0x%x val 0x%x\n",
|
||||||
func, bus, devfn, reg, regs->ecx);
|
func, bus, devfn, reg, regs->ecx);
|
||||||
#endif
|
#endif
|
||||||
regs->eax = 0;
|
regs->eax &= 0xffff00ff; /* Clear AH */
|
||||||
|
regs->eax |= PCIBIOS_SUCCESSFUL;
|
||||||
retval = 0;
|
retval = 0;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
printk(BIOS_ERR, "UNSUPPORTED PCIBIOS FUNCTION 0x%x\n", func);
|
printk(BIOS_ERR, "UNSUPPORTED PCIBIOS FUNCTION 0x%x\n", func);
|
||||||
|
regs->eax &= 0xffff00ff; /* Clear AH */
|
||||||
|
regs->eax |= PCIBIOS_UNSUPPORTED;
|
||||||
retval = -1;
|
retval = -1;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue