2018-05-06 21:58:06 +00:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0+ */
|
2017-01-16 14:03:48 +00:00
|
|
|
/*
|
|
|
|
* 64-bit x86 Startup Code
|
|
|
|
*
|
2019-04-26 03:58:40 +00:00
|
|
|
* Copyright 2019 Google, Inc
|
2017-01-16 14:03:48 +00:00
|
|
|
* Written by Simon Glass <sjg@chromium.org>
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <config.h>
|
|
|
|
|
2018-06-12 05:48:37 +00:00
|
|
|
.section .text.start
|
2017-01-16 14:03:48 +00:00
|
|
|
.code64
|
|
|
|
.globl _start
|
|
|
|
.type _start, @function
|
|
|
|
_start:
|
|
|
|
/* Set up memory using the existing stack */
|
|
|
|
mov %rsp, %rdi
|
|
|
|
call board_init_f_alloc_reserve
|
|
|
|
mov %rax, %rsp
|
|
|
|
|
|
|
|
call board_init_f_init_reserve
|
|
|
|
|
2018-10-14 03:52:09 +00:00
|
|
|
xor %rdi, %rdi
|
2017-01-16 14:03:48 +00:00
|
|
|
call board_init_f
|
|
|
|
call board_init_f_r
|
|
|
|
|
|
|
|
/* Should not return here */
|
|
|
|
jmp .
|