faults.cc (2808:a88ea76f6738) faults.cc (3363:8ed27e349b3d)
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;

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

189 Process *p = tc->getProcessPtr();
190
191 // address is higher than the stack region or in the current stack region
192 if (vaddr > p->stack_base || vaddr > p->stack_min)
193 FaultBase::invoke(tc);
194
195 // We've accessed the next page
196 if (vaddr > p->stack_min - PageBytes) {
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;

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

189 Process *p = tc->getProcessPtr();
190
191 // address is higher than the stack region or in the current stack region
192 if (vaddr > p->stack_base || vaddr > p->stack_min)
193 FaultBase::invoke(tc);
194
195 // We've accessed the next page
196 if (vaddr > p->stack_min - PageBytes) {
197 warn("Increasing stack %#x:%#x to %#x:%#x because of access to %#x",
197 DPRINTF(Stack,
198 "Increasing stack %#x:%#x to %#x:%#x because of access to %#x",
198 p->stack_min, p->stack_base, p->stack_min - PageBytes,
199 p->stack_base, vaddr);
200 p->stack_min -= PageBytes;
201 if (p->stack_base - p->stack_min > 8*1024*1024)
202 fatal("Over max stack size for one thread\n");
203 p->pTable->allocate(p->stack_min, PageBytes);
204 } else {
199 p->stack_min, p->stack_base, p->stack_min - PageBytes,
200 p->stack_base, vaddr);
201 p->stack_min -= PageBytes;
202 if (p->stack_base - p->stack_min > 8*1024*1024)
203 fatal("Over max stack size for one thread\n");
204 p->pTable->allocate(p->stack_min, PageBytes);
205 } else {
206 warn("Page fault on address %#x\n", vaddr);
205 FaultBase::invoke(tc);
206 }
207}
208
209#endif
210
211} // namespace AlphaISA
212
207 FaultBase::invoke(tc);
208 }
209}
210
211#endif
212
213} // namespace AlphaISA
214