#include <bitset>
#include <set>
+#include "params/Platform.hh"
#include "sim/sim_object.hh"
-#include "arch/isa_traits.hh"
-class PciConfigAll;
class IntrControl;
-class SimConsole;
+class Terminal;
class Uart;
class System;
+
class Platform : public SimObject
{
public:
/** Pointer to the interrupt controller */
IntrControl *intrctrl;
- /** Pointer to the UART, set by the uart */
- Uart *uart;
-
- /** Pointer to the system for info about the memory system. */
- System *system;
-
public:
- Platform(const std::string &name, IntrControl *intctrl);
+ typedef PlatformParams Params;
+ Platform(const Params *p);
virtual ~Platform();
+
+ /**
+ * Cause the cpu to post a serial interrupt to the CPU.
+ */
virtual void postConsoleInt() = 0;
+
+ /**
+ * Clear a posted CPU interrupt
+ */
virtual void clearConsoleInt() = 0;
- virtual Tick intrFrequency() = 0;
- virtual void postPciInt(int line);
- virtual void clearPciInt(int line);
- virtual Addr pciToDma(Addr pciAddr) const;
- virtual Addr calcConfigAddr(int bus, int dev, int func) = 0;
- virtual void registerPciDevice(uint8_t bus, uint8_t dev, uint8_t func,
- uint8_t intr);
- private:
- std::bitset<256> intLines;
- std::set<uint32_t> pciDevices;
+ /**
+ * Cause the chipset to post a cpi interrupt to the CPU.
+ */
+ virtual void postPciInt(int line);
+
+ /**
+ * Clear a posted PCI->CPU interrupt
+ */
+ virtual void clearPciInt(int line);
};
#endif // __DEV_PLATFORM_HH__