blob: c6f05fd238ffcb5ed4d8231aaee696593de63a5d [file] [log] [blame]
/*
* Copyright 2014 Google Inc.
*
* See file CREDITS for list of people who contributed to this
* project.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of
* the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but without any warranty; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*/
.global boot_arm_linux_jump
.type boot_arm_linux_jump, function
boot_arm_linux_jump:
/* Entered with X0 = entry, X1 = &fdt */
/* Linux ABI expects masking of Debug, SError, IRQ and FIQ */
msr daifset, #0xf
mov x4, x0 /* save entry pointer */
mov x0, x1 /* X0 = physical address of dtb */
mov x1, #0 /* X1 = 0 */
mov x2, #0 /* X2 = 0 */
mov x3, #0 /* X3 = 0 */
mrs x5, sctlr_el2
/* turn off mmu and disable caching */
and x5, x5, #~1
and x5, x5, #~(1<<2)
and x5, x5, #~(1<<12)
msr sctlr_el2, x5
br x4 /* jump to entry pointer */