1 ;------------------------------------------------------------------------------
3 ; Copyright (c) 2006, Intel Corporation
4 ; All rights reserved. This program and the accompanying materials
5 ; are licensed and made available under the terms and conditions of the BSD License
6 ; which accompanies this distribution. The full text of the license may be found at
7 ; http://opensource.org/licenses/bsd-license.php
9 ; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 ; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
18 ; AsmEnablePaging64 function
22 ;------------------------------------------------------------------------------
28 InternalX86EnablePaging64 PROC
30 mov [esp], @F ; offset for far retf
33 mov cr4, eax ; enable PAE
40 mov cr0, eax ; enable paging
42 @@: ; long mode starts here
44 mov ebx, [esp] ; mov rbx, [esp]
46 mov ecx, [esp + 8] ; mov rcx, [esp + 8]
48 mov edx, [esp + 10h] ; mov rdx, [esp + 10h]
50 mov esp, [esp + 18h] ; mov rsp, [esp + 18h]
52 add esp, -20h ; add rsp, -20h
55 InternalX86EnablePaging64 ENDP