/*
- * 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 "config/the_isa.hh"
#include "cpu/pc_event.hh"
#include "enums/MemoryMode.hh"
#include "kern/system_events.hh"
BaseMasterPort& getMasterPort(const std::string &if_name,
PortID idx = InvalidPortID);
- static const char *MemoryModeStrings[4];
-
/** @{ */
/**
* Is the system in atomic mode?
*/
Addr loadAddrMask;
+ /** Offset that should be used for binary/symbol loading.
+ * This further allows more flexibily than the loadAddrMask allows alone in
+ * loading kernels and similar. The loadAddrOffset is applied after the
+ * loadAddrMask.
+ */
+ Addr loadAddrOffset;
+
protected:
uint64_t nextPID;
*/
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;
* Called by pseudo_inst to track the number of work items completed by
* this system.
*/
- uint64_t
+ uint64_t
incWorkItemsEnd()
{
return ++workItemsEnd;
* Returns the total number of cpus that have executed work item begin or
* ends.
*/
- int
+ int
markWorkItem(int index)
{
int count = 0;
assert(index < activeCpus.size());
activeCpus[index] = true;
- for (std::vector<bool>::iterator i = activeCpus.begin();
+ for (std::vector<bool>::iterator i = activeCpus.begin();
i < activeCpus.end(); i++) {
if (*i) count++;
}
T *addFuncEvent(const SymbolTable *symtab, const char *lbl,
const std::string &desc, Args... args)
{
- Addr addr = 0; // initialize only to avoid compiler warning
+ Addr addr M5_VAR_USED = 0; // initialize only to avoid compiler warning
#if THE_ISA != NULL_ISA
if (symtab->findAddress(lbl, addr)) {