Subversion Repositories HelenOS

Rev

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

Rev 1411 Rev 1595
Line 37... Line 37...
37
#include <symtab.h>
37
#include <symtab.h>
38
#include <synch/spinlock.h>
38
#include <synch/spinlock.h>
39
#include <print.h>
39
#include <print.h>
40
#include <debug.h>
40
#include <debug.h>
41
#include <align.h>
41
#include <align.h>
-
 
42
#include <interrupt.h>
42
 
43
 
43
static void tlb_refill_fail(istate_t *istate);
44
static void tlb_refill_fail(istate_t *istate);
44
static void tlb_invalid_fail(istate_t *istate);
45
static void tlb_invalid_fail(istate_t *istate);
45
static void tlb_modified_fail(istate_t *istate);
46
static void tlb_modified_fail(istate_t *istate);
46
 
47
 
Line 334... Line 335...
334
    if (s)
335
    if (s)
335
        symbol = s;
336
        symbol = s;
336
    s = get_symtab_entry(istate->ra);
337
    s = get_symtab_entry(istate->ra);
337
    if (s)
338
    if (s)
338
        sym2 = s;
339
        sym2 = s;
-
 
340
 
-
 
341
    fault_if_from_uspace(istate, "TLB Refill Exception on %P", cp0_badvaddr_read());
339
    panic("%X: TLB Refill Exception at %X(%s<-%s)\n", cp0_badvaddr_read(), istate->epc, symbol, sym2);
342
    panic("%X: TLB Refill Exception at %X(%s<-%s)\n", cp0_badvaddr_read(), istate->epc, symbol, sym2);
340
}
343
}
341
 
344
 
342
 
345
 
343
void tlb_invalid_fail(istate_t *istate)
346
void tlb_invalid_fail(istate_t *istate)
Line 345... Line 348...
345
    char *symbol = "";
348
    char *symbol = "";
346
 
349
 
347
    char *s = get_symtab_entry(istate->epc);
350
    char *s = get_symtab_entry(istate->epc);
348
    if (s)
351
    if (s)
349
        symbol = s;
352
        symbol = s;
-
 
353
    fault_if_from_uspace(istate, "TLB Invalid Exception on %P", cp0_badvaddr_read());
350
    panic("%X: TLB Invalid Exception at %X(%s)\n", cp0_badvaddr_read(), istate->epc, symbol);
354
    panic("%X: TLB Invalid Exception at %X(%s)\n", cp0_badvaddr_read(), istate->epc, symbol);
351
}
355
}
352
 
356
 
353
void tlb_modified_fail(istate_t *istate)
357
void tlb_modified_fail(istate_t *istate)
354
{
358
{
355
    char *symbol = "";
359
    char *symbol = "";
356
 
360
 
357
    char *s = get_symtab_entry(istate->epc);
361
    char *s = get_symtab_entry(istate->epc);
358
    if (s)
362
    if (s)
359
        symbol = s;
363
        symbol = s;
-
 
364
    fault_if_from_uspace(istate, "TLB Modified Exception on %P", cp0_badvaddr_read());
360
    panic("%X: TLB Modified Exception at %X(%s)\n", cp0_badvaddr_read(), istate->epc, symbol);
365
    panic("%X: TLB Modified Exception at %X(%s)\n", cp0_badvaddr_read(), istate->epc, symbol);
361
}
366
}
362
 
367
 
363
/** Try to find PTE for faulting address
368
/** Try to find PTE for faulting address
364
 *
369
 *