summaryrefslogtreecommitdiff
path: root/Core/EM/CmosManager/CmosSetup.sd
blob: 104663210cf02d794fc8cb2add77c463c8c52ff7 (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
//**********************************************************************
//**********************************************************************
//**                                                                  **
//**        (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/CMOS Board/CmosSetup.sd 2     11/30/11 11:47p Michaela $
//
// $Revision: 2 $
//
// $Date: 11/30/11 11:47p $
//**********************************************************************
// Revision History
// ----------------
// $Log: /Alaska/SOURCE/Modules/CMOS Manager/CMOS Board/CmosSetup.sd $
// 
// 2     11/30/11 11:47p 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 
// 
// 1     6/15/10 2:25p Michaela
// 
//**********************************************************************

//**********************************************************************
//<AMI_FHDR_START>
//
// Name:    CmosManager.sd
//
// Description:    CMOS Form Template
//
//<AMI_FHDR_END>
//**********************************************************************

#ifdef SETUP_DATA_DEFINITION

/***********************************************************/
/* Put NVRAM data definitions here.
/* For example: UINT8 Data1;
/* These definitions will be converted by the build process
/* to a definitions of SETUP_DATA fields.
/***********************************************************/
    UINT8 CmosNotUsable;            // do not remove   
    UINT8 CmosFirstBootDetected;    // do not remove   
    UINT8 CmosDefaultsLoaded;       // do not remove      
    UINT8 CmosBatteryIsBad;         // do not remove      
    UINT8 CmosCheckSumIsBad;        // do not remove      
#endif


#ifdef FORM_SET_TYPEDEF
    // #include 

    #ifndef SUPPRESS_GRAYOUT_ENDIF //old Core
      #if EFI_SPECIFICATION_VERSION>0x20000
        #define SUPPRESS_GRAYOUT_ENDIF endif; endif;
      #else
        #define SUPPRESS_GRAYOUT_ENDIF endif;
      #endif
    #endif
#endif // FORM_SET_TYPEDEF

//**********************************************************************
//                  Compatibility Section
//**********************************************************************

#if defined(VFRCOMPILE) && !defined(CONTROLS_ARE_DEFINED)
  #define CONTROL_DEFINITION
#endif

//**********************************************************************
//                  Controls Section
//
// The following section contains control macros that can be overridden
// in external files.  This allows customization of control content, 
// while ensuring the control's data is available.
//**********************************************************************

#ifdef CONTROL_DEFINITION

#define CMOS_MGR_NOT_USABLE \
    oneof varid =   SETUP_DATA.CmosNotUsable,\
        prompt = STRING_TOKEN(STR_UNUSABLE_CMOS_PROMPT),\
        help = STRING_TOKEN(STR_EMPTY),\
        option text = STRING_TOKEN(STR_FALSE), value = 0, flags = MANUFACTURING | DEFAULT;\
        option text = STRING_TOKEN(STR_TRUE),  value = 1, flags = 0;\
    endoneof;

#define CMOS_MGR_BATTERY_IS_BAD \
    oneof varid =   SETUP_DATA.CmosBatteryIsBad,\
        prompt = STRING_TOKEN(STR_BAD_CMOS_BATTERY_PROMPT),\
        help = STRING_TOKEN(STR_EMPTY),\
        option text = STRING_TOKEN(STR_FALSE), value = 0, flags = MANUFACTURING | DEFAULT;\
        option text = STRING_TOKEN(STR_TRUE),  value = 1, flags = 0;\
    endoneof;

#define CMOS_MGR_FIRST_BOOT_DETECTED \
    oneof varid =   SETUP_DATA.CmosFirstBootDetected,\
        prompt = STRING_TOKEN(STR_FIRST_BOOT_DETECTED_PROMPT),\
        help = STRING_TOKEN(STR_EMPTY),\
        option text = STRING_TOKEN(STR_FALSE), value = 0, flags = MANUFACTURING | DEFAULT;\
        option text = STRING_TOKEN(STR_TRUE),  value = 1, flags = 0;\
    endoneof;

#define CMOS_MGR_DEFAULTS_LOADED \
    oneof varid =   SETUP_DATA.CmosDefaultsLoaded,\
        prompt = STRING_TOKEN(STR_DEFAULTS_LOADED_PROMPT),\
        help = STRING_TOKEN(STR_EMPTY),\
        option text = STRING_TOKEN(STR_FALSE), value = 0, flags = MANUFACTURING | DEFAULT;\
        option text = STRING_TOKEN(STR_TRUE),  value = 1, flags = 0;\
    endoneof;

#define CMOS_MGR_CHECKSUM_IS_BAD \
    oneof varid =   SETUP_DATA.CmosCheckSumIsBad,\
        prompt = STRING_TOKEN(STR_BAD_CHECKSUM_PROMPT),\
        help = STRING_TOKEN(STR_EMPTY),\
        option text = STRING_TOKEN(STR_FALSE), value = 0, flags = MANUFACTURING | DEFAULT;\
        option text = STRING_TOKEN(STR_TRUE),  value = 1, flags = 0;\
    endoneof;

#endif //#ifdef CONTROL_DEFINITION


#ifdef CONTROLS_WITH_DEFAULTS
    CMOS_MGR_NOT_USABLE
    CMOS_MGR_BATTERY_IS_BAD
    CMOS_MGR_FIRST_BOOT_DETECTED
    CMOS_MGR_DEFAULTS_LOADED
    CMOS_MGR_CHECKSUM_IS_BAD
#endif //#ifdef CONTROLS_WITH_DEFAULTS


#ifdef ADVANCED_FORM_SET

    #ifdef FORM_SET_ITEM
    // Define controls to be added to the main page of the formset
    #endif

    #ifdef FORM_SET_GOTO
    // Define goto commands for the forms defined in this file
        goto CMOS_FORM_ID, 
        prompt = STRING_TOKEN(STR_CMOS_FORM),
        help = STRING_TOKEN(STR_CMOS_FORM_HELP);
    #endif

    #ifdef FORM_SET_FORM


      #ifndef CMOS_FORM_DEF
      #define CMOS_FORM_DEF
        // Define forms
        form formid = AUTO_ID(CMOS_FORM_ID),

        title = STRING_TOKEN(STR_CMOS_FORM);
        SUBTITLE(STRING_TOKEN(STR_CMOS_FORM_HELP))
    
        SEPARATOR
    
        // grayout (for display only)
        suppressif ideqval SETUP_DATA.CmosNotUsable == 0;
        grayoutif ideqval SETUP_DATA.CmosNotUsable == 1;
            CMOS_MGR_NOT_USABLE
        SUPPRESS_GRAYOUT_ENDIF

        grayoutif ideqval SETUP_DATA.CmosBatteryIsBad == 1 OR
                  ideqval SETUP_DATA.CmosBatteryIsBad == 0;
            CMOS_MGR_BATTERY_IS_BAD
        endif;

        grayoutif ideqval SETUP_DATA.CmosFirstBootDetected == 1 OR
                  ideqval SETUP_DATA.CmosFirstBootDetected == 0;
            CMOS_MGR_FIRST_BOOT_DETECTED
        endif;

        suppressif ideqval SETUP_DATA.CmosNotUsable == 1;
        grayoutif ideqval SETUP_DATA.CmosDefaultsLoaded == 1 OR
                  ideqval SETUP_DATA.CmosDefaultsLoaded == 0;
            CMOS_MGR_DEFAULTS_LOADED
        SUPPRESS_GRAYOUT_ENDIF

        suppressif ideqval SETUP_DATA.CmosNotUsable == 1;
        grayoutif ideqval SETUP_DATA.CmosCheckSumIsBad == 1 OR
                  ideqval SETUP_DATA.CmosCheckSumIsBad == 0;
            CMOS_MGR_CHECKSUM_IS_BAD
        SUPPRESS_GRAYOUT_ENDIF

        endform; 
      #endif // #ifndef CMOS_FORM_DEF

    #endif // FORM_SET_FORM

#endif  // ADVANCED_FORM_SET

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