]> git.proxmox.com Git - mirror_edk2.git/blob - DuetPkg/DxeIpl/Ia32/EnterDxeCore.asm
Initialize DuetPkg ...
[mirror_edk2.git] / DuetPkg / DxeIpl / Ia32 / EnterDxeCore.asm
1 TITLE EnterDxeCore.asm: Assembly code for the entering DxeCore
2 ;------------------------------------------------------------------------------
3 ;*
4 ;* Copyright 2006, Intel Corporation
5 ;* All rights reserved. This program and the accompanying materials
6 ;* are licensed and made available under the terms and conditions of the BSD License
7 ;* which accompanies this distribution. The full text of the license may be found at
8 ;* http://opensource.org/licenses/bsd-license.php
9 ;*
10 ;* THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11 ;* WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
12 ;*
13 ;* EnterDxeCore.asm
14 ;*
15 ;* Abstract:
16 ;*
17 ;------------------------------------------------------------------------------
18
19 .686p
20 .model flat
21
22 .code
23 .stack
24 .MMX
25 .XMM
26
27 ;
28 ; VOID
29 ; EnterDxeMain (
30 ; IN VOID *StackTop,
31 ; IN VOID *DxeCoreEntryPoint,
32 ; IN VOID *Hob,
33 ; IN VOID *PageTable
34 ; )
35 ;
36 EnterDxeMain PROC C \
37 StackTop:DWORD, \
38 DxeCoreEntryPoint:DWORD, \
39 Hob:DWORD, \
40 PageTable:DWORD
41
42 mov eax, PageTable
43 ; mov cr3, eax ; load page table
44 ; mov eax, cr4
45 ; bts eax, 4 ; enable CR4.PSE
46 ; mov cr4, eax
47 ; mov eax, cr0
48 ; bts eax, 31 ; enable CR0.PG
49 ; mov cr0, eax
50 mov ecx, DxeCoreEntryPoint
51 mov eax, StackTop
52 mov esp, eax
53 mov edx, Hob
54 push edx
55 push 0
56 jmp ecx
57
58 ; should never get here
59 jmp $
60 ret
61
62 EnterDxeMain ENDP
63
64 END