tlb.hh (8229:78bf55f23338) tlb.hh (8763:509e9bb84dfa)
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

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

50
51class ThreadContext;
52
53/* MIPS does not distinguish between a DTLB and an ITLB -> unified TLB
54 However, to maintain compatibility with other architectures, we'll
55 simply create an ITLB and DTLB that will point to the real TLB */
56namespace MipsISA {
57
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

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

50
51class ThreadContext;
52
53/* MIPS does not distinguish between a DTLB and an ITLB -> unified TLB
54 However, to maintain compatibility with other architectures, we'll
55 simply create an ITLB and DTLB that will point to the real TLB */
56namespace MipsISA {
57
58// WARN: This particular TLB entry is not necessarily conformed to MIPS ISA
59struct TlbEntry
60{
61 Addr _pageStart;
62 TlbEntry() {}
63 TlbEntry(Addr asn, Addr vaddr, Addr paddr) : _pageStart(paddr) {}
64
65 Addr pageStart()
66 {
67 return _pageStart;
68 }
69
70 void
71 updateVaddr(Addr new_vaddr) {}
72
73 void serialize(std::ostream &os)
74 {
75 SERIALIZE_SCALAR(_pageStart);
76 }
77
78 void unserialize(Checkpoint *cp, const std::string &section)
79 {
80 UNSERIALIZE_SCALAR(_pageStart);
81 }
82
83};
84
85class TLB : public BaseTLB
86{
87 protected:
88 typedef std::multimap<Addr, int> PageTable;
89 PageTable lookupTable; // Quick lookup into page table
90
91 MipsISA::PTE *table; // the Page Table
92 int size; // TLB Size

--- 61 unchanged lines hidden ---
58class TLB : public BaseTLB
59{
60 protected:
61 typedef std::multimap<Addr, int> PageTable;
62 PageTable lookupTable; // Quick lookup into page table
63
64 MipsISA::PTE *table; // the Page Table
65 int size; // TLB Size

--- 61 unchanged lines hidden ---