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