diff options
| author | Felix Morgner <felix.morgner@ost.ch> | 2026-04-29 09:36:43 +0200 |
|---|---|---|
| committer | Felix Morgner <felix.morgner@ost.ch> | 2026-04-29 09:36:43 +0200 |
| commit | d6ef2153fb32ee7ba04acdf37e7a535a855229db (patch) | |
| tree | d2cd3275797208b1f78c44baa63739fa8645146f /arch/x86_64/src/boot/entry64.s | |
| parent | d906d70c94c2a40d5fc6fd26056c7bc57d540002 (diff) | |
| parent | c3d5a155025b445ab9213f131681afe9410b4e66 (diff) | |
| download | teachos-d6ef2153fb32ee7ba04acdf37e7a535a855229db.tar.xz teachos-d6ef2153fb32ee7ba04acdf37e7a535a855229db.zip | |
Merge branch 'fmorgner/develop-BA-FS26/x86-64-use-p1204-layout' into 'develop-BA-FS26'
chore: migrate 'arch' to p1204 project layout
See merge request teachos/kernel!28
Diffstat (limited to 'arch/x86_64/src/boot/entry64.s')
| -rw-r--r-- | arch/x86_64/src/boot/entry64.s | 62 |
1 files changed, 0 insertions, 62 deletions
diff --git a/arch/x86_64/src/boot/entry64.s b/arch/x86_64/src/boot/entry64.s deleted file mode 100644 index 29fb778..0000000 --- a/arch/x86_64/src/boot/entry64.s +++ /dev/null @@ -1,62 +0,0 @@ -.section .stack, "aw", @nobits - -.align 16 -.global stack_top -stack_bottom: .skip 1 << 20 -stack_top: -stack_size = stack_top - stack_bottom - -.section .bss, "aw", @nobits - -//! A structure containing information gathered during the bootstrap process. -//! Expected layout (as described by teachos::boot::information): -//! -//! struct -//! { -//! multiboot2::information_view const * mbi; -//! std::size_t vga_buffer_index; -//! } -.global bootstrap_information -bootstrap_information: .skip 16 - -.section .boot_text, "ax", @progbits -.code64 - -.global _entry64 -_entry64: - mov $global_descriptor_table_data, %rax - mov %rax, %ss - mov %rax, %ds - mov %rax, %es - mov %rax, %fs - mov %rax, %gs - - mov $stack_top, %rsp - mov %rsp, %rbp - - mov multiboot_information_pointer, %rax - or $TEACHOS_VMA, %rax - mov vga_buffer_pointer, %rdx - sub $0xb8000, %rdx - mov %rax, (bootstrap_information) - mov %rdx, (bootstrap_information + 8) - - call invoke_global_constructors - - xor %rax, %rax - mov %rax, %rbp - mov %rax, %rdx - mov %rax, %rsi - - mov $stack_size, %rcx - shr $3, %rcx - lea (stack_bottom), %rdi - rep stosq - - mov %rax, %rdi - - call main - -1: - hlt - jmp 1b |
