summaryrefslogtreecommitdiff
path: root/src/devices/pci_device.c
diff options
context:
space:
mode:
authorRonald G. Minnich <rminnich@gmail.com>2003-10-02 18:16:07 +0000
committerRonald G. Minnich <rminnich@gmail.com>2003-10-02 18:16:07 +0000
commitcb3f498296bad22b360796139bc454d141d7ccc9 (patch)
tree34b62e7987a0d39a85da4afc325994fd65c83d89 /src/devices/pci_device.c
parent53311091a63f3fd63f24e296246e040730dfabbe (diff)
success. It boots as a bproc slave now.
git-svn-id: svn://svn.coreboot.org/coreboot/trunk@1176 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'src/devices/pci_device.c')
-rw-r--r--src/devices/pci_device.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/devices/pci_device.c b/src/devices/pci_device.c
index a91381f0d6..806734c18b 100644
--- a/src/devices/pci_device.c
+++ b/src/devices/pci_device.c
@@ -686,13 +686,25 @@ unsigned int pci_scan_bridge(struct device *dev, unsigned int max)
*/
static void pci_level_irq(unsigned char intNum)
{
- unsigned intBits = inb(0x4d0) | (((unsigned) inb(0x4d1)) << 8);
+ unsigned short intBits = inb(0x4d0) | (((unsigned) inb(0x4d1)) << 8);
+ printk_spew("%s: current ints are 0x%x\n", __FUNCTION__, intBits);
intBits |= (1 << intNum);
+ printk_spew("%s: try to set ints 0x%x\n", __FUNCTION__, intBits);
+
// Write new values
outb((unsigned char) intBits, 0x4d0);
outb((unsigned char) (intBits >> 8), 0x4d1);
+
+ if (inb(0x4d0) != (intBits & 0xf)) {
+ printk_err("%s: lower order bits are wrong: want 0x%x, got 0x%x\n",
+ __FUNCTION__, intBits &0xf, inb(0x4d0));
+ }
+ if (inb(0x4d1) != ((intBits >> 8) & 0xf)) {
+ printk_err("%s: lower order bits are wrong: want 0x%x, got 0x%x\n",
+ __FUNCTION__, (intBits>>8) &0xf, inb(0x4d1));
+ }
}