T1000.py revision 3743
1from m5.params import * 2from m5.proxy import * 3from Device import BasicPioDevice 4from Uart import Uart8250 5from Platform import Platform 6from SimConsole import SimConsole, ConsoleListener 7 8class IsaFake(BasicPioDevice): 9 type = 'IsaFake' 10 pio_size = Param.Addr(0x8, "Size of address range") 11 ret_data = Param.UInt8(0xFF, "Default data to return") 12 ret_bad_addr = Param.Bool(False, "Return pkt status bad address on access") 13 14class BadAddr(IsaFake): 15 ret_bad_addr = Param.Bool(True, "Return pkt status bad address on access") 16 17class T1000(Platform): 18 type = 'T1000' 19 system = Param.System(Parent.any, "system") 20 21 fake_iob = IsaFake(pio_addr=0x8000000000, pio_size=0x7F00000000) 22 23 uart = Uart8250(pio_addr=0xfff0c2c000) 24 console = SimConsole(listener = ConsoleListener()) 25 26 # Attach I/O devices to specified bus object. Can't do this 27 # earlier, since the bus object itself is typically defined at the 28 # System level. 29 def attachIO(self, bus): 30 self.fake_iob.pio = bus.port 31 self.uart.pio = bus.port 32