from m5.params import *
from m5.proxy import *
-from m5.objects.Device import IsaFake
+from m5.objects.Device import IsaFake, BadAddr
from m5.objects.Platform import Platform
from m5.objects.SouthBridge import SouthBridge
from m5.objects.Terminal import Terminal
from m5.objects.Uart import Uart8250
from m5.objects.PciHost import GenericPciHost
+from m5.objects.XBar import IOXBar
def x86IOAddress(port):
IO_address_space_base = 0x8000000000000000
south_bridge = SouthBridge()
pci_host = PcPciHost()
- # "Non-existant" ports used for timing purposes by the linux kernel
- i_dont_exist1 = IsaFake(pio_addr=x86IOAddress(0x80), pio_size=1)
- i_dont_exist2 = IsaFake(pio_addr=x86IOAddress(0xed), pio_size=1)
-
- # Ports behind the pci config and data regsiters. These don't do anything,
- # but the linux kernel fiddles with them anway.
- behind_pci = IsaFake(pio_addr=x86IOAddress(0xcf8), pio_size=8)
-
# Serial port and terminal
com_1 = Uart8250()
com_1.pio_addr = x86IOAddress(0x3f8)
# A device to catch accesses to the non-existant floppy controller.
fake_floppy = IsaFake(pio_addr=x86IOAddress(0x3f2), pio_size=2)
+ # A bus for accesses not claimed by a specific device.
+ default_bus = IOXBar()
+
+ # A device to handle accesses to unclaimed IO ports.
+ empty_isa = IsaFake(pio_addr=x86IOAddress(0), pio_size='64kB',
+ ret_data8=0, ret_data16=0, ret_data32=0, ret_data64=0,
+ pio=default_bus.mem_side_ports)
+
+ # A device to handle any other type of unclaimed access.
+ bad_addr = BadAddr(pio=default_bus.default)
+
def attachIO(self, bus, dma_ports = []):
self.south_bridge.attachIO(bus, dma_ports)
- self.i_dont_exist1.pio = bus.mem_side_ports
- self.i_dont_exist2.pio = bus.mem_side_ports
- self.behind_pci.pio = bus.mem_side_ports
self.com_1.pio = bus.mem_side_ports
self.fake_com_2.pio = bus.mem_side_ports
self.fake_com_3.pio = bus.mem_side_ports
self.fake_com_4.pio = bus.mem_side_ports
self.fake_floppy.pio = bus.mem_side_ports
- self.pci_host.pio = bus.default
+ self.pci_host.pio = bus.mem_side_ports
+
+ self.default_bus.cpu_side_ports = bus.default