Interrupt handling

"Christian, Martin, OPEE45" <[email protected]>
Newsgroups gmane.comp.micro-kernel.l4.l4ka.general
Message-ID <[email protected]>
Hi,
this time I've got a problem with interrupt handling in Pistachio. ;-)
I'm writing a serial port user mode driver without IDL - to understand
how it's working. Here are the code parts:

Low level interrupt handling in SRC_PLAT(intctrl.cc):

void intctrl_t::handle_irq( word_t irq )
{
	this->mask_and_ack( irq );
	handle_interrupt( irq );
}

Roottasks main:

int main (void)
{
	[...]
	hwint_tid = L4_GlobalId( MPSC_INT_RCC, 1 );
	res = L4_AssociateInterrupt( hwint_tid, L4_Myself() );
	if ( !res )
		L4_KDB_Enter( "Couldn't register interrupt." );
	[...]
	echo_tid = start_thread( &echo_server,
&echo_stack[sizeof(echo_stack) - 1] ); /* taken from SDIOS */
	[...]
}

Thread which echoes character back on serial line:

void echo_server (void)
{
	L4_MsgTag_t tag;
	char c;

	while ( true )
	{
		/* wait for ipc */
		tag = L4_Receive( hwint_tid );
		c = inc();
		if ( c )
			outc( c );
		L4_Reply( hwint_tid );
	}
}

What happens is this:

Enable MPSC_INT_RCC    -> only one interrupt active at the moment
Disable MPSC_INT_RCC   -> interrupt received and masked
ACK MPSC_INT_RCC

The interrupt isn't enabled again. How should that happen? I thought a
reply to the interrupt IPC automatically triggers the kernel unmask the
interrupt again?!

Thanks,

Martin.
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.