From c44c1f8f293365d682b6de131384f4ae4662ca99 Mon Sep 17 00:00:00 2001 From: Danny Holman Date: Sun, 26 Nov 2023 18:14:18 -0600 Subject: arch: i386: boot: boot.s Fix several small bugs in assembler. Signed-off-by: Danny Holman --- arch/i386/boot/boot.s | 12 ++++-------- 1 file 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 -- cgit v1.2.3