gem5  v19.0.0.0
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
tlbi_op.cc
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2018-2019 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
11  * unmodified and in its entirety in all distributions of the software,
12  * modified or unmodified, in source code or in binary form.
13  *
14  * Redistribution and use in source and binary forms, with or without
15  * modification, are permitted provided that the following conditions are
16  * met: redistributions of source code must retain the above copyright
17  * notice, this list of conditions and the following disclaimer;
18  * redistributions in binary form must reproduce the above copyright
19  * notice, this list of conditions and the following disclaimer in the
20  * documentation and/or other materials provided with the distribution;
21  * neither the name of the copyright holders nor the names of its
22  * contributors may be used to endorse or promote products derived from
23  * this software without specific prior written permission.
24  *
25  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
26  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
27  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
28  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
29  * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
30  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
31  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
32  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
33  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
34  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
35  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
36  *
37  * Authors: Giacomo Travaglini
38  */
39 
40 #include "arch/arm/tlbi_op.hh"
41 
42 #include "arch/arm/tlb.hh"
43 #include "cpu/checker/cpu.hh"
44 
45 namespace ArmISA {
46 
47 void
49 {
52 
53  // If CheckerCPU is connected, need to notify it of a flush
54  CheckerCPU *checker = tc->getCheckerCpuPtr();
55  if (checker) {
57  targetEL);
59  targetEL);
60  }
61 }
62 
63 void
65 {
67 }
68 
69 void
71 {
73 }
74 
75 void
77 {
80  CheckerCPU *checker = tc->getCheckerCpuPtr();
81  if (checker) {
84  }
85 }
86 
87 void
89 {
91 }
92 
93 void
95 {
97 }
98 
99 void
101 {
104 
105  CheckerCPU *checker = tc->getCheckerCpuPtr();
106  if (checker) {
107  getITBPtr(checker)->flushAllNs(targetEL);
108  getDTBPtr(checker)->flushAllNs(targetEL);
109  }
110 }
111 
112 void
114 {
117 
118  CheckerCPU *checker = tc->getCheckerCpuPtr();
119  if (checker) {
122  }
123 }
124 
125 void
127 {
132 
133  CheckerCPU *checker = tc->getCheckerCpuPtr();
134  if (checker) {
135  getITBPtr(checker)->flushMvaAsid(
137  getDTBPtr(checker)->flushMvaAsid(
139  }
140 }
141 
142 void
144 {
145  getITBPtr(tc)->flushMvaAsid(
147 }
148 
149 void
151 {
152  getDTBPtr(tc)->flushMvaAsid(
154 }
155 
156 void
158 {
163 
164  CheckerCPU *checker = tc->getCheckerCpuPtr();
165  if (checker) {
166  getITBPtr(checker)->flushIpaVmid(addr,
168  getDTBPtr(checker)->flushIpaVmid(addr,
170  }
171 }
172 
173 } // namespace ArmISA
ExceptionLevel targetEL
Definition: tlbi_op.hh:82
void operator()(ThreadContext *tc) override
Definition: tlbi_op.cc:76
The file contains the definition of a set of TLB Invalidate Instructions.
CheckerCPU class.
Definition: cpu.hh:87
void flushAllNs(ExceptionLevel target_el, bool ignore_el=false)
Remove all entries in the non secure world, depending on whether they were allocated in hyp mode or n...
Definition: tlb.cc:266
void flushMva(Addr mva, bool secure_lookup, ExceptionLevel target_el)
Remove all entries that match the va regardless of asn.
Definition: tlb.cc:332
void operator()(ThreadContext *tc) override
Definition: tlbi_op.cc:48
void flushAllSecurity(bool secure_lookup, ExceptionLevel target_el, bool ignore_el=false)
Reset the entire TLB.
Definition: tlb.cc:234
TLB * getDTBPtr(T *tc)
Definition: tlb.hh:480
void operator()(ThreadContext *tc) override
Definition: tlbi_op.cc:143
ip6_addr_t addr
Definition: inet.hh:335
Definition: ccregs.hh:42
void operator()(ThreadContext *tc) override
Definition: tlbi_op.cc:150
void operator()(ThreadContext *tc) override
Definition: tlbi_op.cc:70
ThreadContext is the external interface to all thread state for anything outside of the CPU...
void flushAsid(uint64_t asn, bool secure_lookup, ExceptionLevel target_el)
Remove any entries that match the asn.
Definition: tlb.cc:308
void operator()(ThreadContext *tc) override
Definition: tlbi_op.cc:100
virtual CheckerCPU * getCheckerCpuPtr()=0
void flushIpaVmid(Addr ipa, bool secure_lookup, ExceptionLevel target_el)
Invalidate all entries in the stage 2 TLB that match the given ipa and the current VMID...
Definition: tlb.cc:364
void flushMvaAsid(Addr mva, uint64_t asn, bool secure_lookup, ExceptionLevel target_el)
Remove any entries that match both a va and asn.
Definition: tlb.cc:297
void operator()(ThreadContext *tc) override
Definition: tlbi_op.cc:157
void operator()(ThreadContext *tc) override
Definition: tlbi_op.cc:113
bool secureLookup
Definition: tlbi_op.hh:81
void operator()(ThreadContext *tc) override
Definition: tlbi_op.cc:126
void operator()(ThreadContext *tc) override
Definition: tlbi_op.cc:94
TLB * getITBPtr(T *tc)
Definition: tlb.hh:471
void operator()(ThreadContext *tc) override
Definition: tlbi_op.cc:88
void operator()(ThreadContext *tc) override
Definition: tlbi_op.cc:64

Generated on Fri Feb 28 2020 16:26:57 for gem5 by doxygen 1.8.13