arch: x86 -> x86_64 and build system changes
This commit is contained in:
committed by
Hannes Weisbach
parent
51982de36b
commit
43ecf06e83
34
arch/x86_64/elfboot/head.S
Normal file
34
arch/x86_64/elfboot/head.S
Normal file
@@ -0,0 +1,34 @@
|
||||
/**
|
||||
* \file head.S
|
||||
* License details are found in the file LICENSE.
|
||||
* \brief
|
||||
* Entry point calling to elfboot_main.
|
||||
* \author Taku Shimosawa <shimosawa@is.s.u-tokyo.ac.jp> \par
|
||||
* Copyright (C) 2011 - 2012 Taku Shimosawa
|
||||
*/
|
||||
/*
|
||||
* HISTORY
|
||||
*/
|
||||
.text
|
||||
.globl _start
|
||||
_start:
|
||||
leaq _stack_end(%rip), %rsp
|
||||
/* preserve arguments */
|
||||
pushq %rdi
|
||||
pushq %rsi
|
||||
pushq %rdx
|
||||
pushq %rcx
|
||||
leaq _stack_end(%rip), %rdi
|
||||
call elfboot_main
|
||||
andq %rax, %rax
|
||||
jz 1f
|
||||
popq %rcx
|
||||
popq %rdx
|
||||
popq %rsi
|
||||
popq %rdi
|
||||
jmpq *%rax
|
||||
1:
|
||||
cli
|
||||
hlt
|
||||
jmp 1b
|
||||
|
||||
Reference in New Issue
Block a user