Addr lock_addr; // lock address for LL/SC
} MiscRegFile;
+static const Addr PageShift = 13;
+static const Addr PageBytes = ULL(1) << PageShift;
+static const Addr PageMask = ~(PageBytes - 1);
+static const Addr PageOffset = PageBytes - 1;
+
#ifdef FULL_SYSTEM
typedef uint64_t InternalProcReg;
int offset = src & (blk_size - 1);
// Make sure block doesn't span page
- if (no_warn && (src & (~8191)) != ((src + blk_size) & (~8191)) &&
+ if (no_warn &&
+ (src & TheISA::PageMask) != ((src + blk_size) & TheISA::PageMask) &&
(src >> 40) != 0xfffffc) {
warn("Copied block source spans pages %x.", src);
no_warn = false;
}
-
memReq->reset(src & ~(blk_size - 1), blk_size);
// translate to physical address
int offset = dest & (blk_size - 1);
// Make sure block doesn't span page
- if (no_warn && (dest & (~8191)) != ((dest + blk_size) & (~8191)) &&
+ if (no_warn &&
+ (dest & TheISA::PageMask) != ((dest + blk_size) & TheISA::PageMask) &&
(dest >> 40) != 0xfffffc) {
no_warn = false;
warn("Copied block destination spans pages %x. ", dest);
Fault read(Addr addr, T &data, unsigned flags);
template <class T>
- Fault write(T data, Addr addr, unsigned flags,
- uint64_t *res);
+ Fault write(T data, Addr addr, unsigned flags, uint64_t *res);
void prefetch(Addr addr, unsigned flags)
{