Ide.py revision 4486
16019Shines@cs.fsu.edu# Copyright (c) 2005-2007 The Regents of The University of Michigan 27093Sgblack@eecs.umich.edu# All rights reserved. 37093Sgblack@eecs.umich.edu# 47093Sgblack@eecs.umich.edu# Redistribution and use in source and binary forms, with or without 57093Sgblack@eecs.umich.edu# modification, are permitted provided that the following conditions are 67093Sgblack@eecs.umich.edu# met: redistributions of source code must retain the above copyright 77093Sgblack@eecs.umich.edu# notice, this list of conditions and the following disclaimer; 87093Sgblack@eecs.umich.edu# redistributions in binary form must reproduce the above copyright 97093Sgblack@eecs.umich.edu# notice, this list of conditions and the following disclaimer in the 107093Sgblack@eecs.umich.edu# documentation and/or other materials provided with the distribution; 117093Sgblack@eecs.umich.edu# neither the name of the copyright holders nor the names of its 127093Sgblack@eecs.umich.edu# contributors may be used to endorse or promote products derived from 137093Sgblack@eecs.umich.edu# this software without specific prior written permission. 146019Shines@cs.fsu.edu# 156019Shines@cs.fsu.edu# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 166019Shines@cs.fsu.edu# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 176019Shines@cs.fsu.edu# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 186019Shines@cs.fsu.edu# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 196019Shines@cs.fsu.edu# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 206019Shines@cs.fsu.edu# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 216019Shines@cs.fsu.edu# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 226019Shines@cs.fsu.edu# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 236019Shines@cs.fsu.edu# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 246019Shines@cs.fsu.edu# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 256019Shines@cs.fsu.edu# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 266019Shines@cs.fsu.edu# 276019Shines@cs.fsu.edu# Authors: Nathan Binkert 286019Shines@cs.fsu.edu 296019Shines@cs.fsu.edufrom m5.SimObject import SimObject 306019Shines@cs.fsu.edufrom m5.params import * 316019Shines@cs.fsu.edufrom Pci import PciDevice, PciConfigData 326019Shines@cs.fsu.edu 336019Shines@cs.fsu.educlass IdeID(Enum): vals = ['master', 'slave'] 346019Shines@cs.fsu.edu 356019Shines@cs.fsu.educlass IdeControllerPciData(PciConfigData): 366019Shines@cs.fsu.edu VendorID = 0x8086 376019Shines@cs.fsu.edu DeviceID = 0x7111 386019Shines@cs.fsu.edu Command = 0x0 396019Shines@cs.fsu.edu Status = 0x280 407399SAli.Saidi@ARM.com Revision = 0x0 417399SAli.Saidi@ARM.com ClassCode = 0x01 426019Shines@cs.fsu.edu SubClassCode = 0x01 436019Shines@cs.fsu.edu ProgIF = 0x85 446019Shines@cs.fsu.edu BAR0 = 0x00000001 456019Shines@cs.fsu.edu BAR1 = 0x00000001 466019Shines@cs.fsu.edu BAR2 = 0x00000001 476019Shines@cs.fsu.edu BAR3 = 0x00000001 486116Snate@binkert.org BAR4 = 0x00000001 496019Shines@cs.fsu.edu BAR5 = 0x00000001 508782Sgblack@eecs.umich.edu InterruptLine = 0x1f 518756Sgblack@eecs.umich.edu InterruptPin = 0x01 526019Shines@cs.fsu.edu BAR0Size = '8B' 536019Shines@cs.fsu.edu BAR1Size = '4B' 546019Shines@cs.fsu.edu BAR2Size = '8B' 556019Shines@cs.fsu.edu BAR3Size = '4B' 566019Shines@cs.fsu.edu BAR4Size = '16B' 576019Shines@cs.fsu.edu 588232Snate@binkert.orgclass IdeDisk(SimObject): 598232Snate@binkert.org type = 'IdeDisk' 608232Snate@binkert.org delay = Param.Latency('1us', "Fixed disk delay in microseconds") 616116Snate@binkert.org driveID = Param.IdeID('master', "Drive ID") 626116Snate@binkert.org image = Param.DiskImage("Disk image") 638756Sgblack@eecs.umich.edu 646019Shines@cs.fsu.educlass IdeController(PciDevice): 656019Shines@cs.fsu.edu type = 'IdeController' 666019Shines@cs.fsu.edu disks = VectorParam.IdeDisk("IDE disks attached to this controller") 676019Shines@cs.fsu.edu 686019Shines@cs.fsu.edu configdata =IdeControllerPciData() 696019Shines@cs.fsu.edu