T1000.py revision 8847
16157Snate@binkert.org# Copyright (c) 2006-2007 The Regents of The University of Michigan 26157Snate@binkert.org# All rights reserved. 36157Snate@binkert.org# 46157Snate@binkert.org# Redistribution and use in source and binary forms, with or without 56157Snate@binkert.org# modification, are permitted provided that the following conditions are 66157Snate@binkert.org# met: redistributions of source code must retain the above copyright 76157Snate@binkert.org# notice, this list of conditions and the following disclaimer; 86157Snate@binkert.org# redistributions in binary form must reproduce the above copyright 96157Snate@binkert.org# notice, this list of conditions and the following disclaimer in the 106157Snate@binkert.org# documentation and/or other materials provided with the distribution; 116157Snate@binkert.org# neither the name of the copyright holders nor the names of its 126157Snate@binkert.org# contributors may be used to endorse or promote products derived from 136157Snate@binkert.org# this software without specific prior written permission. 146157Snate@binkert.org# 156157Snate@binkert.org# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 166157Snate@binkert.org# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 176157Snate@binkert.org# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 186157Snate@binkert.org# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 196157Snate@binkert.org# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 206157Snate@binkert.org# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 216157Snate@binkert.org# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 226157Snate@binkert.org# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 236157Snate@binkert.org# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 246157Snate@binkert.org# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 256157Snate@binkert.org# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 266157Snate@binkert.org# 276157Snate@binkert.org# Authors: Gabe Black 286157Snate@binkert.org 296157Snate@binkert.orgfrom m5.params import * 306157Snate@binkert.orgfrom m5.proxy import * 316157Snate@binkert.orgfrom Device import BasicPioDevice, PioDevice, IsaFake, BadAddr 326157Snate@binkert.orgfrom Platform import Platform 336157Snate@binkert.orgfrom Terminal import Terminal 346157Snate@binkert.orgfrom Uart import Uart8250 356157Snate@binkert.org 366157Snate@binkert.org 376157Snate@binkert.orgclass MmDisk(BasicPioDevice): 386157Snate@binkert.org type = 'MmDisk' 396157Snate@binkert.org image = Param.DiskImage("Disk Image") 4010133Sandreas.hansson@arm.com pio_addr = 0x1F40000000 4110133Sandreas.hansson@arm.com 4210133Sandreas.hansson@arm.comclass DumbTOD(BasicPioDevice): 4310133Sandreas.hansson@arm.com type = 'DumbTOD' 4410133Sandreas.hansson@arm.com time = Param.Time('01/01/2009', "System time to use ('Now' for real time)") 4510133Sandreas.hansson@arm.com pio_addr = 0xfff0c1fff8 4610133Sandreas.hansson@arm.com 4710133Sandreas.hansson@arm.comclass Iob(PioDevice): 4810133Sandreas.hansson@arm.com type = 'Iob' 4910133Sandreas.hansson@arm.com platform = Param.Platform(Parent.any, "Platform this device is part of.") 5010133Sandreas.hansson@arm.com pio_latency = Param.Latency('1ns', "Programed IO latency in simticks") 5110133Sandreas.hansson@arm.com 5210133Sandreas.hansson@arm.com 5310133Sandreas.hansson@arm.comclass T1000(Platform): 5410133Sandreas.hansson@arm.com type = 'T1000' 5510133Sandreas.hansson@arm.com system = Param.System(Parent.any, "system") 5610133Sandreas.hansson@arm.com 5710133Sandreas.hansson@arm.com fake_clk = IsaFake(pio_addr=0x9600000000, pio_size=0x100000000) 5810133Sandreas.hansson@arm.com #warn_access="Accessing Clock Unit -- Unimplemented!") 5910133Sandreas.hansson@arm.com 6010133Sandreas.hansson@arm.com fake_membnks = IsaFake(pio_addr=0x9700000000, pio_size=16384, 6110133Sandreas.hansson@arm.com ret_data64=0x0000000000000000, update_data=False) 629850Sandreas.hansson@arm.com #warn_access="Accessing Memory Banks -- Unimplemented!") 637768SAli.Saidi@ARM.com 647768SAli.Saidi@ARM.com fake_jbi = IsaFake(pio_addr=0x8000000000, pio_size=0x100000000) 658492Snilay@cs.wisc.edu #warn_access="Accessing JBI -- Unimplemented!") 666168Snate@binkert.org 676168Snate@binkert.org fake_l2_1 = IsaFake(pio_addr=0xA900000000, pio_size=0x8, 686157Snate@binkert.org ret_data64=0x0000000000000001, update_data=True) 696157Snate@binkert.org #warn_access="Accessing L2 Cache Banks -- Unimplemented!") 706157Snate@binkert.org 716157Snate@binkert.org fake_l2_2 = IsaFake(pio_addr=0xA900000040, pio_size=0x8, 726157Snate@binkert.org ret_data64=0x0000000000000001, update_data=True) 736157Snate@binkert.org #warn_access="Accessing L2 Cache Banks -- Unimplemented!") 746157Snate@binkert.org 756157Snate@binkert.org fake_l2_3 = IsaFake(pio_addr=0xA900000080, pio_size=0x8, 766157Snate@binkert.org ret_data64=0x0000000000000001, update_data=True) 776157Snate@binkert.org #warn_access="Accessing L2 Cache Banks -- Unimplemented!") 786157Snate@binkert.org 796157Snate@binkert.org fake_l2_4 = IsaFake(pio_addr=0xA9000000C0, pio_size=0x8, 806157Snate@binkert.org ret_data64=0x0000000000000001, update_data=True) 816157Snate@binkert.org #warn_access="Accessing L2 Cache Banks -- Unimplemented!") 826157Snate@binkert.org 836157Snate@binkert.org fake_l2esr_1 = IsaFake(pio_addr=0xAB00000000, pio_size=0x8, 846157Snate@binkert.org ret_data64=0x0000000000000000, update_data=True) 856157Snate@binkert.org #warn_access="Accessing L2 ESR Cache Banks -- Unimplemented!") 866157Snate@binkert.org 876157Snate@binkert.org fake_l2esr_2 = IsaFake(pio_addr=0xAB00000040, pio_size=0x8, 886157Snate@binkert.org ret_data64=0x0000000000000000, update_data=True) 896157Snate@binkert.org #warn_access="Accessing L2 ESR Cache Banks -- Unimplemented!") 906157Snate@binkert.org 916157Snate@binkert.org fake_l2esr_3 = IsaFake(pio_addr=0xAB00000080, pio_size=0x8, 926157Snate@binkert.org ret_data64=0x0000000000000000, update_data=True) 936157Snate@binkert.org #warn_access="Accessing L2 ESR Cache Banks -- Unimplemented!") 946157Snate@binkert.org 956157Snate@binkert.org fake_l2esr_4 = IsaFake(pio_addr=0xAB000000C0, pio_size=0x8, 966157Snate@binkert.org ret_data64=0x0000000000000000, update_data=True) 976157Snate@binkert.org #warn_access="Accessing L2 ESR Cache Banks -- Unimplemented!") 986157Snate@binkert.org 996157Snate@binkert.org fake_ssi = IsaFake(pio_addr=0xff00000000, pio_size=0x10000000) 1006157Snate@binkert.org #warn_access="Accessing SSI -- Unimplemented!") 1016157Snate@binkert.org 1026157Snate@binkert.org hterm = Terminal() 1036157Snate@binkert.org hvuart = Uart8250(pio_addr=0xfff0c2c000) 1046157Snate@binkert.org htod = DumbTOD() 1056157Snate@binkert.org 1066157Snate@binkert.org pterm = Terminal() 1076157Snate@binkert.org puart0 = Uart8250(pio_addr=0x1f10000000) 1086157Snate@binkert.org 1096157Snate@binkert.org iob = Iob() 1106157Snate@binkert.org # Attach I/O devices that are on chip 1118483Sgblack@eecs.umich.edu def attachOnChipIO(self, bus): 1128483Sgblack@eecs.umich.edu self.iob.pio = bus.master 1136157Snate@binkert.org self.htod.pio = bus.master 1146882SBrad.Beckmann@amd.com 1156286Snate@binkert.org 1166286Snate@binkert.org # Attach I/O devices to specified bus object. Can't do this 1176286Snate@binkert.org # earlier, since the bus object itself is typically defined at the 1188092Snilay@cs.wisc.edu # System level. 1196286Snate@binkert.org def attachIO(self, bus): 1206286Snate@binkert.org self.hvuart.terminal = self.hterm 1216157Snate@binkert.org self.puart0.terminal = self.pterm 1226157Snate@binkert.org self.fake_clk.pio = bus.master 12310301Snilay@cs.wisc.edu self.fake_membnks.pio = bus.master 1246157Snate@binkert.org self.fake_l2_1.pio = bus.master 1256157Snate@binkert.org self.fake_l2_2.pio = bus.master 1266286Snate@binkert.org self.fake_l2_3.pio = bus.master 12710301Snilay@cs.wisc.edu self.fake_l2_4.pio = bus.master 1289363Snilay@cs.wisc.edu self.fake_l2esr_1.pio = bus.master 12910301Snilay@cs.wisc.edu self.fake_l2esr_2.pio = bus.master 1306286Snate@binkert.org self.fake_l2esr_3.pio = bus.master 13110301Snilay@cs.wisc.edu self.fake_l2esr_4.pio = bus.master 13210301Snilay@cs.wisc.edu self.fake_ssi.pio = bus.master 13310301Snilay@cs.wisc.edu self.fake_jbi.pio = bus.master 13410301Snilay@cs.wisc.edu self.puart0.pio = bus.master 13510301Snilay@cs.wisc.edu self.hvuart.pio = bus.master 1366157Snate@binkert.org