Ide.py revision 3102
1from m5.SimObject import SimObject
2from m5.params import *
3from Pci import PciDevice, PciConfigData
4
5class IdeID(Enum): vals = ['master', 'slave']
6
7class IdeControllerPciData(PciConfigData):
8    VendorID = 0x8086
9    DeviceID = 0x7111
10    Command = 0x0
11    Status = 0x280
12    Revision = 0x0
13    ClassCode = 0x01
14    SubClassCode = 0x01
15    ProgIF = 0x85
16    BAR0 = 0x00000001
17    BAR1 = 0x00000001
18    BAR2 = 0x00000001
19    BAR3 = 0x00000001
20    BAR4 = 0x00000001
21    BAR5 = 0x00000001
22    InterruptLine = 0x1f
23    InterruptPin = 0x01
24    BAR0Size = '8B'
25    BAR1Size = '4B'
26    BAR2Size = '8B'
27    BAR3Size = '4B'
28    BAR4Size = '16B'
29
30class IdeDisk(SimObject):
31    type = 'IdeDisk'
32    delay = Param.Latency('1us', "Fixed disk delay in microseconds")
33    driveID = Param.IdeID('master', "Drive ID")
34    image = Param.DiskImage("Disk image")
35
36class IdeController(PciDevice):
37    type = 'IdeController'
38    disks = VectorParam.IdeDisk("IDE disks attached to this controller")
39
40    config_latency = Param.Latency('20ns', "Config read or write latency")
41
42    configdata =IdeControllerPciData()
43