1 ;------------------------------------------------------------------------------ 2 ; @file 3 ; This file includes all other code files to assemble the reset vector code 4 ; 5 ; Copyright (c) 2008 - 2013, Intel Corporation. All rights reserved.<BR> 6 ; This program and the accompanying materials 7 ; are licensed and made available under the terms and conditions of the BSD License 8 ; which accompanies this distribution. The full text of the license may be found at 9 ; http://opensource.org/licenses/bsd-license.php 10 ; 11 ; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 12 ; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 13 ; 14 ;------------------------------------------------------------------------------ 15 16 ; 17 ; If neither ARCH_IA32 nor ARCH_X64 are defined, then try to include 18 ; Base.h to use the C pre-processor to determine the architecture. 19 ; 20 %ifndef ARCH_IA32 21 %ifndef ARCH_X64 22 #include <Base.h> 23 #if defined (MDE_CPU_IA32) 24 %define ARCH_IA32 25 #elif defined (MDE_CPU_X64) 26 %define ARCH_X64 27 #endif 28 %endif 29 %endif 30 31 %ifdef ARCH_IA32 32 %ifdef ARCH_X64 33 %error "Only one of ARCH_IA32 or ARCH_X64 can be defined." 34 %endif 35 %elifdef ARCH_X64 36 %else 37 %error "Either ARCH_IA32 or ARCH_X64 must be defined." 38 %endif 39 40 %include "CommonMacros.inc" 41 42 %include "PostCodes.inc" 43 44 %ifdef DEBUG_PORT80 45 %include "Port80Debug.asm" 46 %elifdef DEBUG_SERIAL 47 %include "SerialDebug.asm" 48 %else 49 %include "DebugDisabled.asm" 50 %endif 51 52 %include "Ia32/SearchForBfvBase.asm" 53 %include "Ia32/SearchForSecEntry.asm" 54 55 %ifdef ARCH_X64 56 #include <AutoGen.h> 57 58 %if (FixedPcdGet32 (PcdOvmfSecPageTablesSize) != 0x6000) 59 %error "This implementation inherently depends on PcdOvmfSecPageTablesSize" 60 %endif 61 62 %define PT_ADDR(Offset) (FixedPcdGet32 (PcdOvmfSecPageTablesBase) + (Offset)) 63 %include "Ia32/Flat32ToFlat64.asm" 64 %include "Ia32/PageTables64.asm" 65 %endif 66 67 %include "Ia16/Real16ToFlat32.asm" 68 %include "Ia16/Init16.asm" 69 70 %include "Main.asm" 71 72 %include "Ia16/ResetVectorVtf0.asm" 73 74