X86TLB.py revision 9338
112853Sgabeblack@google.com# Copyright (c) 2007 The Hewlett-Packard Development Company 212853Sgabeblack@google.com# All rights reserved. 312853Sgabeblack@google.com# 412853Sgabeblack@google.com# The license below extends only to copyright in the software and shall 512853Sgabeblack@google.com# not be construed as granting a license to any other intellectual 612853Sgabeblack@google.com# property including but not limited to intellectual property relating 712853Sgabeblack@google.com# to a hardware implementation of the functionality of the software 812853Sgabeblack@google.com# licensed hereunder. You may use the software subject to the license 912853Sgabeblack@google.com# terms below provided that you ensure that this notice is replicated 1012853Sgabeblack@google.com# unmodified and in its entirety in all distributions of the software, 1112853Sgabeblack@google.com# modified or unmodified, in source code or in binary form. 1212853Sgabeblack@google.com# 1312853Sgabeblack@google.com# Redistribution and use in source and binary forms, with or without 1412853Sgabeblack@google.com# modification, are permitted provided that the following conditions are 1512853Sgabeblack@google.com# met: redistributions of source code must retain the above copyright 1612853Sgabeblack@google.com# notice, this list of conditions and the following disclaimer; 1712853Sgabeblack@google.com# redistributions in binary form must reproduce the above copyright 1812853Sgabeblack@google.com# notice, this list of conditions and the following disclaimer in the 1912853Sgabeblack@google.com# documentation and/or other materials provided with the distribution; 2012853Sgabeblack@google.com# neither the name of the copyright holders nor the names of its 2112853Sgabeblack@google.com# contributors may be used to endorse or promote products derived from 2212853Sgabeblack@google.com# this software without specific prior written permission. 2312853Sgabeblack@google.com# 2412853Sgabeblack@google.com# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 2512853Sgabeblack@google.com# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 2612853Sgabeblack@google.com# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 2712853Sgabeblack@google.com# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 2812853Sgabeblack@google.com# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 2912853Sgabeblack@google.com# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 3012853Sgabeblack@google.com# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 3112853Sgabeblack@google.com# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 3212853Sgabeblack@google.com# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 3312853Sgabeblack@google.com# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 3412853Sgabeblack@google.com# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 3512853Sgabeblack@google.com# 3612853Sgabeblack@google.com# Authors: Gabe Black 3712853Sgabeblack@google.com 3812853Sgabeblack@google.comfrom m5.params import * 3912853Sgabeblack@google.comfrom m5.proxy import * 4012853Sgabeblack@google.com 4112853Sgabeblack@google.comfrom BaseTLB import BaseTLB 4212853Sgabeblack@google.comfrom MemObject import MemObject 4312853Sgabeblack@google.com 4412853Sgabeblack@google.comclass X86PagetableWalker(MemObject): 4512853Sgabeblack@google.com type = 'X86PagetableWalker' 4612853Sgabeblack@google.com cxx_class = 'X86ISA::Walker' 4712853Sgabeblack@google.com cxx_header = 'arch/x86/pagetable_walker.hh' 4812853Sgabeblack@google.com port = MasterPort("Port for the hardware table walker") 4912853Sgabeblack@google.com system = Param.System(Parent.any, "system object") 5013322Sgabeblack@google.com 5112853Sgabeblack@google.comclass X86TLB(BaseTLB): 5212853Sgabeblack@google.com type = 'X86TLB' 5313325Sgabeblack@google.com cxx_class = 'X86ISA::TLB' 5412853Sgabeblack@google.com cxx_header = 'arch/x86/tlb.hh' 5513197Sgabeblack@google.com size = Param.Int(64, "TLB size") 5613197Sgabeblack@google.com walker = Param.X86PagetableWalker(\ 5713197Sgabeblack@google.com X86PagetableWalker(), "page table walker") 5813197Sgabeblack@google.com