faults.cc (12455:c88f0b37f433) faults.cc (12461:a4cb506cda74)
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;

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

191ItbPageFault::invoke(ThreadContext *tc, const StaticInstPtr &inst)
192{
193 if (FullSystem) {
194 ItbFault::invoke(tc);
195 return;
196 }
197
198 Process *p = tc->getProcessPtr();
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;

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

191ItbPageFault::invoke(ThreadContext *tc, const StaticInstPtr &inst)
192{
193 if (FullSystem) {
194 ItbFault::invoke(tc);
195 return;
196 }
197
198 Process *p = tc->getProcessPtr();
199 TlbEntry *entry = p->pTable->lookup(pc);
200 panic_if(!entry, "Tried to execute unmapped address %#x.\n", pc);
199 const EmulationPageTable::Entry *pte = p->pTable->lookup(pc);
200 panic_if(!pte, "Tried to execute unmapped address %#x.\n", pc);
201
202 VAddr vaddr(pc);
201
202 VAddr vaddr(pc);
203 dynamic_cast<TLB *>(tc->getITBPtr())->insert(vaddr.page(), *entry);
203 TlbEntry entry(p->pTable->pid(), vaddr.page(), pte->paddr,
204 pte->flags & EmulationPageTable::Uncacheable,
205 pte->flags & EmulationPageTable::ReadOnly);
206 dynamic_cast<TLB *>(tc->getITBPtr())->insert(vaddr.page(), entry);
204}
205
206void
207NDtbMissFault::invoke(ThreadContext *tc, const StaticInstPtr &inst)
208{
209 if (FullSystem) {
210 DtbFault::invoke(tc, inst);
211 return;
212 }
213
214 Process *p = tc->getProcessPtr();
207}
208
209void
210NDtbMissFault::invoke(ThreadContext *tc, const StaticInstPtr &inst)
211{
212 if (FullSystem) {
213 DtbFault::invoke(tc, inst);
214 return;
215 }
216
217 Process *p = tc->getProcessPtr();
215 TlbEntry *entry = p->pTable->lookup(vaddr);
216 if (!entry && p->fixupStackFault(vaddr))
217 entry = p->pTable->lookup(vaddr);
218 panic_if(!entry, "Tried to access unmapped address %#x.\n", (Addr)vaddr);
219 dynamic_cast<TLB *>(tc->getDTBPtr())->insert(vaddr.page(), *entry);
218 const EmulationPageTable::Entry *pte = p->pTable->lookup(vaddr);
219 if (!pte && p->fixupStackFault(vaddr))
220 pte = p->pTable->lookup(vaddr);
221 panic_if(!pte, "Tried to access unmapped address %#x.\n", (Addr)vaddr);
222 TlbEntry entry(p->pTable->pid(), vaddr.page(), pte->paddr,
223 pte->flags & EmulationPageTable::Uncacheable,
224 pte->flags & EmulationPageTable::ReadOnly);
225 dynamic_cast<TLB *>(tc->getDTBPtr())->insert(vaddr.page(), entry);
220}
221
222} // namespace AlphaISA
223
226}
227
228} // namespace AlphaISA
229