Skip to content

Commit

Permalink
x64: explain where %rbp and %rbx are set
Browse files Browse the repository at this point in the history
Signed-off-by: Elazar Leibovich <[email protected]>
Signed-off-by: Pekka Enberg <[email protected]>
  • Loading branch information
elazarl authored and Pekka Enberg committed Jul 23, 2014
1 parent d72ab0d commit 8fb28d3
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions arch/x64/boot.S
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ interrupt_stack_top = .

.globl start32
start32:
# boot16.S set %eax to ELF start address, we'll use it later
mov %eax, %ebp
lgdt gdt_desc
mov $0x10, %eax
Expand Down Expand Up @@ -101,6 +102,7 @@ start64:
xor %eax, %eax
rep stosb
mov %rbp, elf_header
# %ebx is set by boot16.S before running the loader
mov %rbx, osv_multiboot_info
lea init_stack_top, %rsp
call premain
Expand Down

0 comments on commit 8fb28d3

Please sign in to comment.