How to disable MMU for arm64 platforms like imx8 series

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to disable MMU for arm64 platforms like imx8 series

Jump to solution
1,644 Views
haamnath
Contributor I

I tried to disable MMU before control gives to Linux kernel.

So the flow is,

U-boot Spl -> ATF -> U-boot -> Bootloader -> Payload -> Linux kernel

End of payload we give control to Linux kernel. Before giving control kernel we need to disable MMU.

I use the below code to disable MMU and the results, kernel gives warning and hang.

// Disable MMU
mrs x0, sctlr_el1 // Read the System Control Register (EL1)
and x0, x0, #1 // Clear the M (MMU enable) bit
msr sctlr_el1, x0 // Write back the modified value to SCTLR_EL1

isb
dsb sy
ret
 
Any suggestion on this ?
Tags (1)
0 Kudos
Reply
1 Solution
1,629 Views
Bio_TICFSL
NXP TechSupport
NXP TechSupport

Hello,

You can disable from kernel menu config or  variable CONFIG_MMU (default value y)in the Kconfig file.

Regards

View solution in original post

0 Kudos
Reply
1 Reply
1,630 Views
Bio_TICFSL
NXP TechSupport
NXP TechSupport

Hello,

You can disable from kernel menu config or  variable CONFIG_MMU (default value y)in the Kconfig file.

Regards

0 Kudos
Reply
%3CLINGO-SUB%20id%3D%22lingo-sub-1882769%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EHow%20to%20disable%20MMU%20for%20arm64%20platforms%20like%20imx8%20series%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1882769%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EI%20tried%20to%20disable%20MMU%20before%20control%20gives%20to%20Linux%20kernel.%3C%2FP%3E%3CP%3ESo%20the%20flow%20is%2C%3C%2FP%3E%3CP%3EU-boot%20Spl%20-%26gt%3B%20ATF%20-%26gt%3B%20U-boot%20-%26gt%3B%20Bootloader%20-%26gt%3B%20Payload%20-%26gt%3B%20Linux%20kernel%3C%2FP%3E%3CP%3EEnd%20of%20payload%20we%20give%20control%20to%20Linux%20kernel.%20Before%20giving%20control%20kernel%20we%20need%20to%20disable%20MMU.%3C%2FP%3E%3CP%3EI%20use%20the%20below%20code%20to%20disable%20MMU%20and%20the%20results%2C%20kernel%20gives%20warning%20and%20hang.%3C%2FP%3E%3CDIV%3E%3CDIV%3E%3CSPAN%3E%2F%2F%20Disable%20MMU%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3Emrs%3C%2FSPAN%3E%20%3CSPAN%3Ex0%3C%2FSPAN%3E%3CSPAN%3E%2C%20%3C%2FSPAN%3E%3CSPAN%3Esctlr_el1%3C%2FSPAN%3E%20%3CSPAN%3E%2F%2F%20Read%20the%20System%20Control%20Register%20(EL1)%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3Eand%3C%2FSPAN%3E%20%3CSPAN%3Ex0%3C%2FSPAN%3E%3CSPAN%3E%2C%20%3C%2FSPAN%3E%3CSPAN%3Ex0%3C%2FSPAN%3E%3CSPAN%3E%2C%20%3C%2FSPAN%3E%3CSPAN%3E%231%20%2F%2F%20Clear%20the%20M%20(MMU%20enable)%20bit%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3Emsr%3C%2FSPAN%3E%20%3CSPAN%3Esctlr_el1%3C%2FSPAN%3E%3CSPAN%3E%2C%20%3C%2FSPAN%3E%3CSPAN%3Ex0%3C%2FSPAN%3E%20%3CSPAN%3E%2F%2F%20Write%20back%20the%20modified%20value%20to%20SCTLR_EL1%3C%2FSPAN%3E%3C%2FDIV%3E%3CBR%20%2F%3E%3CDIV%3E%3CSPAN%3Eisb%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3Edsb%3C%2FSPAN%3E%20%3CSPAN%3Esy%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3Eret%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3EAny%20suggestion%20on%20this%20%3F%3C%2FSPAN%3E%3C%2FDIV%3E%3C%2FDIV%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1882854%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20How%20to%20disable%20MMU%20for%20arm64%20platforms%20like%20imx8%20series%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1882854%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHello%2C%3C%2FP%3E%0A%3CP%3EYou%20can%20disable%20from%20kernel%20menu%20config%20or%26nbsp%3B%20variable%20CONFIG_MMU%20(default%20value%20y)in%20the%20Kconfig%20file.%3C%2FP%3E%0A%3CP%3ERegards%3C%2FP%3E%3C%2FLINGO-BODY%3E