Preface |
|
vii | |
Chapter 1 Introduction |
|
1 | (8) |
|
|
1 | (3) |
|
What Do We Mean by Shell? |
|
|
4 | (1) |
|
A Short History of the UEFI Shell |
|
|
5 | (1) |
|
Brief Overview of the UEFI Shell |
|
|
5 | (1) |
|
|
6 | (1) |
|
Command Line Interface Features |
|
|
6 | (1) |
|
|
7 | (2) |
Chapter 2 Under the UEFI Shell |
|
9 | (6) |
|
|
9 | (4) |
|
|
13 | (2) |
Chapter 3 What Is the UEFI Shell? |
|
15 | (18) |
|
What Is Contained in the UEFI Shell? |
|
|
16 | (1) |
|
What Kind of Shell Do You Have? |
|
|
16 | (1) |
|
What!? No Shell? No Problem! |
|
|
17 | (2) |
|
Programmatic Shell Environment |
|
|
19 | (1) |
|
Using UEFI Shell Commands |
|
|
20 | (2) |
|
Interactive Shell Environment |
|
|
22 | (1) |
|
|
22 | (2) |
|
|
24 | (5) |
|
|
29 | (2) |
|
Shell Script Resolves into a UEFI Firmware Action |
|
|
31 | (2) |
Chapter 4 Why We Need an Execution Environment before the OS |
|
33 | (14) |
|
|
33 | (1) |
|
The Platform Initialization Flow |
|
|
34 | (2) |
|
|
36 | (2) |
|
|
38 | (3) |
|
|
41 | (3) |
|
Migration Using the UEFI Shell |
|
|
44 | (1) |
|
|
45 | (2) |
Chapter 5 Manufacturing |
|
47 | (8) |
|
|
47 | (2) |
|
|
49 | (1) |
|
Hardware Access with Manufacturing Tools |
|
|
50 | (3) |
|
Converting Manufacturing Tools |
|
|
53 | (1) |
|
|
54 | (1) |
Chapter 6 Bare Metal Provisioning |
|
55 | (14) |
|
Provisioning with the UEFI Shell |
|
|
55 | (1) |
|
|
56 | (2) |
|
|
58 | (4) |
|
|
62 | (1) |
|
Example of Putting It Together |
|
|
62 | (6) |
|
|
68 | (1) |
Chapter 7 Configuration of Provisioned Material |
|
69 | (16) |
|
|
69 | (2) |
|
Configuration Infrastructure Overview |
|
|
71 | (1) |
|
Using the Configuration Infrastructure |
|
|
72 | (1) |
|
Driver Model Interactions |
|
|
73 | (2) |
|
Provisioning the Platform |
|
|
75 | (1) |
|
Configuring through the UEFI Shell |
|
|
76 | (1) |
|
|
76 | (3) |
|
Advanced Configuration Abilities |
|
|
79 | (6) |
Chapter 8 The Use of UEFI for Diagnostics |
|
85 | (22) |
|
|
85 | (2) |
|
SMBIOS Table Organization |
|
|
87 | (1) |
|
SMBIOS Structure Table Entry Point |
|
|
88 | (1) |
|
|
88 | (1) |
|
|
89 | (1) |
|
Structure Evolution and Usage Guidelines |
|
|
90 | (1) |
|
|
90 | (1) |
|
Required Structures and Data |
|
|
91 | (1) |
|
|
91 | (1) |
|
|
92 | (1) |
|
|
92 | (1) |
|
|
93 | (1) |
|
|
93 | (1) |
|
|
94 | (1) |
|
|
95 | (1) |
|
|
95 | (2) |
|
|
97 | (1) |
|
|
98 | (1) |
|
|
99 | (1) |
|
Source Code for the Utility |
|
|
100 | (5) |
|
|
105 | (2) |
Chapter 9 UEFI Shell Scripting |
|
107 | (14) |
|
|
108 | (1) |
|
|
108 | (1) |
|
|
109 | (1) |
|
Echo All Parameters (Improved Version) |
|
|
110 | (2) |
|
|
112 | (1) |
|
List Only Selected "Is" Information |
|
|
113 | (2) |
|
|
115 | (4) |
|
How to Make a Shell Script Appear as a Boot Option |
|
|
119 | (2) |
Chapter 10 UEFI Shell Programming |
|
121 | (44) |
|
A Simple UEFI Shell Application: HelloWorld |
|
|
121 | (1) |
|
The Source File: HelloWorld.c |
|
|
121 | (2) |
|
The Component Information (.inf) File |
|
|
123 | (1) |
|
A Simple Standard Application: HelloWorld2 |
|
|
124 | (1) |
|
The Source File: HelloWorld2.c |
|
|
124 | (1) |
|
The Component Information (.inf) File: HelloWorld2.inf |
|
|
125 | (1) |
|
Read Keyboard Input in UEFI Shell Scripts: GetKey |
|
|
126 | (1) |
|
The Source File: GetKey.c |
|
|
127 | (10) |
|
The Component Information (.inf) File: GetKey.inf |
|
|
137 | (2) |
|
The Build Description (.dsc) File |
|
|
139 | (1) |
|
Calculate Math Expressions: Math |
|
|
139 | (1) |
|
|
140 | (14) |
|
The Component Information (.inf) File: Math.inf |
|
|
154 | (1) |
|
Convert ASCII to Unicode and Back: UniCodeDecode |
|
|
154 | (1) |
|
The Source File: UniCodeDecode.c |
|
|
155 | (8) |
|
The Component Information (.inf) File |
|
|
163 | (2) |
Chapter 11 Managing UEFI Drivers Using the Shell |
|
165 | (16) |
|
Testing Specific Protocols |
|
|
166 | (1) |
|
Loading and Unloading UEFI Drivers |
|
|
167 | (1) |
|
|
168 | (1) |
|
|
168 | (1) |
|
|
169 | (1) |
|
|
169 | (1) |
|
|
169 | (1) |
|
|
170 | (1) |
|
|
170 | (1) |
|
Driver and Device Information |
|
|
171 | (1) |
|
|
171 | (1) |
|
|
172 | (1) |
|
|
172 | (1) |
|
|
173 | (1) |
|
|
173 | (1) |
|
Testing the Driver Configuration and Driver Diagnostics Protocols |
|
|
174 | (1) |
|
|
174 | (1) |
|
|
174 | (1) |
|
Debugging Code Statements |
|
|
175 | (2) |
|
|
177 | (1) |
|
|
178 | (1) |
|
Text-Mode VGA Frame Buffer |
|
|
179 | (1) |
|
|
179 | (2) |
Appendix A Security Considerations |
|
181 | (8) |
|
UEFI Shell Binary Integrity |
|
|
181 | (1) |
|
|
181 | (1) |
|
Signed Executable Overview |
|
|
182 | (1) |
|
|
183 | (2) |
|
Signed Executable Processing |
|
|
185 | (1) |
|
Signed Executable Generation Application (SignTool) |
|
|
185 | (1) |
|
|
186 | (1) |
|
|
186 | (1) |
|
|
186 | (1) |
|
|
187 | (2) |
Appendix B Command Reference |
|
189 | (44) |
|
Command Profiles and Support Levels |
|
|
189 | (1) |
|
|
189 | (3) |
|
Standardizing Command Output |
|
|
192 | (1) |
|
|
193 | (1) |
|
|
193 | (1) |
|
|
194 | (1) |
|
|
194 | (2) |
|
|
196 | (1) |
|
|
197 | (1) |
|
|
197 | (1) |
|
|
198 | (1) |
|
|
199 | (1) |
|
|
199 | (1) |
|
|
200 | (1) |
|
|
200 | (1) |
|
|
200 | (1) |
|
|
201 | (1) |
|
|
201 | (1) |
|
|
202 | (1) |
|
|
202 | (1) |
|
|
203 | (1) |
|
|
204 | (1) |
|
|
204 | (1) |
|
|
205 | (1) |
|
|
206 | (1) |
|
|
206 | (1) |
|
|
207 | (1) |
|
|
207 | (1) |
|
|
207 | (1) |
|
|
207 | (1) |
|
|
208 | (1) |
|
|
209 | (1) |
|
|
209 | (1) |
|
|
209 | (1) |
|
|
210 | (1) |
|
|
210 | (4) |
|
|
214 | (1) |
|
|
214 | (1) |
|
|
215 | (1) |
|
|
216 | (1) |
|
|
216 | (1) |
|
|
217 | (1) |
|
|
218 | (1) |
|
|
218 | (1) |
|
|
218 | (1) |
|
|
219 | (1) |
|
|
219 | (1) |
|
|
220 | (1) |
|
|
220 | (1) |
|
|
220 | (1) |
|
|
221 | (1) |
|
|
221 | (1) |
|
|
221 | (1) |
|
|
222 | (1) |
|
|
222 | (1) |
|
|
223 | (1) |
|
|
223 | (1) |
|
|
224 | (1) |
|
|
224 | (1) |
|
|
225 | (1) |
|
|
226 | (1) |
|
|
226 | (1) |
|
|
227 | (1) |
|
|
227 | (1) |
|
|
228 | (1) |
|
|
228 | (1) |
|
|
229 | (1) |
|
|
230 | (1) |
|
|
230 | (1) |
|
|
230 | (1) |
|
|
230 | (3) |
Appendix C Programming Reference |
|
233 | (8) |
|
|
233 | (1) |
|
|
233 | (1) |
|
|
234 | (1) |
|
|
235 | (1) |
|
|
236 | (1) |
|
Non-Script-based Programming |
|
|
237 | (1) |
|
|
238 | (2) |
|
Shell Parameters Protocol |
|
|
240 | (1) |
Appendix D UEFI Shell Library |
|
241 | (50) |
|
|
241 | (1) |
|
|
241 | (1) |
|
|
242 | (1) |
|
|
243 | (1) |
|
|
244 | (1) |
|
|
244 | (1) |
|
|
245 | (1) |
|
|
246 | (1) |
|
ShellCommandLineCheckDuplicate() |
|
|
246 | (1) |
|
ShellCommandlineFreeVarList() |
|
|
247 | (1) |
|
ShellCommandLineGetCount() |
|
|
247 | (1) |
|
ShellCommandLineGetFlag() |
|
|
248 | (1) |
|
ShellCommandLineGetValue() |
|
|
248 | (1) |
|
ShellCommandLineGetRawValue() |
|
|
249 | (1) |
|
ShellCommandLineParseEx() |
|
|
250 | (1) |
|
ShellCopySearchAndReplace() |
|
|
251 | (1) |
|
ShellConvertStringToUint64() |
|
|
252 | (1) |
|
|
253 | (1) |
|
|
254 | (1) |
|
|
254 | (1) |
|
|
255 | (2) |
|
|
257 | (1) |
|
ShellFileHandleReturnLine() |
|
|
257 | (1) |
|
ShellFileHandleReadLine() |
|
|
258 | (1) |
|
|
259 | (1) |
|
|
260 | (1) |
|
|
260 | (1) |
|
|
261 | (1) |
|
|
262 | (1) |
|
|
263 | (1) |
|
|
263 | (1) |
|
ShellGetEnvironmentVariable() |
|
|
264 | (1) |
|
ShellGetExecutionBreakFlag() |
|
|
265 | (1) |
|
|
265 | (1) |
|
|
266 | (1) |
|
|
266 | (1) |
|
|
267 | (1) |
|
|
268 | (1) |
|
ShelllsDecimalDigitCharacter() |
|
|
268 | (1) |
|
|
269 | (1) |
|
|
269 | (1) |
|
|
270 | (1) |
|
ShellIsHexaDecimalDigitCharacter() |
|
|
270 | (1) |
|
ShellIsHexOrDecimalNumber() |
|
|
271 | (1) |
|
ShellOpenFileByDevicePath() |
|
|
271 | (2) |
|
|
273 | (1) |
|
|
274 | (1) |
|
|
275 | (1) |
|
|
276 | (1) |
|
|
277 | (1) |
|
|
278 | (1) |
|
ShellPromptForResponseHii() |
|
|
279 | (2) |
|
|
281 | (1) |
|
|
282 | (1) |
|
|
283 | (1) |
|
ShellSetEnvironmentVariable() |
|
|
284 | (1) |
|
|
285 | (1) |
|
|
285 | (1) |
|
|
286 | (1) |
|
|
287 | (1) |
|
|
288 | (1) |
|
|
288 | (1) |
|
|
289 | (2) |
Index |
|
291 | |