summaryrefslogtreecommitdiff
path: root/src/cpu/checker
diff options
context:
space:
mode:
authorAli Saidi <Ali.Saidi@ARM.com>2014-10-29 23:18:24 -0500
committerAli Saidi <Ali.Saidi@ARM.com>2014-10-29 23:18:24 -0500
commite3ee27c7b4da421676ca7d77c0953726259890d5 (patch)
treea36f52443ad80472311fec592d76f7ed23b9615b /src/cpu/checker
parent536c72333f71f6e816d4b5e95e39754638bd76ea (diff)
downloadgem5-e3ee27c7b4da421676ca7d77c0953726259890d5.tar.xz
cpu: Add support to checker for CACHE_BLOCK_ZERO commands.
The checker didn't know how to properly validate these new commands.
Diffstat (limited to 'src/cpu/checker')
-rw-r--r--src/cpu/checker/cpu.cc10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/cpu/checker/cpu.cc b/src/cpu/checker/cpu.cc
index 61c127ec4..f91bad294 100644
--- a/src/cpu/checker/cpu.cc
+++ b/src/cpu/checker/cpu.cc
@@ -231,6 +231,7 @@ CheckerCPU::writeMem(uint8_t *data, unsigned size,
bool checked_flags = false;
bool flags_match = true;
Addr pAddr = 0x0;
+ static uint8_t zero_data[64] = {};
int fullSize = size;
@@ -304,6 +305,15 @@ CheckerCPU::writeMem(uint8_t *data, unsigned size,
unverifiedReq->getExtraData() : true;
}
+ // If the request is to ZERO a cache block, there is no data to check
+ // against, but it's all zero. We need something to compare to, so use a
+ // const set of zeros.
+ if (flags & Request::CACHE_BLOCK_ZERO) {
+ assert(!data);
+ assert(sizeof(zero_data) <= fullSize);
+ data = zero_data;
+ }
+
if (unverifiedReq && unverifiedMemData &&
memcmp(data, unverifiedMemData, fullSize) && extraData) {
warn("%lli: Store value does not match value sent to memory! "