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