summaryrefslogtreecommitdiff
path: root/Core/EM/PeiRamBoot/PeiRamBoot.mak
blob: a0fee27ffe65366e4365311435762f165d7c0e89 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
#*************************************************************************
#*************************************************************************
#**                                                                     **
#**        (C)Copyright 1985-2010, American Megatrends, Inc.            **
#**                                                                     **
#**                       All Rights Reserved.                          **
#**                                                                     **
#**      5555 Oakbrook Parkway, Suite 200, Norcross, GA 30093           **
#**                                                                     **
#**                       Phone: (770)-246-8600                         **
#**                                                                     **
#*************************************************************************
#*************************************************************************

#**********************************************************************
# $Header: /Alaska/SOURCE/Modules/PEI Ram Boot/PeiRamBoot.mak 13    10/02/14 4:44a Calvinchen $
#
# $Revision: 13 $
#
# $Date: 10/02/14 4:44a $
#**********************************************************************
# Revision History
# ----------------
# $Log: /Alaska/SOURCE/Modules/PEI Ram Boot/PeiRamBoot.mak $
# 
# 13    10/02/14 4:44a Calvinchen
# [TAG]  		EIP184075
# [Category]  	Improvement
# [Description]  	[HWR]FtRecovery support for Intel Top Swap
# Modified PeiRamBoot module for multiple Boot Block Volumes support.
# [Files]  		PeiRamBoot.sdl
# PeiRamBoot.mak
# PeiRamBoot.c
# PeiRamBoot.chm
# PeiRamBoot.cif
# 
# 12    3/18/13 6:08a Calvinchen
# Bug Fixed : Build failed if Core 4.6.5.5.
# 
# 11    7/18/12 3:41a Calvinchen
# 
# 10    2/23/12 6:35a Calvinchen
# [TAG]  		EIP82264
# [Category]  	Improvement
# [Description]  	Need to do cold boot to get the correct data in rom
# hole when changing data in rom hole.
# [Files]  		PeiRamBoot.sdl
# PeiRamBoot.mak
# PeiRamBoot.h
# PeiRamBoot.c
# PeiRamBootDxe.c
# PeiRamBoot.chm
# PeiRamBoot.cif
# 
# 9     6/21/11 2:22a Calvinchen
# ¡P Bug Fixed: 
# Bug Fixed:
# 1. Build failed if Core 4.6.4.0. 
# 2. System could hang if SAVE_ENTIRE_FV_TO_MEM = 1with AMD platform. 
# 
# 8     4/22/11 1:27a Calvinchen
# 
# 7     2/11/11 3:16a Calvinchen
# Bug Fixed : System hangs after reflashed BIOS with warm reset if
# PEI_RAM_BOOT_S3_SUPPORT = 1 with fast warm boot support.
# 
# 6     12/21/10 2:24a Calvinchen
# Added an eLink "PeiRamBootObjectsList" for oem links their obj files
# for fast warm boot support. 
# 
# 5     12/14/10 2:25a Calvinchen
# Improvement : 
# 1. Added an eLink "PeiRamBootList" for fast warm boot support
# (PEI_RAM_BOOT_S3_SUPPORT = 1). If system boots in warm boot state, BIOS
# directly boot to previous copied ROM image in RAM to save time of
# copying ROM. 
# 2. Added "PEI_RAM_BOOT_S3_SUPPORT" = "2" for saving runtime memory, it
# only keep necessary PEIM FFS in runtime memory for S3 resume
# improvement. 
# 
# 4     12/02/10 6:18a Calvinchen
# Bug Fixed : Fixed Update SMBIOS Structures failed with DMI Utility.
# 
# 3     10/27/10 3:03a Calvinchen
# Initail check-in.
# 
#
#**********************************************************************
#<AMI_FHDR_START>
#
# Name: PeiRamBoot.mak 
#
# Description: Make file for PEI Ram Boot.
#
#<AMI_FHDR_END>
#**********************************************************************
!IFNDEF PI_SPECIFICATION_VERSION
PI_SPECIFICATION_VERSION = 0
!ENDIF

all : PeiRamBoot PeiRamBootCacheRdy

