tlb.cc (5360:02a3af203516) | tlb.cc (5374:4773d53f88a0) |
---|---|
1/* 2 * Copyright (c) 2007 The Hewlett-Packard Development Company 3 * All rights reserved. 4 * 5 * Redistribution and use of this software in source and binary forms, 6 * with or without modification, are permitted provided that the 7 * following conditions are met: 8 * --- 578 unchanged lines hidden (view full) --- 587 } 588 } else { 589 // Real mode 590 DPRINTF(TLB, "In real mode.\n"); 591 DPRINTF(TLB, "Translated %#x -> %#x.\n", vaddr, vaddr); 592 req->setPaddr(vaddr); 593 } 594 // Check for an access to the local APIC | 1/* 2 * Copyright (c) 2007 The Hewlett-Packard Development Company 3 * All rights reserved. 4 * 5 * Redistribution and use of this software in source and binary forms, 6 * with or without modification, are permitted provided that the 7 * following conditions are met: 8 * --- 578 unchanged lines hidden (view full) --- 587 } 588 } else { 589 // Real mode 590 DPRINTF(TLB, "In real mode.\n"); 591 DPRINTF(TLB, "Translated %#x -> %#x.\n", vaddr, vaddr); 592 req->setPaddr(vaddr); 593 } 594 // Check for an access to the local APIC |
595#if FULL_SYSTEM |
|
595 LocalApicBase localApicBase = tc->readMiscRegNoEffect(MISCREG_APIC_BASE); 596 Addr baseAddr = localApicBase.base << 12; 597 Addr paddr = req->getPaddr(); 598 if (baseAddr <= paddr && baseAddr + (1 << 12) > paddr) { 599 req->setMmapedIpr(true); 600 // Check alignment 601 if (paddr & ((32/8) - 1)) 602 return new GeneralProtection(0); --- 125 unchanged lines hidden (view full) --- 728 break; 729 default: 730 // A reserved register field. 731 return new GeneralProtection(0); 732 break; 733 } 734 req->setPaddr(regNum * sizeof(MiscReg)); 735 } | 596 LocalApicBase localApicBase = tc->readMiscRegNoEffect(MISCREG_APIC_BASE); 597 Addr baseAddr = localApicBase.base << 12; 598 Addr paddr = req->getPaddr(); 599 if (baseAddr <= paddr && baseAddr + (1 << 12) > paddr) { 600 req->setMmapedIpr(true); 601 // Check alignment 602 if (paddr & ((32/8) - 1)) 603 return new GeneralProtection(0); --- 125 unchanged lines hidden (view full) --- 729 break; 730 default: 731 // A reserved register field. 732 return new GeneralProtection(0); 733 break; 734 } 735 req->setPaddr(regNum * sizeof(MiscReg)); 736 } |
737#endif |
|
736 return NoFault; 737}; 738 739Fault 740DTB::translate(RequestPtr &req, ThreadContext *tc, bool write) 741{ 742 return TLB::translate<FakeDTLBFault>(req, tc, write, false); 743} --- 58 unchanged lines hidden --- | 738 return NoFault; 739}; 740 741Fault 742DTB::translate(RequestPtr &req, ThreadContext *tc, bool write) 743{ 744 return TLB::translate<FakeDTLBFault>(req, tc, write, false); 745} --- 58 unchanged lines hidden --- |