]> git.proxmox.com Git - mirror_edk2.git/blobdiff - IntelFspWrapperPkg/FspWrapperSecCore/Ia32/ResetVec.asm16
Add IntelFspWrapper to support boot EDKII on FSP bin.
[mirror_edk2.git] / IntelFspWrapperPkg / FspWrapperSecCore / Ia32 / ResetVec.asm16
diff --git a/IntelFspWrapperPkg/FspWrapperSecCore/Ia32/ResetVec.asm16 b/IntelFspWrapperPkg/FspWrapperSecCore/Ia32/ResetVec.asm16
new file mode 100644 (file)
index 0000000..93de20e
--- /dev/null
@@ -0,0 +1,106 @@
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2014, Intel Corporation. All rights reserved.<BR>\r
+; This program and the accompanying materials\r
+; are licensed and made available under the terms and conditions of the BSD License\r
+; which accompanies this distribution.  The full text of the license may be found at\r
+; http://opensource.org/licenses/bsd-license.php.\r
+;\r
+; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+;\r
+; Module Name:\r
+;\r
+;  ResetVec.asm\r
+;\r
+; Abstract:\r
+;\r
+;  Reset Vector Data structure\r
+;  This structure is located at 0xFFFFFFC0\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+    .model  tiny\r
+    .686p\r
+    .stack  0h\r
+    .code\r
+\r
+;\r
+; The layout of this file is fixed. The build tool makes assumption of the layout.\r
+;\r
+\r
+    ORG     0h\r
+;\r
+; Reserved\r
+;\r
+ReservedData         DD 0eeeeeeeeh, 0eeeeeeeeh\r
+\r
+    ORG     10h\r
+;\r
+; This is located at 0xFFFFFFD0h\r
+;\r
+    mov     di, "AP"\r
+    jmp     ApStartup\r
+\r
+    ORG     20h\r
+;\r
+; Pointer to the entry point of the PEI core\r
+; It is located at 0xFFFFFFE0, and is fixed up by some build tool\r
+; So if the value 8..1 appears in the final FD image, tool failure occurs.\r
+;\r
+PeiCoreEntryPoint       DD      87654321h\r
+\r
+;\r
+; This is the handler for all kinds of exceptions. Since it's for debugging\r
+; purpose only, nothing except a deadloop would be done here. Developers could\r
+; analyze the cause of the exception if a debugger had been attached.\r
+;\r
+InterruptHandler    PROC\r
+    jmp     $\r
+    iret\r
+InterruptHandler    ENDP\r
+\r
+    ORG     30h\r
+;\r
+; For IA32, the reset vector must be at 0xFFFFFFF0, i.e., 4G-16 byte\r
+; Execution starts here upon power-on/platform-reset.\r
+;\r
+ResetHandler:\r
+    nop\r
+    nop\r
+ApStartup:\r
+    ;\r
+    ; Jmp Rel16 instruction\r
+    ; Use machine code directly in case of the assembler optimization\r
+    ; SEC entry point relatvie address will be fixed up by some build tool.\r
+    ;\r
+    ; Typically, SEC entry point is the function _ModuleEntryPoint() defined in\r
+    ; SecEntry.asm\r
+    ;\r
+    DB      0e9h\r
+    DW      -3\r
+\r
+\r
+    ORG     38h\r
+;\r
+; Ap reset vector segment address is at 0xFFFFFFF8\r
+; This will be fixed up by some build tool,\r
+; so if the value 1..8 appears in the final FD image,\r
+; tool failure occurs\r
+;\r
+ApSegAddress    dd      12345678h\r
+\r
+    ORG     3ch\r
+;\r
+; BFV Base is at 0xFFFFFFFC\r
+; This will be fixed up by some build tool,\r
+; so if the value 1..8 appears in the final FD image,\r
+; tool failure occurs.\r
+;\r
+BfvBase     DD      12345678h\r
+\r
+;\r
+; Nothing can go here, otherwise the layout of this file would change.\r
+;\r
+\r
+    END\r