Deleted Added
sdiff udiff text old ( 11151:ca4ea9b5c052 ) new ( 11357:6668387fa488 )
full compact
1/*
2 * Copyright (c) 2012-2013 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

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

59#include "mem/request.hh"
60
61namespace ArmISA
62{
63template <class XC>
64inline void
65handleLockedSnoop(XC *xc, PacketPtr pkt, Addr cacheBlockMask)
66{
67 DPRINTF(LLSC,"%s: handleing snoop for address: %#x locked: %d\n",
68 xc->getCpuPtr()->name(),pkt->getAddr(),
69 xc->readMiscReg(MISCREG_LOCKFLAG));
70 if (!xc->readMiscReg(MISCREG_LOCKFLAG))
71 return;
72
73 Addr locked_addr = xc->readMiscReg(MISCREG_LOCKADDR) & cacheBlockMask;
74 // If no caches are attached, the snoop address always needs to be masked
75 Addr snoop_addr = pkt->getAddr() & cacheBlockMask;
76
77 DPRINTF(LLSC,"%s: handleing snoop for address: %#x locked addr: %#x\n",
78 xc->getCpuPtr()->name(),snoop_addr, locked_addr);
79 if (locked_addr == snoop_addr) {
80 DPRINTF(LLSC,"%s: address match, clearing lock and signaling sev\n",
81 xc->getCpuPtr()->name());
82 xc->setMiscReg(MISCREG_LOCKFLAG, false);
83 // Implement ARMv8 WFE/SEV semantics
84 xc->setMiscReg(MISCREG_SEV_MAILBOX, true);
85 xc->getCpuPtr()->wakeup(xc->threadId());

--- 66 unchanged lines hidden ---