#---------------------------------------------------------------------------
# Create PEI RAM BOOT dependencies
#---------------------------------------------------------------------------
$(BUILD_DIR)\PeiRamBoot.mak : $(PeiRamBoot_DIR)\$(@B).cif $(PeiRamBoot_DIR)\$(@B).mak $(BUILD_RULES)
	$(CIF2MAK) $(PeiRamBoot_DIR)\$(@B).cif $(CIF2MAK_DEFAULTS)
#---------------------------------------------------------------------------
# Create PeiRamBoot PEI Component
#---------------------------------------------------------------------------
PeiRamBoot: $(BUILD_DIR)\$(PeiRamBoot_DIR)\RomLayout.obj $(BUILD_DIR)\PeiRamBoot.mak PeiRamBootBin

PEI_RAM_BOOT_INCLUDES =\
/I$(PeiRamBoot_DIR)\
/I$(CORE_PEI_DIR)\
!IF $(PI_SPECIFICATION_VERSION) >= 65546
/I$(CORE_PEI_DIR)\CORE_PEI_PI\
!ELSE
/I$(CORE_PEI_DIR)\CORE_PEI_FRAMEWORK\
!ENDIF
/I$(CORE_DXE_DIR)\
/I$(CORE_DIR)

PeiRamBootObjects =\
$(BUILD_DIR)\$(PeiRamBoot_DIR)\RomLayout.obj\
$(BUILD_DIR)\$(PeiRamBoot_DIR)\PeiRamBoot.obj\
$(BUILD_DIR)\$(PeiRamBoot_DIR)\PeiRamBootHook.obj\
$(PeiRamBootObjectsList)

PEI_RAM_BOOT_LISTS = \
/D\"PEI_RAM_BOOT_LIST=$(PeiRamBootList)\"\
/D\"PEI_RAM_BOOT_FV_BOOTBLOCK_LIST=$(PeiRamBootFvBootBlockList)\"\
/D\"PEI_RAM_BOOT_FFS_GUID_LIST=$(PeiRamBootFfsGuidList)\"

PeiRamBootBin : $(AMIPEILIB) $(AMICSPLib)
            $(MAKE) /$(MAKEFLAGS) $(BUILD_DEFAULTS)\
            /f $(BUILD_DIR)\PeiRamBoot.mak all\
            NAME=PeiRamBoot\
            MAKEFILE=$(BUILD_DIR)\PeiRamBoot.mak \
            "CFLAGS=$(CFLAGS) $(PEI_RAM_BOOT_LISTS)"\
            GUID=08efd15d-ec55-4023-b648-7ba40df7d05d \
            OBJECTS="$(PeiRamBootObjects)" \
            ENTRY_POINT=PeiRamBootEntry \
            TYPE=PEIM \
            "MY_INCLUDES=$(PEI_RAM_BOOT_INCLUDES)" \
            "MY_DEFINES=$(PEI_CORE_DEFINES)"\
            DEPEX1=$(PeiRamBoot_DIR)\PeiRamBoot.DXS \
            DEPEX1_TYPE=EFI_SECTION_PEI_DEPEX \
            COMPRESS=0

$(BUILD_DIR)\$(PeiRamBoot_DIR)\RomLayout.obj : $(BUILD_DIR)\RomLayout.c
    $(CC) /Fo$@ $(CFLAGS) $(BUILD_DIR)\RomLayout.c
#---------------------------------------------------------------------------
# Create PeiRamBoot DXE Component
#---------------------------------------------------------------------------
Runtime_LIBBin : $(BUILD_DIR)\PeiRamBootDxe.lib

$(BUILD_DIR)\PeiRamBootDxe.lib : PeiRamBootDxe

PeiRamBootDxe: $(BUILD_DIR)\PeiRamBoot.mak PeiRamBootDxeBin

PeiRamBootDxeObjs =\
$(BUILD_DIR)\$(PeiRamBoot_DIR)\PeiRamBootDxe.obj

PeiRamBootDxeBin : $(AMIDXELIB) $(AMICSPLib)
            $(MAKE) /$(MAKEFLAGS) $(BUILD_DEFAULTS)\
            /f $(BUILD_DIR)\PeiRamBoot.mak all\
            NAME=PeiRamBoot\
            "CFLAGS=$(CFLAGS) /I$(PeiRamBoot_DIR)"\
            OBJECTS="$(PeiRamBootDxeObjs)" \
            TYPE=LIBRARY \
            LIBRARY_NAME=$(BUILD_DIR)\PeiRamBootDxe.lib                

