page_table.hh (12431:000549e1f497) page_table.hh (12432:2480d8b432f5)
1/*
2 * Copyright (c) 2014 Advanced Micro Devices, Inc.
3 * Copyright (c) 2003 The Regents of The University of Michigan
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

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

68 const Addr pageSize;
69 const Addr offsetMask;
70
71 const uint64_t pid;
72 const std::string _name;
73
74 public:
75
1/*
2 * Copyright (c) 2014 Advanced Micro Devices, Inc.
3 * Copyright (c) 2003 The Regents of The University of Michigan
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

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

68 const Addr pageSize;
69 const Addr offsetMask;
70
71 const uint64_t pid;
72 const std::string _name;
73
74 public:
75
76 PageTableBase(const std::string &__name, uint64_t _pid,
77 Addr _pageSize = TheISA::PageBytes)
76 PageTableBase(const std::string &__name, uint64_t _pid, Addr _pageSize)
78 : pageSize(_pageSize), offsetMask(mask(floorLog2(_pageSize))),
79 pid(_pid), _name(__name)
80 {
81 assert(isPowerOf2(pageSize));
82 pTableCache[0].valid = false;
83 pTableCache[1].valid = false;
84 pTableCache[2].valid = false;
85 }

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

206{
207 private:
208 typedef std::unordered_map<Addr, TheISA::TlbEntry> PTable;
209 typedef PTable::iterator PTableItr;
210 PTable pTable;
211
212 public:
213
77 : pageSize(_pageSize), offsetMask(mask(floorLog2(_pageSize))),
78 pid(_pid), _name(__name)
79 {
80 assert(isPowerOf2(pageSize));
81 pTableCache[0].valid = false;
82 pTableCache[1].valid = false;
83 pTableCache[2].valid = false;
84 }

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

205{
206 private:
207 typedef std::unordered_map<Addr, TheISA::TlbEntry> PTable;
208 typedef PTable::iterator PTableItr;
209 PTable pTable;
210
211 public:
212
214 FuncPageTable(const std::string &__name, uint64_t _pid,
215 Addr _pageSize = TheISA::PageBytes);
213 FuncPageTable(const std::string &__name, uint64_t _pid, Addr _pageSize);
216
217 ~FuncPageTable();
218
219 void initState(ThreadContext* tc) override
220 {
221 }
222
223 void map(Addr vaddr, Addr paddr, int64_t size,

--- 26 unchanged lines hidden ---
214
215 ~FuncPageTable();
216
217 void initState(ThreadContext* tc) override
218 {
219 }
220
221 void map(Addr vaddr, Addr paddr, int64_t size,

--- 26 unchanged lines hidden ---