tlb.cc (9028:f92783bcfd25) tlb.cc (9062:21f92aa46e8f)
1/*
2 * Copyright (c) 2007-2008 The Hewlett-Packard Development Company
3 * All rights reserved.
4 *
5 * The license below extends only to copyright in the software and shall
6 * not be construed as granting a license to any other intellectual
7 * property including but not limited to intellectual property relating
8 * to a hardware implementation of the functionality of the software

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

265 if (!attr.readable && mode == Read)
266 return new GeneralProtection(0);
267 expandDown = attr.expandDown;
268
269 }
270 Addr base = tc->readMiscRegNoEffect(MISCREG_SEG_BASE(seg));
271 Addr limit = tc->readMiscRegNoEffect(MISCREG_SEG_LIMIT(seg));
272 bool sizeOverride = (flags & (AddrSizeFlagBit << FlagShift));
1/*
2 * Copyright (c) 2007-2008 The Hewlett-Packard Development Company
3 * All rights reserved.
4 *
5 * The license below extends only to copyright in the software and shall
6 * not be construed as granting a license to any other intellectual
7 * property including but not limited to intellectual property relating
8 * to a hardware implementation of the functionality of the software

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

265 if (!attr.readable && mode == Read)
266 return new GeneralProtection(0);
267 expandDown = attr.expandDown;
268
269 }
270 Addr base = tc->readMiscRegNoEffect(MISCREG_SEG_BASE(seg));
271 Addr limit = tc->readMiscRegNoEffect(MISCREG_SEG_LIMIT(seg));
272 bool sizeOverride = (flags & (AddrSizeFlagBit << FlagShift));
273 int logSize = sizeOverride ? m5Reg.altAddr : m5Reg.defAddr;
273 unsigned logSize = sizeOverride ? (unsigned)m5Reg.altAddr
274 : (unsigned)m5Reg.defAddr;
274 int size = (1 << logSize) * 8;
275 Addr offset = bits(vaddr - base, size - 1, 0);
276 Addr endOffset = offset + req->getSize() - 1;
277 if (expandDown) {
278 DPRINTF(TLB, "Checking an expand down segment.\n");
279 warn_once("Expand down segments are untested.\n");
280 if (offset <= limit || endOffset <= limit)
281 return new GeneralProtection(0);

--- 168 unchanged lines hidden ---
275 int size = (1 << logSize) * 8;
276 Addr offset = bits(vaddr - base, size - 1, 0);
277 Addr endOffset = offset + req->getSize() - 1;
278 if (expandDown) {
279 DPRINTF(TLB, "Checking an expand down segment.\n");
280 warn_once("Expand down segments are untested.\n");
281 if (offset <= limit || endOffset <= limit)
282 return new GeneralProtection(0);

--- 168 unchanged lines hidden ---