On Fri, Mar 11, 2016 at 11:34:11AM +0100, Stefan Sperling wrote:
> Install with bsd.rd works fine.
> 
> The installed system can't find the root disk (emmc flash on usb) because:
> 
> ehci_sync_hc: tsleep() = 35
> ehci_sync_hc: tsleep() = 35
> ehci_sync_hc: tsleep() = 35
> ehci_sync_hc: tsleep() = 35
> ehci_sync_hc: tsleep() = 35
> ehci_sync_hc: tsleep() = 35
> ehci_sync_hc: tsleep() = 35
> ehci_sync_hc: tsleep() = 35
> uhub0: device problem, disabling port 1
 
mpi@ pointed out that ehci0 shares an interrupt with ichiic0.

And, indeed, with debug printfs added I'm seeing interrupts from ichiic0:

ichiic0: intr st 0x20<SMBAL>
ichiic0: intr st 0x60<SMBAL,INUSE>
ichiic0: intr st 0x20<SMBAL>
ichiic0: intr st 0x60<SMBAL,INUSE>
ichiic0: intr st 0x20<SMBAL>
ichiic0: intr st 0x60<SMBAL,INUSE>
ichiic0: intr st 0x20<SMBAL>
ichiic0: intr st 0x60<SMBAL,INUSE>

Over and over...

This seems to be the SMBALERT interrupt.

If I'm tracing the right tracks, the Atom C2000 data sheet indicates
this interrupt can also be wired to a GPIO port.

http://www.intel.com/content/dam/www/public/us/en/documents/datasheets/atom-c2000-microserver-datasheet.pdf

>From Section 18.1 on page 430:
""""
SMBus Alert (SMBALERT#): This signal wakes the system or
generates a System Management Interrupt (SMI).
This signal is muxed with GPIOS_10 and is used by other functions.
""""

>From Table 31-8 on page 587:
"""
Legacy SMBus Alert - Port 0. External pull-up required.
If the SMBALRT_N0 interface is not used, the signal can be used as
GPIO Port 10.
"""

FreeBSD's ichsmb driver ignores this interrupt. 

Ignoring it in ichiic, an indicating that we didn't handle it,
allows OpenBSD to boot:

Index: ichiic.c
===================================================================
RCS file: /cvs/src/sys/dev/pci/ichiic.c,v
retrieving revision 1.37
diff -u -p -r1.37 ichiic.c
--- ichiic.c    7 Dec 2015 02:56:36 -0000       1.37
+++ ichiic.c    11 Mar 2016 13:40:33 -0000
@@ -373,6 +373,9 @@ ichiic_intr(void *arg)
                            ICH_SMB_HD1);
        }
 
+       /* Ignore SMBALERT. This is potentially a shared interrupt. */
+       if (st & ICH_SMB_HS_SMBAL)
+               return (0);
 done:
        if ((sc->sc_i2c_xfer.flags & I2C_F_POLL) == 0)
                wakeup(sc);

Reply via email to