ArmSystem.py revision 8299:64a938a8b7fc
12391SN/A# Copyright (c) 2009 ARM Limited
28931Sandreas.hansson@arm.com# All rights reserved.
37733SN/A#
47733SN/A# The license below extends only to copyright in the software and shall
57733SN/A# not be construed as granting a license to any other intellectual
67733SN/A# property including but not limited to intellectual property relating
77733SN/A# to a hardware implementation of the functionality of the software
87733SN/A# licensed hereunder.  You may use the software subject to the license
97733SN/A# terms below provided that you ensure that this notice is replicated
107733SN/A# unmodified and in its entirety in all distributions of the software,
117733SN/A# modified or unmodified, in source code or in binary form.
127733SN/A#
137733SN/A# Redistribution and use in source and binary forms, with or without
142391SN/A# modification, are permitted provided that the following conditions are
152391SN/A# met: redistributions of source code must retain the above copyright
162391SN/A# notice, this list of conditions and the following disclaimer;
172391SN/A# redistributions in binary form must reproduce the above copyright
182391SN/A# notice, this list of conditions and the following disclaimer in the
192391SN/A# documentation and/or other materials provided with the distribution;
202391SN/A# neither the name of the copyright holders nor the names of its
212391SN/A# contributors may be used to endorse or promote products derived from
222391SN/A# this software without specific prior written permission.
232391SN/A#
242391SN/A# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
252391SN/A# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
262391SN/A# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
272391SN/A# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
282391SN/A# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
292391SN/A# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
302391SN/A# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
312391SN/A# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
322391SN/A# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
332391SN/A# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
342391SN/A# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
352391SN/A#
362391SN/A# Authors: Ali Saidi
372391SN/A
382391SN/Afrom m5.params import *
392665SN/A
402665SN/Afrom System import System
412914SN/A
428931Sandreas.hansson@arm.comclass ArmMachineType(Enum):
432391SN/A    map = {'RealView_EB' : 827,
442391SN/A           'RealView_PBX' : 1901 }
4510466Sandreas.hansson@arm.com
4610466Sandreas.hansson@arm.comclass ArmSystem(System):
4710102Sali.saidi@arm.com    type = 'ArmSystem'
4810102Sali.saidi@arm.com    load_addr_mask = 0xffffffff
498232SN/A    # 0x35 Implementor is '5' from "M5"
508232SN/A    # 0x0 Variant
518931Sandreas.hansson@arm.com    # 0xf Architecture from CPUID scheme
523879SN/A    # 0xf00 Primary part number
539053Sdam.sunwoo@arm.com    # 0x0 Revision
542394SN/A    midr_regval = Param.UInt32(0x350ff000, "MIDR value")
552391SN/A    boot_loader = Param.String("", "File that contains the boot loader code if any")
562391SN/A    boot_loader_mem = Param.PhysicalMemory(NULL,
578931Sandreas.hansson@arm.com                          "Memory object that boot loader is to be loaded into")
588931Sandreas.hansson@arm.com    gic_cpu_addr = Param.Addr(0, "Addres of the GIC CPU interface")
599053Sdam.sunwoo@arm.com    flags_addr = Param.Addr(0, "Address of the flags register for MP booting")
609053Sdam.sunwoo@arm.com
612391SN/Aclass LinuxArmSystem(ArmSystem):
6210466Sandreas.hansson@arm.com    type = 'LinuxArmSystem'
6310466Sandreas.hansson@arm.com    load_addr_mask = 0x0fffffff
6410466Sandreas.hansson@arm.com    machine_type = Param.ArmMachineType('RealView_PBX',
6510466Sandreas.hansson@arm.com        "Machine id from http://www.arm.linux.org.uk/developer/machines/")
6610466Sandreas.hansson@arm.com
6710466Sandreas.hansson@arm.com
6810466Sandreas.hansson@arm.com