Subversion Repositories HelenOS-historic

Rev

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

Rev 1265 Rev 1507
Line 42... Line 42...
42
#include <debug.h>
42
#include <debug.h>
43
#include <syscall/syscall.h>
43
#include <syscall/syscall.h>
44
#include <print.h>
44
#include <print.h>
45
#include <proc/scheduler.h>
45
#include <proc/scheduler.h>
46
#include <ipc/sysipc.h>
46
#include <ipc/sysipc.h>
-
 
47
#include <ipc/irq.h>
-
 
48
#include <ipc/ipc.h>
47
 
49
 
48
 
50
 
49
#define VECTORS_64_BUNDLE   20
51
#define VECTORS_64_BUNDLE   20
50
#define VECTORS_16_BUNDLE   48
52
#define VECTORS_16_BUNDLE   48
51
#define VECTORS_16_BUNDLE_START 0x5000
53
#define VECTORS_16_BUNDLE_START 0x5000
52
#define VECTOR_MAX      0x7f00
54
#define VECTOR_MAX      0x7f00
53
 
55
 
54
#define BUNDLE_SIZE     16
56
#define BUNDLE_SIZE     16
55
 
57
 
-
 
58
 
56
char *vector_names_64_bundle[VECTORS_64_BUNDLE] = {
59
char *vector_names_64_bundle[VECTORS_64_BUNDLE] = {
57
    "VHPT Translation vector",
60
    "VHPT Translation vector",
58
    "Instruction TLB vector",
61
    "Instruction TLB vector",
59
    "Data TLB vector",
62
    "Data TLB vector",
60
    "Alternate Instruction TLB vector",
63
    "Alternate Instruction TLB vector",
Line 132... Line 135...
132
    iip = get_symtab_entry(istate->cr_iip);
135
    iip = get_symtab_entry(istate->cr_iip);
133
 
136
 
134
    putchar('\n');
137
    putchar('\n');
135
    printf("Interrupted context dump:\n");
138
    printf("Interrupted context dump:\n");
136
    printf("ar.bsp=%p\tar.bspstore=%p\n", istate->ar_bsp, istate->ar_bspstore);
139
    printf("ar.bsp=%p\tar.bspstore=%p\n", istate->ar_bsp, istate->ar_bspstore);
137
    printf("ar.rnat=%#llx\tar.rsc=%$llx\n", istate->ar_rnat, istate->ar_rsc);
140
    printf("ar.rnat=%#018llx\tar.rsc=%#018llx\n", istate->ar_rnat, istate->ar_rsc);
138
    printf("ar.ifs=%#llx\tar.pfs=%#llx\n", istate->ar_ifs, istate->ar_pfs);
141
    printf("ar.ifs=%#018llx\tar.pfs=%#018llx\n", istate->ar_ifs, istate->ar_pfs);
139
    printf("cr.isr=%#llx\tcr.ipsr=%#llx\t\n", istate->cr_isr.value, istate->cr_ipsr);
142
    printf("cr.isr=%#018llx\tcr.ipsr=%#018llx\t\n", istate->cr_isr.value, istate->cr_ipsr);
140
   
143
   
141
    printf("cr.iip=%#llx, #%d\t(%s)\n", istate->cr_iip, istate->cr_isr.ei, iip ? iip : "?");
144
    printf("cr.iip=%#018llx, #%d\t(%s)\n", istate->cr_iip, istate->cr_isr.ei, iip);
142
    printf("cr.iipa=%#llx\t(%s)\n", istate->cr_iipa, iipa ? iipa : "?");
145
    printf("cr.iipa=%#018llx\t(%s)\n", istate->cr_iipa, iipa);
143
    printf("cr.ifa=%#llx\t(%s)\n", istate->cr_ifa, ifa ? ifa : "?");
146
    printf("cr.ifa=%#018llx\t(%s)\n", istate->cr_ifa, ifa);
144
}
147
}
145
 
148
 
146
void general_exception(__u64 vector, istate_t *istate)
149
void general_exception(__u64 vector, istate_t *istate)
147
{
150
{
148
    char *desc = "";
151
    char *desc = "";
Line 240... Line 243...
240
        panic("\nUnhandled External Interrupt Vector %d\n", ivr.vector);
243
        panic("\nUnhandled External Interrupt Vector %d\n", ivr.vector);
241
        break;
244
        break;
242
    }
245
    }
243
}
246
}
244
 
247
 
-
 
248
void virtual_interrupt(__u64 irq,void *param)
-
 
249
{
-
 
250
    switch(irq) {
-
 
251
        case IRQ_KBD:
-
 
252
            if(kbd_uspace) ipc_irq_send_notif(irq);
-
 
253
            break;
-
 
254
        default:
-
 
255
            panic("\nUnhandled Virtual Interrupt request %d\n", irq);
-
 
256
        break;
-
 
257
    }
-
 
258
}
-
 
259
 
245
/* Reregister irq to be IPC-ready */
260
/* Reregister irq to be IPC-ready */
246
void irq_ipc_bind_arch(__native irq)
261
void irq_ipc_bind_arch(__native irq)
247
{
262
{
-
 
263
    if(irq==IRQ_KBD) {
-
 
264
        kbd_uspace=1;
-
 
265
        return;
-
 
266
    }
248
    panic("not implemented\n");
267
    panic("not implemented\n");
249
    /* TODO */
268
    /* TODO */
250
}
269
}
-
 
270
 
-
 
271
 
-
 
272