gem5  v22.1.0.0
isa.hh
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2009 The Regents of The University of Michigan
3  * Copyright (c) 2009 The University of Edinburgh
4  * Copyright (c) 2021 IBM Corporation
5  * All rights reserved.
6  *
7  * Redistribution and use in source and binary forms, with or without
8  * modification, are permitted provided that the following conditions are
9  * met: redistributions of source code must retain the above copyright
10  * notice, this list of conditions and the following disclaimer;
11  * redistributions in binary form must reproduce the above copyright
12  * notice, this list of conditions and the following disclaimer in the
13  * documentation and/or other materials provided with the distribution;
14  * neither the name of the copyright holders nor the names of its
15  * contributors may be used to endorse or promote products derived from
16  * this software without specific prior written permission.
17  *
18  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22  * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29  */
30 
31 #ifndef __ARCH_POWER_ISA_HH__
32 #define __ARCH_POWER_ISA_HH__
33 
34 #include "arch/generic/isa.hh"
35 #include "arch/power/pcstate.hh"
36 #include "arch/power/regs/misc.hh"
37 #include "arch/power/types.hh"
38 #include "base/logging.hh"
39 #include "cpu/reg_class.hh"
40 #include "sim/sim_object.hh"
41 
42 namespace gem5
43 {
44 
45 struct PowerISAParams;
46 class ThreadContext;
47 class Checkpoint;
48 class EventManager;
49 
50 namespace PowerISA
51 {
52 
53 class ISA : public BaseISA
54 {
55  protected:
57 
58  public:
59  PCStateBase *
60  newPCState(Addr new_inst_addr=0) const override
61  {
62  return new PCState(new_inst_addr);
63  }
64 
65  RegVal
66  readMiscRegNoEffect(RegIndex idx) const override
67  {
68  fatal("Power does not currently have any misc regs defined\n");
69  }
70 
71  RegVal
72  readMiscReg(RegIndex idx) override
73  {
74  fatal("Power does not currently have any misc regs defined\n");
75  }
76 
77  void
79  {
80  fatal("Power does not currently have any misc regs defined\n");
81  }
82 
83  void
84  setMiscReg(RegIndex idx, RegVal val) override
85  {
86  fatal("Power does not currently have any misc regs defined\n");
87  }
88 
89  bool
90  inUserMode() const override
91  {
92  return false;
93  }
94 
95  void copyRegsFrom(ThreadContext *src) override;
96 
97  using Params = PowerISAParams;
98 
99  ISA(const Params &p);
100 };
101 
102 } // namespace PowerISA
103 } // namespace gem5
104 
105 #endif // __ARCH_POWER_ISA_HH__
RegVal miscRegs[NUM_MISCREGS]
Definition: isa.hh:56
void copyRegsFrom(ThreadContext *src) override
Definition: isa.cc:76
PowerISAParams Params
Definition: isa.hh:97
RegVal readMiscReg(RegIndex idx) override
Definition: isa.hh:72
void setMiscRegNoEffect(RegIndex idx, RegVal val) override
Definition: isa.hh:78
void setMiscReg(RegIndex idx, RegVal val) override
Definition: isa.hh:84
RegVal readMiscRegNoEffect(RegIndex idx) const override
Definition: isa.hh:66
PCStateBase * newPCState(Addr new_inst_addr=0) const override
Definition: isa.hh:60
bool inUserMode() const override
Definition: isa.hh:90
ISA(const Params &p)
Definition: isa.cc:63
ThreadContext is the external interface to all thread state for anything outside of the CPU.
#define fatal(...)
This implements a cprintf based fatal() function.
Definition: logging.hh:190
GenericISA::DelaySlotPCState< 4 > PCState
Definition: pcstate.hh:40
@ NUM_MISCREGS
Definition: misc.hh:45
Bitfield< 54 > p
Definition: pagetable.hh:70
Bitfield< 63 > val
Definition: misc.hh:776
Reference material can be found at the JEDEC website: UFS standard http://www.jedec....
uint16_t RegIndex
Definition: types.hh:176
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
Definition: types.hh:147
uint64_t RegVal
Definition: types.hh:173

Generated on Wed Dec 21 2022 10:22:24 for gem5 by doxygen 1.9.1