All pastes #444507 Raw Edit

Stuff

public text v1 · immutable
·published 2007-04-17 11:26 UTC
rendered paste body
pcfiic0 at isa0 port 0xe0000/2
iic0 at pcfiic0

unexpected machine check:

    mces    = 0x1
    vector  = 0x670
    param   = 0xfffffc0000004838
    pc      = 0xfffffc000070a274
    ra      = 0xfffffc00002c4444
    curproc = 0xfffffc00008c4450
        pid = 0, comm = swapper

panic: machine check

-------------------

int
mcpcfiic_isa_match(parent, match, aux)
        struct device *parent;
        void *match;
        void *aux;
{
        struct isa_attach_args *ia = aux;
        bus_space_handle_t ioh;

        if ((ia->ia_iobase != IOBASEUNK && ia->ia_iobase != 0xe0000) ||
            ia->ia_maddr != MADDRUNK || ia->ia_msize != 0 ||
            ia->ia_irq != IRQUNK || ia->ia_drq != DRQUNK)
                return (0);

        if (bus_space_map(ia->ia_iot, 0xe0000, 0x2, 0, &ioh))
                return (0);

        bus_space_unmap(ia->ia_iot, ioh, 0x2);

        ia->ia_iobase = 0xe0000;
        ia->ia_iosize = 0x2;

        return (1);
}

void
mcpcfiic_isa_attach(parent, self, aux)
        struct device *parent, *self;
        void *aux;
{
        struct isa_attach_args *ia = aux;
        struct pcfiic_softc *sc = (struct pcfiic_softc *)self;
        static int i2caddr= 0x55;

        sc->sc_iot = ia->ia_iot;
        if (bus_space_map(sc->sc_iot, ia->ia_iobase, ia->ia_iosize, 0,
            &sc->sc_ioh))
                panic("mcpcfiic_isa_attach: couldn't map clock I/O space");

        pcfiic_attach(sc, (i2c_addr_t)i2caddr, 0x1c, 0,
            0, NULL);
}