mirror of
https://github.com/genodelabs/genode.git
synced 2025-04-08 03:45:24 +00:00
base: store initial ax and di registers in crt0.s
The values are used by a follow up commit by nova to get the boot CPU number. Issue #814
This commit is contained in:
parent
fdaeda47bb
commit
0079179f05
@ -17,6 +17,8 @@
|
||||
|
||||
_start:
|
||||
mov %esp, __initial_sp
|
||||
mov %eax, __initial_ax
|
||||
mov %edi, __initial_di
|
||||
|
||||
/* XXX Switch to our own stack. */
|
||||
leal _stack_high, %esp
|
||||
@ -52,6 +54,10 @@ _stack_low:
|
||||
.global _stack_high
|
||||
_stack_high:
|
||||
|
||||
/* initial value of the ESP register */
|
||||
/* initial value of the ESP, EAX and EDI register */
|
||||
.globl __initial_sp
|
||||
.globl __initial_ax
|
||||
.globl __initial_di
|
||||
__initial_sp: .space 4
|
||||
__initial_ax: .space 4
|
||||
__initial_di: .space 4
|
||||
|
@ -17,6 +17,12 @@
|
||||
|
||||
_start:
|
||||
|
||||
movq __initial_ax@GOTPCREL(%rip), %rbx
|
||||
movq %rax, (%rbx)
|
||||
|
||||
movq __initial_di@GOTPCREL(%rip), %rbx
|
||||
movq %rdi, (%rbx)
|
||||
|
||||
movq __initial_sp@GOTPCREL(%rip), %rax
|
||||
movq %rsp, (%rax)
|
||||
|
||||
@ -55,6 +61,10 @@ _stack_low:
|
||||
.global _stack_high
|
||||
_stack_high:
|
||||
|
||||
/* initial value of the RSP register */
|
||||
/* initial value of the RSP, RAX and RDI register */
|
||||
.globl __initial_sp
|
||||
.globl __initial_ax
|
||||
.globl __initial_di
|
||||
__initial_sp: .space 8
|
||||
__initial_ax: .space 8
|
||||
__initial_di: .space 8
|
||||
|
Loading…
x
Reference in New Issue
Block a user