diff --git a/shared/source/gmm_helper/gmm_helper.cpp b/shared/source/gmm_helper/gmm_helper.cpp index b0776a42b3a82..c43af5e5bbf17 100644 --- a/shared/source/gmm_helper/gmm_helper.cpp +++ b/shared/source/gmm_helper/gmm_helper.cpp @@ -63,7 +63,13 @@ GmmHelper::GmmHelper(const RootDeviceEnvironment &rootDeviceEnvironmentArg) : ro } uint64_t GmmHelper::canonize(uint64_t address) const { +#if defined(__aarch64__) + // Memory layout on aarch64 doesn't require setting bits 63-48 to the same + // as bit 47. See https://docs.kernel.org/arch/arm64/memory.html + return static_cast(address); +#else return static_cast(address << (64 - addressWidth)) >> (64 - addressWidth); +#endif } uint64_t GmmHelper::decanonize(uint64_t address) const {