summaryrefslogtreecommitdiff
path: root/arch/x86/lib/crt0_x86_64_efi.S
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/lib/crt0_x86_64_efi.S')
-rw-r--r--arch/x86/lib/crt0_x86_64_efi.S24
1 files changed, 13 insertions, 11 deletions
diff --git a/arch/x86/lib/crt0_x86_64_efi.S b/arch/x86/lib/crt0_x86_64_efi.S
index 989799fb4a..bb8d3cf8a9 100644
--- a/arch/x86/lib/crt0_x86_64_efi.S
+++ b/arch/x86/lib/crt0_x86_64_efi.S
@@ -3,7 +3,7 @@
* crt0-efi-x86_64.S - x86_64 EFI startup code.
* Copyright (C) 1999 Hewlett-Packard Co.
* Contributed by David Mosberger <davidm@hpl.hp.com>.
- * Copyright (C) 2005 Intel Co.
+ * Copyright (C) 2005 Intel Corporation
* Contributed by Fenghua Yu <fenghua.yu@intel.com>.
*
* All rights reserved.
@@ -14,26 +14,28 @@
.globl _start
_start:
subq $8, %rsp
+
pushq %rcx
pushq %rdx
-0:
- lea image_base(%rip), %rdi
- lea _DYNAMIC(%rip), %rsi
+ mov %rcx, %r8
+ mov %rdx, %r9
+
+ lea image_base(%rip), %rcx
+ lea _DYNAMIC(%rip), %rdx
- popq %rcx
- popq %rdx
- pushq %rcx
- pushq %rdx
call _relocate
- popq %rdi
- popq %rsi
+ popq %rdx
+ popq %rcx
+
+ testq %rax, %rax
+ jnz .exit
call efi_main
+.exit:
addq $8, %rsp
-.exit:
ret
/*