2018-05-07 06:58:06 +09:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0+ */
|
2017-01-16 23:03:48 +09:00
|
|
|
/*
|
|
|
|
* 64-bit x86 Startup Code
|
|
|
|
*
|
2019-04-26 12:58:40 +09:00
|
|
|
* Copyright 2019 Google, Inc
|
2017-01-16 23:03:48 +09:00
|
|
|
* Written by Simon Glass <sjg@chromium.org>
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <config.h>
|
|
|
|
|
2018-06-12 14:48:37 +09:00
|
|
|
.section .text.start
|
2017-01-16 23:03:48 +09: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 12:52:09 +09:00
|
|
|
xor %rdi, %rdi
|
2017-01-16 23:03:48 +09:00
|
|
|
call board_init_f
|
|
|
|
call board_init_f_r
|
|
|
|
|
|
|
|
/* Should not return here */
|
|
|
|
jmp .
|