X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=dev%2Fplatform.hh;h=1ee64545467ef08fd3daa18d24a9d5b59f57b366;hb=a48c24b61eedf580645ff0294b225d1e69a9444b;hp=db6a489ad656a4e29d8c2a613a645724f775a96b;hpb=a5f90eba3bd2d96c6733a6ac9e8d03a9297fae6a;p=gem5.git diff --git a/dev/platform.hh b/dev/platform.hh index db6a489ad..1ee645454 100644 --- a/dev/platform.hh +++ b/dev/platform.hh @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003 The Regents of The University of Michigan + * Copyright (c) 2004-2005 The Regents of The University of Michigan * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -31,32 +31,38 @@ * Generic interface for platforms */ -#ifndef __PLATFORM_HH_ -#define __PLATFORM_HH_ +#ifndef __DEV_PLATFORM_HH__ +#define __DEV_PLATFORM_HH__ #include "sim/sim_object.hh" +#include "arch/isa_traits.hh" class PciConfigAll; class IntrControl; class SimConsole; +class Uart; class Platform : public SimObject { public: /** Pointer to the interrupt controller */ IntrControl *intrctrl; - /** Pointer to the simulation console */ - SimConsole *cons; + /** Pointer to the PCI configuration space */ PciConfigAll *pciconfig; - int interrupt_frequency; + /** Pointer to the UART, set by the uart */ + Uart *uart; public: - Platform(const std::string &name, SimConsole *con, IntrControl *intctrl, - PciConfigAll *pci, int intrFreq) - : SimObject(name), intrctrl(intctrl), cons(con), pciconfig(pci), - interrupt_frequency(intrFreq) {} + Platform(const std::string &name, IntrControl *intctrl, PciConfigAll *pci); + virtual ~Platform(); + virtual void postConsoleInt() = 0; + virtual void clearConsoleInt() = 0; + virtual Tick intrFrequency() = 0; + virtual void postPciInt(int line); + virtual void clearPciInt(int line); + virtual Addr pciToDma(Addr pciAddr) const; }; -#endif // __PLATFORM_HH_ +#endif // __DEV_PLATFORM_HH__