Deleted Added
sdiff udiff text old ( 10556:1e3b3c7a0cba ) new ( 10558:426665ec11a9 )
full compact
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

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

80 assert(isPowerOf2(pageSize));
81 pTableCache[0].valid = false;
82 pTableCache[1].valid = false;
83 pTableCache[2].valid = false;
84 }
85
86 virtual ~PageTableBase() {};
87
88 virtual void initState(ThreadContext* tc) = 0;
89
90 // for DPRINTF compatibility
91 const std::string name() const { return _name; }
92
93 Addr pageAlign(Addr a) { return (a & ~offsetMask); }
94 Addr pageOffset(Addr a) { return (a & offsetMask); }
95
96 virtual void map(Addr vaddr, Addr paddr, int64_t size,
97 bool clobber = false) = 0;
98 virtual void remap(Addr vaddr, int64_t size, Addr new_vaddr) = 0;
99 virtual void unmap(Addr vaddr, int64_t size) = 0;
100
101 /**
102 * Check if any pages in a region are already allocated
103 * @param vaddr The starting virtual address of the region.
104 * @param size The length of the region.
105 * @return True if no pages in the region are mapped.

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

192 Addr _pageSize = TheISA::PageBytes);
193
194 ~FuncPageTable();
195
196 void initState(ThreadContext* tc)
197 {
198 }
199
200 void map(Addr vaddr, Addr paddr, int64_t size, bool clobber = false);
201 void remap(Addr vaddr, int64_t size, Addr new_vaddr);
202 void unmap(Addr vaddr, int64_t size);
203
204 /**
205 * Check if any pages in a region are already allocated
206 * @param vaddr The starting virtual address of the region.
207 * @param size The length of the region.
208 * @return True if no pages in the region are mapped.

--- 31 unchanged lines hidden ---