1/*
2 * Copyright (c) 2010-2013, 2016 ARM Limited
2 * Copyright (c) 2010-2013, 2016-2017 ARM Limited
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
9 * licensed hereunder. You may use the software subject to the license
10 * terms below provided that you ensure that this notice is replicated

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

637
638 if (!te->longDescFormat) {
639 switch ((dacr >> (static_cast<uint8_t>(te->domain) * 2)) & 0x3) {
640 case 0:
641 domainFaults++;
642 DPRINTF(TLB, "TLB Fault: Data abort on domain. DACR: %#x"
643 " domain: %#x write:%d\n", dacr,
644 static_cast<uint8_t>(te->domain), is_write);
645 if (is_fetch)
645 if (is_fetch) {
646 // Use PC value instead of vaddr because vaddr might
647 // be aligned to cache line and should not be the
648 // address reported in FAR
649 return std::make_shared<PrefetchAbort>(
647 vaddr,
650 req->getPC(),
651 ArmFault::DomainLL + te->lookupLevel,
652 isStage2, tranMethod);
650 else
653 } else
654 return std::make_shared<DataAbort>(
655 vaddr, te->domain, is_write,
656 ArmFault::DomainLL + te->lookupLevel,
657 isStage2, tranMethod);
658 case 1:
659 // Continue with permissions check
660 break;
661 case 2:

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

733 (ap == 3 && sctlr.uwxn && is_priv);
734 if (is_fetch && (abt || xn ||
735 (te->longDescFormat && te->pxn && is_priv) ||
736 (isSecure && te->ns && scr.sif))) {
737 permsFaults++;
738 DPRINTF(TLB, "TLB Fault: Prefetch abort on permission check. AP:%d "
739 "priv:%d write:%d ns:%d sif:%d sctlr.afe: %d \n",
740 ap, is_priv, is_write, te->ns, scr.sif,sctlr.afe);
741 // Use PC value instead of vaddr because vaddr might be aligned to
742 // cache line and should not be the address reported in FAR
743 return std::make_shared<PrefetchAbort>(
739 vaddr,
744 req->getPC(),
745 ArmFault::PermissionLL + te->lookupLevel,
746 isStage2, tranMethod);
747 } else if (abt | hapAbt) {
748 permsFaults++;
749 DPRINTF(TLB, "TLB Fault: Data abort on permission check. AP:%d priv:%d"
750 " write:%d\n", ap, is_priv, is_write);
751 return std::make_shared<DataAbort>(
752 vaddr, te->domain, is_write,

--- 779 unchanged lines hidden ---