#---------------------------------------------------------------------------
# Create PEIRamBoot OFBD Lib Component
#---------------------------------------------------------------------------
!IF "$(PEI_RAM_BOOT_S3_SUPPORT)"=="1"
PeiRamBootOfbd : $(BUILD_DIR)\PeiRamBoot.mak PeiRamBootOfbdBin

PeiRamBootOfbdObjs = $(BUILD_DIR)\$(PeiRamBoot_DIR)\PeiRamBootOfbd.obj

PeiRamBootOfbdBin : $(AMIDXELIB)
            $(MAKE) /$(MAKEFLAGS) $(BUILD_DEFAULTS)\
            /f $(BUILD_DIR)\PeiRamBoot.mak all\
            "CFLAGS=$(CFLAGS:/W4=/W3) /I$(OFBD_DIR)" \
            OBJECTS="$(PeiRamBootOfbdObjs)" \
            NAME=PeiRamBoot \
            TYPE=LIBRARY LIBRARY_NAME=$(PEIRAMBOOT_OFBD_LIB)

$(PEIRAMBOOT_OFBD_LIB) : PeiRamBootOfbd
!ENDIF
#---------------------------------------------------------------------------
# Create PeiRamBoot PEI Component
#---------------------------------------------------------------------------
!IF "$(SAVE_ENTIRE_FV_IN_MEM)"=="1"
PeiRamBootCacheRdy: $(BUILD_DIR)\PeiRamBoot.mak PeiRamBootCacheRdyBin

PeiRamBootCacheRdyObjects =\
$(BUILD_DIR)\$(PeiRamBoot_DIR)\PeiRamBootCacheRdy.obj

PeiRamBootCacheRdyBin : $(AMIPEILIB) $(AMICSPLib)
            $(MAKE) /$(MAKEFLAGS) $(BUILD_DEFAULTS)\
            /f $(BUILD_DIR)\PeiRamBoot.mak all\
            NAME=PeiRamBootCacheRdy\
            MAKEFILE=$(BUILD_DIR)\PeiRamBoot.mak \
            "CFLAGS=$(CFLAGS) /I$(PeiRamBoot_DIR)"\
            GUID=a6a3a962-c591-4701-9d25-73d0226d89dc\
            OBJECTS="$(PeiRamBootCacheRdyObjects)" \
            ENTRY_POINT=PeiRamBootCacheRdyEntry \
            TYPE=PEIM \
            DEPEX1=$(PeiRamBoot_DIR)\PeiRamBootCacheRdy.DXS \
            DEPEX1_TYPE=EFI_SECTION_PEI_DEPEX \
            COMPRESS=1
!ELSE
PeiRamBootCacheRdy:
!ENDIF
#---------------------------------------------------------------------------
!IF "$(PRESERVE_NESTED_FV_IN_MEM)"=="1"
$(BUILD_DIR)\$(PeiRamBoot_DIR)\PeiRamBootFvHook.obj : $(PeiRamBoot_DIR)\PeiRamBootFvHook.c
!IF !EXIST($(BUILD_DIR)\$(PeiRamBoot_DIR))
	mkdir $(BUILD_DIR)\$(PeiRamBoot_DIR)
!ENDIF
    $(CC) /Fo$@ $(CFLAGS) /I$(PeiRamBoot_DIR) $(PeiRamBoot_DIR)\PeiRamBootFvHook.c

CORE_PEIBin : $(BUILD_DIR)\$(PeiRamBoot_DIR)\PeiRamBootFvHook.obj
RecoveryBin : $(BUILD_DIR)\$(PeiRamBoot_DIR)\PeiRamBootFvHook.obj
FwCapsuleRecoveryPPIBin : $(BUILD_DIR)\$(PeiRamBoot_DIR)\PeiRamBootFvHook.obj
!ENDIF

#*************************************************************************
#*************************************************************************
#**                                                                     **
#**        (C)Copyright 1985-2010, American Megatrends, Inc.            **
#**                                                                     **
#**                       All Rights Reserved.                          **
#**                                                                     **
#**      5555 Oakbrook Parkway, Suite 200, Norcross, GA 30093           **
#**                                                                     **
#**                       Phone: (770)-246-8600                         **
#**                                                                     **
#*************************************************************************
#*************************************************************************