gem5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
system.hh
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2002-2005 The Regents of The University of Michigan
3  * All rights reserved.
4  *
5  * Redistribution and use in source and binary forms, with or without
6  * modification, are permitted provided that the following conditions are
7  * met: redistributions of source code must retain the above copyright
8  * notice, this list of conditions and the following disclaimer;
9  * redistributions in binary form must reproduce the above copyright
10  * notice, this list of conditions and the following disclaimer in the
11  * documentation and/or other materials provided with the distribution;
12  * neither the name of the copyright holders nor the names of its
13  * contributors may be used to endorse or promote products derived from
14  * this software without specific prior written permission.
15  *
16  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
17  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
18  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
19  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
20  * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
21  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
22  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27  *
28  * Authors: Ali Saidi
29  * Nathan Binkert
30  */
31 
32 #ifndef __ARCH_ALPHA_SYSTEM_HH__
33 #define __ARCH_ALPHA_SYSTEM_HH__
34 
35 #include <string>
36 #include <vector>
37 
38 #include "base/loader/symtab.hh"
39 #include "cpu/pc_event.hh"
40 #include "kern/system_events.hh"
42 #include "params/AlphaSystem.hh"
43 #include "sim/sim_object.hh"
44 #include "sim/system.hh"
45 
46 class AlphaSystem : public System
47 {
48  public:
49  typedef AlphaSystemParams Params;
51  ~AlphaSystem();
52 
53  public:
54 
58  void initState() override;
59 
63  void serializeSymtab(CheckpointOut &cp) const override;
64  void unserializeSymtab(CheckpointIn &cp) override;
65 
68  void startup() override;
69 
73  void setAlphaAccess(Addr access);
74 
77 
80 
83 
86 
87 #ifndef NDEBUG
88 
90 #endif
91 
92  protected:
94 
99 
100  const Params *params() const { return (const Params *)_params; }
101 
102 
106  virtual void setupFuncEvents();
107 
109  template <class T>
110  T *
111  addPalFuncEvent(const char *lbl)
112  {
113  return addFuncEvent<T>(palSymtab, lbl);
114  }
115 
117  template <class T>
118  T *
119  addConsoleFuncEvent(const char *lbl)
120  {
121  return addFuncEvent<T>(consoleSymtab, lbl);
122  }
123 
124  Addr fixFuncEventAddr(Addr addr) override;
125 
126  public:
127  void setIntrFreq(Tick freq) { intrFreq = freq; }
128 };
129 
130 #endif // __ARCH_ALPHA_SYSTEM_HH__
131 
A TranslatingPortProxy in FS mode translates a virtual address to a physical address and then calls t...
BreakPCEvent * consolePanicEvent
Event to halt the simulator if the console calls panic()
Definition: system.hh:89
virtual void setupFuncEvents()
Setup all the function events.
Definition: system.cc:149
AlphaSystem(Params *p)
Definition: system.cc:48
SymbolTable * consoleSymtab
console symbol table
Definition: system.hh:76
T * addPalFuncEvent(const char *lbl)
Add a function-based event to PALcode.
Definition: system.hh:111
ip6_addr_t addr
Definition: inet.hh:335
AlphaSystemParams Params
Definition: system.hh:49
ObjectFile * console
Object pointer for the console code.
Definition: system.hh:82
void setIntrFreq(Tick freq)
Definition: system.hh:127
Definition: system.hh:83
void startup() override
Override startup() to provide a path to call setupFuncEvents()
Definition: system.cc:141
void setAlphaAccess(Addr access)
Set the m5AlphaAccess pointer in the console.
Definition: system.cc:211
void unserializeSymtab(CheckpointIn &cp) override
If needed, unserialize additional symbol table entries for a specific subclass of this system...
Definition: system.cc:229
ObjectFile * pal
Object pointer for the PAL code.
Definition: system.hh:85
Addr fixFuncEventAddr(Addr addr) override
This function fixes up addresses that are used to match PCs for hooking simulator events on to target...
Definition: system.cc:188
uint64_t Tick
Tick count type.
Definition: types.hh:63
const Params * params() const
Definition: system.hh:100
~AlphaSystem()
Definition: system.cc:90
void initState() override
Initialise the state of the system.
Definition: system.cc:101
SymbolTable * palSymtab
pal symbol table
Definition: system.hh:79
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
Definition: types.hh:142
void serializeSymtab(CheckpointOut &cp) const override
Serialization stuff.
Definition: system.cc:222
T * addConsoleFuncEvent(const char *lbl)
Add a function-based event to the console code.
Definition: system.hh:119
Tick intrFreq
Definition: system.hh:93
Params * _params
Definition: system.hh:495
FSTranslatingPortProxy virtProxy
Proxy used to copy arguments directly into kernel memory.
Definition: system.hh:98
std::ostream CheckpointOut
Definition: serialize.hh:67
TranslatingPortProxy Object Declaration for FS.
Bitfield< 0 > p

Generated on Fri Jun 9 2017 13:03:34 for gem5 by doxygen 1.8.6