X86: Add fake devices for non-existant serial ports.
authorGabe Black <gblack@eecs.umich.edu>
Mon, 26 Jan 2009 04:33:52 +0000 (20:33 -0800)
committerGabe Black <gblack@eecs.umich.edu>
Mon, 26 Jan 2009 04:33:52 +0000 (20:33 -0800)
src/dev/x86/Pc.py

index 080844e4a94aa9504cd64c67c487616a004099f7..51a21c3490160fc26c5e9a3a54184c57c1cfac28 100644 (file)
@@ -61,11 +61,19 @@ class Pc(Platform):
     com_1.pio_addr = x86IOAddress(0x3f8)
     com_1.terminal = terminal
 
+    # Devices to catch access to non-existant serial ports.
+    fake_com_2 = IsaFake(pio_addr=x86IOAddress(0x2f8), pio_size=8)
+    fake_com_3 = IsaFake(pio_addr=x86IOAddress(0x3e8), pio_size=8)
+    fake_com_4 = IsaFake(pio_addr=x86IOAddress(0x2e8), pio_size=8)
+
     def attachIO(self, bus):
         self.south_bridge.attachIO(bus)
         self.i_dont_exist.pio = bus.port
         self.behind_pci.pio = bus.port
         self.com_1.pio = bus.port
+        self.fake_com_2.pio = bus.port
+        self.fake_com_3.pio = bus.port
+        self.fake_com_4.pio = bus.port
         self.pciconfig.pio = bus.default
         bus.responder_set = True
         bus.responder = self.pciconfig