tlb.hh (5268:5bfc53fe60e7) tlb.hh (5358:e9acb84bbafb)
1/*
2 * Copyright (c) 2001-2005 The Regents of The University of Michigan
3 * Copyright (c) 2007 MIPS Technologies, Inc.
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions are
8 * met: redistributions of source code must retain the above copyright

--- 66 unchanged lines hidden (view full) ---

75
76 void unserialize(Checkpoint *cp, const std::string &section)
77 {
78 UNSERIALIZE_SCALAR(_pageStart);
79 }
80
81};
82
1/*
2 * Copyright (c) 2001-2005 The Regents of The University of Michigan
3 * Copyright (c) 2007 MIPS Technologies, Inc.
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions are
8 * met: redistributions of source code must retain the above copyright

--- 66 unchanged lines hidden (view full) ---

75
76 void unserialize(Checkpoint *cp, const std::string &section)
77 {
78 UNSERIALIZE_SCALAR(_pageStart);
79 }
80
81};
82
83class TLB : public SimObject
83class TLB : public BaseTLB
84{
85 protected:
86 typedef std::multimap<Addr, int> PageTable;
87 PageTable lookupTable; // Quick lookup into page table
88
89 MipsISA::PTE *table; // the Page Table
90 int size; // TLB Size
91 int nlu; // not last used entry (for replacement)

--- 23 unchanged lines hidden (view full) ---

115 virtual ~TLB();
116 int smallPages;
117 int getsize() const { return size; }
118
119 MipsISA::PTE &index(bool advance = true);
120 void insert(Addr vaddr, MipsISA::PTE &pte);
121 void insertAt(MipsISA::PTE &pte, unsigned Index, int _smallPages);
122 void flushAll();
84{
85 protected:
86 typedef std::multimap<Addr, int> PageTable;
87 PageTable lookupTable; // Quick lookup into page table
88
89 MipsISA::PTE *table; // the Page Table
90 int size; // TLB Size
91 int nlu; // not last used entry (for replacement)

--- 23 unchanged lines hidden (view full) ---

115 virtual ~TLB();
116 int smallPages;
117 int getsize() const { return size; }
118
119 MipsISA::PTE &index(bool advance = true);
120 void insert(Addr vaddr, MipsISA::PTE &pte);
121 void insertAt(MipsISA::PTE &pte, unsigned Index, int _smallPages);
122 void flushAll();
123 void demapPage(Addr vaddr, uint64_t asn)
124 {
125 panic("demapPage unimplemented.\n");
126 }
123
124 // static helper functions... really
125 static bool validVirtualAddress(Addr vaddr);
126
127 static Fault checkCacheability(RequestPtr &req);
128
129 // Checkpointing
130 void serialize(std::ostream &os);

--- 33 unchanged lines hidden ---
127
128 // static helper functions... really
129 static bool validVirtualAddress(Addr vaddr);
130
131 static Fault checkCacheability(RequestPtr &req);
132
133 // Checkpointing
134 void serialize(std::ostream &os);

--- 33 unchanged lines hidden ---