SparcSystem.py revision 8931
17405SAli.Saidi@ARM.com# Copyright (c) 2007 The Regents of The University of Michigan
211573SDylan.Johnson@ARM.com# All rights reserved.
37405SAli.Saidi@ARM.com#
47405SAli.Saidi@ARM.com# Redistribution and use in source and binary forms, with or without
57405SAli.Saidi@ARM.com# modification, are permitted provided that the following conditions are
67405SAli.Saidi@ARM.com# met: redistributions of source code must retain the above copyright
77405SAli.Saidi@ARM.com# notice, this list of conditions and the following disclaimer;
87405SAli.Saidi@ARM.com# redistributions in binary form must reproduce the above copyright
97405SAli.Saidi@ARM.com# notice, this list of conditions and the following disclaimer in the
107405SAli.Saidi@ARM.com# documentation and/or other materials provided with the distribution;
117405SAli.Saidi@ARM.com# neither the name of the copyright holders nor the names of its
127405SAli.Saidi@ARM.com# contributors may be used to endorse or promote products derived from
137405SAli.Saidi@ARM.com# this software without specific prior written permission.
147405SAli.Saidi@ARM.com#
157405SAli.Saidi@ARM.com# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
167405SAli.Saidi@ARM.com# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
177405SAli.Saidi@ARM.com# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
187405SAli.Saidi@ARM.com# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
197405SAli.Saidi@ARM.com# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
207405SAli.Saidi@ARM.com# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
217405SAli.Saidi@ARM.com# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
227405SAli.Saidi@ARM.com# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
237405SAli.Saidi@ARM.com# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
247405SAli.Saidi@ARM.com# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
257405SAli.Saidi@ARM.com# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
267405SAli.Saidi@ARM.com#
277405SAli.Saidi@ARM.com# Authors: Nathan Binkert
287405SAli.Saidi@ARM.com
297405SAli.Saidi@ARM.comfrom m5.params import *
307405SAli.Saidi@ARM.com
317405SAli.Saidi@ARM.comfrom SimpleMemory import SimpleMemory
327405SAli.Saidi@ARM.comfrom System import System
337405SAli.Saidi@ARM.com
347405SAli.Saidi@ARM.comclass SparcSystem(System):
357405SAli.Saidi@ARM.com    type = 'SparcSystem'
367405SAli.Saidi@ARM.com    _rom_base = 0xfff0000000
377405SAli.Saidi@ARM.com    _nvram_base = 0x1f11000000
387405SAli.Saidi@ARM.com    _hypervisor_desc_base = 0x1f12080000
397405SAli.Saidi@ARM.com    _partition_desc_base = 0x1f12000000
407405SAli.Saidi@ARM.com    # ROM for OBP/Reset/Hypervisor
417405SAli.Saidi@ARM.com    rom = Param.SimpleMemory(
4210461SAndreas.Sandberg@ARM.com        SimpleMemory(range=AddrRange(_rom_base, size='8MB')),
439050Schander.sudanthi@arm.com            "Memory to hold the ROM data")
448887Sgeoffrey.blake@arm.com    # nvram
4510461SAndreas.Sandberg@ARM.com    nvram = Param.SimpleMemory(
468232Snate@binkert.org        SimpleMemory(range=AddrRange(_nvram_base, size='8kB')),
478232Snate@binkert.org        "Memory to hold the nvram data")
4810844Sandreas.sandberg@arm.com    # hypervisor description
499384SAndreas.Sandberg@arm.com    hypervisor_desc = Param.SimpleMemory(
507678Sgblack@eecs.umich.edu        SimpleMemory(range=AddrRange(_hypervisor_desc_base, size='8kB')),
518059SAli.Saidi@ARM.com        "Memory to hold the hypervisor description")
528284SAli.Saidi@ARM.com    # partition description
537405SAli.Saidi@ARM.com    partition_desc = Param.SimpleMemory(
547405SAli.Saidi@ARM.com        SimpleMemory(range=AddrRange(_partition_desc_base, size='8kB')),
557405SAli.Saidi@ARM.com        "Memory to hold the partition description")
567405SAli.Saidi@ARM.com
5710037SARM gem5 Developers    reset_addr = Param.Addr(_rom_base, "Address to load ROM at")
5810037SARM gem5 Developers    hypervisor_addr = Param.Addr(Addr('64kB') + _rom_base,
5910037SARM gem5 Developers                                 "Address to load hypervisor at")
6010037SARM gem5 Developers    openboot_addr = Param.Addr(Addr('512kB') + _rom_base,
6110037SARM gem5 Developers                               "Address to load openboot at")
6210037SARM gem5 Developers    nvram_addr = Param.Addr(_nvram_base, "Address to put the nvram")
6310037SARM gem5 Developers    hypervisor_desc_addr = Param.Addr(_hypervisor_desc_base,
6410037SARM gem5 Developers            "Address for the hypervisor description")
6510037SARM gem5 Developers    partition_desc_addr = Param.Addr(_partition_desc_base,
6610037SARM gem5 Developers            "Address for the partition description")
6710037SARM gem5 Developers
6810037SARM gem5 Developers    reset_bin = Param.String("file that contains the reset code")
6910037SARM gem5 Developers    hypervisor_bin = Param.String("file that contains the hypervisor code")
7010037SARM gem5 Developers    openboot_bin = Param.String("file that contains the openboot code")
7110037SARM gem5 Developers    nvram_bin = Param.String("file that contains the contents of nvram")
7210037SARM gem5 Developers    hypervisor_desc_bin = Param.String("file that contains the hypervisor description")
7310037SARM gem5 Developers    partition_desc_bin = Param.String("file that contains the partition description")
7410037SARM gem5 Developers    load_addr_mask = 0xffffffffff
7510037SARM gem5 Developers