Subversion Repositories HelenOS

Rev

Rev 2608 | Rev 3657 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2608 Rev 3626
Line 51... Line 51...
51
#include <proc/scheduler.h>
51
#include <proc/scheduler.h>
52
#include <ipc/sysipc.h>
52
#include <ipc/sysipc.h>
53
#include <ipc/irq.h>
53
#include <ipc/irq.h>
54
#include <ipc/ipc.h>
54
#include <ipc/ipc.h>
55
#include <synch/spinlock.h>
55
#include <synch/spinlock.h>
-
 
56
#include <mm/tlb.h>
56
 
57
 
57
#define VECTORS_64_BUNDLE   20
58
#define VECTORS_64_BUNDLE   20
58
#define VECTORS_16_BUNDLE   48
59
#define VECTORS_16_BUNDLE   48
59
#define VECTORS_16_BUNDLE_START 0x5000
60
#define VECTORS_16_BUNDLE_START 0x5000
60
#define VECTOR_MAX      0x7f00
61
#define VECTOR_MAX      0x7f00
Line 232... Line 233...
232
    dump_interrupted_context(istate);
233
    dump_interrupted_context(istate);
233
    panic("Interruption: %#hx (%s)\n", (uint16_t) vector,
234
    panic("Interruption: %#hx (%s)\n", (uint16_t) vector,
234
        vector_to_string(vector));
235
        vector_to_string(vector));
235
}
236
}
236
 
237
 
-
 
238
static void end_of_local_irq()
-
 
239
{
-
 
240
    asm volatile ("mov cr.eoi=r0;;");
-
 
241
}
-
 
242
 
-
 
243
 
237
void external_interrupt(uint64_t vector, istate_t *istate)
244
void external_interrupt(uint64_t vector, istate_t *istate)
238
{
245
{
239
    irq_t *irq;
246
    irq_t *irq;
240
    cr_ivr_t ivr;
247
    cr_ivr_t ivr;
241
   
248
   
Line 252... Line 259...
252
#ifdef CONFIG_DEBUG
259
#ifdef CONFIG_DEBUG
253
            printf("cpu%d: spurious interrupt\n", CPU->id);
260
            printf("cpu%d: spurious interrupt\n", CPU->id);
254
#endif
261
#endif
255
            break;
262
            break;
256
 
263
 
-
 
264
#ifdef CONFIG_SMP
-
 
265
        case VECTOR_TLB_SHOOTDOWN_IPI:
-
 
266
            tlb_shootdown_ipi_recv();
-
 
267
            end_of_local_irq();
-
 
268
            break;
-
 
269
#endif
-
 
270
 
-
 
271
 
257
        default:
272
        default:
258
            panic("\nUnhandled External Interrupt Vector %d\n",
273
            panic("\nUnhandled External Interrupt Vector %d\n",
259
                ivr.vector);
274
                ivr.vector);
260
            break;
275
            break;
261
        }
276
        }