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.asm 15; 16; Abstract: 17; 18; Reset Vector Data structure 19; This structure is located at 0xFFFFFFC0 20; 21;------------------------------------------------------------------------------ 22 23 .model tiny 24 .686p 25 .stack 0h 26 .code 27 28; 29; The layout of this file is fixed. The build tool makes assumption of the layout. 30; 31 32 ORG 0h 33; 34; Reserved 35; 36ReservedData DD 0eeeeeeeeh, 0eeeeeeeeh 37 38 ORG 10h 39; 40; This is located at 0xFFFFFFD0h 41; 42 mov di, "AP" 43 jmp ApStartup 44 45 ORG 20h 46; 47; Pointer to the entry point of the PEI core 48; It is located at 0xFFFFFFE0, and is fixed up by some build tool 49; So if the value 8..1 appears in the final FD image, tool failure occurs. 50; 51PeiCoreEntryPoint DD 87654321h 52 53; 54; This is the handler for all kinds of exceptions. Since it's for debugging 55; purpose only, nothing except a dead loop would be done here. Developers could 56; analyze the cause of the exception if a debugger had been attached. 57; 58InterruptHandler PROC 59 jmp $ 60 iret 61InterruptHandler ENDP 62 63 ORG 30h 64; 65; For IA32, the reset vector must be at 0xFFFFFFF0, i.e., 4G-16 byte 66; Execution starts here upon power-on/platform-reset. 67; 68ResetHandler: 69 nop 70 nop 71ApStartup: 72 ; 73 ; Jmp Rel16 instruction 74 ; Use machine code directly in case of the assembler optimization 75 ; SEC entry point relative address will be fixed up by some build tool. 76 ; 77 ; Typically, SEC entry point is the function _ModuleEntryPoint() defined in 78 ; SecEntry.asm 79 ; 80 DB 0e9h 81 DW -3 82 83 84 ORG 38h 85; 86; Ap reset vector segment address is at 0xFFFFFFF8 87; This will be fixed up by some build tool, 88; so if the value 1..8 appears in the final FD image, 89; tool failure occurs 90; 91ApSegAddress dd 12345678h 92 93 ORG 3ch 94; 95; BFV Base is at 0xFFFFFFFC 96; This will be fixed up by some build tool, 97; so if the value 1..8 appears in the final FD image, 98; tool failure occurs. 99; 100BfvBase DD 12345678h 101 102; 103; Nothing can go here, otherwise the layout of this file would change. 104; 105 106 END 107