Deleted Added
sdiff udiff text old ( 6059:d78df8ebc225 ) new ( 6099:74e5e063a03d )
full compact
1/*
2 * Copyright (c) 2007-2008 The Hewlett-Packard Development Company
3 * All rights reserved.
4 *
5 * Redistribution and use of this software in source and binary forms,
6 * with or without modification, are permitted provided that the
7 * following conditions are met:
8 *

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

192 delayedResponse = false;
193 Addr vaddr = req->getVaddr();
194 DPRINTF(TLB, "Translating vaddr %#x.\n", vaddr);
195 uint32_t flags = req->getFlags();
196 bool storeCheck = flags & StoreCheck;
197
198 int seg = flags & SegmentFlagMask;
199
200 //XXX Junk code to surpress the warning
201 if (storeCheck);
202
203 // If this is true, we're dealing with a request to read an internal
204 // value.
205 if (seg == SEGMENT_REG_MS) {
206 DPRINTF(TLB, "Addresses references internal memory.\n");
207 Addr prefix = (vaddr >> 3) & IntAddrPrefixMask;
208 if (prefix == IntAddrPrefixCPUID) {
209 panic("CPUID memory space not yet implemented!\n");
210 } else if (prefix == IntAddrPrefixMSR) {

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

574 if (!(seg == SEGMENT_REG_TSG || seg == SYS_SEGMENT_REG_IDTR ||
575 seg == SEGMENT_REG_HS || seg == SEGMENT_REG_LS ||
576 seg == SEGMENT_REG_MS)
577 && !tc->readMiscRegNoEffect(MISCREG_SEG_SEL(seg)))
578 return new GeneralProtection(0);
579 bool expandDown = false;
580 SegAttr attr = tc->readMiscRegNoEffect(MISCREG_SEG_ATTR(seg));
581 if (seg >= SEGMENT_REG_ES && seg <= SEGMENT_REG_HS) {
582 if (!attr.writable && mode == Write)
583 return new GeneralProtection(0);
584 if (!attr.readable && mode == Read)
585 return new GeneralProtection(0);
586 expandDown = attr.expandDown;
587
588 }
589 Addr base = tc->readMiscRegNoEffect(MISCREG_SEG_BASE(seg));
590 Addr limit = tc->readMiscRegNoEffect(MISCREG_SEG_LIMIT(seg));

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

650 !(flags & (CPL0FlagBit << FlagShift)));
651 if ((inUser && !entry->user) ||
652 (mode == Write && !entry->writable)) {
653 // The page must have been present to get into the TLB in
654 // the first place. We'll assume the reserved bits are
655 // fine even though we're not checking them.
656 return new PageFault(vaddr, true, mode, inUser, false);
657 }
658
659
660 DPRINTF(TLB, "Entry found with paddr %#x, "
661 "doing protection checks.\n", entry->paddr);
662 Addr paddr = entry->paddr | (vaddr & (entry->size-1));
663 DPRINTF(TLB, "Translated %#x -> %#x.\n", vaddr, paddr);
664 req->setPaddr(paddr);
665 } else {

--- 88 unchanged lines hidden ---