Deleted Added
sdiff udiff text old ( 12749:223c83ed9979 ) new ( 13449:2f7efa89c58b )
full compact
1/*
2 * Copyright (c) 2011-2015 Advanced Micro Devices, Inc.
3 * All rights reserved.
4 *
5 * For use for simulation and test purposes only
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions are met:

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

40
41#include "arch/x86/faults.hh"
42#include "arch/x86/insts/microldstop.hh"
43#include "arch/x86/pagetable.hh"
44#include "arch/x86/pagetable_walker.hh"
45#include "arch/x86/regs/misc.hh"
46#include "arch/x86/x86_traits.hh"
47#include "base/bitfield.hh"
48#include "base/output.hh"
49#include "base/trace.hh"
50#include "cpu/base.hh"
51#include "cpu/thread_context.hh"
52#include "debug/GPUPrefetch.hh"
53#include "debug/GPUTLB.hh"
54#include "mem/packet_access.hh"
55#include "mem/page_table.hh"

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

1145 // Do paging protection checks.
1146 bool inUser = (m5Reg.cpl == 3 && !(flags & (CPL0FlagBit << FlagShift)));
1147 CR0 cr0 = tc->readMiscRegNoEffect(MISCREG_CR0);
1148
1149 bool badWrite = (!tlb_entry->writable && (inUser || cr0.wp));
1150
1151 if ((inUser && !tlb_entry->user) ||
1152 (mode == BaseTLB::Write && badWrite)) {
1153 // The page must have been present to get into the TLB in
1154 // the first place. We'll assume the reserved bits are
1155 // fine even though we're not checking them.
1156 assert(false);
1157 }
1158
1159 if (storeCheck && badWrite) {
1160 // This would fault if this were a write, so return a page
1161 // fault that reflects that happening.
1162 assert(false);
1163 }
1164 }
1165
1166 /**
1167 * handleTranslationReturn is called on a TLB hit,
1168 * when a TLB miss returns or when a page fault returns.
1169 * The latter calls handelHit with TLB miss as tlbOutcome.
1170 */

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

1357
1358 handleTranslationReturn(virtPageAddr, TLB_MISS, pkt);
1359 } else if (outcome == MISS_RETURN) {
1360 /** we add an extra cycle in the return path of the translation
1361 * requests in between the various TLB levels.
1362 */
1363 handleTranslationReturn(virtPageAddr, TLB_MISS, pkt);
1364 } else {
1365 assert(false);
1366 }
1367 }
1368
1369 void
1370 GpuTLB::TLBEvent::process()
1371 {
1372 tlb->translationReturn(virtPageAddr, outcome, pkt);
1373 }

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

1602 tlb->handleFuncTranslationReturn(pkt, tlb_outcome);
1603 }
1604
1605 void
1606 GpuTLB::CpuSidePort::recvReqRetry()
1607 {
1608 // The CPUSidePort never sends anything but replies. No retries
1609 // expected.
1610 assert(false);
1611 }
1612
1613 AddrRangeList
1614 GpuTLB::CpuSidePort::getAddrRanges() const
1615 {
1616 // currently not checked by the master
1617 AddrRangeList ranges;
1618

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

1643 return true;
1644 }
1645
1646 void
1647 GpuTLB::MemSidePort::recvReqRetry()
1648 {
1649 // No retries should reach the TLB. The retries
1650 // should only reach the TLBCoalescer.
1651 assert(false);
1652 }
1653
1654 void
1655 GpuTLB::cleanup()
1656 {
1657 while (!cleanupQueue.empty()) {
1658 Addr cleanup_addr = cleanupQueue.front();
1659 cleanupQueue.pop();

--- 153 unchanged lines hidden ---