diff options
author | Danny Holman <dholman@gymli.org> | 2024-02-24 06:41:48 -0600 |
---|---|---|
committer | Danny Holman <dholman@gymli.org> | 2024-02-24 06:41:48 -0600 |
commit | 5d06824289868c5a345fbcfa8ed4d1e63af84fdb (patch) | |
tree | 05cf903c665554142ee7b49d2b7f16480ec85adb /arch/i386/boot | |
parent | ae9eeff0ce79def2c51e361acbdecdee7fc4ecb1 (diff) |
arch: i386: move jump_userspace to its own file
Move the function that jumps to ring 3 to its own assembly file.
Signed-off-by: Danny Holman <dholman@gymli.org>
Diffstat (limited to 'arch/i386/boot')
-rw-r--r-- | arch/i386/boot/boot.s | 19 |
1 files changed, 1 insertions, 18 deletions
diff --git a/arch/i386/boot/boot.s b/arch/i386/boot/boot.s index 005b07b..4b9106d 100644 --- a/arch/i386/boot/boot.s +++ b/arch/i386/boot/boot.s @@ -82,7 +82,7 @@ load_page_dir: pushl %ebp movl %esp, %ebp - movl 8(%ebp), %eax + movl 8(%esp), %eax movl %eax, %cr3 movl %ebp, %esp @@ -111,20 +111,3 @@ flush_gdt: jmp $0x08, $.flush .flush: ret - -.global jump_userspace -.type jump_userspace, @function -jump_userspace: - movw $0x23, %ax - movw %ax, %ds - movw %ax, %es - movw %ax, %fs - movw %ax, %gs - - pushl $0x23 - pushl %esp - pushf - orl $0x200, (%esp) - pushl $0x1B - pushl test_user_function - iret |