Skip to content

Commit

Permalink
elfloader: unconditionally set PTE shareability to
Browse files Browse the repository at this point in the history
Inner Shareable.

We noticed a lot of instability with the Jetson Orin port when running
in UP + HYP mode. Setting the shareability to Inner Shareable (IS)
unconditionally is the fix, however, we're unable to find the exact
line in Arm documentation that explains why this is the case.

Potential theory: there are other agents on the Jetson Orin that
require cache coherency and live in the IS domain. Being more
permissive with memory resolves the prefetching and translation
faults we were getting.

For reference, Arm states "Arm expects operating systems to mark the
majority of DRAM memory as Normal Write-back cacheable, Inner
shareable" (102376_0200_01_en version 2).

Signed-off-by: Andy Bui <[email protected]>
  • Loading branch information
Andy Bui committed Feb 25, 2024
1 parent 16ea8ef commit 84a55cd
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions elfloader-tool/src/arch-arm/64/mmu.c
Original file line number Diff line number Diff line change
Expand Up @@ -156,9 +156,7 @@ static inline uint64_t make_pte(paddr_t pa, uint8_t mem_attr_index)
return xn
| mask_pa(pa)
| BIT(10) /* access flag */
#if CONFIG_MAX_NUM_NODES > 1
| (INNER_SHAREABLE << 8)
#endif
| (mem_attr_index << 2)
| BIT(0); /* valid page/block mapping */
}
Expand Down

0 comments on commit 84a55cd

Please sign in to comment.