Deleted Added
sdiff udiff text old ( 5140:2fd7f8477b4c ) new ( 5149:356e00996637 )
full compact
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 *

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

56 */
57
58#include <cstring>
59
60#include "config/full_system.hh"
61
62#include "arch/x86/pagetable.hh"
63#include "arch/x86/tlb.hh"
64#include "base/bitfield.hh"
65#include "base/trace.hh"
66#include "cpu/thread_context.hh"
67#include "cpu/base.hh"
68#include "mem/packet_access.hh"
69#include "mem/request.hh"
70#include "sim/system.hh"
71

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

137Fault
138TLB::translate(RequestPtr &req, ThreadContext *tc, bool write, bool execute)
139{
140 Addr vaddr = req->getVaddr();
141 DPRINTF(TLB, "Translating vaddr %#x.\n", vaddr);
142 uint32_t flags = req->getFlags();
143 bool storeCheck = flags & StoreCheck;
144
145 int seg = flags & (mask(NUM_SEGMENTREGS));
146
147 //XXX Junk code to surpress the warning
148 if (storeCheck) seg = seg;
149
150 // Get cr0. This will tell us how to do translation. We'll assume it was
151 // verified to be correct and consistent when set.
152 CR0 cr0 = tc->readMiscRegNoEffect(MISCREG_CR0);
153
154 // If protected mode has been enabled...
155 if (cr0.pe) {
156 Efer efer = tc->readMiscRegNoEffect(MISCREG_EFER);
157 SegAttr csAttr = tc->readMiscRegNoEffect(MISCREG_CS_ATTR);

--- 121 unchanged lines hidden ---