Re: Keyboard Problem with V5.1 on an E4000

Eduardo Horvath <[email protected]>
Newsgroups gmane.os.netbsd.ports.sparc64
Message-ID <[email protected]>
On Thu, 11 Aug 2011, Julian Coleman wrote:

> The reset is at the point where we enable interrupts on the serial port (line
> 473 of sys/arch/sparc64/dev/zs.c [1]).  According to the "Sun Enterprise xx00
> Problem Solving Manual", section 4.13 [2], the reset is caused by "an
> interrupt being sent to an unmapped or non-accepting destination".

Looks like the fhc driver is not setting the destination UPAID where it 
needs to when establishing an interrupt mapping.  I don't have the docs on 
the fhc controller, but Sun usually recycled register contents across 
designs.

SBus does this:

                                /* Register the map and clear intr 
registers */
                                ih->ih_map = &intrptr[i];
                                intrptr = (int64_t 
*)&sc->sc_sysio->scsi_clr_int;
                                ih->ih_clr = &intrptr[i];
                                /* Enable the interrupt */
                                imap |= INTMAP_V
                                    |(CPU_UPAID << INTMAP_TID_SHIFT);
                                /* XXXX */
                                *(ih->ih_map) = imap;
 
FHC does this:

        if (intrmapptr != NULL) {
                u_int64_t r;

                r = *intrmapptr;
                r |= INTMAP_V;
                *intrmapptr = r;
                r = *intrmapptr;
                ih->ih_number |= r & INTMAP_INR;
        }


If you add something like:

		r |= (CPU_UPAID << INTMAP_TID_SHIFT);

(after you figure out where those are defined) it will probably solve your 
problem.

Eduardo
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.