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