SparcSystem.py revision 8931
17584SN/A# Copyright (c) 2007 The Regents of The University of Michigan
28869SAli.Saidi@ARM.com# All rights reserved.
37584SN/A#
47584SN/A# Redistribution and use in source and binary forms, with or without
57584SN/A# modification, are permitted provided that the following conditions are
67584SN/A# met: redistributions of source code must retain the above copyright
77584SN/A# notice, this list of conditions and the following disclaimer;
87584SN/A# redistributions in binary form must reproduce the above copyright
97584SN/A# notice, this list of conditions and the following disclaimer in the
107584SN/A# documentation and/or other materials provided with the distribution;
117584SN/A# neither the name of the copyright holders nor the names of its
127584SN/A# contributors may be used to endorse or promote products derived from
137584SN/A# this software without specific prior written permission.
147584SN/A#
157584SN/A# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
167584SN/A# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
177584SN/A# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
187584SN/A# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
197584SN/A# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
207584SN/A# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
217584SN/A# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
227584SN/A# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
237584SN/A# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
247584SN/A# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
257584SN/A# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
267584SN/A#
277584SN/A# Authors: Nathan Binkert
287584SN/A
297584SN/Afrom m5.params import *
307584SN/A
317584SN/Afrom SimpleMemory import SimpleMemory
327584SN/Afrom System import System
337584SN/A
347584SN/Aclass SparcSystem(System):
357584SN/A    type = 'SparcSystem'
367584SN/A    _rom_base = 0xfff0000000
377584SN/A    _nvram_base = 0x1f11000000
387584SN/A    _hypervisor_desc_base = 0x1f12080000
397584SN/A    _partition_desc_base = 0x1f12000000
4011793Sbrandon.potter@amd.com    # ROM for OBP/Reset/Hypervisor
4111793Sbrandon.potter@amd.com    rom = Param.SimpleMemory(
427584SN/A        SimpleMemory(range=AddrRange(_rom_base, size='8MB')),
438869SAli.Saidi@ARM.com            "Memory to hold the ROM data")
447584SN/A    # nvram
458245SN/A    nvram = Param.SimpleMemory(
468245SN/A        SimpleMemory(range=AddrRange(_nvram_base, size='8kB')),
478869SAli.Saidi@ARM.com        "Memory to hold the nvram data")
487584SN/A    # hypervisor description
497584SN/A    hypervisor_desc = Param.SimpleMemory(
507584SN/A        SimpleMemory(range=AddrRange(_hypervisor_desc_base, size='8kB')),
518869SAli.Saidi@ARM.com        "Memory to hold the hypervisor description")
5212772Snikos.nikoleris@arm.com    # partition description
539808Sstever@gmail.com    partition_desc = Param.SimpleMemory(
5412086Sspwilson2@wisc.edu        SimpleMemory(range=AddrRange(_partition_desc_base, size='8kB')),
5512086Sspwilson2@wisc.edu        "Memory to hold the partition description")
567584SN/A
577584SN/A    reset_addr = Param.Addr(_rom_base, "Address to load ROM at")
587584SN/A    hypervisor_addr = Param.Addr(Addr('64kB') + _rom_base,
597584SN/A                                 "Address to load hypervisor at")
607584SN/A    openboot_addr = Param.Addr(Addr('512kB') + _rom_base,
618869SAli.Saidi@ARM.com                               "Address to load openboot at")
627584SN/A    nvram_addr = Param.Addr(_nvram_base, "Address to put the nvram")
637584SN/A    hypervisor_desc_addr = Param.Addr(_hypervisor_desc_base,
647584SN/A            "Address for the hypervisor description")
657584SN/A    partition_desc_addr = Param.Addr(_partition_desc_base,
668869SAli.Saidi@ARM.com            "Address for the partition description")
677584SN/A
688869SAli.Saidi@ARM.com    reset_bin = Param.String("file that contains the reset code")
698869SAli.Saidi@ARM.com    hypervisor_bin = Param.String("file that contains the hypervisor code")
708869SAli.Saidi@ARM.com    openboot_bin = Param.String("file that contains the openboot code")
718869SAli.Saidi@ARM.com    nvram_bin = Param.String("file that contains the contents of nvram")
728869SAli.Saidi@ARM.com    hypervisor_desc_bin = Param.String("file that contains the hypervisor description")
738869SAli.Saidi@ARM.com    partition_desc_bin = Param.String("file that contains the partition description")
748869SAli.Saidi@ARM.com    load_addr_mask = 0xffffffffff
758869SAli.Saidi@ARM.com