pagetable.cc revision 5254
15222Sksewell@umich.edu/* 25254Sksewell@umich.edu * Copyright (c) 2007 MIPS Technologies, Inc. 35254Sksewell@umich.edu * All rights reserved. 45222Sksewell@umich.edu * 55254Sksewell@umich.edu * Redistribution and use in source and binary forms, with or without 65254Sksewell@umich.edu * modification, are permitted provided that the following conditions are 75254Sksewell@umich.edu * met: redistributions of source code must retain the above copyright 85254Sksewell@umich.edu * notice, this list of conditions and the following disclaimer; 95254Sksewell@umich.edu * redistributions in binary form must reproduce the above copyright 105254Sksewell@umich.edu * notice, this list of conditions and the following disclaimer in the 115254Sksewell@umich.edu * documentation and/or other materials provided with the distribution; 125254Sksewell@umich.edu * neither the name of the copyright holders nor the names of its 135254Sksewell@umich.edu * contributors may be used to endorse or promote products derived from 145254Sksewell@umich.edu * this software without specific prior written permission. 155222Sksewell@umich.edu * 165254Sksewell@umich.edu * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 175254Sksewell@umich.edu * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 185254Sksewell@umich.edu * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 195254Sksewell@umich.edu * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 205254Sksewell@umich.edu * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 215254Sksewell@umich.edu * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 225254Sksewell@umich.edu * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 235254Sksewell@umich.edu * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 245254Sksewell@umich.edu * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 255254Sksewell@umich.edu * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 265254Sksewell@umich.edu * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 275222Sksewell@umich.edu * 285222Sksewell@umich.edu * Authors: Jaidev Patwardhan 295222Sksewell@umich.edu */ 305222Sksewell@umich.edu 315222Sksewell@umich.edu#include "arch/mips/pagetable.hh" 325222Sksewell@umich.edu#include "sim/serialize.hh" 335222Sksewell@umich.edu 345222Sksewell@umich.edunamespace MipsISA 355222Sksewell@umich.edu{ 365222Sksewell@umich.edu 375222Sksewell@umich.edu 385222Sksewell@umich.edu void 395222Sksewell@umich.edu PTE::serialize(std::ostream &os) 405222Sksewell@umich.edu { 415222Sksewell@umich.edu SERIALIZE_SCALAR(Mask); 425222Sksewell@umich.edu SERIALIZE_SCALAR(VPN); 435222Sksewell@umich.edu SERIALIZE_SCALAR(asid); 445222Sksewell@umich.edu SERIALIZE_SCALAR(G); 455222Sksewell@umich.edu SERIALIZE_SCALAR(PFN0); 465222Sksewell@umich.edu SERIALIZE_SCALAR(D0); 475222Sksewell@umich.edu SERIALIZE_SCALAR(V0); 485222Sksewell@umich.edu SERIALIZE_SCALAR(C0); 495222Sksewell@umich.edu SERIALIZE_SCALAR(PFN1); 505222Sksewell@umich.edu SERIALIZE_SCALAR(D1); 515222Sksewell@umich.edu SERIALIZE_SCALAR(V1); 525222Sksewell@umich.edu SERIALIZE_SCALAR(C1); 535222Sksewell@umich.edu SERIALIZE_SCALAR(AddrShiftAmount); 545222Sksewell@umich.edu SERIALIZE_SCALAR(OffsetMask); 555222Sksewell@umich.edu } 565222Sksewell@umich.edu 575222Sksewell@umich.edu void 585222Sksewell@umich.edu PTE::unserialize(Checkpoint *cp, const std::string §ion) 595222Sksewell@umich.edu { 605222Sksewell@umich.edu UNSERIALIZE_SCALAR(Mask); 615222Sksewell@umich.edu UNSERIALIZE_SCALAR(VPN); 625222Sksewell@umich.edu UNSERIALIZE_SCALAR(asid); 635222Sksewell@umich.edu UNSERIALIZE_SCALAR(G); 645222Sksewell@umich.edu UNSERIALIZE_SCALAR(PFN0); 655222Sksewell@umich.edu UNSERIALIZE_SCALAR(D0); 665222Sksewell@umich.edu UNSERIALIZE_SCALAR(V0); 675222Sksewell@umich.edu UNSERIALIZE_SCALAR(C0); 685222Sksewell@umich.edu UNSERIALIZE_SCALAR(PFN1); 695222Sksewell@umich.edu UNSERIALIZE_SCALAR(D1); 705222Sksewell@umich.edu UNSERIALIZE_SCALAR(V1); 715222Sksewell@umich.edu UNSERIALIZE_SCALAR(C1); 725222Sksewell@umich.edu UNSERIALIZE_SCALAR(AddrShiftAmount); 735222Sksewell@umich.edu UNSERIALIZE_SCALAR(OffsetMask); 745222Sksewell@umich.edu } 755222Sksewell@umich.edu} 76