pagetable_walker.hh (5881:73c0aaaaf186) | pagetable_walker.hh (5895:569e3b31a868) |
---|---|
1/* 2 * Copyright (c) 2007 The Hewlett-Packard Development Company 3 * All rights reserved. 4 * 5 * Redistribution and use of this software in source and binary forms, 6 * with or without modification, are permitted provided that the 7 * following conditions are met: 8 * --- 77 unchanged lines hidden (view full) --- 86 }; 87 88 // Act on the current state and determine what to do next. read 89 // should be the packet that just came back from a read and write 90 // should be NULL. When the function returns, read is either NULL 91 // if the machine is finished, or points to a packet to initiate 92 // the next read. If any write is required to update an "accessed" 93 // bit, write will point to a packet to do the write. Otherwise it | 1/* 2 * Copyright (c) 2007 The Hewlett-Packard Development Company 3 * All rights reserved. 4 * 5 * Redistribution and use of this software in source and binary forms, 6 * with or without modification, are permitted provided that the 7 * following conditions are met: 8 * --- 77 unchanged lines hidden (view full) --- 86 }; 87 88 // Act on the current state and determine what to do next. read 89 // should be the packet that just came back from a read and write 90 // should be NULL. When the function returns, read is either NULL 91 // if the machine is finished, or points to a packet to initiate 92 // the next read. If any write is required to update an "accessed" 93 // bit, write will point to a packet to do the write. Otherwise it |
94 // will be NULL. 95 void doNext(PacketPtr &read, PacketPtr &write); | 94 // will be NULL. The return value is whatever fault was incurred 95 // during this stage of the lookup. 96 Fault doNext(PacketPtr &read, PacketPtr &write); |
96 97 // Kick off the state machine. | 97 98 // Kick off the state machine. |
98 void start(ThreadContext * _tc, Addr vaddr, bool write, bool execute); | 99 Fault start(ThreadContext * _tc, BaseTLB::Translation *translation, 100 RequestPtr req, bool write, bool execute); 101 // Clean up after the state machine. 102 void 103 stop() 104 { 105 nextState = Ready; 106 delete read->req; 107 delete read; 108 read = NULL; 109 } |
99 100 protected: 101 102 /* 103 * State having to do with sending packets. 104 */ 105 PacketPtr read; 106 std::vector<PacketPtr> writes; 107 108 // How many memory operations are in flight. 109 unsigned inflight; 110 111 bool retrying; 112 113 /* | 110 111 protected: 112 113 /* 114 * State having to do with sending packets. 115 */ 116 PacketPtr read; 117 std::vector<PacketPtr> writes; 118 119 // How many memory operations are in flight. 120 unsigned inflight; 121 122 bool retrying; 123 124 /* |
125 * The fault, if any, that's waiting to be delivered in timing mode. 126 */ 127 Fault timingFault; 128 129 /* |
|
114 * Functions for dealing with packets. 115 */ 116 bool recvTiming(PacketPtr pkt); 117 void recvRetry(); 118 119 void sendPackets(); 120 121 /* --- 29 unchanged lines hidden (view full) --- 151 152 friend class WalkerPort; 153 154 WalkerPort port; 155 156 // The TLB we're supposed to load. 157 TLB * tlb; 158 System * sys; | 130 * Functions for dealing with packets. 131 */ 132 bool recvTiming(PacketPtr pkt); 133 void recvRetry(); 134 135 void sendPackets(); 136 137 /* --- 29 unchanged lines hidden (view full) --- 167 168 friend class WalkerPort; 169 170 WalkerPort port; 171 172 // The TLB we're supposed to load. 173 TLB * tlb; 174 System * sys; |
175 BaseTLB::Translation * translation; |
|
159 160 /* 161 * State machine state. 162 */ 163 ThreadContext * tc; | 176 177 /* 178 * State machine state. 179 */ 180 ThreadContext * tc; |
181 RequestPtr req; |
|
164 State state; 165 State nextState; 166 int size; 167 bool enableNX; | 182 State state; 183 State nextState; 184 int size; 185 bool enableNX; |
168 bool write, execute; | 186 bool write, execute, user; |
169 TlbEntry entry; 170 171 Fault pageFault(bool present); 172 173 public: 174 175 void setTLB(TLB * _tlb) 176 { --- 16 unchanged lines hidden --- | 187 TlbEntry entry; 188 189 Fault pageFault(bool present); 190 191 public: 192 193 void setTLB(TLB * _tlb) 194 { --- 16 unchanged lines hidden --- |