]>
Commit | Line | Data |
---|---|---|
1921695e MK |
1 | ;------------------------------------------------------------------------------\r |
2 | ;\r | |
3 | ; Copyright (c) 2014, Intel Corporation. All rights reserved.<BR>\r | |
0acd8697 | 4 | ; SPDX-License-Identifier: BSD-2-Clause-Patent\r |
1921695e MK |
5 | ;\r |
6 | ; Module Name:\r | |
7 | ;\r | |
8 | ; ResetVec.nasmb\r | |
9 | ;\r | |
10 | ; Abstract:\r | |
11 | ;\r | |
12 | ; Reset Vector Data structure\r | |
13 | ; This structure is located at 0xFFFFFFC0\r | |
14 | ;\r | |
15 | ;------------------------------------------------------------------------------\r | |
16 | \r | |
17 | ; .stack 0x0\r | |
18 | ; SECTION .text\r | |
19 | USE16\r | |
20 | \r | |
21 | ;\r | |
22 | ; The layout of this file is fixed. The build tool makes assumption of the layout.\r | |
23 | ;\r | |
24 | \r | |
25 | ORG 0h\r | |
26 | ;\r | |
27 | ; Reserved\r | |
28 | ;\r | |
29 | ReservedData: DD 0eeeeeeeeh, 0eeeeeeeeh\r | |
30 | \r | |
31 | TIMES 0x10-($-$$) DB 0\r | |
32 | ;\r | |
33 | ; This is located at 0xFFFFFFD0h\r | |
34 | ;\r | |
35 | mov di, "PA"\r | |
36 | jmp ApStartup\r | |
37 | \r | |
38 | TIMES 0x20-($-$$) DB 0\r | |
39 | ;\r | |
40 | ; Pointer to the entry point of the PEI core\r | |
41 | ; It is located at 0xFFFFFFE0, and is fixed up by some build tool\r | |
42 | ; So if the value 8..1 appears in the final FD image, tool failure occurs.\r | |
43 | ;\r | |
44 | PeiCoreEntryPoint: DD 87654321h\r | |
45 | \r | |
46 | ;\r | |
47 | ; This is the handler for all kinds of exceptions. Since it's for debugging\r | |
48 | ; purpose only, nothing except a dead loop would be done here. Developers could\r | |
49 | ; analyze the cause of the exception if a debugger had been attached.\r | |
50 | ;\r | |
51 | global ASM_PFX(InterruptHandler)\r | |
52 | ASM_PFX(InterruptHandler):\r | |
53 | jmp $\r | |
54 | iret\r | |
55 | \r | |
56 | TIMES 0x30-($-$$) DB 0\r | |
57 | ;\r | |
58 | ; For IA32, the reset vector must be at 0xFFFFFFF0, i.e., 4G-16 byte\r | |
59 | ; Execution starts here upon power-on/platform-reset.\r | |
60 | ;\r | |
61 | ResetHandler:\r | |
62 | nop\r | |
63 | nop\r | |
64 | ApStartup:\r | |
65 | ;\r | |
66 | ; Jmp Rel16 instruction\r | |
67 | ; Use machine code directly in case of the assembler optimization\r | |
68 | ; SEC entry point relative address will be fixed up by some build tool.\r | |
69 | ;\r | |
70 | ; Typically, SEC entry point is the function _ModuleEntryPoint() defined in\r | |
71 | ; SecEntry.asm\r | |
72 | ;\r | |
73 | DB 0e9h\r | |
74 | DW -3\r | |
75 | \r | |
76 | \r | |
77 | TIMES 0x38-($-$$) DB 0\r | |
78 | ;\r | |
79 | ; Ap reset vector segment address is at 0xFFFFFFF8\r | |
80 | ; This will be fixed up by some build tool,\r | |
81 | ; so if the value 1..8 appears in the final FD image,\r | |
82 | ; tool failure occurs\r | |
83 | ;\r | |
84 | ApSegAddress: dd 12345678h\r | |
85 | \r | |
86 | TIMES 0x3c-($-$$) DB 0\r | |
87 | ;\r | |
88 | ; BFV Base is at 0xFFFFFFFC\r | |
89 | ; This will be fixed up by some build tool,\r | |
90 | ; so if the value 1..8 appears in the final FD image,\r | |
91 | ; tool failure occurs.\r | |
92 | ;\r | |
93 | BfvBase: DD 12345678h\r | |
94 | \r | |
95 | ;\r | |
96 | ; Nothing can go here, otherwise the layout of this file would change.\r | |
97 | ;\r |