tlb.hh (3881:f06ef65cd746) tlb.hh (3950:19a99edda63b)
1/*
2 * Copyright (c) 2006 The Regents of The University of Michigan
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are
7 * met: redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer;

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

49 protected:
50 TlbMap lookupTable;;
51 typedef TlbMap::iterator MapIter;
52
53 TlbEntry *tlb;
54
55 int size;
56 int usedEntries;
1/*
2 * Copyright (c) 2006 The Regents of The University of Michigan
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are
7 * met: redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer;

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

49 protected:
50 TlbMap lookupTable;;
51 typedef TlbMap::iterator MapIter;
52
53 TlbEntry *tlb;
54
55 int size;
56 int usedEntries;
57 int lastReplaced;
58
59 uint64_t cacheState;
60 bool cacheValid;
61
57
58 uint64_t cacheState;
59 bool cacheValid;
60
62 std::list<TlbEntry*> freeList;
63
64 enum FaultTypes {
65 OtherFault = 0,
66 PrivViolation = 0x1,
67 SideEffect = 0x2,
68 AtomicToIo = 0x4,
69 IllegalAsi = 0x8,
70 LoadFromNfo = 0x10,
71 VaOutOfRange = 0x20,

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

91
92 /** Insert a PTE into the TLB. */
93 void insert(Addr vpn, int partition_id, int context_id, bool real,
94 const PageTableEntry& PTE, int entry = -1);
95
96 /** Given an entry id, read that tlb entries' tag. */
97 uint64_t TagRead(int entry);
98
61 enum FaultTypes {
62 OtherFault = 0,
63 PrivViolation = 0x1,
64 SideEffect = 0x2,
65 AtomicToIo = 0x4,
66 IllegalAsi = 0x8,
67 LoadFromNfo = 0x10,
68 VaOutOfRange = 0x20,

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

88
89 /** Insert a PTE into the TLB. */
90 void insert(Addr vpn, int partition_id, int context_id, bool real,
91 const PageTableEntry& PTE, int entry = -1);
92
93 /** Given an entry id, read that tlb entries' tag. */
94 uint64_t TagRead(int entry);
95
96 /** Give an entry id, read that tlb entries' tte */
97 uint64_t TteRead(int entry);
98
99 /** Remove all entries from the TLB */
100 void invalidateAll();
101
102 /** Remove all non-locked entries from the tlb that match partition id. */
103 void demapAll(int partition_id);
104
105 /** Remove all entries that match a given context/partition id. */
106 void demapContext(int partition_id, int context_id);

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

123 public:
124 TLB(const std::string &name, int size);
125
126 void dumpAll();
127
128 // Checkpointing
129 virtual void serialize(std::ostream &os);
130 virtual void unserialize(Checkpoint *cp, const std::string &section);
99 /** Remove all entries from the TLB */
100 void invalidateAll();
101
102 /** Remove all non-locked entries from the tlb that match partition id. */
103 void demapAll(int partition_id);
104
105 /** Remove all entries that match a given context/partition id. */
106 void demapContext(int partition_id, int context_id);

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

123 public:
124 TLB(const std::string &name, int size);
125
126 void dumpAll();
127
128 // Checkpointing
129 virtual void serialize(std::ostream &os);
130 virtual void unserialize(Checkpoint *cp, const std::string &section);
131
132 /** Give an entry id, read that tlb entries' tte */
133 uint64_t TteRead(int entry);
134
135};
136
137class ITB : public TLB
138{
139 public:
140 ITB(const std::string &name, int size) : TLB(name, size)
141 {
142 cacheEntry = NULL;

--- 36 unchanged lines hidden ---
131};
132
133class ITB : public TLB
134{
135 public:
136 ITB(const std::string &name, int size) : TLB(name, size)
137 {
138 cacheEntry = NULL;

--- 36 unchanged lines hidden ---