14486SN/A# Copyright (c) 2005-2007 The Regents of The University of Michigan 24486SN/A# All rights reserved. 34486SN/A# 44486SN/A# Redistribution and use in source and binary forms, with or without 54486SN/A# modification, are permitted provided that the following conditions are 64486SN/A# met: redistributions of source code must retain the above copyright 74486SN/A# notice, this list of conditions and the following disclaimer; 84486SN/A# redistributions in binary form must reproduce the above copyright 94486SN/A# notice, this list of conditions and the following disclaimer in the 104486SN/A# documentation and/or other materials provided with the distribution; 114486SN/A# neither the name of the copyright holders nor the names of its 124486SN/A# contributors may be used to endorse or promote products derived from 134486SN/A# this software without specific prior written permission. 144486SN/A# 154486SN/A# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 164486SN/A# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 174486SN/A# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 184486SN/A# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 194486SN/A# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 204486SN/A# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 214486SN/A# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 224486SN/A# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 234486SN/A# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 244486SN/A# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 254486SN/A# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 264486SN/A# 274486SN/A# Authors: Nathan Binkert 284486SN/A 293102SN/Afrom m5.SimObject import SimObject 303102SN/Afrom m5.params import * 311692SN/Aclass DiskImage(SimObject): 321366SN/A type = 'DiskImage' 331310SN/A abstract = True 3411264Sandreas.sandberg@arm.com cxx_header = "dev/storage/disk_image.hh" 351310SN/A image_file = Param.String("disk image file") 361369SN/A read_only = Param.Bool(False, "read only image") 371310SN/A 381692SN/Aclass RawDiskImage(DiskImage): 391366SN/A type = 'RawDiskImage' 4011264Sandreas.sandberg@arm.com cxx_header = "dev/storage/disk_image.hh" 411310SN/A 421692SN/Aclass CowDiskImage(DiskImage): 431366SN/A type = 'CowDiskImage' 4411264Sandreas.sandberg@arm.com cxx_header = "dev/storage/disk_image.hh" 452916SN/A child = Param.DiskImage(RawDiskImage(read_only=True), 462916SN/A "child image") 471310SN/A table_size = Param.Int(65536, "initial table size") 485821SN/A image_file = "" 49