diff --git a/arch/x86/kernel/irq.c b/arch/x86/kernel/irq.c index 9e8ca5e8..017491fb 100644 --- a/arch/x86/kernel/irq.c +++ b/arch/x86/kernel/irq.c @@ -235,7 +235,10 @@ void irq_handler(struct state *s) void (*handler) (struct state * s); // at first, we check our work queues - if( s->int_no == 124 ) check_workqueues(); + if( s->int_no == 124 ) { + kprintf( "Got remote interrupt!\n" ); + check_workqueues(); + } /* * Find out if we have a custom handler to run for this diff --git a/arch/x86/scc/iRCCE_mailbox.c b/arch/x86/scc/iRCCE_mailbox.c index 8b14480a..901799c2 100644 --- a/arch/x86/scc/iRCCE_mailbox.c +++ b/arch/x86/scc/iRCCE_mailbox.c @@ -169,12 +169,10 @@ int iRCCE_mail_recv( iRCCE_mailbox_recv_queue[i]->next; help_header->next = NULL; - *header = help_header; return iRCCE_SUCCESS; } } - // no mail queued *header = NULL; return iRCCE_MAILBOX_EMPTY; diff --git a/arch/x86/scc/icc.c b/arch/x86/scc/icc.c index 1c3e7f05..16e7cc73 100644 --- a/arch/x86/scc/icc.c +++ b/arch/x86/scc/icc.c @@ -234,6 +234,8 @@ int icc_ping(int ue) int icc_mail_ping( void ) { + kprintf( "Hello from mail_ping ... \n" ); + uint32_t flags; uint64_t timer; int remote_rank = (my_ue+1)%2; @@ -249,7 +251,7 @@ int icc_mail_ping( void ) timer = rdtsc(); iRCCE_mail_send( 0, 1, 0, NULL, remote_rank ); - kprintf( "Sent pingrequest to %d ...\n", remote_rank ); +// kprintf( "Sent pingrequest to %d ...\n", remote_rank ); // wake up receiver @@ -347,10 +349,10 @@ void icc_check(void) void icc_mail_check(void) { - if( !my_ue ) return ; - iRCCE_MAIL_HEADER* header; - int res; + int res, count = 0; + +// if( !my_ue ) return; kprintf( "Hello from icc_mail_check() \n" ); @@ -361,9 +363,11 @@ void icc_mail_check(void) kprintf( "Received mail_ping request ...\n" ); iRCCE_mail_send( 0, 2, 0, NULL, header->source ); } - + count++; iRCCE_mail_release( &header ); } while( res == iRCCE_SUCCESS ); + + kprintf( "received %d headers!\n", count ); } #endif diff --git a/kernel/main.c b/kernel/main.c index 4238ea72..f2fcf076 100644 --- a/kernel/main.c +++ b/kernel/main.c @@ -86,7 +86,6 @@ int main(void) kprintf("This is MetalSVM %s Build %u, %u\n", METALSVM_VERSION, &__BUILD_DATE, &__BUILD_TIME); popbg(); - system_init(); irq_init(); timer_init(); @@ -103,7 +102,6 @@ int main(void) irq_enable(); kprintf("Kernel starts at %p and ends at %p\n", &kernel_start, &kernel_end); - system_calibration(); network_init(); @@ -115,6 +113,7 @@ int main(void) sleep(5); list_root(); // test_init(); + kprintf( "starting mailbox ...\n " ); mailbox_test_init(); per_core(current_task)->status = TASK_IDLE; reschedule();