ArmSystem.py revision 11238:627dd43a5846
15132Sgblack@eecs.umich.edu# Copyright (c) 2009, 2012-2013, 2015 ARM Limited 25132Sgblack@eecs.umich.edu# All rights reserved. 35132Sgblack@eecs.umich.edu# 45132Sgblack@eecs.umich.edu# The license below extends only to copyright in the software and shall 55132Sgblack@eecs.umich.edu# not be construed as granting a license to any other intellectual 65132Sgblack@eecs.umich.edu# property including but not limited to intellectual property relating 75132Sgblack@eecs.umich.edu# to a hardware implementation of the functionality of the software 85132Sgblack@eecs.umich.edu# licensed hereunder. You may use the software subject to the license 95132Sgblack@eecs.umich.edu# terms below provided that you ensure that this notice is replicated 105132Sgblack@eecs.umich.edu# unmodified and in its entirety in all distributions of the software, 115132Sgblack@eecs.umich.edu# modified or unmodified, in source code or in binary form. 125132Sgblack@eecs.umich.edu# 135132Sgblack@eecs.umich.edu# Redistribution and use in source and binary forms, with or without 145132Sgblack@eecs.umich.edu# modification, are permitted provided that the following conditions are 155132Sgblack@eecs.umich.edu# met: redistributions of source code must retain the above copyright 165132Sgblack@eecs.umich.edu# notice, this list of conditions and the following disclaimer; 175132Sgblack@eecs.umich.edu# redistributions in binary form must reproduce the above copyright 185132Sgblack@eecs.umich.edu# notice, this list of conditions and the following disclaimer in the 195132Sgblack@eecs.umich.edu# documentation and/or other materials provided with the distribution; 205132Sgblack@eecs.umich.edu# neither the name of the copyright holders nor the names of its 215132Sgblack@eecs.umich.edu# contributors may be used to endorse or promote products derived from 225132Sgblack@eecs.umich.edu# this software without specific prior written permission. 235132Sgblack@eecs.umich.edu# 245132Sgblack@eecs.umich.edu# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 255132Sgblack@eecs.umich.edu# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 265132Sgblack@eecs.umich.edu# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 275132Sgblack@eecs.umich.edu# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 285132Sgblack@eecs.umich.edu# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 295132Sgblack@eecs.umich.edu# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 305132Sgblack@eecs.umich.edu# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 315132Sgblack@eecs.umich.edu# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 325132Sgblack@eecs.umich.edu# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 335132Sgblack@eecs.umich.edu# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 345132Sgblack@eecs.umich.edu# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 355132Sgblack@eecs.umich.edu# 365132Sgblack@eecs.umich.edu# Authors: Ali Saidi 375132Sgblack@eecs.umich.edu 385132Sgblack@eecs.umich.edufrom m5.params import * 395132Sgblack@eecs.umich.edu 405132Sgblack@eecs.umich.edufrom System import System 415132Sgblack@eecs.umich.edu 425132Sgblack@eecs.umich.educlass ArmMachineType(Enum): 435132Sgblack@eecs.umich.edu map = { 445132Sgblack@eecs.umich.edu 'RealViewEB' : 827, 455132Sgblack@eecs.umich.edu 'RealViewPBX' : 1901, 465132Sgblack@eecs.umich.edu 'VExpress_EMM' : 2272, 475132Sgblack@eecs.umich.edu 'VExpress_EMM64' : 2272, 485132Sgblack@eecs.umich.edu 'DTOnly' : -1, 495132Sgblack@eecs.umich.edu } 505132Sgblack@eecs.umich.edu 515132Sgblack@eecs.umich.educlass ArmSystem(System): 525132Sgblack@eecs.umich.edu type = 'ArmSystem' 535132Sgblack@eecs.umich.edu cxx_header = "arch/arm/system.hh" 545132Sgblack@eecs.umich.edu load_addr_mask = 0xffffffff 555132Sgblack@eecs.umich.edu multi_proc = Param.Bool(True, "Multiprocessor system?") 565132Sgblack@eecs.umich.edu boot_loader = VectorParam.String([], 575132Sgblack@eecs.umich.edu "File that contains the boot loader code. Zero or more files may be " 585612Sgblack@eecs.umich.edu "specified. The first boot loader that matches the kernel's " 595625Sgblack@eecs.umich.edu "architecture will be used.") 605299Sgblack@eecs.umich.edu gic_cpu_addr = Param.Addr(0, "Addres of the GIC CPU interface") 615132Sgblack@eecs.umich.edu flags_addr = Param.Addr(0, "Address of the flags register for MP booting") 625132Sgblack@eecs.umich.edu have_security = Param.Bool(False, 635625Sgblack@eecs.umich.edu "True if Security Extensions are implemented") 645132Sgblack@eecs.umich.edu have_virtualization = Param.Bool(False, 655132Sgblack@eecs.umich.edu "True if Virtualization Extensions are implemented") 665625Sgblack@eecs.umich.edu have_lpae = Param.Bool(False, "True if LPAE is implemented") 675132Sgblack@eecs.umich.edu highest_el_is_64 = Param.Bool(False, 685299Sgblack@eecs.umich.edu "True if the register width of the highest implemented exception level " 695132Sgblack@eecs.umich.edu "is 64 bits (ARMv8)") 705132Sgblack@eecs.umich.edu reset_addr_64 = Param.Addr(0x0, 715132Sgblack@eecs.umich.edu "Reset address if the highest implemented exception level is 64 bits " 725132Sgblack@eecs.umich.edu "(ARMv8)") 735132Sgblack@eecs.umich.edu phys_addr_range_64 = Param.UInt8(40, 745299Sgblack@eecs.umich.edu "Supported physical address range in bits when using AArch64 (ARMv8)") 755299Sgblack@eecs.umich.edu have_large_asid_64 = Param.Bool(False, 765132Sgblack@eecs.umich.edu "True if ASID is 16 bits in AArch64 (ARMv8)") 775625Sgblack@eecs.umich.edu 785625Sgblack@eecs.umich.educlass GenericArmSystem(ArmSystem): 795625Sgblack@eecs.umich.edu type = 'GenericArmSystem' 805627Sgblack@eecs.umich.edu cxx_header = "arch/arm/system.hh" 815627Sgblack@eecs.umich.edu load_addr_mask = 0x0fffffff 825615Sgblack@eecs.umich.edu machine_type = Param.ArmMachineType('VExpress_EMM', 835132Sgblack@eecs.umich.edu "Machine id from http://www.arm.linux.org.uk/developer/machines/") 846220Sgblack@eecs.umich.edu atags_addr = Param.Addr("Address where default atags structure should " \ 856220Sgblack@eecs.umich.edu "be written") 866220Sgblack@eecs.umich.edu dtb_filename = Param.String("", 876220Sgblack@eecs.umich.edu "File that contains the Device Tree Blob. Don't use DTB if empty.") 886220Sgblack@eecs.umich.edu early_kernel_symbols = Param.Bool(False, 896220Sgblack@eecs.umich.edu "enable early kernel symbol tables before MMU") 906220Sgblack@eecs.umich.edu enable_context_switch_stats_dump = Param.Bool(False, "enable stats/task info dumping at context switch boundaries") 916220Sgblack@eecs.umich.edu 926220Sgblack@eecs.umich.edu panic_on_panic = Param.Bool(False, "Trigger a gem5 panic if the " \ 936220Sgblack@eecs.umich.edu "guest kernel panics") 946220Sgblack@eecs.umich.edu panic_on_oops = Param.Bool(False, "Trigger a gem5 panic if the " \ 956220Sgblack@eecs.umich.edu "guest kernel oopses") 966220Sgblack@eecs.umich.edu 976220Sgblack@eecs.umich.educlass LinuxArmSystem(GenericArmSystem): 986220Sgblack@eecs.umich.edu type = 'LinuxArmSystem' 996220Sgblack@eecs.umich.edu cxx_header = "arch/arm/linux/system.hh" 1006220Sgblack@eecs.umich.edu 1016220Sgblack@eecs.umich.educlass FreebsdArmSystem(GenericArmSystem): 1026220Sgblack@eecs.umich.edu type = 'FreebsdArmSystem' 1036220Sgblack@eecs.umich.edu cxx_header = "arch/arm/freebsd/system.hh" 1046220Sgblack@eecs.umich.edu