From 1f032ad3452c2514287c142fb3faf953a5682ea3 Mon Sep 17 00:00:00 2001 From: Gene Wu Date: Mon, 23 Aug 2010 11:18:41 -0500 Subject: ARM: Implement CLREX --- src/arch/arm/tlb.cc | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/arch/arm/tlb.cc') diff --git a/src/arch/arm/tlb.cc b/src/arch/arm/tlb.cc index 9cc00a89e..b7e951767 100644 --- a/src/arch/arm/tlb.cc +++ b/src/arch/arm/tlb.cc @@ -355,6 +355,13 @@ TLB::translateFs(RequestPtr req, ThreadContext *tc, Mode mode, DPRINTF(TLBVerbose, "CPSR is user:%d UserMode:%d\n", cpsr.mode == MODE_USER, flags & UserMode); + // If this is a clrex instruction, provide a PA of 0 with no fault + // This will force the monitor to set the tracked address to 0 + // a bit of a hack but this effectively clrears this processors monitor + if (flags & Clrex){ + req->setPaddr(0); + return NoFault; + } if (!is_fetch) { assert(flags & MustBeOne); if (sctlr.a || !(flags & AllowUnaligned)) { -- cgit v1.2.3