Merge vm1.(none):/home/stever/bk/newmem-head
[gem5.git] / src / mem / translating_port.hh
index d078158a3ef46a84fbbd18054061a8500f5ac4d7..76c7947be9be809f34cdf48bc876e2f161488793 100644 (file)
@@ -24,6 +24,9 @@
  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * Authors: Ron Dreslinski
+ *          Ali Saidi
  */
 
 #ifndef __MEM_TRANSLATING_PROT_HH__
 #include "mem/port.hh"
 
 class PageTable;
+class Process;
 
 class TranslatingPort : public FunctionalPort
 {
+  public:
+    enum AllocType {
+        Always,
+        Never,
+        NextPage
+    };
+
   private:
     PageTable *pTable;
-    bool allocating;
+    Process *process;
+    AllocType allocating;
 
   public:
     TranslatingPort(const std::string &_name,
-                    PageTable *p_table, bool alloc = false);
+                    Process *p, AllocType alloc);
     virtual ~TranslatingPort();
 
     bool tryReadBlob(Addr addr, uint8_t *p, int size);