gem5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
backdoor.hh
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2001-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: Nathan Binkert
29  */
30 
35 #ifndef __DEV_ALPHA_BACKDOOR_HH__
36 #define __DEV_ALPHA_BACKDOOR_HH__
37 
38 #include "base/types.hh"
39 #include "dev/alpha/access.h"
40 #include "dev/io_device.hh"
41 #include "params/AlphaBackdoor.hh"
42 #include "sim/sim_object.hh"
43 
44 class BaseCPU;
45 class Terminal;
46 class AlphaSystem;
47 class SimpleDisk;
48 
75 {
76  protected:
77  struct Access : public AlphaAccess, public Serializable
78  {
79  void serialize(CheckpointOut &cp) const override;
80  void unserialize(CheckpointIn &cp) override;
81  };
82 
83  union {
85  uint8_t *consoleData;
86  };
87 
90 
93 
96 
99 
100  public:
101  typedef AlphaBackdoorParams Params;
102  AlphaBackdoor(const Params *p);
103 
104  const Params *
105  params() const
106  {
107  return dynamic_cast<const Params *>(_params);
108  }
109 
110  void startup() override;
111 
115  Tick read(PacketPtr pkt) override;
116  Tick write(PacketPtr pkt) override;
117 
121  void serialize(CheckpointOut &cp) const override;
122  void unserialize(CheckpointIn &cp) override;
123 };
124 
125 #endif // __DEV_ALPHA_BACKDOOR_HH__
void serialize(CheckpointOut &cp) const override
Serialize an object.
Definition: backdoor.cc:256
const Params * params() const
Definition: backdoor.hh:105
AlphaSystem * system
a pointer to the system we are running in
Definition: backdoor.hh:95
void startup() override
startup() is the final initialization call before simulation.
Definition: backdoor.cc:87
Access * alphaAccess
Definition: backdoor.hh:84
Tick read(PacketPtr pkt) override
memory mapped reads and writes
Definition: backdoor.cc:103
BaseCPU * cpu
a pointer to the CPU boot cpu
Definition: backdoor.hh:98
System Console Memory Mapped Register Definition.
AlphaBackdoorParams Params
Definition: backdoor.hh:101
uint64_t Tick
Tick count type.
Definition: types.hh:63
Defines global host-dependent types: Counter, Tick, and (indirectly) {int,uint}{8,16,32,64}_t.
uint8_t * consoleData
Definition: backdoor.hh:85
A Packet is used to encapsulate a transfer between two objects in the memory system (e...
Definition: packet.hh:245
AlphaBackdoor(const Params *p)
Definition: backdoor.cc:65
Basic support for object serialization.
Definition: serialize.hh:220
std::ostream CheckpointOut
Definition: serialize.hh:67
Tick write(PacketPtr pkt) override
Pure virtual function that the device must implement.
Definition: backdoor.cc:201
void serialize(CheckpointOut &cp) const override
standard serialization routines for checkpointing
Definition: backdoor.cc:300
Memory mapped interface to the system console.
Definition: backdoor.hh:74
const SimObjectParams * _params
Cached copy of the object parameters.
Definition: sim_object.hh:107
Terminal * terminal
the system console (the terminal) is accessable from the console
Definition: backdoor.hh:92
SimpleDisk * disk
the disk must be accessed from the console
Definition: backdoor.hh:89
void unserialize(CheckpointIn &cp) override
Unserialize an object.
Definition: backdoor.cc:306
void unserialize(CheckpointIn &cp) override
Unserialize an object.
Definition: backdoor.cc:278
Bitfield< 0 > p

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