system.hh (8870:f95c4042f2d0) | system.hh (9332:ae2a5329ce96) |
---|---|
1/* | 1/* |
2 * Copyright (c) 2010 ARM Limited | 2 * Copyright (c) 2010-2012 ARM Limited |
3 * All rights reserved 4 * 5 * The license below extends only to copyright in the software and shall 6 * not be construed as granting a license to any other intellectual 7 * property including but not limited to intellectual property relating 8 * to a hardware implementation of the functionality of the software 9 * licensed hereunder. You may use the software subject to the license 10 * terms below provided that you ensure that this notice is replicated --- 27 unchanged lines hidden (view full) --- 38 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 39 * 40 * Authors: Ali Saidi 41 */ 42 43#ifndef __ARCH_ARM_LINUX_SYSTEM_HH__ 44#define __ARCH_ARM_LINUX_SYSTEM_HH__ 45 | 3 * All rights reserved 4 * 5 * The license below extends only to copyright in the software and shall 6 * not be construed as granting a license to any other intellectual 7 * property including but not limited to intellectual property relating 8 * to a hardware implementation of the functionality of the software 9 * licensed hereunder. You may use the software subject to the license 10 * terms below provided that you ensure that this notice is replicated --- 27 unchanged lines hidden (view full) --- 38 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 39 * 40 * Authors: Ali Saidi 41 */ 42 43#ifndef __ARCH_ARM_LINUX_SYSTEM_HH__ 44#define __ARCH_ARM_LINUX_SYSTEM_HH__ 45 |
46#include <cstdio> 47#include <map> |
|
46#include <string> 47#include <vector> 48 49#include "arch/arm/system.hh" | 48#include <string> 49#include <vector> 50 51#include "arch/arm/system.hh" |
52#include "base/output.hh" |
|
50#include "kern/linux/events.hh" 51#include "params/LinuxArmSystem.hh" | 53#include "kern/linux/events.hh" 54#include "params/LinuxArmSystem.hh" |
55#include "sim/core.hh" |
|
52 | 56 |
57class DumpStatsPCEvent; 58 |
|
53class LinuxArmSystem : public ArmSystem 54{ | 59class LinuxArmSystem : public ArmSystem 60{ |
61 protected: 62 DumpStatsPCEvent *dumpStatsPCEvent; 63 |
|
55 public: 56 /** Boilerplate params code */ 57 typedef LinuxArmSystemParams Params; 58 const Params * 59 params() const 60 { 61 return dynamic_cast<const Params *>(_params); 62 } 63 | 64 public: 65 /** Boilerplate params code */ 66 typedef LinuxArmSystemParams Params; 67 const Params * 68 params() const 69 { 70 return dynamic_cast<const Params *>(_params); 71 } 72 |
73 /** When enabled, dump stats/task info on context switches for 74 * Streamline and per-thread cache occupancy studies, etc. */ 75 bool enableContextSwitchStatsDump; 76 77 /** This map stores a mapping of OS process IDs to internal Task IDs. The 78 * mapping is done because the stats system doesn't tend to like vectors 79 * that are much greater than 1000 items and the entire process space is 80 * 65K. */ 81 std::map<uint32_t, uint32_t> taskMap; 82 83 /** This is a file that is placed in the run directory that prints out 84 * mappings between taskIds and OS process IDs */ 85 std::ostream* taskFile; 86 |
|
64 LinuxArmSystem(Params *p); 65 ~LinuxArmSystem(); 66 67 void initState(); 68 69 bool adderBootUncacheable(Addr a); 70 | 87 LinuxArmSystem(Params *p); 88 ~LinuxArmSystem(); 89 90 void initState(); 91 92 bool adderBootUncacheable(Addr a); 93 |
94 void startup(); 95 96 /** This function creates a new task Id for the given pid. 97 * @param tc thread context that is currentyl executing */ 98 void mapPid(ThreadContext* tc, uint32_t pid); 99 |
|
71 private: 72#ifndef NDEBUG 73 /** Event to halt the simulator if the kernel calls panic() */ 74 BreakPCEvent *kernelPanicEvent; 75#endif 76 /** 77 * PC based event to skip udelay(<time>) calls and quiesce the 78 * processor for the appropriate amount of time. This is not functionally --- 13 unchanged lines hidden (view full) --- 92 * Since these operations aren't supported in gem5, we keep them coherent 93 * by making them uncacheable until all processors in the system boot. 94 */ 95 Addr secDataPtrAddr; 96 Addr secDataAddr; 97 Addr penReleaseAddr; 98}; 99 | 100 private: 101#ifndef NDEBUG 102 /** Event to halt the simulator if the kernel calls panic() */ 103 BreakPCEvent *kernelPanicEvent; 104#endif 105 /** 106 * PC based event to skip udelay(<time>) calls and quiesce the 107 * processor for the appropriate amount of time. This is not functionally --- 13 unchanged lines hidden (view full) --- 121 * Since these operations aren't supported in gem5, we keep them coherent 122 * by making them uncacheable until all processors in the system boot. 123 */ 124 Addr secDataPtrAddr; 125 Addr secDataAddr; 126 Addr penReleaseAddr; 127}; 128 |
129class DumpStatsPCEvent : public PCEvent 130{ 131 public: 132 DumpStatsPCEvent(PCEventQueue *q, const std::string &desc, Addr addr) 133 : PCEvent(q, desc, addr) 134 {} 135 136 virtual void process(ThreadContext* tc); 137}; 138 139 |
|
100#endif // __ARCH_ARM_LINUX_SYSTEM_HH__ 101 | 140#endif // __ARCH_ARM_LINUX_SYSTEM_HH__ 141 |