AbstractMemory.py revision 11614
12567SN/A# Copyright (c) 2012 ARM Limited 212531Sandreas.sandberg@arm.com# All rights reserved. 37650SAli.Saidi@ARM.com# 47650SAli.Saidi@ARM.com# The license below extends only to copyright in the software and shall 57650SAli.Saidi@ARM.com# not be construed as granting a license to any other intellectual 67650SAli.Saidi@ARM.com# property including but not limited to intellectual property relating 77650SAli.Saidi@ARM.com# to a hardware implementation of the functionality of the software 87650SAli.Saidi@ARM.com# licensed hereunder. You may use the software subject to the license 97650SAli.Saidi@ARM.com# terms below provided that you ensure that this notice is replicated 107650SAli.Saidi@ARM.com# unmodified and in its entirety in all distributions of the software, 117650SAli.Saidi@ARM.com# modified or unmodified, in source code or in binary form. 127650SAli.Saidi@ARM.com# 137650SAli.Saidi@ARM.com# Copyright (c) 2005-2008 The Regents of The University of Michigan 142567SN/A# All rights reserved. 152567SN/A# 162567SN/A# Redistribution and use in source and binary forms, with or without 172567SN/A# modification, are permitted provided that the following conditions are 182567SN/A# met: redistributions of source code must retain the above copyright 192567SN/A# notice, this list of conditions and the following disclaimer; 202567SN/A# redistributions in binary form must reproduce the above copyright 212567SN/A# notice, this list of conditions and the following disclaimer in the 222567SN/A# documentation and/or other materials provided with the distribution; 232567SN/A# neither the name of the copyright holders nor the names of its 242567SN/A# contributors may be used to endorse or promote products derived from 252567SN/A# this software without specific prior written permission. 262567SN/A# 272567SN/A# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 282567SN/A# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 292567SN/A# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 302567SN/A# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 312567SN/A# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 322567SN/A# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 332567SN/A# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 342567SN/A# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 352567SN/A# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 362567SN/A# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 372567SN/A# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 382567SN/A# 392665SN/A# Authors: Nathan Binkert 402665SN/A# Andreas Hansson 412567SN/A 422567SN/Afrom m5.params import * 436757SAli.Saidi@ARM.comfrom MemObject import MemObject 446757SAli.Saidi@ARM.com 452567SN/Aclass AbstractMemory(MemObject): 4611234Sandreas.sandberg@arm.com type = 'AbstractMemory' 472567SN/A abstract = True 482567SN/A cxx_header = "mem/abstract_mem.hh" 492567SN/A 508229Snate@binkert.org # A default memory size of 128 MB (starting at 0) is used to 516757SAli.Saidi@ARM.com # simplify the regressions 5210810Sbr@bsdpad.com range = Param.AddrRange('128MB', "Address range (potentially interleaved)") 532567SN/A null = Param.Bool(False, "Do not store data, always return zero") 542567SN/A 552567SN/A # All memories are passed to the global physical memory, and 5610844Sandreas.sandberg@arm.com # certain memories may be excluded from the global address map, 5710037SARM gem5 Developers # e.g. by the testers that use shadow memories as a reference 5810037SARM gem5 Developers in_addr_map = Param.Bool(True, "Memory part of the global address map") 596757SAli.Saidi@ARM.com 602567SN/A # When KVM acceleration is used, memory is mapped into the guest process 618285SPrakash.Ramrakhyani@arm.com # address space and accessed directly. Some memories may need to be 627650SAli.Saidi@ARM.com # excluded from this mapping if they overlap with other memory ranges or 637650SAli.Saidi@ARM.com # are not accessible by the CPU. 647650SAli.Saidi@ARM.com kvm_map = Param.Bool(True, "Should KVM map this memory for the guest") 657650SAli.Saidi@ARM.com 667650SAli.Saidi@ARM.com # Should the bootloader include this memory when passing 677650SAli.Saidi@ARM.com # configuration information about the physical memory layout to 6811234Sandreas.sandberg@arm.com # the kernel, e.g. using ATAG or ACPI 6911234Sandreas.sandberg@arm.com conf_table_reported = Param.Bool(True, "Report to configuration table") 7011234Sandreas.sandberg@arm.com