Deleted Added
sdiff udiff text old ( 9950:4b7f60080149 ) new ( 10020:2f33cb012383 )
full compact
1/*
2 * Copyright (c) 2012 ARM Limited
3 * All rights reserved
4 *
5 * The license below extends only to copyright in the software and shall
6 * not be construed as granting a license to any other intellectual
7 * property including but not limited to intellectual property relating
8 * to a hardware implementation of the functionality of the software
9 * licensed hereunder. You may use the software subject to the license
10 * terms below provided that you ensure that this notice is replicated

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

239 Addr _pc;
240
241 public:
242 /** Minimal constructor. No fields are initialized.
243 * (Note that _flags and privateFlags are cleared by Flags
244 * default constructor.)
245 */
246 Request()
247 {}
248
249 /**
250 * Constructor for physical (e.g. device) requests. Initializes
251 * just physical address, size, flags, and timestamp (to curTick()).
252 * These fields are adequate to perform a request.
253 */
254 Request(Addr paddr, int size, Flags flags, MasterID mid)

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

299 _paddr = paddr;
300 _size = size;
301 _time = time;
302 _masterId = mid;
303 _flags.clear(~STICKY_FLAGS);
304 _flags.set(flags);
305 privateFlags.clear(~STICKY_PRIVATE_FLAGS);
306 privateFlags.set(VALID_PADDR|VALID_SIZE);
307 }
308
309 void
310 setPhys(Addr paddr, int size, Flags flags, MasterID mid)
311 {
312 setPhys(paddr, size, flags, mid, curTick());
313 }
314

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

326 _masterId = mid;
327 _pc = pc;
328 _time = curTick();
329
330 _flags.clear(~STICKY_FLAGS);
331 _flags.set(flags);
332 privateFlags.clear(~STICKY_PRIVATE_FLAGS);
333 privateFlags.set(VALID_VADDR|VALID_SIZE|VALID_PC);
334 }
335
336 /**
337 * Set just the physical address. This usually used to record the
338 * result of a translation. However, when using virtualized CPUs
339 * setPhys() is sometimes called to finalize a physical address
340 * without a virtual address, so we can't check if the virtual
341 * address is valid.

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

377 Addr
378 getPaddr()
379 {
380 assert(privateFlags.isSet(VALID_PADDR));
381 return _paddr;
382 }
383
384 /**
385 * Accessor for size.
386 */
387 bool
388 hasSize()
389 {
390 return privateFlags.isSet(VALID_SIZE);
391 }
392

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

530 /** Accessor function for pc.*/
531 Addr
532 getPC() const
533 {
534 assert(privateFlags.isSet(VALID_PC));
535 return _pc;
536 }
537
538 /** Accessor functions for flags. Note that these are for testing
539 only; setting flags should be done via setFlags(). */
540 bool isUncacheable() const { return _flags.isSet(UNCACHEABLE); }
541 bool isInstFetch() const { return _flags.isSet(INST_FETCH); }
542 bool isPrefetch() const { return _flags.isSet(PREFETCH); }
543 bool isLLSC() const { return _flags.isSet(LLSC); }
544 bool isPriv() const { return _flags.isSet(PRIVILEGED); }
545 bool isLocked() const { return _flags.isSet(LOCKED); }
546 bool isSwap() const { return _flags.isSet(MEM_SWAP|MEM_SWAP_COND); }
547 bool isCondSwap() const { return _flags.isSet(MEM_SWAP_COND); }
548 bool isMmappedIpr() const { return _flags.isSet(MMAPPED_IPR); }
549 bool isClearLL() const { return _flags.isSet(CLEAR_LL); }
550};
551
552#endif // __MEM_REQUEST_HH__