locked_mem.hh (12748:ae5ce8e42de7) locked_mem.hh (12749:223c83ed9979)
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

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

80
81 if (locked_addr == snoop_addr)
82 xc->setMiscReg(MISCREG_LOCKFLAG, false);
83}
84
85
86template <class XC>
87inline void
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

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

80
81 if (locked_addr == snoop_addr)
82 xc->setMiscReg(MISCREG_LOCKFLAG, false);
83}
84
85
86template <class XC>
87inline void
88handleLockedRead(XC *xc, RequestPtr req)
88handleLockedRead(XC *xc, const RequestPtr &req)
89{
90 xc->setMiscReg(MISCREG_LOCKADDR, req->getPaddr() & ~0xf);
91 xc->setMiscReg(MISCREG_LOCKFLAG, true);
92}
93
94template <class XC>
95inline void
96handleLockedSnoopHit(XC *xc)
97{
98}
99
100template <class XC>
101inline bool
89{
90 xc->setMiscReg(MISCREG_LOCKADDR, req->getPaddr() & ~0xf);
91 xc->setMiscReg(MISCREG_LOCKFLAG, true);
92}
93
94template <class XC>
95inline void
96handleLockedSnoopHit(XC *xc)
97{
98}
99
100template <class XC>
101inline bool
102handleLockedWrite(XC *xc, RequestPtr req, Addr cacheBlockMask)
102handleLockedWrite(XC *xc, const RequestPtr &req, Addr cacheBlockMask)
103{
104 if (req->isUncacheable()) {
105 // Funky Turbolaser mailbox access...don't update
106 // result register (see stq_c in decoder.isa)
107 req->setExtraData(2);
108 } else {
109 // standard store conditional
110 bool lock_flag = xc->readMiscReg(MISCREG_LOCKFLAG);

--- 37 unchanged lines hidden ---
103{
104 if (req->isUncacheable()) {
105 // Funky Turbolaser mailbox access...don't update
106 // result register (see stq_c in decoder.isa)
107 req->setExtraData(2);
108 } else {
109 // standard store conditional
110 bool lock_flag = xc->readMiscReg(MISCREG_LOCKFLAG);

--- 37 unchanged lines hidden ---