tlb.cc (11793:ef606668d247) tlb.cc (11861:9684637f3339)
1/*
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);
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
646 return std::make_shared<PrefetchAbort>(
649 return std::make_shared<PrefetchAbort>(
647 vaddr,
650 req->getPC(),
648 ArmFault::DomainLL + te->lookupLevel,
649 isStage2, tranMethod);
651 ArmFault::DomainLL + te->lookupLevel,
652 isStage2, tranMethod);
650 else
653 } else
651 return std::make_shared<DataAbort>(
652 vaddr, te->domain, is_write,
653 ArmFault::DomainLL + te->lookupLevel,
654 isStage2, tranMethod);
655 case 1:
656 // Continue with permissions check
657 break;
658 case 2:

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

730 (ap == 3 && sctlr.uwxn && is_priv);
731 if (is_fetch && (abt || xn ||
732 (te->longDescFormat && te->pxn && is_priv) ||
733 (isSecure && te->ns && scr.sif))) {
734 permsFaults++;
735 DPRINTF(TLB, "TLB Fault: Prefetch abort on permission check. AP:%d "
736 "priv:%d write:%d ns:%d sif:%d sctlr.afe: %d \n",
737 ap, is_priv, is_write, te->ns, scr.sif,sctlr.afe);
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
738 return std::make_shared<PrefetchAbort>(
743 return std::make_shared<PrefetchAbort>(
739 vaddr,
744 req->getPC(),
740 ArmFault::PermissionLL + te->lookupLevel,
741 isStage2, tranMethod);
742 } else if (abt | hapAbt) {
743 permsFaults++;
744 DPRINTF(TLB, "TLB Fault: Data abort on permission check. AP:%d priv:%d"
745 " write:%d\n", ap, is_priv, is_write);
746 return std::make_shared<DataAbort>(
747 vaddr, te->domain, is_write,

--- 779 unchanged lines hidden ---
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 ---