tlb.cc (6379:75d4aaf7dd54) tlb.cc (6383:31c067ae3331)
1/*
2 * Copyright (c) 2001-2005 The Regents of The University of Michigan
3 * Copyright (c) 2007 MIPS Technologies, Inc.
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions are
8 * met: redistributions of source code must retain the above copyright

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

306 if (fault != NoFault)
307 return fault;
308
309 return NoFault;
310#else
311 if (IsKSeg0(req->getVaddr())) {
312 // Address will not be translated through TLB, set response, and go!
313 req->setPaddr(KSeg02Phys(req->getVaddr()));
1/*
2 * Copyright (c) 2001-2005 The Regents of The University of Michigan
3 * Copyright (c) 2007 MIPS Technologies, Inc.
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions are
8 * met: redistributions of source code must retain the above copyright

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

306 if (fault != NoFault)
307 return fault;
308
309 return NoFault;
310#else
311 if (IsKSeg0(req->getVaddr())) {
312 // Address will not be translated through TLB, set response, and go!
313 req->setPaddr(KSeg02Phys(req->getVaddr()));
314 if (getOperatingMode(tc->readMiscReg(Status)) != mode_kernel ||
314 if (getOperatingMode(tc->readMiscReg(MISCREG_STATUS)) != mode_kernel ||
315 req->isMisaligned()) {
316 AddressErrorFault *Flt = new AddressErrorFault();
317 /* BadVAddr must be set */
318 Flt->badVAddr = req->getVaddr();
319 return Flt;
320 }
321 } else if(IsKSeg1(req->getVaddr())) {
322 // Address will not be translated through TLB, set response, and go!

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

381 }
382 PAddr >>= (pte->AddrShiftAmount - 12);
383 PAddr <<= pte->AddrShiftAmount;
384 PAddr |= ((req->getVaddr()) & pte->OffsetMask);
385 req->setPaddr(PAddr);
386 }
387 } else {
388 // Didn't find any match, return a TLB Refill Exception
315 req->isMisaligned()) {
316 AddressErrorFault *Flt = new AddressErrorFault();
317 /* BadVAddr must be set */
318 Flt->badVAddr = req->getVaddr();
319 return Flt;
320 }
321 } else if(IsKSeg1(req->getVaddr())) {
322 // Address will not be translated through TLB, set response, and go!

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

381 }
382 PAddr >>= (pte->AddrShiftAmount - 12);
383 PAddr <<= pte->AddrShiftAmount;
384 PAddr |= ((req->getVaddr()) & pte->OffsetMask);
385 req->setPaddr(PAddr);
386 }
387 } else {
388 // Didn't find any match, return a TLB Refill Exception
389 ItbRefillFault *Flt=new ItbRefillFault();
389 ItbRefillFault *Flt = new ItbRefillFault();
390 /* EntryHi VPN, ASID fields must be set */
391 Flt->entryHiAsid = Asid;
392 Flt->entryHiVPN2 = (VPN >> 2);
393 Flt->entryHiVPN2X = (VPN & 0x3);
394
395 /* BadVAddr must be set */
396 Flt->badVAddr = req->getVaddr();
397

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

426 if (fault != NoFault)
427 return fault;
428
429 return NoFault;
430#else
431 if (IsKSeg0(req->getVaddr())) {
432 // Address will not be translated through TLB, set response, and go!
433 req->setPaddr(KSeg02Phys(req->getVaddr()));
390 /* EntryHi VPN, ASID fields must be set */
391 Flt->entryHiAsid = Asid;
392 Flt->entryHiVPN2 = (VPN >> 2);
393 Flt->entryHiVPN2X = (VPN & 0x3);
394
395 /* BadVAddr must be set */
396 Flt->badVAddr = req->getVaddr();
397

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

426 if (fault != NoFault)
427 return fault;
428
429 return NoFault;
430#else
431 if (IsKSeg0(req->getVaddr())) {
432 // Address will not be translated through TLB, set response, and go!
433 req->setPaddr(KSeg02Phys(req->getVaddr()));
434 if (getOperatingMode(tc->readMiscReg(Status)) != mode_kernel ||
434 if (getOperatingMode(tc->readMiscReg(MISCREG_STATUS)) != mode_kernel ||
435 req->isMisaligned()) {
436 StoreAddressErrorFault *Flt = new StoreAddressErrorFault();
437 /* BadVAddr must be set */
438 Flt->badVAddr = req->getVaddr();
439
440 return Flt;
441 }
442 } else if(IsKSeg1(req->getVaddr())) {

--- 135 unchanged lines hidden ---
435 req->isMisaligned()) {
436 StoreAddressErrorFault *Flt = new StoreAddressErrorFault();
437 /* BadVAddr must be set */
438 Flt->badVAddr = req->getVaddr();
439
440 return Flt;
441 }
442 } else if(IsKSeg1(req->getVaddr())) {

--- 135 unchanged lines hidden ---