/*
- * Copyright (c) 2012 ARM Limited
+ * Copyright (c) 2012, 2014 ARM Limited
* All rights reserved
*
* The license below extends only to copyright in the software and shall
#include <utility>
#include <vector>
+#include "arch/isa_traits.hh"
#include "base/loader/symtab.hh"
#include "base/misc.hh"
#include "base/statistics.hh"
-#include "cpu/pc_event.hh"
+#include "config/the_isa.hh"
#include "enums/MemoryMode.hh"
-#include "kern/system_events.hh"
#include "mem/mem_object.hh"
#include "mem/port.hh"
#include "mem/port_proxy.hh"
#include "mem/physical.hh"
#include "params/System.hh"
+/**
+ * To avoid linking errors with LTO, only include the header if we
+ * actually have the definition.
+ */
+#if THE_ISA != NULL_ISA
+#include "cpu/pc_event.hh"
+#endif
+
class BaseCPU;
class BaseRemoteGDB;
class GDBListener;
{ }
bool recvTimingResp(PacketPtr pkt)
{ panic("SystemPort does not receive timing!\n"); return false; }
- void recvRetry()
+ void recvReqRetry()
{ panic("SystemPort does not expect retry!\n"); }
};
*/
bool isMemAddr(Addr addr) const;
+ /**
+ * Get the architecture.
+ */
+ Arch getArch() const { return Arch::TheISA; }
+
+ /**
+ * Get the page bytes for the ISA.
+ */
+ Addr getPageBytes() const { return TheISA::PageBytes; }
+
+ /**
+ * Get the number of bits worth of in-page adress for the ISA.
+ */
+ Addr getPageShift() const { return TheISA::PageShift; }
+
protected:
PhysicalMemory physmem;
int registerThreadContext(ThreadContext *tc, int assigned=-1);
void replaceThreadContext(ThreadContext *tc, int context_id);
- void serialize(std::ostream &os);
- void unserialize(Checkpoint *cp, const std::string §ion);
+ void serialize(CheckpointOut &cp) const M5_ATTR_OVERRIDE;
+ void unserialize(CheckpointIn &cp) M5_ATTR_OVERRIDE;
- unsigned int drain(DrainManager *dm);
- void drainResume();
+ void drainResume() M5_ATTR_OVERRIDE;
public:
Counter totalNumInsts;
*
* @param os stream to serialize to
*/
- virtual void serializeSymtab(std::ostream &os) {}
+ virtual void serializeSymtab(CheckpointOut &os) const {}
/**
* If needed, unserialize additional symbol table entries for a
* @param cp checkpoint to unserialize from
* @param section relevant section in the checkpoint
*/
- virtual void unserializeSymtab(Checkpoint *cp,
- const std::string §ion) {}
+ virtual void unserializeSymtab(CheckpointIn &cp) {}
};