locked_mem.hh (10030:b531e328342d) locked_mem.hh (10574:95297ec0f14b)
1/*
2 * Copyright (c) 2012 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

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

61template <class XC>
62inline void
63handleLockedSnoop(XC *xc, PacketPtr pkt, Addr cacheBlockMask)
64{
65 if (!xc->readMiscReg(MISCREG_LLFLAG))
66 return;
67
68 Addr locked_addr = xc->readMiscReg(MISCREG_LLADDR) & cacheBlockMask;
1/*
2 * Copyright (c) 2012 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

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

61template <class XC>
62inline void
63handleLockedSnoop(XC *xc, PacketPtr pkt, Addr cacheBlockMask)
64{
65 if (!xc->readMiscReg(MISCREG_LLFLAG))
66 return;
67
68 Addr locked_addr = xc->readMiscReg(MISCREG_LLADDR) & cacheBlockMask;
69 Addr snoop_addr = pkt->getAddr();
69 Addr snoop_addr = pkt->getAddr() & cacheBlockMask;
70
70
71 assert((cacheBlockMask & snoop_addr) == snoop_addr);
72
73 if (locked_addr == snoop_addr)
74 xc->setMiscReg(MISCREG_LLFLAG, false);
75}
76
77
78template <class XC>
79inline void
80handleLockedRead(XC *xc, Request *req)

--- 66 unchanged lines hidden ---
71 if (locked_addr == snoop_addr)
72 xc->setMiscReg(MISCREG_LLFLAG, false);
73}
74
75
76template <class XC>
77inline void
78handleLockedRead(XC *xc, Request *req)

--- 66 unchanged lines hidden ---