blob: 7be834788b9f67e962546e4279b279b8b999091e [file] [log] [blame]
Tom Rini83d290c2018-05-06 17:58:06 -04001/* SPDX-License-Identifier: GPL-2.0+ */
Simon Glassdca92202017-01-16 07:03:48 -07002/*
3 * 64-bit x86 Startup Code
4 *
Simon Glass4a5fc6a2019-04-25 21:58:40 -06005 * Copyright 2019 Google, Inc
Simon Glassdca92202017-01-16 07:03:48 -07006 * Written by Simon Glass <sjg@chromium.org>
Simon Glassdca92202017-01-16 07:03:48 -07007 */
8
9#include <config.h>
10
Alexander Graf7e21fbc2018-06-12 07:48:37 +020011.section .text.start
Simon Glassdca92202017-01-16 07:03:48 -070012.code64
13.globl _start
14.type _start, @function
15_start:
16 /* Set up memory using the existing stack */
17 mov %rsp, %rdi
18 call board_init_f_alloc_reserve
19 mov %rax, %rsp
20
21 call board_init_f_init_reserve
22
Bin Meng49d5ff42018-10-13 20:52:09 -070023 xor %rdi, %rdi
Simon Glassdca92202017-01-16 07:03:48 -070024 call board_init_f
25 call board_init_f_r
26
27 /* Should not return here */
28 jmp .