Add the capability to iterate through the packets in a pktfifo,
[gem5.git] / dev / uart8250.hh
index 06a798e26f744849515e4a3b560871b9e3522fc3..88abf8e242ac62e8bf7f67cace12816837a15703 100644 (file)
 #include "dev/io_device.hh"
 #include "dev/uart.hh"
 
+
+/* UART8250 Interrupt ID Register
+ *  bit 0    Interrupt Pending 0 = true, 1 = false
+ *  bit 2:1  ID of highest priority interrupt
+ *  bit 7:3  zeroes
+ */
+#define IIR_NOPEND 0x1
+
+// Interrupt IDs
+#define IIR_MODEM 0x00 /* Modem Status (lowest priority) */
+#define IIR_TXID  0x02 /* Tx Data */
+#define IIR_RXID  0x04 /* Rx Data */
+#define IIR_LINE  0x06 /* Rx Line Status (highest priority)*/
+
 class SimConsole;
 class Platform;
 
@@ -65,7 +79,7 @@ class Uart8250 : public Uart
 
   public:
     Uart8250(const std::string &name, SimConsole *c, MemoryController *mmu,
-         Addr a, Addr s, HierParams *hier, Bus *bus, Tick pio_latency,
+         Addr a, Addr s, HierParams *hier, Bus *pio_bus, Tick pio_latency,
          Platform *p);
 
     virtual Fault read(MemReqPtr &req, uint8_t *data);