summaryrefslogtreecommitdiff
path: root/Core/EM/CmosManager/CmosManager.sdl
blob: e346f42768263def3c90943b3957ba4bb4531432 (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
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
#**********************************************************************
#**********************************************************************
#**                                                                  **
#**        (C)Copyright 1985-2009, American Megatrends, Inc.         **
#**                                                                  **
#**                       All Rights Reserved.                       **
#**                                                                  **
#**         5555 Oakbrook Pkwy, Suite 200, Norcross, GA 30093        **
#**                                                                  **
#**                       Phone: (770)-246-8600                      **
#**                                                                  **
#**********************************************************************
#**********************************************************************
#
#**********************************************************************
# $Header: /Alaska/SOURCE/Modules/CMOS Manager/CmosManager.sdl 5     12/11/11 8:51p Michaela $
#
# $Revision: 5 $
#
# $Date: 12/11/11 8:51p $
#**********************************************************************
# Revision History
# ----------------
# $Log: /Alaska/SOURCE/Modules/CMOS Manager/CmosManager.sdl $
# 
# 5     12/11/11 8:51p Michaela
# 
# 4     11/30/11 11:45p Michaela
# TAG]         EIP56197
# [Category]    New Feature
# [Severity]    Normal
# [Description] CMOS Manager Support in Runtime Code
# [Files]       CmosManager.sdl
#               CmosSetup.uni
#               CmosMessages.uni
#               CmosManagerSmm.cif
#               CmosAccess.h
#               CmosManagerSmm.c
# 
# 3     3/16/11 2:46p Michaela
# 
# 2     6/16/10 3:25p Michaela
# 
# 1     6/15/10 2:27p Michaela
# 
# 15    3/05/10 4:54p Michaela
# 
# 14    12/04/09 7:32p Michaela
# 
# 13    12/03/09 6:26p Michaela
# 1. CMOS_PEI_BEFORE_NVRAM_PEI token is added to control whether
#    or not CMOS PEI code executes before NVRAM PEI
#    code. (default is off)
#    
# 2. If DEBUG_MODE is on, INIT_LIST ordering is changed
#    so that Status Codes initialization is done
#    before CMOS code.
#    
# 3. CMOS_IS_COLD_BOOT_MAPPING eLink added to allow
#    overriding of the default cold boot detection
#    code.
# 
# 12    11/12/09 6:04p Michaela
# Updated destination for SEC object code
# 
# 11    11/10/09 9:13p Michaela
# 
# 10    7/29/09 9:57a Michaela
# updates Aptio Enhancement EIP 22205
# (no code changes)
# 
# 9     6/02/09 3:27p Michaela
# For label: 4.6.3_CMOSMGR_11
# 
# 8     2/23/09 6:01p Michaela
# 
#**********************************************************************

#<AMI_FHDR_START>
#-----------------------------------------------------------------------
#
# Name:         CmosManager.sdl
#
# Description:  This AMI SDL file defines porting constants used in
#               the CMOS Manager module.  Please see CmosBoard.sdl for
#               SDL Tokens/eLinks that are expected to be cloned/added
#               for project-level porting.
#
#-----------------------------------------------------------------------
#<AMI_FHDR_END>

#<AMI_SHDR_START>
#----------------------------------------------------------------------------
#
# Name:    CMOS_MANAGER_SUPPORT
#
# Description:
#      This token is the main switch to enable CMOS manager support in Project
#
#----------------------------------------------------------------------------
#<AMI_SHDR_END>

#<AMI_SHDR_START>
#----------------------------------------------------------------------------
#
# Name:    CMOS_RTC_STATUS_REGISTER
#
# Description:
#
#       Default value is 0xd
#
#       This is the RTC status register. Bit 7 is the battery status. 
#       (Do not set the NMI bit as this is a policy to be implmeneted by 
#       the ReadWrite function.)
#
#----------------------------------------------------------------------------
#<AMI_SHDR_END>

#<AMI_SHDR_START>
#----------------------------------------------------------------------------
#
# Name:    CMOS_DIAGNOSTIC_STATUS_REGISTER
#
# Description:
#
#       Default value is 0xe
#
#       This is the diagnostic status register. (Do not set the NMI bit as 
#       this is a policy to be implmeneted by the ReadWrite function.)
#
#----------------------------------------------------------------------------
#<AMI_SHDR_END>

#<AMI_SHDR_START>
#----------------------------------------------------------------------------
#
# Name:    CMOS_ACCESS_API_BYTE3
#
# Description:
#
#       Default value is 0x42
#
#       The high byte of the CMOS Access API pointer registers.
#                  1) These registers are in range: 0x10-0x7f. 
#                  2) If you change this token, you must modify CmosManager.ssp.
#                  3) Do not set the NMI bit as this is a policy to be
#                     implemented by the ReadWrite function.
#
#----------------------------------------------------------------------------
#<AMI_SHDR_END>

#<AMI_SHDR_START>
#----------------------------------------------------------------------------
#
# Name:    SSP
#
# Description:
#
#       Default value is AMISSP2.exe
#
#       Defines the location of AmiSsp2.exe, which is used to generate
#       the header files containing CMOS information.
#      
#----------------------------------------------------------------------------
#<AMI_SHDR_END>

#<AMI_SHDR_START>
#----------------------------------------------------------------------------
#
# Name:     ADDON_SSP_FILES
#
# Description:
#
#       There are no default eLinks
#
#       This eLink is used to update the list of CMOS Token definition files
#       to be processed by AmiSsp2.exe during the build process.  
#
#       For example, the following eLink will add AgesaCmosTokens.ssp to the 
#       list of CMOS Token definition files:
#
#                   ELINK
#                       Name = "$(AGESA_EFI_DIR)\AgesaCmosTokens.ssp"
#                       Parent  = "ADDON_SSP_FILES"
#                       InvokeOrder = AfterParent
#                   End
#      
#----------------------------------------------------------------------------
#<AMI_SHDR_END>

TOKEN
	Name  = "CMOS_MANAGER_SUPPORT"
	Value  = "1"
	Help  = "Main switch to enable CMOS manager support in Project"
	TokenType = Boolean
	TargetEQU = Yes
	TargetMAK = Yes
	TargetH = Yes
	Master = Yes
End

TOKEN
	Name  = "CMOS_MANAGER_SOURCE_VERSION"
	Value  = "40"
	Help  = "This source version number will increase with each release of CMOS Manager."
	TokenType = Integer
	TargetEQU = Yes
	TargetH = Yes
	TargetMAK = Yes
End

TOKEN
	Name  = "CMOS_RTC_STATUS_REGISTER"
	Value  = "0xd"
	Help  = "This is the Battery status register. (Do not set NMI bit)."
	TokenType = Integer
	TargetEQU = Yes
	TargetH = Yes
End

TOKEN
	Name  = "CMOS_DIAGNOSTIC_STATUS_REGISTER"
	Value  = "0xe"
	Help  = "This is the diagnostic status register. (Do not set NMI bit)."
	TokenType = Integer
	TargetEQU = Yes
	TargetH = Yes
End

TOKEN
	Name  = "CMOS_ACCESS_API_BYTE3"
	Value  = "0x42"
	Help  = "The high byte of the CMOS Access API pointer registers.\1) These registers are in range: 0x10-0x7f. \2) Do not set the NMI bit.\3) If you change this token, you must modify CmosManager.ssp."
	TokenType = Integer
	TargetEQU = Yes
	TargetH = Yes
End

TOKEN
	Name  = "SSP"
	Value  = "AMISSP2.exe"
	Help  = "Setup Script Processor executable"
	TokenType = Expression
	TargetMAK = Yes
End

TOKEN
	Name  = "SRSI"
	Value  = "$(SW_SMI_IO_ADDRESS)"
	TokenType = Integer
	TargetASL = Yes
End

TOKEN
	Name  = "CSMI"
	Value  = "0x61"
	TokenType = Integer
	TargetH = Yes
	TargetASL = Yes
End

TOKEN
	Name  = "CMOS_MANAGER_ASL_SUPPORT"
	Value  = "0"
	Help  = "Enable ASL support for CMOS Manager as \CMOS device"
	TokenType = Boolean
	TargetMak = Yes
	TargetH = Yes
End

PATH
	Name  = "CMOS_MANAGER_DIR"
	Path  = "Core\EM\CmosManager"
End

MODULE
	Help  = "Includes CmosManager.mak to Project"
	File  = "CmosManager.mak"
End

ELINK
	Name = "$(CMOS_MANAGER_DIR)\CmosAccess.asl"
	Parent = "GENERIC_ASL"
	Help = "ASL code for using CMOS Manager services in ASL code"
	InvokeOrder = AfterParent
	Token = "CMOS_MANAGER_ASL_SUPPORT" "=" "1"
End

ELINK
	Name  = "$(BUILD_DIR)\$(CMOS_MANAGER_DIR)\SEC\CmosManagerSec.OBJ"
	Parent  = "ADDON_SEC_CORE_OBJ_FILES"
	Priority  = 0
	InvokeOrder = AfterParent
End

ELINK
	Name  = "CmosManagerPeiEntry,"
	Parent  = "PeiCoreInitialize"
	Help  = "This simply adds the CMOS PEI entry to the PeiCoreInitialize Init list."
	InvokeOrder = AfterParent
	Token = "DEBUG_MODE" "=" "0"
End

ELINK
	Name  = "CmosManagerPeiEntry,"
	Parent  = "PeiInitStatusCode,"
	Help  = "This forces CMOS PEI after status codes PEI code so that CMOS Manager console messages can be displayed."
	InvokeOrder = AfterParent
	Token = "DEBUG_MODE" "=" "1"
End

ELINK
	Name  = "CmosManagerAfterMemoryEntry,"
	Parent  = "PeiCoreMemoryInstalled"
	InvokeOrder = AfterParent
End

ELINK
	Name  = "CmosManagerDxeEntry,"
	Parent  = "DxeCoreInitialize"
	Help  = "This simply adds the CMOS DXE entry point to the DxeCoreInitialize Init list."
	InvokeOrder = AfterParent
	Token = "DEBUG_MODE" "=" "0"
End

ELINK
	Name  = "CmosManagerDxeEntry,"
	Parent  = "DxeInitStatusCode,"
	Help  = "This forces CMOS DXE after status codes DXE code so that CMOS Manager console messages can be displayed."
	InvokeOrder = AfterParent
	Token = "DEBUG_MODE" "=" "1"
End

ELINK
	Name  = "SEC_CmosManager"
	Parent  = "SECCoreAtPowerOn"
	Help  = "CMOS Early Init in SEC (before Cache as memory enabling)"
	SrcFile  = "Core\Em\CmosManager\CmosManagerSec.asm"
	InvokeOrder = AfterParent
End

ELINK
	Name  = "ADDON_SSP_FILES"
	InvokeOrder = ReplaceParent
End

ELINK
	Name  = "$(BUILD_DIR)\CmosManagerSmm.ffs"
	Parent  = "FV_MAIN"
	InvokeOrder = AfterParent
    Token = "CMOS_SMM_SUPPORT" "=" "1"
End

ELINK
	Name  = "CMOS_MGR_CFLAGS"
	Help  = "CMOS Manager command line options of the C compiler"
	InvokeOrder = ReplaceParent
End

ELINK
	Name  = "CMOS_PORT_MAPPING"
	Help  = "Associate a CMOS address range with an \8-bit index/data port pair or a board-specific access function:\\{Index, Data, Low, High, FunctionName},\\This function is typicall provided by the Southbridge for CMOS addresses above 0x7f."
	InvokeOrder = ReplaceParent
End

ELINK
	Name  = "CMOS_BATTERY_TEST_MAPPING"
	Help  = "Returns BOOLEAN (TRUE=1, FALSE=0) value specifying whether or not the battery is good. This function is implemented by CMOS Manager but can be overriden, typically by the Southbridge."
	InvokeOrder = ReplaceParent
End

ELINK
	Name  = "CMOS_IS_FIRST_BOOT_MAPPING"
	Help  = "Returns BOOLEAN (TRUE=1, FALSE=0) value specifying whether or not the this is the first boot. This function is implemented by CMOS Manager but can be overriden, typically by the Southbridge."
	InvokeOrder = ReplaceParent
End

ELINK
	Name  = "CMOS_IS_BSP_MAPPING"
	Help  = "Returns BOOLEAN (TRUE=1, FALSE=0) value specifying whether or not BSP is currently executing. This function is implemented by CMOS Manager but can be overriden by another module."
	InvokeOrder = ReplaceParent
End

ELINK
	Name  = "CMOS_IS_COLD_BOOT_MAPPING"
	Help  = "Returns BOOLEAN (TRUE=1, FALSE=0) value specifying whether or not the platform is currently executing a cold boot. This function is implemented by CMOS Manager but can be overriden by another module."
	InvokeOrder = ReplaceParent
End

ELINK
	Name  = "CMOS_IS_USABLE_MAPPING"
	Help  = "Returns BOOLEAN (TRUE=1, FALSE=0) value specifying whether or not the CMOS hardware is usable. This function is implemented by CMOS Manager but can be overriden by another module."
	InvokeOrder = ReplaceParent
End


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