tlb.cc (5837:831413564d0c) | tlb.cc (5881:73c0aaaaf186) |
---|---|
1/* 2 * Copyright (c) 2007-2008 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 * --- 126 unchanged lines hidden (view full) --- 135 if (entry == entryList.end()) 136 return NULL; 137 else 138 return *entry; 139} 140 141#if FULL_SYSTEM 142void | 1/* 2 * Copyright (c) 2007-2008 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 * --- 126 unchanged lines hidden (view full) --- 135 if (entry == entryList.end()) 136 return NULL; 137 else 138 return *entry; 139} 140 141#if FULL_SYSTEM 142void |
143TLB::walk(ThreadContext * _tc, Addr vaddr) | 143TLB::walk(ThreadContext * _tc, Addr vaddr, bool write, bool execute) |
144{ | 144{ |
145 walker->start(_tc, vaddr); | 145 walker->start(_tc, vaddr, write, execute); |
146} 147#endif 148 149void 150TLB::invalidateAll() 151{ 152 DPRINTF(TLB, "Invalidating all entries.\n"); 153 while (!entryList.empty()) { --- 457 unchanged lines hidden (view full) --- 611 } 612 } 613 // If paging is enabled, do the translation. 614 if (cr0.pg) { 615 DPRINTF(TLB, "Paging enabled.\n"); 616 // The vaddr already has the segment base applied. 617 TlbEntry *entry = lookup(vaddr); 618 if (!entry) { | 146} 147#endif 148 149void 150TLB::invalidateAll() 151{ 152 DPRINTF(TLB, "Invalidating all entries.\n"); 153 while (!entryList.empty()) { --- 457 unchanged lines hidden (view full) --- 611 } 612 } 613 // If paging is enabled, do the translation. 614 if (cr0.pg) { 615 DPRINTF(TLB, "Paging enabled.\n"); 616 // The vaddr already has the segment base applied. 617 TlbEntry *entry = lookup(vaddr); 618 if (!entry) { |
619 return new TlbFault(vaddr); | 619 return new TlbFault(vaddr, write, execute); |
620 } else { 621 // Do paging protection checks. 622 DPRINTF(TLB, "Entry found with paddr %#x, doing protection checks.\n", entry->paddr); 623 Addr paddr = entry->paddr | (vaddr & (entry->size-1)); 624 DPRINTF(TLB, "Translated %#x -> %#x.\n", vaddr, paddr); 625 req->setPaddr(paddr); 626 } 627 } else { --- 99 unchanged lines hidden --- | 620 } else { 621 // Do paging protection checks. 622 DPRINTF(TLB, "Entry found with paddr %#x, doing protection checks.\n", entry->paddr); 623 Addr paddr = entry->paddr | (vaddr & (entry->size-1)); 624 DPRINTF(TLB, "Translated %#x -> %#x.\n", vaddr, paddr); 625 req->setPaddr(paddr); 626 } 627 } else { --- 99 unchanged lines hidden --- |