summaryrefslogtreecommitdiff
path: root/Core/EM/SMIFlash/SMIFlash.mak
blob: cb840d3a6c0eb0cdc2983bd3c1c1d74771a23d9a (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
#//**********************************************************************//
#//**********************************************************************//
#//**                                                                  **//
#//**        (C)Copyright 1985-2005, American Megatrends, Inc.         **//
#//**                                                                  **//
#//**                       All Rights Reserved.                       **//
#//**                                                                  **//
#//**             6145-F Northbelt Pkwy, Norcross, GA 30071            **//
#//**                                                                  **//
#//**                       Phone: (770)-246-8600                      **//
#//**                                                                  **//
#//**********************************************************************//
#//**********************************************************************//

#************************************************************************//
# $Header: /Alaska/SOURCE/Modules/SMIFlash/SMIFlash.mak 13    11/02/12 7:13a Calvinchen $
#
# $Revision: 13 $
#
# $Date: 11/02/12 7:13a $
#************************************************************************//
# Revision History
# ----------------
# $Log: /Alaska/SOURCE/Modules/SMIFlash/SMIFlash.mak $
# 
# 13    11/02/12 7:13a Calvinchen
# [TAG]  		EIP64328
# [Category]  	Improvement
# [Description]  	Improvement: 
#  1. (EIP64328) Update modules to be compliant with PI 1.2 and UEFI
# 2.3.1 specifications. 
# BugFix: 
#  1. (EIP100950) Fix the attribute of Win8 Debug Variable been changed
# after restored. 
#  2. (EIP98199) The #### in Boot#### should be upper case. 
# [Files]  		SMIFlash.mak
# SMIFlash.dxs
# SMIFlash.c
# SMIFlash.chm
# SMIFlashLinks.c
# SMIFlashDxe.dxs
# SMIFlash.cif
# 
# 12    5/29/12 5:45a Klzhan
# [TAG]  		EIP86878
# [Category]  	Improvement
# [Description]  	Restore SMBIOS data when recovery.
# [Files]  		SMIFlash.sdl
# SMIFlash.mak
# SMIFlash.dxs
# SMIFlash.c
# SMIFlash.chm
# SMIFlashLinks.c
# SMIFlash.cif
# 
# 11    5/23/12 3:01a Klzhan
# [TAG]  		EIP81706 
# [Category]  	Improvement
# [Description]  	Restore variables when recovery.
# 
# 10    3/06/12 2:41a Klzhan
# Improvement :
# 1. Add non SMM Elinks
# 2. Search Variables on in-active NVRam.
# 
# 9     11/23/11 3:39a Calvinchen
# [TAG]  		EIP54533
# [Category]  	Improvement
# [Description]  	1. Removed BiosLockEnablePatchHook hook. Moved to
# Chipset file. 
# 2. Also enable/disable PS2 keyboard in Enable/DisableUSBKBD hook. 
# 3. (EIP54533) Request for afu capable updating OEM firmware volumes 
# [Files]  		SMIFlash.sdl
# SMIFlash.mak
# SMIFlash.chm
# SMIFlashLinks.c
# 
# 8     3/23/11 4:44a Calvinchen
# [TAG]  		EIP53067
# [Category]  	Improvement
# [Description]  	Modified for OEM Secure BIOS Update Requirements.
# [Files]  		SMIFlash.sdl
# SMIFlash.mak
# SMIFlash.dxs
# SMIFlash.c
# SMIFlash.chm
# SMIFlashLinks.c
# SMIFlash.cif
# 
# 7     6/15/10 3:11a Klzhan
# Improvement: Add Elink to modify GetFlashInfo.
# 
# 6     2/02/09 6:42p Fredericko
# 
# 5     1/29/09 5:36p Fredericko
# modified build for SMIFLASH_PRE_UPDATE_LIST and
# SMIFLASH_END_UPDATE_LIST. See EIP 18819
# 
# 4     8/15/07 7:07p Pats
# Modified to support preservation of passwords through flashing.
# 
# 3     12/29/06 3:04p Felixp
# 1. Updated to use new Flash Interface.
# 2. Embedded Controller support added.
# 
# 2     12/02/05 11:48a Felixp
# 
# 1     4/05/05 3:47p Sivagarn
# Initial Checkin
#
#************************************************************************//

all : SMIFlash

SMIFLASH_BUILD_DIR = $(BUILD_DIR)\$(SMI_FLASH_DIR)

SMIFlash : $(SMIFLASH_BUILD_DIR)\RomLayout.obj $(BUILD_DIR)\SMIFlash.mak SMIFlashBin

SMIFlashObjects =\
$(SMIFLASH_BUILD_DIR)\SMIFlash.obj\
$(SMIFLASH_BUILD_DIR)\SMIFlashLinks.obj\
$(SMIFLASH_BUILD_DIR)\RomLayout.obj\
$(BUILD_DIR)\$(NVRAM_DIR)\NVRAMRead.obj\

SMIFLASH_LISTS = \
/D\"PRESERVE_FFS_GUID=$(SMIFlashPreserveRomHoleGuid)\"\
/D\"SMIFLASH_IN_SMM_LIST=$(SMIFlashInSmmList)\"\
/D\"SMIFLASH_NOT_IN_SMM_LIST=$(SMIFlashNotSmmList)\"\
/D\"SMIFLASH_END_UPDATE_LIST=$(SMIFlashEndUpdateList)\"\
/D\"SMIFLASH_PRE_UPDATE_LIST=$(SMIFlashPreUpdateList)\"\
/D\"SMIFLASH_PRE_HANDLER_LIST=$(SMIFlashPreHandlerList)\"\
/D\"SMIFLASH_END_HANDLER_LIST=$(SMIFlashEndHandlerList)\"

$(BUILD_DIR)\SMIFlash.mak : $(SMI_FLASH_DIR)\SMIFlash.cif $(SMI_FLASH_DIR)\$(@B).mak $(BUILD_RULES)
	$(CIF2MAK) $(SMI_FLASH_DIR)\SMIFlash.cif $(CIF2MAK_DEFAULTS)

SMIFlashBin : $(AMIDXELIB) $(FLASHLIB) $(PRESERVE_LIB)
        $(MAKE) /$(MAKEFLAGS) $(BUILD_DEFAULTS)\
        /f $(BUILD_DIR)\SMIFlash.mak all\
        GUID=BC327DBD-B982-4f55-9F79-056AD7E987C5\
        OBJECTS="$(SMIFlashObjects)" \
        ENTRY_POINT=SMIFlashDriverEntryPoint\
        "EXT_HEADERS=$(BUILD_DIR)\token.h"\
        "CFLAGS=$(CFLAGS) /DVFRCOMPILE $(SMIFLASH_LISTS)"\
!IF $(PI_SPECIFICATION_VERSION) >= 0x1000A
        TYPE=DXESMM_DRIVER\
        DEPEX1=$(SMI_FLASH_DIR)\SMIFlash.dxs \
        DEPEX1_TYPE=EFI_SECTION_SMM_DEPEX \
        DEPEX2=$(SMI_FLASH_DIR)\SMIFlashDxe.dxs \
        DEPEX2_TYPE=EFI_SECTION_DXE_DEPEX \
!ELSE
        TYPE=BS_DRIVER\
        DEPEX1=$(SMI_FLASH_DIR)\SMIFlash.dxs \
        DEPEX1_TYPE=EFI_SECTION_DXE_DEPEX \
!ENDIF		 
        COMPRESS=1

$(SMIFLASH_BUILD_DIR)\RomLayout.obj : $(BUILD_DIR)\RomLayout.c
    $(CC) /Fo$@ $(CFLAGS) $(BUILD_DIR)\RomLayout.c

#---------------------------------------------------------------------------
#               Reflash link file
#---------------------------------------------------------------------------
!IF "$(RECOVERY_PRESERVE_VARS_IN_SMM)"=="1"
ReFlashBin : $(BUILD_DIR)\ReflashHooks.obj

$(BUILD_DIR)\ReflashHooks.obj : $(SMI_FLASH_DIR)\SMIFlashLinks.c
    $(CC) /Fo$(BUILD_DIR)\ReflashHooks.obj $(CFLAGS) /D_OUTSIDE_SMM_ $(SMI_FLASH_DIR)\SMIFlashLinks.c
!ENDIF

#//**********************************************************************//
#//**********************************************************************//
#//**                                                                  **//
#//**        (C)Copyright 1985-2005, American Megatrends, Inc.         **//
#//**                                                                  **//
#//**                       All Rights Reserved.                       **//
#//**                                                                  **//
#//**             6145-F Northbelt Pkwy, Norcross, GA 30071            **//
#//**                                                                  **//
#//**                       Phone: (770)-246-8600                      **//
#//**                                                                  **//
#//**********************************************************************//
#//**********************************************************************//