diff options
author | Nikos Nikoleris <nikos.nikoleris@arm.com> | 2016-06-01 13:29:04 +0100 |
---|---|---|
committer | Nikos Nikoleris <nikos.nikoleris@arm.com> | 2017-12-05 11:47:01 +0000 |
commit | 149a501d8a52373d0b9108311d7e64d6376bb45b (patch) | |
tree | 6a43107deb0348948371f58a46fc5027fa65fc8f /src/mem/packet.hh | |
parent | 2141c2904af0f72dba4f6ec19983392d53c718bd (diff) | |
download | gem5-149a501d8a52373d0b9108311d7e64d6376bb45b.tar.xz |
mem: Add support for CMOs in the cache
This change adds support for maintenance operations (CMOs) in the
cache. The supported memory operations clean and/or invalidate a cache
block as specified by its VA to the specified xbar (PoU, PoC).
A cache maintenance packet visits all memories down to the specified
xbar. Caches need to invalidate their copy if it is an invalidating
CMO. If it is (additionally) a cleaning CMO and a dirty copy exists,
the cache cleans it with a WriteClean request.
Change-Id: Ibf31daa7213925898f3408738b11b1dd76c90b79
Reviewed-by: Stephan Diestelhorst <stephan.diestelhorst@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/5049
Maintainer: Nikos Nikoleris <nikos.nikoleris@arm.com>
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Diffstat (limited to 'src/mem/packet.hh')
-rw-r--r-- | src/mem/packet.hh | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/src/mem/packet.hh b/src/mem/packet.hh index fcdd73a03..88829d358 100644 --- a/src/mem/packet.hh +++ b/src/mem/packet.hh @@ -42,6 +42,7 @@ * Steve Reinhardt * Ali Saidi * Andreas Hansson + * Nikos Nikoleris */ /** @@ -259,7 +260,7 @@ class Packet : public Printable enum : FlagsType { // Flags to transfer across when copying a packet - COPY_FLAGS = 0x0000001F, + COPY_FLAGS = 0x0000003F, // Does this packet have sharers (which means it should not be // considered writable) or not. See setHasSharers below. @@ -282,6 +283,10 @@ class Packet : public Printable // downstream by the receiver WRITE_THROUGH = 0x00000010, + // Response co-ordination flag for cache maintenance + // operations + SATISFIED = 0x00000020, + /// Are the 'addr' and 'size' fields valid? VALID_ADDR = 0x00000100, VALID_SIZE = 0x00000200, @@ -643,6 +648,19 @@ class Packet : public Printable void clearWriteThrough() { flags.clear(WRITE_THROUGH); } bool writeThrough() const { return flags.isSet(WRITE_THROUGH); } + /** + * Set when a request hits in a cache and the cache is not going + * to respond. This is used by the crossbar to coordinate + * responses for cache maintenance operations. + */ + void setSatisfied() + { + assert(cmd.isClean()); + assert(!flags.isSet(SATISFIED)); + flags.set(SATISFIED); + } + bool satisfied() const { return flags.isSet(SATISFIED); } + void setSuppressFuncError() { flags.set(SUPPRESS_FUNC_ERROR); } bool suppressFuncError() const { return flags.isSet(SUPPRESS_FUNC_ERROR); } void setBlockCached() { flags.set(BLOCK_CACHED); } |