cache_blk.hh (13223:081299f403fe) cache_blk.hh (13445:070fc4d948c0)
1/*
2 * Copyright (c) 2012-2018 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

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

239 * @return True if the block holds data from the secure memory space.
240 */
241 bool isSecure() const
242 {
243 return (status & BlkSecure) != 0;
244 }
245
246 /**
1/*
2 * Copyright (c) 2012-2018 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

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

239 * @return True if the block holds data from the secure memory space.
240 */
241 bool isSecure() const
242 {
243 return (status & BlkSecure) != 0;
244 }
245
246 /**
247 * Set valid bit.
248 */
249 virtual void setValid()
250 {
251 assert(!isValid());
252 status |= BlkValid;
253 }
254
255 /**
256 * Set secure bit.
257 */
258 virtual void setSecure()
259 {
260 status |= BlkSecure;
261 }
262
263 /**
247 * Set member variables when a block insertion occurs. Resets reference
248 * count to 1 (the insertion counts as a reference), and touch block if
249 * it hadn't been touched previously. Sets the insertion tick to the
264 * Set member variables when a block insertion occurs. Resets reference
265 * count to 1 (the insertion counts as a reference), and touch block if
266 * it hadn't been touched previously. Sets the insertion tick to the
250 * current tick. Does not make block valid.
267 * current tick. Marks the block valid.
251 *
252 * @param tag Block address tag.
253 * @param is_secure Whether the block is in secure space or not.
254 * @param src_master_ID The source requestor ID.
255 * @param task_ID The new task ID.
256 */
257 virtual void insert(const Addr tag, const bool is_secure,
258 const int src_master_ID, const uint32_t task_ID);

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

420 CacheBlk::invalidate();
421
422 _addr = MaxAddr;
423 }
424
425 void insert(const Addr addr, const bool is_secure,
426 const int src_master_ID=0, const uint32_t task_ID=0) override
427 {
268 *
269 * @param tag Block address tag.
270 * @param is_secure Whether the block is in secure space or not.
271 * @param src_master_ID The source requestor ID.
272 * @param task_ID The new task ID.
273 */
274 virtual void insert(const Addr tag, const bool is_secure,
275 const int src_master_ID, const uint32_t task_ID);

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

437 CacheBlk::invalidate();
438
439 _addr = MaxAddr;
440 }
441
442 void insert(const Addr addr, const bool is_secure,
443 const int src_master_ID=0, const uint32_t task_ID=0) override
444 {
445 // Make sure that the block has been properly invalidated
446 assert(status == 0);
447
428 // Set block address
429 _addr = addr;
430
431 // Set secure state
432 if (is_secure) {
448 // Set block address
449 _addr = addr;
450
451 // Set secure state
452 if (is_secure) {
433 status = BlkSecure;
434 } else {
435 status = 0;
453 setSecure();
436 }
454 }
455
456 // Validate block
457 setValid();
437 }
438
439 /**
440 * Get block's address.
441 *
442 * @return addr Address value.
443 */
444 Addr getAddr() const

--- 22 unchanged lines hidden ---
458 }
459
460 /**
461 * Get block's address.
462 *
463 * @return addr Address value.
464 */
465 Addr getAddr() const

--- 22 unchanged lines hidden ---