mptramp.S revision 265694
1272343Sngie/*- 2272343Sngie * Copyright 2011 Semihalf 3272343Sngie * All rights reserved. 4272343Sngie * 5272343Sngie * Redistribution and use in source and binary forms, with or without 6272343Sngie * modification, are permitted provided that the following conditions 7272343Sngie * are met: 8272343Sngie * 1. Redistributions of source code must retain the above copyright 9272343Sngie * notice, this list of conditions and the following disclaimer. 10272343Sngie * 2. Redistributions in binary form must reproduce the above copyright 11272343Sngie * notice, this list of conditions and the following disclaimer in the 12272343Sngie * documentation and/or other materials provided with the distribution. 13272343Sngie * 14272343Sngie * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 15272343Sngie * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 16272343Sngie * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 17272343Sngie * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 18272343Sngie * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19272343Sngie * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20272343Sngie * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21272343Sngie * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22272343Sngie * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23272343Sngie * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24272343Sngie * SUCH DAMAGE. 25272343Sngie */ 26272343Sngie 27272343Sngie#include <machine/asm.h> 28272343Sngie#include <machine/armreg.h> 29272343Sngie 30272343Sngie__FBSDID("$FreeBSD: head/sys/arm/mv/armadaxp/mptramp.S 265694 2014-05-08 18:36:42Z ian $"); 31272343Sngie 32272343SngieASENTRY_NP(mptramp) 33272343Sngie mov r0, #0 34272343Sngie mcr p15, 0, r0, c7, c7, 0 35272343Sngie 36272343Sngie mrs r3, cpsr 37272343Sngie bic r3, r3, #(PSR_MODE) 38272343Sngie orr r3, r3, #(PSR_SVC32_MODE) 39272343Sngie msr cpsr_fsxc, r3 40272343Sngie 41272343Sngie mrc p15, 0, r0, c0, c0, 5 42272343Sngie and r0, #0x0f /* Get CPU ID */ 43272343Sngie 44272343Sngie /* Read boot address for CPU */ 45272343Sngie mov r1, #0x100 46272343Sngie mul r2, r0, r1 47272343Sngie ldr r1, Lpmureg 48272343Sngie add r0, r2, r1 49272343Sngie ldr r1, [r0], #0x00 50272343Sngie 51272343Sngie mov pc, r1 52272343Sngie 53272343SngieLpmureg: 54272343Sngie .word 0xd0022124 55272343SngieEND(mptramp) 56272343Sngie 57272343Sngie