faults.cc (2935:d1223a6c9156) | faults.cc (4183:3d19c1d46946) |
---|---|
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; --- 44 unchanged lines hidden (view full) --- 53FaultName ResetFault::_name = "reset"; 54FaultVect ResetFault::_vect = 0x0001; 55FaultStat ResetFault::_count; 56 57FaultName ArithmeticFault::_name = "arith"; 58FaultVect ArithmeticFault::_vect = 0x0501; 59FaultStat ArithmeticFault::_count; 60 | 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; --- 44 unchanged lines hidden (view full) --- 53FaultName ResetFault::_name = "reset"; 54FaultVect ResetFault::_vect = 0x0001; 55FaultStat ResetFault::_count; 56 57FaultName ArithmeticFault::_name = "arith"; 58FaultVect ArithmeticFault::_vect = 0x0501; 59FaultStat ArithmeticFault::_count; 60 |
61#if !FULL_SYSTEM 62FaultName PageTableFault::_name = "page_table_fault"; 63FaultVect PageTableFault::_vect = 0x0000; 64FaultStat PageTableFault::_count; 65#endif 66 | |
67FaultName InterruptFault::_name = "interrupt"; 68FaultVect InterruptFault::_vect = 0x0101; 69FaultStat InterruptFault::_count; 70 71FaultName NDtbMissFault::_name = "dtb_miss_single"; 72FaultVect NDtbMissFault::_vect = 0x0201; 73FaultStat NDtbMissFault::_count; 74 --- 32 unchanged lines hidden (view full) --- 107FaultName PalFault::_name = "pal"; 108FaultVect PalFault::_vect = 0x2001; 109FaultStat PalFault::_count; 110 111FaultName IntegerOverflowFault::_name = "intover"; 112FaultVect IntegerOverflowFault::_vect = 0x0501; 113FaultStat IntegerOverflowFault::_count; 114 | 61FaultName InterruptFault::_name = "interrupt"; 62FaultVect InterruptFault::_vect = 0x0101; 63FaultStat InterruptFault::_count; 64 65FaultName NDtbMissFault::_name = "dtb_miss_single"; 66FaultVect NDtbMissFault::_vect = 0x0201; 67FaultStat NDtbMissFault::_count; 68 --- 32 unchanged lines hidden (view full) --- 101FaultName PalFault::_name = "pal"; 102FaultVect PalFault::_vect = 0x2001; 103FaultStat PalFault::_count; 104 105FaultName IntegerOverflowFault::_name = "intover"; 106FaultVect IntegerOverflowFault::_vect = 0x0501; 107FaultStat IntegerOverflowFault::_count; 108 |
115void PageTableFault::invoke(ThreadContext *tc) 116{ 117 Process *p = tc->getProcessPtr(); 118 119 // address is higher than the stack region or in the current stack region 120 if (vaddr > p->stack_base || vaddr > p->stack_min) 121 FaultBase::invoke(tc); 122 123 // We've accessed the next page 124 if (vaddr > p->stack_min - PageBytes) { 125 p->stack_min -= PageBytes; 126 if (p->stack_base - p->stack_min > 8*1024*1024) 127 fatal("Over max stack size for one thread\n"); 128 p->pTable->allocate(p->stack_min, PageBytes); 129 warn("Increasing stack size by one page."); 130 } else { 131 FaultBase::invoke(tc); 132 } 133} 134 | |
135} // namespace MipsISA 136 | 109} // namespace MipsISA 110 |