Skip to content

Commit

Permalink
mmu: fix compilation error when enabling CONFIG_MMU_DEBUG
Browse files Browse the repository at this point in the history
  • Loading branch information
HidenoriMatsubayashi committed Feb 23, 2024
1 parent 489a659 commit 3e9123d
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions src/arch/arm64/mmu.cc
Original file line number Diff line number Diff line change
Expand Up @@ -452,12 +452,14 @@ void Mmu::SetPteBlockDesc(uint64_t* pte,

#if defined(CONFIG_MMU_DEBUG)
printf("%x: ", pte);
printf("%s ", (mem_type == MT_NORMAL)
? "MEM"
: ((mem_type == MT_NORMAL_NC) ? "NC" : "DEV"));
printf("%s ", (attrs & MT_RW) ? "-RW" : "-RO");
printf("%s ", (attrs & MT_NS) ? "-NS" : "-S");
printf("%s\n", (attrs & MT_EXECUTE_NEVER) ? "-XN" : "-EXEC");
printf("%s ",
(mem_type == PageMemoryAttribute::kNormal)
? "MEM"
: ((mem_type == PageMemoryAttribute::kNormalNC) ? "NC" : "DEV"));
printf("%s ", (attrs & PageTableEntryL3Desc::kRW) ? "-RW" : "-RO");
printf("%s ", (attrs & PageTableEntryL3Desc::kNonSecure) ? "-NS" : "-S");
printf("%s\n",
(attrs & PageTableEntryL3Desc::kExecuteNever) ? "-XN" : "-EXEC");
#endif
}

Expand Down

0 comments on commit 3e9123d

Please sign in to comment.