X-Git-Url: http://git.joshuawise.com/netwatch.git/blobdiff_plain/18a0d8bbdf5091d39ce852c03a2a35000e1e0760..db9fad13f192963786c7ac90d305467ac00bd145:/netwatch/pagingstub-asm.s?ds=sidebyside diff --git a/netwatch/pagingstub-asm.s b/netwatch/pagingstub-asm.s deleted file mode 100644 index 964d06e..0000000 --- a/netwatch/pagingstub-asm.s +++ /dev/null @@ -1,27 +0,0 @@ -# pagingstub-asm.s -# Paging-enable helper routines -# NetWatch system management mode administration console -# -# Copyright (c) 2008 Jacob Potter and Joshua Wise. All rights reserved. -# This program is free software; you can redistribute and/or modify it under -# the terms found in the file LICENSE in the root of this source tree. - -.globl set_cr0 - -set_cr0: - mov 4(%esp), %eax # Load argument - movl %eax, %cr0 # Set CR0 - pushw %cs # Push 16 bits of %CS - pushl $set_cr0_cont # Push 32 bits of %EIP - ljmp *(%esp) # "Far jump" (both %CS and %EIP from stack) -set_cr0_cont: # Hey, here we are! - addl $6, %esp # Un-do 48 bits of pushing - ret - - -.globl ps_switch_stack -ps_switch_stack: - mov 4(%esp), %eax - mov 8(%esp), %esp - call *%eax - rsm