locked_mem.hh (9383:55fa95053ee8) locked_mem.hh (10030:b531e328342d)
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

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

82 xc->setMiscReg(MISCREG_LLADDR, req->getPaddr() & ~0xf);
83 xc->setMiscReg(MISCREG_LLFLAG, true);
84 DPRINTF(LLSC, "[tid:%i]: Load-Link Flag Set & Load-Link"
85 " Address set to %x.\n",
86 req->threadId(), req->getPaddr() & ~0xf);
87}
88
89template <class XC>
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

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

82 xc->setMiscReg(MISCREG_LLADDR, req->getPaddr() & ~0xf);
83 xc->setMiscReg(MISCREG_LLFLAG, true);
84 DPRINTF(LLSC, "[tid:%i]: Load-Link Flag Set & Load-Link"
85 " Address set to %x.\n",
86 req->threadId(), req->getPaddr() & ~0xf);
87}
88
89template <class XC>
90inline void
91handleLockedSnoopHit(XC *xc)
92{
93}
94
95template <class XC>
90inline bool
96inline bool
91handleLockedWrite(XC *xc, Request *req)
97handleLockedWrite(XC *xc, Request *req, Addr cacheBlockMask)
92{
93 if (req->isUncacheable()) {
94 // Funky Turbolaser mailbox access...don't update
95 // result register (see stq_c in decoder.isa)
96 req->setExtraData(2);
97 } else {
98 // standard store conditional
99 bool lock_flag = xc->readMiscReg(MISCREG_LLFLAG);

--- 41 unchanged lines hidden ---
98{
99 if (req->isUncacheable()) {
100 // Funky Turbolaser mailbox access...don't update
101 // result register (see stq_c in decoder.isa)
102 req->setExtraData(2);
103 } else {
104 // standard store conditional
105 bool lock_flag = xc->readMiscReg(MISCREG_LLFLAG);

--- 41 unchanged lines hidden ---