예제 #1
0
파일: interrupts.c 프로젝트: cpizano/lk
enum handler_return platform_irq(struct arm64_iframe_short *frame)
{
    uint32_t iar = GICCPUREG(IAR);
    uint vector = iar & 0x3ff;

//    printf("platform_irq: spsr 0x%llx, pc 0x%llx, currthread %p, vector %d\n", frame->spsr, frame->elr, current_thread, vector);

    if (vector >= 0x3fe) {
        // spurious
        return INT_NO_RESCHEDULE;
    }

    THREAD_STATS_INC(interrupts);
    KEVLOG_IRQ_ENTER(vector);

    // deliver the interrupt
    enum handler_return ret;

    ret = INT_NO_RESCHEDULE;
    if (int_handler_table[vector].handler)
        ret = int_handler_table[vector].handler(int_handler_table[vector].arg);

    GICCPUREG(EOIR) = iar;

//  printf("platform_irq: exit %d\n", ret);

    KEVLOG_IRQ_EXIT(vector);

    if (ret != INT_NO_RESCHEDULE)
        thread_preempt();

    return ret;
}
예제 #2
0
파일: arch.c 프로젝트: M1cha/lk
void arm_cm_irq_entry(void)
{
	inc_critical_section();

	THREAD_STATS_INC(interrupts);
	KEVLOG_IRQ_ENTER(__get_IPSR());
}
예제 #3
0
파일: arch.c 프로젝트: herhut-ggl/lk
void arm_cm_irq_entry(void)
{
	// Set PRIMASK to 1
	// This is so that later calls to arch_ints_disabled() returns true while we're inside the int handler
	// Note: this will probably screw up future efforts to stack higher priority interrupts since we're setting
	// the cpu to essentially max interrupt priority here. Will have to rethink it then.
	__disable_irq();

	THREAD_STATS_INC(interrupts);
	KEVLOG_IRQ_ENTER(__get_IPSR());
}
예제 #4
0
파일: arch.c 프로젝트: dzc1234ok/lk
void arm_cm_irq_entry(void)
{
	THREAD_STATS_INC(interrupts);
	KEVLOG_IRQ_ENTER(__get_IPSR());
}