faults.cc (7460:41550bb10e08) faults.cc (7678:f19b6a3a8cec)
1/*
2 * Copyright (c) 2003-2005 The Regents of The University of Michigan
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are
7 * met: redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer;

--- 24 unchanged lines hidden (view full) ---

33#include "base/misc.hh"
34#include "cpu/thread_context.hh"
35#include "cpu/base.hh"
36#include "sim/faults.hh"
37#include "sim/process.hh"
38#include "mem/page_table.hh"
39
40#if !FULL_SYSTEM
1/*
2 * Copyright (c) 2003-2005 The Regents of The University of Michigan
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are
7 * met: redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer;

--- 24 unchanged lines hidden (view full) ---

33#include "base/misc.hh"
34#include "cpu/thread_context.hh"
35#include "cpu/base.hh"
36#include "sim/faults.hh"
37#include "sim/process.hh"
38#include "mem/page_table.hh"
39
40#if !FULL_SYSTEM
41void FaultBase::invoke(ThreadContext * tc)
41void FaultBase::invoke(ThreadContext * tc, StaticInstPtr inst)
42{
43 panic("fault (%s) detected @ PC %p", name(), tc->readPC());
44}
45#else
42{
43 panic("fault (%s) detected @ PC %p", name(), tc->readPC());
44}
45#else
46void FaultBase::invoke(ThreadContext * tc)
46void FaultBase::invoke(ThreadContext * tc, StaticInstPtr inst)
47{
48 DPRINTF(Fault, "Fault %s at PC: %#x\n", name(), tc->readPC());
49
50 assert(!tc->misspeculating());
51}
52#endif
53
47{
48 DPRINTF(Fault, "Fault %s at PC: %#x\n", name(), tc->readPC());
49
50 assert(!tc->misspeculating());
51}
52#endif
53
54void UnimpFault::invoke(ThreadContext * tc)
54void UnimpFault::invoke(ThreadContext * tc, StaticInstPtr inst)
55{
56 panic("Unimpfault: %s\n", panicStr.c_str());
57}
58
59#if !FULL_SYSTEM
55{
56 panic("Unimpfault: %s\n", panicStr.c_str());
57}
58
59#if !FULL_SYSTEM
60void GenericPageTableFault::invoke(ThreadContext *tc)
60void GenericPageTableFault::invoke(ThreadContext *tc, StaticInstPtr inst)
61{
62 Process *p = tc->getProcessPtr();
63
64 if (!p->checkAndAllocNextPage(vaddr))
65 panic("Page table fault when accessing virtual address %#x\n", vaddr);
66
67}
68
61{
62 Process *p = tc->getProcessPtr();
63
64 if (!p->checkAndAllocNextPage(vaddr))
65 panic("Page table fault when accessing virtual address %#x\n", vaddr);
66
67}
68
69void GenericAlignmentFault::invoke(ThreadContext *tc)
69void GenericAlignmentFault::invoke(ThreadContext *tc, StaticInstPtr inst)
70{
71 panic("Alignment fault when accessing virtual address %#x\n", vaddr);
72}
73#endif
70{
71 panic("Alignment fault when accessing virtual address %#x\n", vaddr);
72}
73#endif