SparcSystem.py revision 7580
17965Sgblack@eecs.umich.edu# Copyright (c) 2007 The Regents of The University of Michigan 28332Snate@binkert.org# All rights reserved. 37965Sgblack@eecs.umich.edu# 47965Sgblack@eecs.umich.edu# Redistribution and use in source and binary forms, with or without 57965Sgblack@eecs.umich.edu# modification, are permitted provided that the following conditions are 67965Sgblack@eecs.umich.edu# met: redistributions of source code must retain the above copyright 77965Sgblack@eecs.umich.edu# notice, this list of conditions and the following disclaimer; 87965Sgblack@eecs.umich.edu# redistributions in binary form must reproduce the above copyright 97965Sgblack@eecs.umich.edu# notice, this list of conditions and the following disclaimer in the 107965Sgblack@eecs.umich.edu# documentation and/or other materials provided with the distribution; 117965Sgblack@eecs.umich.edu# neither the name of the copyright holders nor the names of its 127965Sgblack@eecs.umich.edu# contributors may be used to endorse or promote products derived from 137965Sgblack@eecs.umich.edu# this software without specific prior written permission. 147965Sgblack@eecs.umich.edu# 157965Sgblack@eecs.umich.edu# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 167965Sgblack@eecs.umich.edu# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 177965Sgblack@eecs.umich.edu# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 187965Sgblack@eecs.umich.edu# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 197965Sgblack@eecs.umich.edu# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 207965Sgblack@eecs.umich.edu# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 217965Sgblack@eecs.umich.edu# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 227965Sgblack@eecs.umich.edu# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 237965Sgblack@eecs.umich.edu# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 247965Sgblack@eecs.umich.edu# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 257965Sgblack@eecs.umich.edu# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 267965Sgblack@eecs.umich.edu# 277965Sgblack@eecs.umich.edu# Authors: Nathan Binkert 287965Sgblack@eecs.umich.edu 297965Sgblack@eecs.umich.edufrom m5.params import * 307965Sgblack@eecs.umich.edu 317965Sgblack@eecs.umich.edufrom PhysicalMemory import * 327965Sgblack@eecs.umich.edufrom System import System 337965Sgblack@eecs.umich.edu 347965Sgblack@eecs.umich.educlass SparcSystem(System): 357965Sgblack@eecs.umich.edu type = 'SparcSystem' 367965Sgblack@eecs.umich.edu _rom_base = 0xfff0000000 377965Sgblack@eecs.umich.edu _nvram_base = 0x1f11000000 387965Sgblack@eecs.umich.edu _hypervisor_desc_base = 0x1f12080000 397965Sgblack@eecs.umich.edu _partition_desc_base = 0x1f12000000 407965Sgblack@eecs.umich.edu # ROM for OBP/Reset/Hypervisor 417965Sgblack@eecs.umich.edu rom = Param.PhysicalMemory( 427965Sgblack@eecs.umich.edu PhysicalMemory(range=AddrRange(_rom_base, size='8MB')), 438229Snate@binkert.org "Memory to hold the ROM data") 448229Snate@binkert.org # nvram 4512334Sgabeblack@google.com nvram = Param.PhysicalMemory( 467965Sgblack@eecs.umich.edu PhysicalMemory(range=AddrRange(_nvram_base, size='8kB')), 477965Sgblack@eecs.umich.edu "Memory to hold the nvram data") 487965Sgblack@eecs.umich.edu # hypervisor description 497965Sgblack@eecs.umich.edu hypervisor_desc = Param.PhysicalMemory( 508590Sgblack@eecs.umich.edu PhysicalMemory(range=AddrRange(_hypervisor_desc_base, size='8kB')), 517965Sgblack@eecs.umich.edu "Memory to hold the hypervisor description") 527965Sgblack@eecs.umich.edu # partition description 537965Sgblack@eecs.umich.edu partition_desc = Param.PhysicalMemory( 547965Sgblack@eecs.umich.edu PhysicalMemory(range=AddrRange(_partition_desc_base, size='8kB')), 557965Sgblack@eecs.umich.edu "Memory to hold the partition description") 567965Sgblack@eecs.umich.edu 577965Sgblack@eecs.umich.edu reset_addr = Param.Addr(_rom_base, "Address to load ROM at") 587965Sgblack@eecs.umich.edu hypervisor_addr = Param.Addr(Addr('64kB') + _rom_base, 597965Sgblack@eecs.umich.edu "Address to load hypervisor at") 607965Sgblack@eecs.umich.edu openboot_addr = Param.Addr(Addr('512kB') + _rom_base, 617965Sgblack@eecs.umich.edu "Address to load openboot at") 627965Sgblack@eecs.umich.edu nvram_addr = Param.Addr(_nvram_base, "Address to put the nvram") 637965Sgblack@eecs.umich.edu hypervisor_desc_addr = Param.Addr(_hypervisor_desc_base, 647965Sgblack@eecs.umich.edu "Address for the hypervisor description") 657965Sgblack@eecs.umich.edu partition_desc_addr = Param.Addr(_partition_desc_base, 667965Sgblack@eecs.umich.edu "Address for the partition description") 677965Sgblack@eecs.umich.edu 687965Sgblack@eecs.umich.edu reset_bin = Param.String("file that contains the reset code") 697965Sgblack@eecs.umich.edu hypervisor_bin = Param.String("file that contains the hypervisor code") 707965Sgblack@eecs.umich.edu openboot_bin = Param.String("file that contains the openboot code") 717965Sgblack@eecs.umich.edu nvram_bin = Param.String("file that contains the contents of nvram") 727965Sgblack@eecs.umich.edu hypervisor_desc_bin = Param.String("file that contains the hypervisor description") 737965Sgblack@eecs.umich.edu partition_desc_bin = Param.String("file that contains the partition description") 747965Sgblack@eecs.umich.edu load_addr_mask = 0xffffffffff 757965Sgblack@eecs.umich.edu