summaryrefslogtreecommitdiff
path: root/Core/EM/CmosManager/CmosTables.c
blob: fa0ef32a89dfab3df62f8d4447f08694d2784757 (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
//*************************************************************************
//*************************************************************************
//**                                                                     **
//**        (C)Copyright 1985-2009, American Megatrends, Inc.            **
//**                                                                     **
//**                       All Rights Reserved.                          **
//**                                                                     **
//**      5555 Oakbrook Parkway, Suite 200, Norcross, GA 30093           **
//**                                                                     **
//**                       Phone: (770)-246-8600                         **
//**                                                                     **
//*************************************************************************
//*************************************************************************

//**********************************************************************
// $Header: /Alaska/SOURCE/Modules/CMOS Manager/CMOS Core/CMOS Source/CmosTables.c 12    6/15/10 2:24p Michaela $
//
// $Revision: 12 $
//
// $Date: 6/15/10 2:24p $
//**********************************************************************
// Revision History
// ----------------
// $Log: /Alaska/SOURCE/Modules/CMOS Manager/CMOS Core/CMOS Source/CmosTables.c $
// 
// 12    6/15/10 2:24p Michaela
// 
// 11    11/10/09 9:14p Michaela
// 
// 10    7/29/09 9:59a Michaela
// updates Aptio Enhancement EIP 22205
// (no code changes)
// 
// 9     6/15/09 5:11p Michaela
// 
// 8     6/02/09 3:27p Michaela
// For label: 4.6.3_CMOSMGR_11
// 
// 7     2/06/09 2:01p Michaela
// FIRST_CMOS_REGISTER is now generated by AmiSsp2
// 
// 6     11/17/08 4:40p Michaela
// --Removed Token Name strings in debug development code
// 
// 5     11/17/08 3:40p Michaela
// --Removed development debug code
// 
// 4     3/07/08 4:07p Michaela
// Label 4.6.3_CMOSMGR_05 fixes:
// -- write errors to Optimal Defaults buffer before memory detection
// -- CMOS Token table corruption when name strings are disabled
// 
// 3     2/29/08 9:35p Michaela
// - Added recovery path policy
// - fixed other minor bugs
// 
// 2     2/26/08 12:49p Michaela
// Added/modified Helpbuilder headers
// 
// 1     2/22/08 2:29p Michaela
// 
// 1     2/04/08 6:00p MichaelA
// Created
// 
//**********************************************************************

//<AMI_FHDR_START>
//---------------------------------------------------------------------------
//
// Name:    CmosTables.c
//
// Description: Contains the global static data tables that are initialized
//              from AmiSsp2.exe output during the build process. These
//              tables are used in the PEI phase and passed, as needed,
//              to DXE via HOB data structure.
//
//              This file must always be included in source form.
//
//---------------------------------------------------------------------------
//<AMI_FHDR_END>

//<AMI_GHDR_START>
//----------------------------------------------------------------------------
//
// Name:    Initialization_Tables
//
// Description:        
//      This page provides links to descriptions of the major tables used in 
//      initializing/supporting the CMOS Manager module.
//
// Fields:  Phase  Name  Description
// ------------------------------------------------------------------
// ALL  gCmosTokenTable             all SSP defined tokens
// ALL  gCmosOptimalDefaultTable    default values for all CMOS registers
// ALL  gCmosNoCheckSumTable        CMOS addresses that are not checksummed
//
//----------------------------------------------------------------------------
//<AMI_GHDR_END>


#include <Efi.h>
#ifdef PEI_COMPILE
    #include <Pei.h>
    #include <AmiPeiLib.h>
#else
    #include <AmiDxeLib.h>
#endif
#include "CmosManager.h"
#include "CmosManagerHob.h"
#include <SspData.h>

CONST UINT8   gFirstManagedRegister = FIRST_CMOS_REGISTER;  
CONST UINT8   gLastManagedRegister = LAST_CMOS_REGISTER;

//<AMI_THDR_START>
//---------------------------------------------------------------------------
//
// Name:   gCmosTokenTable
//
// Description: 
//      This is a table of CMOS tokens derived from macros defined in 
//      SspData.h, which is generated by AmiSsp2.exe during the build 
//      process.
//
// Notes:
//      This is an array of type: CMOS_TOKEN
//
//---------------------------------------------------------------------------
//<AMI_THDR_END>

#define USING_SSP_MACROS
CMOS_TOKEN  gCmosTokenTable[] = {         // to DXE via HOB
    {0},                                        // Index starts at 1
    #define CmosTokenTable(name,val) {val},
#include <SspData.h>
};
CONST UINT16 gCmosTokenTableSize = CMOS_TOKEN_COUNT(gCmosTokenTable);


//<AMI_THDR_START>
//---------------------------------------------------------------------------
//
// Name:   gCmosOptimalDefaultTable
//
// Description: 
//      This is a table of default (or optimal) CMOS register values derived 
//      from macros defined in SspData.h, which is generated by AmiSsp2.exe 
//      during the build process.
//
// Notes:
//      This is an array of type: CMOS_REGISTER
//
//---------------------------------------------------------------------------
//<AMI_THDR_END>

#define USING_SSP_MACROS
CMOS_REGISTER  gCmosOptimalDefaultTable[] = {   // to DXE via HOB
{0},                                                // Index starts at 1
#define NvramOptimalDataTable(val) {val},
#include <SspData.h>
};
CONST UINT16 gCmosOptimalDefaultTableSize = 
                    CMOS_REGISTER_COUNT(gCmosOptimalDefaultTable);
 

//<AMI_THDR_START>
//---------------------------------------------------------------------------
//
// Name:   gCmosNoCheckSumTable
//
// Description: 
//      This is a table of CMOS registers excluded from checksum 
//      calculations.  This table is derived from macros defined in 
//      SspData.h, which is generated by AmiSsp2.exe during the build 
//      process.
//
// Notes:
//      This is an array of type: CMOS_REGISTER
//
//---------------------------------------------------------------------------
//<AMI_THDR_END>

#define USING_SSP_MACROS
CONST CMOS_REGISTER  gCmosNoCheckSumTable[] = {   // to DXE via HOB
{0},                                        // Index starts at 1
#define NonChecksumTable(val) {val},
#include <SspData.h>
};
CONST UINT16 gCmosNoCheckSumTableSize = 
                    CMOS_REGISTER_COUNT(gCmosNoCheckSumTable);


//<AMI_THDR_START>
//---------------------------------------------------------------------------
//
// Name:   gUnmanagedTable
//
// Description: 
//      This is a table of CMOS registers that are allocated, but otherwise
//      unmanaged.  The purpose is to provide support for locations that
//      must be written prior to CMOS Manager, and to provide alternative
//      mechanisms in situations where CMOS Manager's loading of default 
//      values would cause major implementation problems.
//
// Notes:
//      This is an array of type: CMOS_REGISTER
//
//      It is up to the owner of the SSP CMOS Token to determine whether
//      or not the value of an un-managed location is valid.
//
//---------------------------------------------------------------------------
//<AMI_THDR_END>

#define USING_SSP_MACROS
CONST CMOS_REGISTER  gUnmanagedTable[] = {   
{0},                                        // Index starts at 1
#define UnmanagedTable(val) {val},
#include <SspData.h>
};
CONST UINT16 gUnmanagedTableSize = 
                    CMOS_REGISTER_COUNT(gUnmanagedTable);

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