2006-04-22 00:54:32 +02:00
|
|
|
#------------------------------------------------------------------------------
|
|
|
|
#
|
|
|
|
# Copyright (c) 2006, Intel Corporation
|
|
|
|
# All rights reserved. This program and the accompanying materials
|
|
|
|
# are licensed and made available under the terms and conditions of the BSD License
|
|
|
|
# which accompanies this distribution. The full text of the license may be found at
|
|
|
|
# http://opensource.org/licenses/bsd-license.php
|
|
|
|
#
|
|
|
|
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
|
|
|
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
|
|
|
#
|
|
|
|
# Module Name:
|
|
|
|
#
|
|
|
|
# EnablePaging32.Asm
|
|
|
|
#
|
|
|
|
# Abstract:
|
|
|
|
#
|
2006-07-11 12:25:13 +02:00
|
|
|
# InternalX86EnablePaging32 function
|
2006-04-22 00:54:32 +02:00
|
|
|
#
|
|
|
|
# Notes:
|
|
|
|
#
|
|
|
|
#------------------------------------------------------------------------------
|
|
|
|
|
2006-07-21 10:47:38 +02:00
|
|
|
.global _InternalX86EnablePaging32
|
2006-04-22 00:54:32 +02:00
|
|
|
|
|
|
|
#------------------------------------------------------------------------------
|
|
|
|
# VOID
|
|
|
|
# EFIAPI
|
2006-07-11 12:25:13 +02:00
|
|
|
# InternalX86EnablePaging32 (
|
2006-04-22 00:54:32 +02:00
|
|
|
# IN SWITCH_STACK_ENTRY_POINT EntryPoint,
|
|
|
|
# IN VOID *Context1, OPTIONAL
|
|
|
|
# IN VOID *Context2, OPTIONAL
|
|
|
|
# IN VOID *NewStack
|
|
|
|
# );
|
|
|
|
#------------------------------------------------------------------------------
|
2006-07-21 10:47:38 +02:00
|
|
|
_InternalX86EnablePaging32:
|
|
|
|
movl 4(%esp), %ebx
|
|
|
|
movl 8(%esp), %ecx
|
|
|
|
movl 12(%esp), %edx
|
2006-04-22 00:54:32 +02:00
|
|
|
pushfl
|
2006-07-21 10:47:38 +02:00
|
|
|
pop %edi
|
2006-04-22 00:54:32 +02:00
|
|
|
cli
|
|
|
|
movl %cr0, %eax
|
2006-07-21 10:47:38 +02:00
|
|
|
btsl $31, %eax
|
|
|
|
movl 16(%esp), %esp
|
2006-04-22 00:54:32 +02:00
|
|
|
movl %eax, %cr0
|
2006-07-21 10:47:38 +02:00
|
|
|
push %edi
|
2006-04-22 00:54:32 +02:00
|
|
|
popfl
|
2006-07-21 10:47:38 +02:00
|
|
|
push %edx
|
|
|
|
push %ecx
|
2006-04-22 00:54:32 +02:00
|
|
|
call *%ebx
|
|
|
|
jmp .
|