SparcSystem.py revision 13665
14486Sbinkertn@umich.edu# Copyright (c) 2007 The Regents of The University of Michigan
24486Sbinkertn@umich.edu# All rights reserved.
34486Sbinkertn@umich.edu#
44486Sbinkertn@umich.edu# Redistribution and use in source and binary forms, with or without
54486Sbinkertn@umich.edu# modification, are permitted provided that the following conditions are
64486Sbinkertn@umich.edu# met: redistributions of source code must retain the above copyright
74486Sbinkertn@umich.edu# notice, this list of conditions and the following disclaimer;
84486Sbinkertn@umich.edu# redistributions in binary form must reproduce the above copyright
94486Sbinkertn@umich.edu# notice, this list of conditions and the following disclaimer in the
104486Sbinkertn@umich.edu# documentation and/or other materials provided with the distribution;
114486Sbinkertn@umich.edu# neither the name of the copyright holders nor the names of its
124486Sbinkertn@umich.edu# contributors may be used to endorse or promote products derived from
134486Sbinkertn@umich.edu# this software without specific prior written permission.
144486Sbinkertn@umich.edu#
154486Sbinkertn@umich.edu# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
164486Sbinkertn@umich.edu# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
174486Sbinkertn@umich.edu# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
184486Sbinkertn@umich.edu# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
194486Sbinkertn@umich.edu# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
204486Sbinkertn@umich.edu# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
214486Sbinkertn@umich.edu# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
224486Sbinkertn@umich.edu# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
234486Sbinkertn@umich.edu# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
244486Sbinkertn@umich.edu# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
254486Sbinkertn@umich.edu# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
264486Sbinkertn@umich.edu#
274486Sbinkertn@umich.edu# Authors: Nathan Binkert
284486Sbinkertn@umich.edu
294486Sbinkertn@umich.edufrom m5.params import *
304486Sbinkertn@umich.edu
3113665Sandreas.sandberg@arm.comfrom m5.objects.SimpleMemory import SimpleMemory
3213665Sandreas.sandberg@arm.comfrom m5.objects.System import System
334486Sbinkertn@umich.edu
344486Sbinkertn@umich.educlass SparcSystem(System):
354486Sbinkertn@umich.edu    type = 'SparcSystem'
369338SAndreas.Sandberg@arm.com    cxx_header = 'arch/sparc/system.hh'
374486Sbinkertn@umich.edu    _rom_base = 0xfff0000000
384486Sbinkertn@umich.edu    _nvram_base = 0x1f11000000
394486Sbinkertn@umich.edu    _hypervisor_desc_base = 0x1f12080000
404486Sbinkertn@umich.edu    _partition_desc_base = 0x1f12000000
414486Sbinkertn@umich.edu    # ROM for OBP/Reset/Hypervisor
428931Sandreas.hansson@arm.com    rom = Param.SimpleMemory(
438931Sandreas.hansson@arm.com        SimpleMemory(range=AddrRange(_rom_base, size='8MB')),
444486Sbinkertn@umich.edu            "Memory to hold the ROM data")
454486Sbinkertn@umich.edu    # nvram
468931Sandreas.hansson@arm.com    nvram = Param.SimpleMemory(
478931Sandreas.hansson@arm.com        SimpleMemory(range=AddrRange(_nvram_base, size='8kB')),
484486Sbinkertn@umich.edu        "Memory to hold the nvram data")
494486Sbinkertn@umich.edu    # hypervisor description
508931Sandreas.hansson@arm.com    hypervisor_desc = Param.SimpleMemory(
518931Sandreas.hansson@arm.com        SimpleMemory(range=AddrRange(_hypervisor_desc_base, size='8kB')),
524486Sbinkertn@umich.edu        "Memory to hold the hypervisor description")
534486Sbinkertn@umich.edu    # partition description
548931Sandreas.hansson@arm.com    partition_desc = Param.SimpleMemory(
558931Sandreas.hansson@arm.com        SimpleMemory(range=AddrRange(_partition_desc_base, size='8kB')),
564486Sbinkertn@umich.edu        "Memory to hold the partition description")
574486Sbinkertn@umich.edu
584486Sbinkertn@umich.edu    reset_addr = Param.Addr(_rom_base, "Address to load ROM at")
594486Sbinkertn@umich.edu    hypervisor_addr = Param.Addr(Addr('64kB') + _rom_base,
604486Sbinkertn@umich.edu                                 "Address to load hypervisor at")
614486Sbinkertn@umich.edu    openboot_addr = Param.Addr(Addr('512kB') + _rom_base,
624486Sbinkertn@umich.edu                               "Address to load openboot at")
634486Sbinkertn@umich.edu    nvram_addr = Param.Addr(_nvram_base, "Address to put the nvram")
644486Sbinkertn@umich.edu    hypervisor_desc_addr = Param.Addr(_hypervisor_desc_base,
654486Sbinkertn@umich.edu            "Address for the hypervisor description")
664486Sbinkertn@umich.edu    partition_desc_addr = Param.Addr(_partition_desc_base,
674486Sbinkertn@umich.edu            "Address for the partition description")
684486Sbinkertn@umich.edu
694486Sbinkertn@umich.edu    reset_bin = Param.String("file that contains the reset code")
704486Sbinkertn@umich.edu    hypervisor_bin = Param.String("file that contains the hypervisor code")
714486Sbinkertn@umich.edu    openboot_bin = Param.String("file that contains the openboot code")
724486Sbinkertn@umich.edu    nvram_bin = Param.String("file that contains the contents of nvram")
734486Sbinkertn@umich.edu    hypervisor_desc_bin = Param.String("file that contains the hypervisor description")
744486Sbinkertn@umich.edu    partition_desc_bin = Param.String("file that contains the partition description")
757580SAli.Saidi@arm.com    load_addr_mask = 0xffffffffff
76