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 | ; Copyright (c) 2019, Citrix Systems, Inc.
|
---|
7 | ; SPDX-License-Identifier: BSD-2-Clause-Patent
|
---|
8 | ;
|
---|
9 | ;------------------------------------------------------------------------------
|
---|
10 |
|
---|
11 | ;
|
---|
12 | ; If neither ARCH_IA32 nor ARCH_X64 are defined, then try to include
|
---|
13 | ; Base.h to use the C pre-processor to determine the architecture.
|
---|
14 | ;
|
---|
15 | %ifndef ARCH_IA32
|
---|
16 | %ifndef ARCH_X64
|
---|
17 | #include <Base.h>
|
---|
18 | #if defined (MDE_CPU_IA32)
|
---|
19 | %define ARCH_IA32
|
---|
20 | #elif defined (MDE_CPU_X64)
|
---|
21 | %define ARCH_X64
|
---|
22 | #endif
|
---|
23 | %endif
|
---|
24 | %endif
|
---|
25 |
|
---|
26 | %ifdef ARCH_IA32
|
---|
27 | %ifdef ARCH_X64
|
---|
28 | %error "Only one of ARCH_IA32 or ARCH_X64 can be defined."
|
---|
29 | %endif
|
---|
30 | %elifdef ARCH_X64
|
---|
31 | %else
|
---|
32 | %error "Either ARCH_IA32 or ARCH_X64 must be defined."
|
---|
33 | %endif
|
---|
34 |
|
---|
35 | %include "CommonMacros.inc"
|
---|
36 |
|
---|
37 | %define PVH_SPACE(Offset) (FixedPcdGet32 (PcdXenPvhStartOfDayStructPtr) + (Offset))
|
---|
38 |
|
---|
39 | %include "PostCodes.inc"
|
---|
40 |
|
---|
41 | %ifdef DEBUG_PORT80
|
---|
42 | %include "Port80Debug.asm"
|
---|
43 | %elifdef DEBUG_SERIAL
|
---|
44 | %include "SerialDebug.asm"
|
---|
45 | %else
|
---|
46 | %include "DebugDisabled.asm"
|
---|
47 | %endif
|
---|
48 |
|
---|
49 | %include "Ia32/SearchForBfvBase.asm"
|
---|
50 | %include "Ia32/SearchForSecEntry.asm"
|
---|
51 |
|
---|
52 | %ifdef ARCH_X64
|
---|
53 | #include <AutoGen.h>
|
---|
54 |
|
---|
55 | %if (FixedPcdGet32 (PcdOvmfSecPageTablesSize) != 0x6000)
|
---|
56 | %error "This implementation inherently depends on PcdOvmfSecPageTablesSize"
|
---|
57 | %endif
|
---|
58 |
|
---|
59 | %define PT_ADDR(Offset) (FixedPcdGet32 (PcdOvmfSecPageTablesBase) + (Offset))
|
---|
60 | %include "Ia32/Flat32ToFlat64.asm"
|
---|
61 | %include "Ia32/PageTables64.asm"
|
---|
62 | %endif
|
---|
63 |
|
---|
64 | %include "Ia16/Real16ToFlat32.asm"
|
---|
65 | %include "Ia16/Init16.asm"
|
---|
66 |
|
---|
67 | %include "Main.asm"
|
---|
68 | %include "Ia32/XenPVHMain.asm"
|
---|
69 |
|
---|
70 | %include "Ia16/ResetVectorVtf0.asm"
|
---|
71 |
|
---|