Exemplo n.º 1
0
void interrupt_nsptimer(int irq, void *pregs, void *pdata )
{
	uint32_t ctl;
	struct arch_regs *regs = pregs;

	uart_print( "=======================================\n\r" );
	HVMM_TRACE_ENTER();

	/* Disable NS Physical Timer Interrupt */
	ctl = read_cntp_ctl();
	ctl &= ~(0x1);
	write_cntp_ctl(ctl);
	

	/* Trigger another interrupt */
	test_start_timer();

	/* Test guest context switch */
	if ( (regs->cpsr & 0x1F) != 0x1A ) {
		/* Not from Hyp, switch the guest context */
		context_dump_regs( regs );
        context_switchto(sched_policy_determ_next());
	}

	HVMM_TRACE_EXIT();
	uart_print( "=======================================\n\r" );
}
Exemplo n.º 2
0
void scheduler_schedule(void)
{
    /* Switch request, actually performed at trap exit */
    context_switchto(sched_policy_determ_next());
}