summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMyles Watson <mylesgw@gmail.com>2010-09-07 23:27:59 +0000
committerMyles Watson <mylesgw@gmail.com>2010-09-07 23:27:59 +0000
commitfe09fd1dacd76badd7a2adf8c8933d927f4bce93 (patch)
treea616bf5ecd0db4c80191392405b7996ea1771022
parent6c9bc01b0ead45ebde3479e2c3c0c150ce99625f (diff)
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
-rw-r--r--src/devices/oprom/x86_interrupts.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/devices/oprom/x86_interrupts.c b/src/devices/oprom/x86_interrupts.c
index 44c98d130c..1dd645b421 100644
--- a/src/devices/oprom/x86_interrupts.c
+++ b/src/devices/oprom/x86_interrupts.c
@@ -99,7 +99,8 @@ int int1a_handler(struct eregs *regs)
}
if (dev) {
unsigned short busdevfn;
- regs->eax = 0;
+ regs->eax &= 0xffff00ff; /* Clear AH */
+ regs->eax |= PCIBIOS_SUCCESSFUL;
// busnum is an unsigned char;
// devfn is an int, so we mask it off.
busdevfn = (dev->bus->secondary << 8)
@@ -108,7 +109,8 @@ int int1a_handler(struct eregs *regs)
regs->ebx = busdevfn;
retval = 0;
} else {
- regs->eax = PCIBIOS_NODEV;
+ regs->eax &= 0xffff00ff; /* Clear AH */
+ regs->eax |= PCIBIOS_NODEV;
retval = -1;
}
break;
@@ -125,7 +127,8 @@ int int1a_handler(struct eregs *regs)
if (!dev) {
printk(BIOS_DEBUG, "0x%x: BAD DEVICE bus %d devfn 0x%x\n", func, bus, devfn);
// Or are we supposed to return PCIBIOS_NODEV?
- regs->eax = PCIBIOS_BADREG;
+ regs->eax &= 0xffff00ff; /* Clear AH */
+ regs->eax |= PCIBIOS_BADREG;
retval = -1;
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",
func, bus, devfn, reg, regs->ecx);
#endif
- regs->eax = 0;
+ regs->eax &= 0xffff00ff; /* Clear AH */
+ regs->eax |= PCIBIOS_SUCCESSFUL;
retval = 0;
break;
default:
printk(BIOS_ERR, "UNSUPPORTED PCIBIOS FUNCTION 0x%x\n", func);
+ regs->eax &= 0xffff00ff; /* Clear AH */
+ regs->eax |= PCIBIOS_UNSUPPORTED;
retval = -1;
break;
}