Deleted Added
sdiff udiff text old ( 3804:fa7a01dddc7a ) new ( 3806:65ae5388c059 )
full compact
1/*
2 * Copyright (c) 2002-2005 The Regents of The University of Michigan
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are
7 * met: redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer;

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

44
45#include <cassert>
46
47class Request;
48
49typedef Request* RequestPtr;
50
51
52/** The request is a Load locked/store conditional. */
53const unsigned LOCKED = 0x001;
54/** The virtual address is also the physical address. */
55const unsigned PHYSICAL = 0x002;
56/** The request is an ALPHA VPTE pal access (hw_ld). */
57const unsigned VPTE = 0x004;
58/** Use the alternate mode bits in ALPHA. */
59const unsigned ALTMODE = 0x008;
60/** The request is to an uncacheable address. */
61const unsigned UNCACHEABLE = 0x010;
62/** The request should not cause a page fault. */
63const unsigned NO_FAULT = 0x020;
64/** The request should be prefetched into the exclusive state. */
65const unsigned PF_EXCLUSIVE = 0x100;
66/** The request should be marked as LRU. */
67const unsigned EVICT_NEXT = 0x200;
68/** The request should ignore unaligned access faults */
69const unsigned NO_ALIGN_FAULT = 0x400;
70/** The request was an instruction read. */
71const unsigned INST_READ = 0x800;
72
73class Request
74{
75 private:
76 /**
77 * The physical address of the request. Valid only if validPaddr
78 * is set. */
79 Addr paddr;

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

90 /**
91 * The time this request was started. Used to calculate
92 * latencies. This field is set to curTick any time paddr or vaddr
93 * is written. */
94 Tick time;
95
96 /** The address space ID. */
97 int asid;
98 /** The ASI is any -- SPARC ONLY */
99 int asi;
100 /** This request is to a memory mapped register. */
101 bool mmapedReg;
102
103 /** The virtual address of the request. */
104 Addr vaddr;
105
106 /** The return value of store conditional. */
107 uint64_t scResult;
108
109 /** The cpu number (for statistics, typically). */

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

164 paddr = _paddr;
165 size = _size;
166 flags = _flags;
167 time = curTick;
168 validPaddr = true;
169 validAsidVaddr = false;
170 validPC = false;
171 validScResult = false;
172 }
173
174 /**
175 * Set up a virtual (e.g., CPU) request in a previously
176 * allocated Request object. */
177 void setVirt(int _asid, Addr _vaddr, int _size, int _flags, Addr _pc)
178 {
179 asid = _asid;
180 vaddr = _vaddr;
181 size = _size;
182 flags = _flags;
183 pc = _pc;
184 time = curTick;
185 validPaddr = false;
186 validAsidVaddr = true;
187 validPC = true;
188 validScResult = false;
189 }
190
191 /** Set just the physical address. This should only be used to
192 * record the result of a translation, and thus the vaddr must be
193 * valid before this method is called. Otherwise, use setPhys()
194 * to guarantee that the size and flags are also set.
195 */
196 void setPaddr(Addr _paddr)

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

216
217 /** Accessor function for vaddr.*/
218 Addr getVaddr() { assert(validAsidVaddr); return vaddr; }
219
220 /** Accessor function for asid.*/
221 int getAsid() { assert(validAsidVaddr); return asid; }
222
223 /** Accessor function for asi.*/
224 int getAsi() { assert(validAsidVaddr); return asi; }
225 /** Accessor function for asi.*/
226 void setAsi(int a) { assert(validAsidVaddr); asi = a; }
227
228 /** Accessor function for asi.*/
229 bool getMmapedReg() { assert(validPaddr); return mmapedReg; }
230 /** Accessor function for asi.*/
231 void setMmapedReg(bool r) { assert(validPaddr); mmapedReg = r; }
232
233 /** Accessor function to check if sc result is valid. */
234 bool scResultValid() { return validScResult; }
235 /** Accessor function for store conditional return value.*/
236 uint64_t getScResult() { assert(validScResult); return scResult; }
237 /** Accessor function for store conditional return value.*/
238 void setScResult(uint64_t _scResult)
239 { scResult = _scResult; validScResult = true; }

--- 20 unchanged lines hidden ---