]>
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 | |
00b8bf7e | 13 | ; This structure is located at 0xFFFFF000\r |
1921695e MK |
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 | |
00b8bf7e CD |
26 | \r |
27 | ;\r | |
28 | ; 0xFFFFF000\r | |
29 | ;\r | |
30 | ; We enter here with CS:IP = 0xFF00:0x0000. Do a far-jump to change CS to 0xF000\r | |
31 | ; and IP to ApStartup.\r | |
32 | ;\r | |
33 | ApVector:\r | |
34 | mov di, "AP"\r | |
35 | jmp 0xF000:0xF000+ApStartup\r | |
36 | \r | |
37 | TIMES 0xFC0-($-$$) nop\r | |
38 | \r | |
39 | ;\r | |
40 | ; This should be at 0xFFFFFFC0\r | |
41 | ;\r | |
42 | \r | |
1921695e MK |
43 | ;\r |
44 | ; Reserved\r | |
45 | ;\r | |
46 | ReservedData: DD 0eeeeeeeeh, 0eeeeeeeeh\r | |
47 | \r | |
00b8bf7e | 48 | TIMES 0xFD0-($-$$) nop\r |
1921695e | 49 | ;\r |
00b8bf7e | 50 | ; This is located at 0xFFFFFFD0\r |
1921695e MK |
51 | ;\r |
52 | mov di, "PA"\r | |
53 | jmp ApStartup\r | |
54 | \r | |
00b8bf7e | 55 | TIMES 0xFE0-($-$$) nop\r |
1921695e MK |
56 | ;\r |
57 | ; Pointer to the entry point of the PEI core\r | |
58 | ; It is located at 0xFFFFFFE0, and is fixed up by some build tool\r | |
59 | ; So if the value 8..1 appears in the final FD image, tool failure occurs.\r | |
60 | ;\r | |
61 | PeiCoreEntryPoint: DD 87654321h\r | |
62 | \r | |
63 | ;\r | |
64 | ; This is the handler for all kinds of exceptions. Since it's for debugging\r | |
65 | ; purpose only, nothing except a dead loop would be done here. Developers could\r | |
66 | ; analyze the cause of the exception if a debugger had been attached.\r | |
67 | ;\r | |
68 | global ASM_PFX(InterruptHandler)\r | |
69 | ASM_PFX(InterruptHandler):\r | |
70 | jmp $\r | |
71 | iret\r | |
72 | \r | |
00b8bf7e | 73 | TIMES 0xFF0-($-$$) nop\r |
1921695e MK |
74 | ;\r |
75 | ; For IA32, the reset vector must be at 0xFFFFFFF0, i.e., 4G-16 byte\r | |
76 | ; Execution starts here upon power-on/platform-reset.\r | |
77 | ;\r | |
78 | ResetHandler:\r | |
79 | nop\r | |
80 | nop\r | |
81 | ApStartup:\r | |
82 | ;\r | |
83 | ; Jmp Rel16 instruction\r | |
84 | ; Use machine code directly in case of the assembler optimization\r | |
85 | ; SEC entry point relative address will be fixed up by some build tool.\r | |
86 | ;\r | |
87 | ; Typically, SEC entry point is the function _ModuleEntryPoint() defined in\r | |
88 | ; SecEntry.asm\r | |
89 | ;\r | |
90 | DB 0e9h\r | |
91 | DW -3\r | |
92 | \r | |
93 | \r | |
00b8bf7e | 94 | TIMES 0xFF8-($-$$) nop\r |
1921695e MK |
95 | ;\r |
96 | ; Ap reset vector segment address is at 0xFFFFFFF8\r | |
97 | ; This will be fixed up by some build tool,\r | |
98 | ; so if the value 1..8 appears in the final FD image,\r | |
99 | ; tool failure occurs\r | |
100 | ;\r | |
101 | ApSegAddress: dd 12345678h\r | |
102 | \r | |
00b8bf7e | 103 | TIMES 0xFFC-($-$$) nop\r |
1921695e MK |
104 | ;\r |
105 | ; BFV Base is at 0xFFFFFFFC\r | |
106 | ; This will be fixed up by some build tool,\r | |
107 | ; so if the value 1..8 appears in the final FD image,\r | |
108 | ; tool failure occurs.\r | |
109 | ;\r | |
110 | BfvBase: DD 12345678h\r | |
111 | \r | |
112 | ;\r | |
113 | ; Nothing can go here, otherwise the layout of this file would change.\r | |
114 | ;\r |