diff options
| author | Felix Morgner <felix.morgner@ost.ch> | 2025-07-18 11:16:43 +0000 |
|---|---|---|
| committer | Felix Morgner <felix.morgner@ost.ch> | 2025-07-18 11:16:50 +0000 |
| commit | 4ae38294b0db1870f82cc402dc4a8bb38cea4a67 (patch) | |
| tree | e7f73274751077c0ebb85635996ab28e5174db27 | |
| parent | 14ed096fc5de6844cb116f3319c0d03043d26ea2 (diff) | |
| download | teachos-4ae38294b0db1870f82cc402dc4a8bb38cea4a67.tar.xz teachos-4ae38294b0db1870f82cc402dc4a8bb38cea4a67.zip | |
x86_64: don't lose multi boot information pointer
Since the transition to a PIE, more registers are required to perform
the relative lookups of data references. As part of that change, a
subtle mistake was introduced in _start, overwriting the multiboot
information pointer that gets handed to kernel by the boot loader in
%ebx.
| -rw-r--r-- | arch/x86_64/src/boot/boot.s | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/x86_64/src/boot/boot.s b/arch/x86_64/src/boot/boot.s index e0cff7c..ba5c6f0 100644 --- a/arch/x86_64/src/boot/boot.s +++ b/arch/x86_64/src/boot/boot.s @@ -195,9 +195,9 @@ _start: call .Lstart_get_ip .Lstart_get_ip: pop %esi - lea (stack_top - .Lstart_get_ip)(%esi), %ebx + lea (stack_top - .Lstart_get_ip)(%esi), %ecx - mov %ebx, %esp + mov %ecx, %esp mov %esp, %ebp call assert_loaded_by_multiboot2_loader |
