2 # Paging-enable helper routines
3 # NetWatch system management mode administration console
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.
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)
17 set_cr0_cont: # Hey, here we are!
18 addl $6, %esp # Un-do 48 bits of pushing
22 .globl ps_switch_stack
26 # Put a sentinel value (FEEDFACE) at the top of the stack