18931Sandreas.hansson@arm.com# Copyright (c) 2012 ARM Limited 28931Sandreas.hansson@arm.com# All rights reserved. 38931Sandreas.hansson@arm.com# 48931Sandreas.hansson@arm.com# The license below extends only to copyright in the software and shall 58931Sandreas.hansson@arm.com# not be construed as granting a license to any other intellectual 68931Sandreas.hansson@arm.com# property including but not limited to intellectual property relating 78931Sandreas.hansson@arm.com# to a hardware implementation of the functionality of the software 88931Sandreas.hansson@arm.com# licensed hereunder. You may use the software subject to the license 98931Sandreas.hansson@arm.com# terms below provided that you ensure that this notice is replicated 108931Sandreas.hansson@arm.com# unmodified and in its entirety in all distributions of the software, 118931Sandreas.hansson@arm.com# modified or unmodified, in source code or in binary form. 128931Sandreas.hansson@arm.com# 135399SN/A# Copyright (c) 2005-2008 The Regents of The University of Michigan 144486SN/A# All rights reserved. 154486SN/A# 164486SN/A# Redistribution and use in source and binary forms, with or without 174486SN/A# modification, are permitted provided that the following conditions are 184486SN/A# met: redistributions of source code must retain the above copyright 194486SN/A# notice, this list of conditions and the following disclaimer; 204486SN/A# redistributions in binary form must reproduce the above copyright 214486SN/A# notice, this list of conditions and the following disclaimer in the 224486SN/A# documentation and/or other materials provided with the distribution; 234486SN/A# neither the name of the copyright holders nor the names of its 244486SN/A# contributors may be used to endorse or promote products derived from 254486SN/A# this software without specific prior written permission. 264486SN/A# 274486SN/A# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 284486SN/A# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 294486SN/A# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 304486SN/A# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 314486SN/A# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 324486SN/A# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 334486SN/A# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 344486SN/A# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 354486SN/A# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 364486SN/A# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 374486SN/A# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 384486SN/A# 394486SN/A# Authors: Nathan Binkert 408931Sandreas.hansson@arm.com# Andreas Hansson 414486SN/A 423102SN/Afrom m5.params import * 4313892Sgabeblack@google.comfrom m5.objects.ClockedObject import ClockedObject 441310SN/A 4513892Sgabeblack@google.comclass AbstractMemory(ClockedObject): 468931Sandreas.hansson@arm.com type = 'AbstractMemory' 478931Sandreas.hansson@arm.com abstract = True 489338SAndreas.Sandberg@arm.com cxx_header = "mem/abstract_mem.hh" 499835Sandreas.hansson@arm.com 509835Sandreas.hansson@arm.com # A default memory size of 128 MB (starting at 0) is used to 519835Sandreas.hansson@arm.com # simplify the regressions 529835Sandreas.hansson@arm.com range = Param.AddrRange('128MB', "Address range (potentially interleaved)") 538931Sandreas.hansson@arm.com null = Param.Bool(False, "Do not store data, always return zero") 548931Sandreas.hansson@arm.com 558931Sandreas.hansson@arm.com # All memories are passed to the global physical memory, and 568931Sandreas.hansson@arm.com # certain memories may be excluded from the global address map, 578931Sandreas.hansson@arm.com # e.g. by the testers that use shadow memories as a reference 588931Sandreas.hansson@arm.com in_addr_map = Param.Bool(True, "Memory part of the global address map") 598931Sandreas.hansson@arm.com 6011614Sdavid.j.hashe@gmail.com # When KVM acceleration is used, memory is mapped into the guest process 6111614Sdavid.j.hashe@gmail.com # address space and accessed directly. Some memories may need to be 6211614Sdavid.j.hashe@gmail.com # excluded from this mapping if they overlap with other memory ranges or 6311614Sdavid.j.hashe@gmail.com # are not accessible by the CPU. 6411614Sdavid.j.hashe@gmail.com kvm_map = Param.Bool(True, "Should KVM map this memory for the guest") 6511614Sdavid.j.hashe@gmail.com 668931Sandreas.hansson@arm.com # Should the bootloader include this memory when passing 678931Sandreas.hansson@arm.com # configuration information about the physical memory layout to 688931Sandreas.hansson@arm.com # the kernel, e.g. using ATAG or ACPI 699835Sandreas.hansson@arm.com conf_table_reported = Param.Bool(True, "Report to configuration table") 70