pagetable.hh (5015:6406d713c713) pagetable.hh (5184:8782de2949e5)
1/*
2 * Copyright (c) 2002-2005 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;

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

87 bool valid() const { return (entry >> 0) & 0x1; }
88
89 Addr paddr() const { return _pfn() << PageShift; }
90 };
91
92 // ITB/DTB table entry
93 struct TlbEntry
94 {
1/*
2 * Copyright (c) 2002-2005 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;

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

87 bool valid() const { return (entry >> 0) & 0x1; }
88
89 Addr paddr() const { return _pfn() << PageShift; }
90 };
91
92 // ITB/DTB table entry
93 struct TlbEntry
94 {
95 Addr pageStart;
96 //Construct an entry that maps to physical address addr.
95 //Construct an entry that maps to physical address addr.
97 TlbEntry(Addr addr) : pageStart(addr)
98 {}
96 TlbEntry(Addr _asn, Addr _vaddr, Addr _paddr)
97 {
98 VAddr vaddr(_vaddr);
99 VAddr paddr(_paddr);
100 tag = vaddr.vpn();
101 ppn = paddr.vpn();
102 xre = 15;
103 xwe = 15;
104 asn = _asn;
105 asma = false;
106 fonr = false;
107 fonw = false;
108 valid = true;
109 }
99 TlbEntry()
100 {}
101
102 Addr tag; // virtual page number tag
103 Addr ppn; // physical page number
104 uint8_t xre; // read permissions - VMEM_PERM_* mask
105 uint8_t xwe; // write permissions - VMEM_PERM_* mask
106 uint8_t asn; // address space number
107 bool asma; // address space match
108 bool fonr; // fault on read
109 bool fonw; // fault on write
110 bool valid; // valid page table entry
111
110 TlbEntry()
111 {}
112
113 Addr tag; // virtual page number tag
114 Addr ppn; // physical page number
115 uint8_t xre; // read permissions - VMEM_PERM_* mask
116 uint8_t xwe; // write permissions - VMEM_PERM_* mask
117 uint8_t asn; // address space number
118 bool asma; // address space match
119 bool fonr; // fault on read
120 bool fonw; // fault on write
121 bool valid; // valid page table entry
122
123 Addr pageStart()
124 {
125 return ppn << PageShift;
126 }
127
112 void serialize(std::ostream &os);
113 void unserialize(Checkpoint *cp, const std::string &section);
114 };
115
116};
117#endif // __ARCH_ALPHA_PAGETABLE_H__
118
128 void serialize(std::ostream &os);
129 void unserialize(Checkpoint *cp, const std::string &section);
130 };
131
132};
133#endif // __ARCH_ALPHA_PAGETABLE_H__
134