Subversion Repositories HelenOS-historic

Rev

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

Rev 583 Rev 921
Line 38... Line 38...
38
#include <arch/register.h>
38
#include <arch/register.h>
39
#include <arch/drivers/it.h>
39
#include <arch/drivers/it.h>
40
#include <arch.h>
40
#include <arch.h>
41
#include <symtab.h>
41
#include <symtab.h>
42
#include <debug.h>
42
#include <debug.h>
-
 
43
#include <syscall/syscall.h>
-
 
44
#include <print.h>
43
 
45
 
44
#define VECTORS_64_BUNDLE   20
46
#define VECTORS_64_BUNDLE   20
45
#define VECTORS_16_BUNDLE   48
47
#define VECTORS_16_BUNDLE   48
46
#define VECTORS_16_BUNDLE_START 0x5000
48
#define VECTORS_16_BUNDLE_START 0x5000
47
#define VECTOR_MAX      0x7f00
49
#define VECTOR_MAX      0x7f00
Line 129... Line 131...
129
    putchar('\n');
131
    putchar('\n');
130
    printf("Interrupted context dump:\n");
132
    printf("Interrupted context dump:\n");
131
    printf("ar.bsp=%P\tar.bspstore=%P\n", pstate->ar_bsp, pstate->ar_bspstore);
133
    printf("ar.bsp=%P\tar.bspstore=%P\n", pstate->ar_bsp, pstate->ar_bspstore);
132
    printf("ar.rnat=%Q\tar.rsc=%Q\n", pstate->ar_rnat, pstate->ar_rsc);
134
    printf("ar.rnat=%Q\tar.rsc=%Q\n", pstate->ar_rnat, pstate->ar_rsc);
133
    printf("ar.ifs=%Q\tar.pfs=%Q\n", pstate->ar_ifs, pstate->ar_pfs);
135
    printf("ar.ifs=%Q\tar.pfs=%Q\n", pstate->ar_ifs, pstate->ar_pfs);
134
    printf("cr.isr=%Q\tcr.ips=%Q\t\n", pstate->cr_isr.value, pstate->cr_ips);
136
    printf("cr.isr=%Q\tcr.ipsr=%Q\t\n", pstate->cr_isr.value, pstate->cr_ipsr);
135
   
137
   
136
    printf("cr.iip=%Q, #%d\t(%s)\n", pstate->cr_iip, pstate->cr_isr.ei ,iip ? iip : "?");
138
    printf("cr.iip=%Q, #%d\t(%s)\n", pstate->cr_iip, pstate->cr_isr.ei ,iip ? iip : "?");
137
    printf("cr.iipa=%Q\t(%s)\n", pstate->cr_iipa, iipa ? iipa : "?");
139
    printf("cr.iipa=%Q\t(%s)\n", pstate->cr_iipa, iipa ? iipa : "?");
138
    printf("cr.ifa=%Q\t(%s)\n", pstate->cr_ifa, ifa ? ifa : "?");
140
    printf("cr.ifa=%Q\t(%s)\n", pstate->cr_ifa, ifa ? ifa : "?");
139
}
141
}
Line 169... Line 171...
169
    }
171
    }
170
 
172
 
171
    panic("General Exception (%s)\n", desc);
173
    panic("General Exception (%s)\n", desc);
172
}
174
}
173
 
175
 
-
 
176
/** Handle syscall. */
174
void break_instruction(__u64 vector, struct exception_regdump *pstate)
177
int break_instruction(__u64 vector, struct exception_regdump *pstate)
175
{
178
{
-
 
179
    /*
-
 
180
     * Move to next instruction after BREAK.
-
 
181
     */
-
 
182
    if (pstate->cr_ipsr.ri == 2) {
-
 
183
        pstate->cr_ipsr.ri = 0;
-
 
184
        pstate->cr_iip += 16;
-
 
185
    } else {
176
    dump_interrupted_context(pstate);
186
        pstate->cr_ipsr.ri++;
-
 
187
    }
-
 
188
 
-
 
189
    if (pstate->in0 < SYSCALL_END)
-
 
190
        return syscall_table[pstate->in0](pstate->in1, pstate->in2, pstate->in3);
-
 
191
    else
177
    panic("Break Instruction\n");
192
        panic("Undefined syscall %d", pstate->in0);
-
 
193
       
-
 
194
    return -1;
178
}
195
}
179
 
196
 
180
void universal_handler(__u64 vector, struct exception_regdump *pstate)
197
void universal_handler(__u64 vector, struct exception_regdump *pstate)
181
{
198
{
182
    dump_interrupted_context(pstate);
199
    dump_interrupted_context(pstate);