pagetable.cc revision 5184
15124Sgblack@eecs.umich.edu/* 25124Sgblack@eecs.umich.edu * Copyright (c) 2007 The Hewlett-Packard Development Company 35124Sgblack@eecs.umich.edu * All rights reserved. 45124Sgblack@eecs.umich.edu * 55124Sgblack@eecs.umich.edu * Redistribution and use of this software in source and binary forms, 65124Sgblack@eecs.umich.edu * with or without modification, are permitted provided that the 75124Sgblack@eecs.umich.edu * following conditions are met: 85124Sgblack@eecs.umich.edu * 95124Sgblack@eecs.umich.edu * The software must be used only for Non-Commercial Use which means any 105124Sgblack@eecs.umich.edu * use which is NOT directed to receiving any direct monetary 115124Sgblack@eecs.umich.edu * compensation for, or commercial advantage from such use. Illustrative 125124Sgblack@eecs.umich.edu * examples of non-commercial use are academic research, personal study, 135124Sgblack@eecs.umich.edu * teaching, education and corporate research & development. 145124Sgblack@eecs.umich.edu * Illustrative examples of commercial use are distributing products for 155124Sgblack@eecs.umich.edu * commercial advantage and providing services using the software for 165124Sgblack@eecs.umich.edu * commercial advantage. 175124Sgblack@eecs.umich.edu * 185124Sgblack@eecs.umich.edu * If you wish to use this software or functionality therein that may be 195124Sgblack@eecs.umich.edu * covered by patents for commercial use, please contact: 205124Sgblack@eecs.umich.edu * Director of Intellectual Property Licensing 215124Sgblack@eecs.umich.edu * Office of Strategy and Technology 225124Sgblack@eecs.umich.edu * Hewlett-Packard Company 235124Sgblack@eecs.umich.edu * 1501 Page Mill Road 245124Sgblack@eecs.umich.edu * Palo Alto, California 94304 255124Sgblack@eecs.umich.edu * 265124Sgblack@eecs.umich.edu * Redistributions of source code must retain the above copyright notice, 275124Sgblack@eecs.umich.edu * this list of conditions and the following disclaimer. Redistributions 285124Sgblack@eecs.umich.edu * in binary form must reproduce the above copyright notice, this list of 295124Sgblack@eecs.umich.edu * conditions and the following disclaimer in the documentation and/or 305124Sgblack@eecs.umich.edu * other materials provided with the distribution. Neither the name of 315124Sgblack@eecs.umich.edu * the COPYRIGHT HOLDER(s), HEWLETT-PACKARD COMPANY, nor the names of its 325124Sgblack@eecs.umich.edu * contributors may be used to endorse or promote products derived from 335124Sgblack@eecs.umich.edu * this software without specific prior written permission. No right of 345124Sgblack@eecs.umich.edu * sublicense is granted herewith. Derivatives of the software and 355124Sgblack@eecs.umich.edu * output created using the software may be prepared, but only for 365124Sgblack@eecs.umich.edu * Non-Commercial Uses. Derivatives of the software may be shared with 375124Sgblack@eecs.umich.edu * others provided: (i) the others agree to abide by the list of 385124Sgblack@eecs.umich.edu * conditions herein which includes the Non-Commercial Use restrictions; 395124Sgblack@eecs.umich.edu * and (ii) such Derivatives of the software include the above copyright 405124Sgblack@eecs.umich.edu * notice to acknowledge the contribution from this software where 415124Sgblack@eecs.umich.edu * applicable, this list of conditions and the disclaimer below. 425124Sgblack@eecs.umich.edu * 435124Sgblack@eecs.umich.edu * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 445124Sgblack@eecs.umich.edu * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 455124Sgblack@eecs.umich.edu * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 465124Sgblack@eecs.umich.edu * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 475124Sgblack@eecs.umich.edu * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 485124Sgblack@eecs.umich.edu * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 495124Sgblack@eecs.umich.edu * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 505124Sgblack@eecs.umich.edu * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 515124Sgblack@eecs.umich.edu * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 525124Sgblack@eecs.umich.edu * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 535124Sgblack@eecs.umich.edu * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 545124Sgblack@eecs.umich.edu * 555124Sgblack@eecs.umich.edu * Authors: Gabe Black 565124Sgblack@eecs.umich.edu */ 575124Sgblack@eecs.umich.edu 585184Sgblack@eecs.umich.edu#include "arch/x86/isa_traits.hh" 595124Sgblack@eecs.umich.edu#include "arch/x86/pagetable.hh" 605124Sgblack@eecs.umich.edu#include "sim/serialize.hh" 615124Sgblack@eecs.umich.edu 625124Sgblack@eecs.umich.edunamespace X86ISA 635124Sgblack@eecs.umich.edu{ 645124Sgblack@eecs.umich.edu 655184Sgblack@eecs.umich.eduTlbEntry::TlbEntry(Addr asn, Addr _vaddr, Addr _paddr) : 665184Sgblack@eecs.umich.edu paddr(_paddr), vaddr(_vaddr), size(PageBytes), writable(true), user(true), 675184Sgblack@eecs.umich.edu uncacheable(false), global(false), patBit(0), noExec(false) 685184Sgblack@eecs.umich.edu{} 695184Sgblack@eecs.umich.edu 705124Sgblack@eecs.umich.eduvoid 715124Sgblack@eecs.umich.eduTlbEntry::serialize(std::ostream &os) 725124Sgblack@eecs.umich.edu{ 735124Sgblack@eecs.umich.edu} 745124Sgblack@eecs.umich.edu 755124Sgblack@eecs.umich.eduvoid 765124Sgblack@eecs.umich.eduTlbEntry::unserialize(Checkpoint *cp, const std::string §ion) 775124Sgblack@eecs.umich.edu{ 785124Sgblack@eecs.umich.edu} 795124Sgblack@eecs.umich.edu 805124Sgblack@eecs.umich.edu} 81