summaryrefslogtreecommitdiff
path: root/src/arch/arm/tlb.cc
diff options
context:
space:
mode:
authorChander Sudanthi <Chander.Sudanthi@ARM.com>2011-06-16 15:08:11 -0500
committerChander Sudanthi <Chander.Sudanthi@ARM.com>2011-06-16 15:08:11 -0500
commit9fe3610b32545b33767fc22b9fdd7f19046077d0 (patch)
tree7815047604454c6d44d351e56e12d8fa88c6590f /src/arch/arm/tlb.cc
parent8bf92329eeea76e4e01c49f31e68c29cdada5985 (diff)
downloadgem5-9fe3610b32545b33767fc22b9fdd7f19046077d0.tar.xz
ARM: Fix memset on TLB flush and initialization
Instead of clearing the entire TLB on initialization and flush, the code was clearing only one element. This patch corrects the memsets in the init and flush routines.
Diffstat (limited to 'src/arch/arm/tlb.cc')
-rw-r--r--src/arch/arm/tlb.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/arch/arm/tlb.cc b/src/arch/arm/tlb.cc
index ca2b68b3b..a2b1a9d8a 100644
--- a/src/arch/arm/tlb.cc
+++ b/src/arch/arm/tlb.cc
@@ -75,7 +75,7 @@ TLB::TLB(const Params *p)
, rangeMRU(1), miscRegValid(false)
{
table = new TlbEntry[size];
- memset(table, 0, sizeof(TlbEntry[size]));
+ memset(table, 0, sizeof(TlbEntry) * size);
#if FULL_SYSTEM
tableWalker->setTlb(this);
@@ -192,7 +192,7 @@ TLB::flushAll()
x++;
}
- memset(table, 0, sizeof(TlbEntry[size]));
+ memset(table, 0, sizeof(TlbEntry) * size);
flushTlb++;
}