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

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

88template <class XC>
89inline void
90handleLockedRead(XC *xc, Request *req)
91{
92 xc->setMiscReg(MISCREG_LOCKADDR, req->getPaddr() & ~0xf);
93 xc->setMiscReg(MISCREG_LOCKFLAG, true);
94}
95
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

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

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

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

--- 30 unchanged lines hidden ---