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 ?