]> Joshua Wise's Git repositories - netwatch.git/blame - netwatch/pagingstub-asm.s
Fix LICENSE.
[netwatch.git] / netwatch / pagingstub-asm.s
CommitLineData
3c4e084d
JP
1# pagingstub-asm.s
2# Paging-enable helper routines
3# NetWatch system management mode administration console
4#
5# Copyright (c) 2008 Jacob Potter and Joshua Wise. All rights reserved.
6# This program is free software; you can redistribute and/or modify it under
7# the terms found in the file LICENSE in the root of this source tree.
9e2a82e4
JP
8
9.globl set_cr0
10
11set_cr0:
12 mov 4(%esp), %eax # Load argument
13 movl %eax, %cr0 # Set CR0
14 pushw %cs # Push 16 bits of %CS
15 pushl $set_cr0_cont # Push 32 bits of %EIP
16 ljmp *(%esp) # "Far jump" (both %CS and %EIP from stack)
17set_cr0_cont: # Hey, here we are!
18 addl $6, %esp # Un-do 48 bits of pushing
19 ret
20
8e404e68
JP
21
22.globl ps_switch_stack
23ps_switch_stack:
24 mov 4(%esp), %eax
25 mov 8(%esp), %esp
26 call *%eax
27 rsm
This page took 0.028727 seconds and 4 git commands to generate.