X86TLB.py revision 6022
19793Sakash.bagdia@arm.com# Copyright (c) 2007 The Hewlett-Packard Development Company 28706Sandreas.hansson@arm.com# All rights reserved. 38706Sandreas.hansson@arm.com# 48706Sandreas.hansson@arm.com# Redistribution and use of this software in source and binary forms, 58706Sandreas.hansson@arm.com# with or without modification, are permitted provided that the 68706Sandreas.hansson@arm.com# following conditions are met: 78706Sandreas.hansson@arm.com# 88706Sandreas.hansson@arm.com# The software must be used only for Non-Commercial Use which means any 98706Sandreas.hansson@arm.com# use which is NOT directed to receiving any direct monetary 108706Sandreas.hansson@arm.com# compensation for, or commercial advantage from such use. Illustrative 118706Sandreas.hansson@arm.com# examples of non-commercial use are academic research, personal study, 128706Sandreas.hansson@arm.com# teaching, education and corporate research & development. 135369Ssaidi@eecs.umich.edu# Illustrative examples of commercial use are distributing products for 143005Sstever@eecs.umich.edu# commercial advantage and providing services using the software for 153005Sstever@eecs.umich.edu# commercial advantage. 163005Sstever@eecs.umich.edu# 173005Sstever@eecs.umich.edu# If you wish to use this software or functionality therein that may be 183005Sstever@eecs.umich.edu# covered by patents for commercial use, please contact: 193005Sstever@eecs.umich.edu# Director of Intellectual Property Licensing 203005Sstever@eecs.umich.edu# Office of Strategy and Technology 213005Sstever@eecs.umich.edu# Hewlett-Packard Company 223005Sstever@eecs.umich.edu# 1501 Page Mill Road 233005Sstever@eecs.umich.edu# Palo Alto, California 94304 243005Sstever@eecs.umich.edu# 253005Sstever@eecs.umich.edu# Redistributions of source code must retain the above copyright notice, 263005Sstever@eecs.umich.edu# this list of conditions and the following disclaimer. Redistributions 273005Sstever@eecs.umich.edu# in binary form must reproduce the above copyright notice, this list of 283005Sstever@eecs.umich.edu# conditions and the following disclaimer in the documentation and/or 293005Sstever@eecs.umich.edu# other materials provided with the distribution. Neither the name of 303005Sstever@eecs.umich.edu# the COPYRIGHT HOLDER(s), HEWLETT-PACKARD COMPANY, nor the names of its 313005Sstever@eecs.umich.edu# contributors may be used to endorse or promote products derived from 323005Sstever@eecs.umich.edu# this software without specific prior written permission. No right of 333005Sstever@eecs.umich.edu# sublicense is granted herewith. Derivatives of the software and 343005Sstever@eecs.umich.edu# output created using the software may be prepared, but only for 353005Sstever@eecs.umich.edu# Non-Commercial Uses. Derivatives of the software may be shared with 363005Sstever@eecs.umich.edu# others provided: (i) the others agree to abide by the list of 373005Sstever@eecs.umich.edu# conditions herein which includes the Non-Commercial Use restrictions; 383005Sstever@eecs.umich.edu# and (ii) such Derivatives of the software include the above copyright 393005Sstever@eecs.umich.edu# notice to acknowledge the contribution from this software where 403005Sstever@eecs.umich.edu# applicable, this list of conditions and the disclaimer below. 412710SN/A# 422710SN/A# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 433005Sstever@eecs.umich.edu# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 442889SN/A# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 456654Snate@binkert.org# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 466654Snate@binkert.org# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 476654Snate@binkert.org# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 482667SN/A# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 496654Snate@binkert.org# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 506654Snate@binkert.org# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 516654Snate@binkert.org# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 525457Ssaidi@eecs.umich.edu# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 536654Snate@binkert.org# 548169SLisa.Hsu@amd.com# Authors: Gabe Black 559100SBrad.Beckmann@amd.com 568169SLisa.Hsu@amd.comfrom MemObject import MemObject 578920Snilay@cs.wisc.edufrom m5.params import * 588169SLisa.Hsu@amd.comfrom m5.proxy import * 593395Shsul@eecs.umich.edufrom m5 import build_env 606981SLisa.Hsu@amd.comfrom BaseTLB import BaseTLB 619836Sandreas.hansson@arm.com 623448Shsul@eecs.umich.eduif build_env['FULL_SYSTEM']: 635369Ssaidi@eecs.umich.edu class X86PagetableWalker(MemObject): 643394Shsul@eecs.umich.edu type = 'X86PagetableWalker' 659197Snilay@cs.wisc.edu cxx_class = 'X86ISA::Walker' 669197Snilay@cs.wisc.edu port = Port("Port for the hardware table walker") 679197Snilay@cs.wisc.edu system = Param.System(Parent.any, "system object") 689197Snilay@cs.wisc.edu 699197Snilay@cs.wisc.educlass X86TLB(BaseTLB): 709197Snilay@cs.wisc.edu type = 'X86TLB' 719197Snilay@cs.wisc.edu cxx_class = 'X86ISA::TLB' 729197Snilay@cs.wisc.edu size = Param.Int(64, "TLB size") 739197Snilay@cs.wisc.edu if build_env['FULL_SYSTEM']: 749197Snilay@cs.wisc.edu walker = Param.X86PagetableWalker(\ 759197Snilay@cs.wisc.edu X86PagetableWalker(), "page table walker") 769197Snilay@cs.wisc.edu