faults.cc (4183:3d19c1d46946) faults.cc (4661:44458219add1)
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;

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

49FaultName AlignmentFault::_name = "Alignment";
50FaultVect AlignmentFault::_vect = 0x0301;
51FaultStat AlignmentFault::_count;
52
53FaultName ResetFault::_name = "reset";
54FaultVect ResetFault::_vect = 0x0001;
55FaultStat ResetFault::_count;
56
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;

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

49FaultName AlignmentFault::_name = "Alignment";
50FaultVect AlignmentFault::_vect = 0x0301;
51FaultStat AlignmentFault::_count;
52
53FaultName ResetFault::_name = "reset";
54FaultVect ResetFault::_vect = 0x0001;
55FaultStat ResetFault::_count;
56
57FaultName CoprocessorUnusableFault::_name = "Coprocessor Unusable";
58FaultVect CoprocessorUnusableFault::_vect = 0xF001;
59FaultStat CoprocessorUnusableFault::_count;
60
61FaultName ReservedInstructionFault::_name = "Reserved Instruction";
62FaultVect ReservedInstructionFault::_vect = 0x0F01;
63FaultStat ReservedInstructionFault::_count;
64
65FaultName ThreadFault::_name = "thread";
66FaultVect ThreadFault::_vect = 0x00F1;
67FaultStat ThreadFault::_count;
68
69
57FaultName ArithmeticFault::_name = "arith";
58FaultVect ArithmeticFault::_vect = 0x0501;
59FaultStat ArithmeticFault::_count;
60
70FaultName ArithmeticFault::_name = "arith";
71FaultVect ArithmeticFault::_vect = 0x0501;
72FaultStat ArithmeticFault::_count;
73
74FaultName UnimplementedOpcodeFault::_name = "opdec";
75FaultVect UnimplementedOpcodeFault::_vect = 0x0481;
76FaultStat UnimplementedOpcodeFault::_count;
77
78#if !FULL_SYSTEM
79//FaultName PageTableFault::_name = "page_table_fault";
80//FaultVect PageTableFault::_vect = 0x0000;
81//FaultStat PageTableFault::_count;
82#endif
83
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

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

85FaultName ItbPageFault::_name = "itbmiss";
86FaultVect ItbPageFault::_vect = 0x0181;
87FaultStat ItbPageFault::_count;
88
89FaultName ItbAcvFault::_name = "iaccvio";
90FaultVect ItbAcvFault::_vect = 0x0081;
91FaultStat ItbAcvFault::_count;
92
84FaultName InterruptFault::_name = "interrupt";
85FaultVect InterruptFault::_vect = 0x0101;
86FaultStat InterruptFault::_count;
87
88FaultName NDtbMissFault::_name = "dtb_miss_single";
89FaultVect NDtbMissFault::_vect = 0x0201;
90FaultStat NDtbMissFault::_count;
91

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

108FaultName ItbPageFault::_name = "itbmiss";
109FaultVect ItbPageFault::_vect = 0x0181;
110FaultStat ItbPageFault::_count;
111
112FaultName ItbAcvFault::_name = "iaccvio";
113FaultVect ItbAcvFault::_vect = 0x0081;
114FaultStat ItbAcvFault::_count;
115
93FaultName UnimplementedOpcodeFault::_name = "opdec";
94FaultVect UnimplementedOpcodeFault::_vect = 0x0481;
95FaultStat UnimplementedOpcodeFault::_count;
96
97FaultName FloatEnableFault::_name = "fen";
98FaultVect FloatEnableFault::_vect = 0x0581;
99FaultStat FloatEnableFault::_count;
100
116FaultName FloatEnableFault::_name = "fen";
117FaultVect FloatEnableFault::_vect = 0x0581;
118FaultStat FloatEnableFault::_count;
119
101FaultName PalFault::_name = "pal";
102FaultVect PalFault::_vect = 0x2001;
103FaultStat PalFault::_count;
104
105FaultName IntegerOverflowFault::_name = "intover";
106FaultVect IntegerOverflowFault::_vect = 0x0501;
107FaultStat IntegerOverflowFault::_count;
108
120FaultName IntegerOverflowFault::_name = "intover";
121FaultVect IntegerOverflowFault::_vect = 0x0501;
122FaultStat IntegerOverflowFault::_count;
123
124FaultName DspStateDisabledFault::_name = "intover";
125FaultVect DspStateDisabledFault::_vect = 0x001a;
126FaultStat DspStateDisabledFault::_count;
127
128
129/*void PageTableFault::invoke(ThreadContext *tc)
130{
131 Process *p = tc->getProcessPtr();
132
133 Addr page_addr = p->pTable->pageAlign(vaddr);
134
135 warn("%i: [tid:%i]: %s encountered @ addr %x. Allocating new page for address range %x - %x.\n",
136 curTick, tc->getThreadNum(), name(), vaddr, page_addr, page_addr+VMPageSize);
137
138 p->pTable->allocate(page_addr, VMPageSize);
139
140 return;
141}
142*/
143 /* address is higher than the stack region or in the current stack region
144 if (vaddr > p->stack_base || vaddr > p->stack_min)
145 FaultBase::invoke(tc);
146
147 // We've accessed the next page
148 if (vaddr > p->stack_min - PageBytes) {
149 p->stack_min -= PageBytes;
150 if (p->stack_base - p->stack_min > 8*1024*1024) {
151 warn("Already allocated Over max stack size for one thread\n");
152 }
153 warn("%i: Allocating page for range %x - %x",
154 curTick, p->stack_min, p->stack_min-PageBytes);
155
156 p->pTable->allocate(p->stack_min, PageBytes);
157 warn("Increasing stack size by one page.");
158 } else {
159 FaultBase::invoke(tc);
160 }*/
161
162void ResetFault::invoke(ThreadContext *tc)
163{
164 warn("[tid:%i]: %s encountered.\n", tc->getThreadNum(), name());
165 //tc->getCpuPtr()->reset();
166}
167
168void CoprocessorUnusableFault::invoke(ThreadContext *tc)
169{
170 panic("[tid:%i]: %s encountered.\n", tc->getThreadNum(), name());
171}
172
173void ReservedInstructionFault::invoke(ThreadContext *tc)
174{
175 panic("[tid:%i]: %s encountered.\n", tc->getThreadNum(), name());
176}
177
178void ThreadFault::invoke(ThreadContext *tc)
179{
180 panic("[tid:%i]: %s encountered.\n", tc->getThreadNum(), name());
181}
182
183void DspStateDisabledFault::invoke(ThreadContext *tc)
184{
185 panic("[tid:%i]: %s encountered.\n", tc->getThreadNum(), name());
186}
187
109} // namespace MipsISA
110
188} // namespace MipsISA
189