Skip to content

Commit 21d771a

Browse files
committed
On Milan, also explicitly disable MBIRQ1 on PIIX.
Milan's ROM bootloader v1.2 and v1.4 incorrectly set MBIRQ0 connected to the secondary IDE to IRQ14 (not 15) and unused MBIRQ1 to IRQ15, so both IDE channels don't work properly.
1 parent 9e6ef97 commit 21d771a

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

sys/arch/atari/pci/pci_machdep.c

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* $NetBSD: pci_machdep.c,v 1.55 2018/01/31 15:36:29 tsutsui Exp $ */
1+
/* $NetBSD: pci_machdep.c,v 1.56 2018/02/09 15:24:35 tsutsui Exp $ */
22

33
/*
44
* Copyright (c) 1996 Leo Weppelman. All rights reserved.
@@ -32,7 +32,7 @@
3232
*/
3333

3434
#include <sys/cdefs.h>
35-
__KERNEL_RCSID(0, "$NetBSD: pci_machdep.c,v 1.55 2018/01/31 15:36:29 tsutsui Exp $");
35+
__KERNEL_RCSID(0, "$NetBSD: pci_machdep.c,v 1.56 2018/02/09 15:24:35 tsutsui Exp $");
3636

3737
#include "opt_mbtype.h"
3838

@@ -454,10 +454,15 @@ enable_pci_devices(void)
454454
#define PIIX_PCIB_MBIRQ0 0x70
455455
if ((PCI_VENDOR(id) == PCI_VENDOR_INTEL) &&
456456
(PCI_PRODUCT(id) == PCI_PRODUCT_INTEL_82371FB_ISA)) {
457-
/* Set Interrupt Routing for MBIRQ0 to IRQ15 */
457+
/*
458+
* Set Interrupt Routing for MBIRQ0 to IRQ15.
459+
* Note Milan's ROM bootloader v1.2 and v1.4 incorrectly
460+
* set MBIRQ0 to IRQ14 (not 15) and unused MBIRQ1 to IRQ 15,
461+
* so explicitly disable MBIRQ1.
462+
*/
458463
csr = pci_conf_read(pc, tag, PIIX_PCIB_MBIRQ0);
459-
csr &= ~0x00000ff;
460-
csr |= 0x000000f; /* IRQ15 */
464+
csr &= ~0x000ffff;
465+
csr |= 0x000800f; /* MBIRQ1: disable, MBIRQ0: IRQ15 */
461466
pci_conf_write(pc, tag, PIIX_PCIB_MBIRQ0, csr);
462467
#ifdef DEBUG_PCI_MACHDEP
463468
printf("\npcib0: enable and route MBIRQ0 to irq 15\n");

0 commit comments

Comments
 (0)