AbstractCacheEntry.cc revision 11025
12292SN/A/*
27597Sminkyu.jeong@arm.com * Copyright (c) 1999-2008 Mark D. Hill and David A. Wood
37597Sminkyu.jeong@arm.com * All rights reserved.
47597Sminkyu.jeong@arm.com *
57597Sminkyu.jeong@arm.com * Redistribution and use in source and binary forms, with or without
67597Sminkyu.jeong@arm.com * modification, are permitted provided that the following conditions are
77597Sminkyu.jeong@arm.com * met: redistributions of source code must retain the above copyright
87597Sminkyu.jeong@arm.com * notice, this list of conditions and the following disclaimer;
97597Sminkyu.jeong@arm.com * redistributions in binary form must reproduce the above copyright
107597Sminkyu.jeong@arm.com * notice, this list of conditions and the following disclaimer in the
117597Sminkyu.jeong@arm.com * documentation and/or other materials provided with the distribution;
127597Sminkyu.jeong@arm.com * neither the name of the copyright holders nor the names of its
137597Sminkyu.jeong@arm.com * contributors may be used to endorse or promote products derived from
142292SN/A * this software without specific prior written permission.
152292SN/A *
162292SN/A * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
172292SN/A * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
182292SN/A * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
192292SN/A * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
202292SN/A * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
212292SN/A * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
222292SN/A * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
232292SN/A * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
242292SN/A * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
252292SN/A * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
262292SN/A * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
272292SN/A */
282292SN/A
292292SN/A#include "mem/ruby/slicc_interface/AbstractCacheEntry.hh"
302292SN/A
312292SN/AAbstractCacheEntry::AbstractCacheEntry()
322292SN/A{
332292SN/A    m_Permission = AccessPermission_NotPresent;
342292SN/A    m_Address = 0;
352292SN/A    m_locked = -1;
362292SN/A}
372292SN/A
382292SN/AAbstractCacheEntry::~AbstractCacheEntry()
392689Sktlim@umich.edu{
402689Sktlim@umich.edu}
412689Sktlim@umich.edu
422292SN/Avoid
432292SN/AAbstractCacheEntry::changePermission(AccessPermission new_perm)
443326Sktlim@umich.edu{
456658Snate@binkert.org    AbstractEntry::changePermission(new_perm);
462733Sktlim@umich.edu    if ((new_perm == AccessPermission_Invalid) ||
472907Sktlim@umich.edu        (new_perm == AccessPermission_NotPresent)) {
482292SN/A        m_locked = -1;
492292SN/A    }
502722Sktlim@umich.edu}
512669Sktlim@umich.edu