headsmp.S 942 字节
Newer Older
D
Dinh Nguyen 已提交
1 2 3 4 5 6 7 8 9 10 11
/*
 *  Copyright (c) 2003 ARM Limited
 *  Copyright (c) u-boot contributors
 *  Copyright (c) 2012 Pavel Machek <pavel@denx.de>
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 as
 * published by the Free Software Foundation.
 */
#include <linux/linkage.h>
#include <linux/init.h>
12
#include <asm/memory.h>
13
#include <asm/assembler.h>
D
Dinh Nguyen 已提交
14

15
	.arch	armv7-a
D
Dinh Nguyen 已提交
16 17

ENTRY(secondary_trampoline)
18 19 20 21
	/* CPU1 will always fetch from 0x0 when it is brought out of reset.
	 * Thus, we can just subtract the PAGE_OFFSET to get the physical
	 * address of &cpu1start_addr. This would not work for platforms
	 * where the physical memory does not start at 0x0.
22 23
	*/
ARM_BE8(setend	be)
24 25 26 27 28
	adr	r0, 1f
	ldmia	r0, {r1, r2}
	sub	r2, r2, #PAGE_OFFSET
	ldr	r3, [r2]
	ldr	r4, [r3]
29
ARM_BE8(rev	r4, r4)
30
	bx	r4
D
Dinh Nguyen 已提交
31

32 33 34
	.align
1:	.long	.
	.long	socfpga_cpu1start_addr
D
Dinh Nguyen 已提交
35
ENTRY(secondary_trampoline_end)