]> git.proxmox.com Git - mirror_edk2.git/blame - UefiCpuPkg/ResetVector/Vtf0/Ia16/ResetVectorVtf0.asm
UefiCpuPkg VTF0 X64: Build page tables in NASM code
[mirror_edk2.git] / UefiCpuPkg / ResetVector / Vtf0 / Ia16 / ResetVectorVtf0.asm
CommitLineData
bc252e8e
EB
1;------------------------------------------------------------------------------\r
2; @file\r
74b7ec58 3; First code executed by processor after resetting.\r
bc252e8e 4;\r
eee1d2ca 5; Copyright (c) 2008 - 2014, Intel Corporation. All rights reserved.<BR>\r
01a1c0fc 6; This program and the accompanying materials\r
bc252e8e
EB
7; are licensed and made available under the terms and conditions of the BSD License\r
8; which accompanies this distribution. The full text of the license may be found at\r
9; http://opensource.org/licenses/bsd-license.php\r
10;\r
11; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
12; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
13;\r
14;------------------------------------------------------------------------------\r
15\r
16BITS 16\r
17\r
18ALIGN 16\r
19\r
eee1d2ca
JJ
20;\r
21; Pad the image size to 4k when page tables are in VTF0\r
22;\r
23; If the VTF0 image has page tables built in, then we need to make\r
24; sure the end of VTF0 is 4k above where the page tables end.\r
25;\r
26; This is required so the page tables will be 4k aligned when VTF0 is\r
27; located just below 0x100000000 (4GB) in the firmware device.\r
28;\r
29%ifdef ALIGN_TOP_TO_4K_FOR_PAGING\r
30 TIMES (0x1000 - ($ - EndOfPageTables) - 0x20) DB 0\r
31%endif\r
32\r
bc252e8e
EB
33applicationProcessorEntryPoint:\r
34;\r
35; Application Processors entry point\r
36;\r
37; GenFv generates code aligned on a 4k boundary which will jump to this\r
38; location. (0xffffffe0) This allows the Local APIC Startup IPI to be\r
39; used to wake up the application processors.\r
40;\r
eee1d2ca 41 jmp EarlyApInitReal16\r
bc252e8e
EB
42\r
43ALIGN 8\r
44\r
45 DD 0\r
46\r
47;\r
48; The VTF signature\r
49;\r
50; VTF-0 means that the VTF (Volume Top File) code does not require\r
51; any fixups.\r
52;\r
53vtfSignature:\r
54 DB 'V', 'T', 'F', 0\r
55\r
56ALIGN 16\r
57\r
58resetVector:\r
59;\r
60; Reset Vector\r
61;\r
62; This is where the processor will begin execution\r
63;\r
8332983e 64 nop\r
65 nop\r
eee1d2ca 66 jmp EarlyBspInitReal16\r
bc252e8e
EB
67\r
68ALIGN 16\r
69\r
70fourGigabytes:\r
71\r