diff options
author | Danny Holman <dholman@gymli.org> | 2023-11-26 18:14:18 -0600 |
---|---|---|
committer | Danny Holman <dholman@gymli.org> | 2023-11-26 18:14:18 -0600 |
commit | c44c1f8f293365d682b6de131384f4ae4662ca99 (patch) | |
tree | b7acedc41908d5f6fcc32ab47327b7aaf36d4e60 /arch/i386/boot | |
parent | fe3aab170c33ae4530f0580c52509f4c414a8769 (diff) |
arch: i386: boot: boot.s
Fix several small bugs in assembler.
Signed-off-by: Danny Holman <dholman@gymli.org>
Diffstat (limited to 'arch/i386/boot')
-rw-r--r-- | arch/i386/boot/boot.s | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/arch/i386/boot/boot.s b/arch/i386/boot/boot.s index 91df039..f2b2da6 100644 --- a/arch/i386/boot/boot.s +++ b/arch/i386/boot/boot.s @@ -52,7 +52,7 @@ _start: movl %ecx, %cr3 movl %cr0, %ecx - orl $0x80010000, %ecx + orl $0x80000000, %ecx movl %ecx, %cr0 lea 4f, %ecx @@ -66,6 +66,7 @@ _start: movl %ecx, %cr3 movl $stack_top, %esp + and $-16, %esp call gdt_install call idt_install @@ -107,7 +108,6 @@ flush_tss: .global jump_userspace .type jump_userspace, @function jump_userspace: - cli movw $0x23, %ax movw %ax, %ds movw %ax, %es @@ -118,10 +118,6 @@ jump_userspace: pushl %esp pushf orl $0x200, (%esp) - pushl $0x8 - pushl $test_user_function + pushl $0x1B + pushl test_user_function iret - -test_user_function: - movl $1, %eax - int $0x80 |