summaryrefslogtreecommitdiffstats
path: root/src/arch/arm/armv7/bootblock_m.S
blob: 4d691414ba36589f92c91acb6b28602e3b0822c3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
/* SPDX-License-Identifier: BSD-3-Clause */
/* This file is part of the coreboot project. */

#include <arch/asm.h>

ENTRY(_start)
	/*
	 * Initialize the stack to a known value. This is used to check for
	 * stack overflow later in the boot process.
	 */
	ldr	r0, =_stack
	ldr	r1, =_estack
	ldr	r2, =0xdeadbeef
init_stack_loop:
	str	r2, [r0]
	add	r0, #4
	cmp	r0, r1
	bne	init_stack_loop

call_bootblock:
	ldr	sp, =_estack /* Set up stack pointer */
	bl	main
ENDPROC(_start)