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