]> git.proxmox.com Git - mirror_edk2.git/blame - IntelFrameworkPkg/Library/DxeBootScriptLibNull/BootScriptLib.c
Add DxeBootScriptLibNull in IntelFrameworkPkg.
[mirror_edk2.git] / IntelFrameworkPkg / Library / DxeBootScriptLibNull / BootScriptLib.c
CommitLineData
c3902377 1/*++\r
2\r
3Copyright (c) 2007, Intel Corporation. All rights reserved. <BR> \r
4This software and associated documentation (if any) is furnished\r
5under a license and may only be used or copied in accordance\r
6with the terms of the license. Except as permitted by such\r
7license, no part of this software or documentation may be\r
8reproduced, stored in a retrieval system, or transmitted in any\r
9form or by any means without the express written consent of\r
10Intel Corporation.\r
11\r
12\r
13\r
14Module Name:\r
15 \r
16 BootScriptLib.c\r
17\r
18Abstract:\r
19\r
20 Support for EFI script. \r
21\r
22--*/\r
23\r
24//\r
25// The package level header files this module uses\r
26//\r
27#include <PiDxe.h>\r
28//\r
29// The protocols, PPI and GUID defintions for this module\r
30//\r
31//\r
32// The Library classes this module consumes\r
33//\r
34#include <Library/BootScriptLib.h>\r
35\r
36EFI_STATUS\r
37EFIAPI\r
38BootScriptSaveIoWrite (\r
39 IN UINT16 TableName,\r
40 IN EFI_BOOT_SCRIPT_WIDTH Width,\r
41 IN UINT64 Address,\r
42 IN UINTN Count,\r
43 IN VOID *Buffer\r
44 )\r
45/*++\r
46\r
47Routine Description:\r
48\r
49 Save I/O write to boot script \r
50\r
51Arguments:\r
52\r
53 TableName - Desired boot script table\r
54\r
55 (Standard EFI IO write script parameter) \r
56\r
57Returns: \r
58 \r
59 EFI_NOT_FOUND - BootScriptSave Protocol not exist.\r
60 \r
61 EFI_STATUS - BootScriptSave Protocol exist, always returns EFI_SUCCESS\r
62\r
63--*/\r
64// GC_TODO: Width - add argument and description to function comment\r
65// GC_TODO: Address - add argument and description to function comment\r
66// GC_TODO: Count - add argument and description to function comment\r
67// GC_TODO: Buffer - add argument and description to function comment\r
68{\r
69 return EFI_SUCCESS;\r
70}\r
71\r
72EFI_STATUS\r
73EFIAPI\r
74BootScriptSaveIoReadWrite (\r
75 IN UINT16 TableName,\r
76 IN EFI_BOOT_SCRIPT_WIDTH Width,\r
77 IN UINT64 Address,\r
78 IN VOID *Data,\r
79 IN VOID *DataMask\r
80 )\r
81/*++\r
82\r
83Routine Description:\r
84\r
85 Save I/O write to boot script \r
86\r
87Arguments:\r
88\r
89 TableName - Desired boot script table\r
90\r
91 (Standard EFI IO read write script parameter) \r
92\r
93Returns: \r
94 \r
95 EFI_NOT_FOUND - BootScriptSave Protocol not exist.\r
96 \r
97 EFI_STATUS - BootScriptSave Protocol exist, always returns EFI_SUCCESS\r
98\r
99--*/\r
100// GC_TODO: Width - add argument and description to function comment\r
101// GC_TODO: Address - add argument and description to function comment\r
102// GC_TODO: Data - add argument and description to function comment\r
103// GC_TODO: DataMask - add argument and description to function comment\r
104{\r
105 return EFI_SUCCESS;\r
106}\r
107\r
108EFI_STATUS\r
109EFIAPI\r
110BootScriptSaveMemWrite (\r
111 IN UINT16 TableName,\r
112 IN EFI_BOOT_SCRIPT_WIDTH Width,\r
113 IN UINT64 Address,\r
114 IN UINTN Count,\r
115 IN VOID *Buffer\r
116 )\r
117/*++\r
118\r
119Routine Description:\r
120\r
121 Save I/O write to boot script \r
122\r
123Arguments:\r
124\r
125 TableName - Desired boot script table\r
126\r
127 (Standard EFI MEM write script parameter) \r
128\r
129Returns: \r
130 \r
131 EFI_NOT_FOUND - BootScriptSave Protocol not exist.\r
132 \r
133 EFI_STATUS - BootScriptSave Protocol exist, always returns EFI_SUCCESS\r
134\r
135--*/\r
136// GC_TODO: Width - add argument and description to function comment\r
137// GC_TODO: Address - add argument and description to function comment\r
138// GC_TODO: Count - add argument and description to function comment\r
139// GC_TODO: Buffer - add argument and description to function comment\r
140{\r
141 return EFI_SUCCESS;\r
142}\r
143\r
144EFI_STATUS\r
145EFIAPI\r
146BootScriptSaveMemReadWrite (\r
147 IN UINT16 TableName,\r
148 IN EFI_BOOT_SCRIPT_WIDTH Width,\r
149 IN UINT64 Address,\r
150 IN VOID *Data,\r
151 IN VOID *DataMask\r
152 )\r
153/*++\r
154\r
155Routine Description:\r
156\r
157 Save I/O write to boot script \r
158\r
159Arguments:\r
160\r
161 TableName - Desired boot script table\r
162\r
163 (Standard EFI MEM read write script parameter) \r
164\r
165Returns: \r
166 \r
167 EFI_NOT_FOUND - BootScriptSave Protocol not exist.\r
168 \r
169 EFI_STATUS - BootScriptSave Protocol exist, always returns EFI_SUCCESS\r
170\r
171--*/\r
172// GC_TODO: Width - add argument and description to function comment\r
173// GC_TODO: Address - add argument and description to function comment\r
174// GC_TODO: Data - add argument and description to function comment\r
175// GC_TODO: DataMask - add argument and description to function comment\r
176{\r
177 return EFI_SUCCESS;\r
178}\r
179\r
180EFI_STATUS\r
181EFIAPI\r
182BootScriptSavePciCfgWrite (\r
183 IN UINT16 TableName,\r
184 IN EFI_BOOT_SCRIPT_WIDTH Width,\r
185 IN UINT64 Address,\r
186 IN UINTN Count,\r
187 IN VOID *Buffer\r
188 )\r
189/*++\r
190\r
191Routine Description:\r
192\r
193 Save I/O write to boot script \r
194\r
195Arguments:\r
196\r
197 TableName - Desired boot script table\r
198\r
199 (Standard EFI PCI write script parameter) \r
200\r
201Returns: \r
202 \r
203 EFI_NOT_FOUND - BootScriptSave Protocol not exist.\r
204 \r
205 EFI_STATUS - BootScriptSave Protocol exist, always returns EFI_SUCCESS\r
206\r
207--*/\r
208// GC_TODO: Width - add argument and description to function comment\r
209// GC_TODO: Address - add argument and description to function comment\r
210// GC_TODO: Count - add argument and description to function comment\r
211// GC_TODO: Buffer - add argument and description to function comment\r
212{\r
213 return EFI_SUCCESS;\r
214}\r
215\r
216EFI_STATUS\r
217EFIAPI\r
218BootScriptSavePciCfgReadWrite (\r
219 IN UINT16 TableName,\r
220 IN EFI_BOOT_SCRIPT_WIDTH Width,\r
221 IN UINT64 Address,\r
222 IN VOID *Data,\r
223 IN VOID *DataMask\r
224 )\r
225/*++\r
226\r
227Routine Description:\r
228\r
229 Save I/O write to boot script \r
230\r
231Arguments:\r
232\r
233 TableName - Desired boot script table\r
234\r
235 (Standard EFI PCI read write script parameter) \r
236\r
237Returns: \r
238 \r
239 EFI_NOT_FOUND - BootScriptSave Protocol not exist.\r
240 \r
241 EFI_STATUS - BootScriptSave Protocol exist, always returns EFI_SUCCESS\r
242\r
243--*/\r
244// GC_TODO: Width - add argument and description to function comment\r
245// GC_TODO: Address - add argument and description to function comment\r
246// GC_TODO: Data - add argument and description to function comment\r
247// GC_TODO: DataMask - add argument and description to function comment\r
248{\r
249 return EFI_SUCCESS;\r
250}\r
251\r
252EFI_STATUS\r
253EFIAPI\r
254BootScriptSaveSmbusExecute (\r
255 IN UINT16 TableName,\r
256 IN EFI_SMBUS_DEVICE_ADDRESS SlaveAddress,\r
257 IN EFI_SMBUS_DEVICE_COMMAND Command,\r
258 IN EFI_SMBUS_OPERATION Operation,\r
259 IN BOOLEAN PecCheck,\r
260 IN UINTN *Length,\r
261 IN VOID *Buffer\r
262 )\r
263/*++\r
264\r
265Routine Description:\r
266\r
267 Save I/O write to boot script \r
268\r
269Arguments:\r
270\r
271 TableName - Desired boot script table\r
272\r
273 (Standard EFI Smbus execute script parameter) \r
274\r
275Returns: \r
276 \r
277 EFI_NOT_FOUND - BootScriptSave Protocol not exist.\r
278 \r
279 EFI_STATUS - BootScriptSave Protocol exist, always returns EFI_SUCCESS\r
280\r
281--*/\r
282// GC_TODO: SlaveAddress - add argument and description to function comment\r
283// GC_TODO: Command - add argument and description to function comment\r
284// GC_TODO: Operation - add argument and description to function comment\r
285// GC_TODO: PecCheck - add argument and description to function comment\r
286// GC_TODO: Length - add argument and description to function comment\r
287// GC_TODO: Buffer - add argument and description to function comment\r
288{\r
289 return EFI_SUCCESS;\r
290}\r
291\r
292EFI_STATUS\r
293EFIAPI\r
294BootScriptSaveStall (\r
295 IN UINT16 TableName,\r
296 IN UINTN Duration\r
297 )\r
298/*++\r
299\r
300Routine Description:\r
301\r
302 Save I/O write to boot script \r
303\r
304Arguments:\r
305\r
306 TableName - Desired boot script table\r
307\r
308 (Standard EFI stall script parameter) \r
309\r
310Returns: \r
311 \r
312 EFI_NOT_FOUND - BootScriptSave Protocol not exist.\r
313 \r
314 EFI_STATUS - BootScriptSave Protocol exist, always returns EFI_SUCCESS\r
315\r
316--*/\r
317// GC_TODO: Duration - add argument and description to function comment\r
318{\r
319 return EFI_SUCCESS;\r
320}\r
321\r
322EFI_STATUS\r
323EFIAPI\r
324BootScriptSaveDispatch2 (\r
325 IN UINT16 TableName,\r
326 IN EFI_PHYSICAL_ADDRESS EntryPoint,\r
327 IN EFI_PHYSICAL_ADDRESS Context\r
328 )\r
329/*++\r
330\r
331Routine Description:\r
332\r
333 GC_TODO: Add function description\r
334\r
335Arguments:\r
336\r
337 TableName - GC_TODO: add argument description\r
338 EntryPoint - GC_TODO: add argument description\r
339\r
340Returns:\r
341\r
342 EFI_NOT_FOUND - GC_TODO: Add description for return value\r
343 EFI_SUCCESS - GC_TODO: Add description for return value\r
344\r
345--*/\r
346{\r
347 return EFI_SUCCESS;\r
348}\r
349\r
350EFI_STATUS\r
351EFIAPI\r
352BootScriptSaveInformation (\r
353 IN UINT16 TableName,\r
354 IN UINT32 Length, \r
355 IN EFI_PHYSICAL_ADDRESS Buffer\r
356 )\r
357/*++\r
358\r
359Routine Description:\r
360\r
361 GC_TODO: Add function description\r
362\r
363Arguments:\r
364\r
365 TableName - GC_TODO: add argument description\r
366 EntryPoint - GC_TODO: add argument description\r
367\r
368Returns:\r
369\r
370 EFI_NOT_FOUND - GC_TODO: Add description for return value\r
371 EFI_SUCCESS - GC_TODO: Add description for return value\r
372\r
373--*/\r
374{\r
375 return EFI_SUCCESS;\r
376}\r
377\r
378EFI_STATUS\r
379EFIAPI\r
380BootScriptSaveInformationUnicodeString (\r
381 IN UINT16 TableName,\r
382 IN CONST CHAR16 *String\r
383 )\r
384 /*++\r
385\r
386Routine Description:\r
387\r
388 Save unicode string information specified by Buffer to \r
389 boot script with opcode EFI_BOOT_SCRIPT_INFORMATION_OPCODE\r
390\r
391Arguments:\r
392\r
393 TableName - Desired boot script table\r
394\r
395 FfsName - The file name of the code to be dispatched.\r
396\r
397 Context - The data that will be passed into code.\r
398\r
399 ParentHandle - The caller's image handle.\r
400\r
401Returns:\r
402\r
403 EFI_NOT_FOUND - BootScriptSave Protocol not exist.\r
404 \r
405 EFI_STATUS - BootScriptSave Protocol exist, always returns EFI_SUCCESS\r
406\r
407--*/\r
408{\r
409 return EFI_SUCCESS;\r
410}\r
411\r
412EFI_STATUS\r
413EFIAPI\r
414BootScriptSaveInformationAsciiString (\r
415 IN UINT16 TableName,\r
416 IN CONST CHAR8 *String\r
417 )\r
418 /*++\r
419\r
420Routine Description:\r
421\r
422 Save ASCII string information specified by Buffer to \r
423 boot script with opcode EFI_BOOT_SCRIPT_INFORMATION_OPCODE\r
424\r
425Arguments:\r
426\r
427 TableName - Desired boot script table\r
428\r
429 FfsName - The file name of the code to be dispatched.\r
430\r
431 Context - The data that will be passed into code.\r
432\r
433 ParentHandle - The caller's image handle.\r
434\r
435Returns:\r
436\r
437 EFI_NOT_FOUND - BootScriptSave Protocol not exist.\r
438 \r
439 EFI_STATUS - BootScriptSave Protocol exist, always returns EFI_SUCCESS\r
440\r
441--*/\r
442{\r
443 return EFI_SUCCESS;\r
444}\r
445\r
446\r
447EFI_STATUS\r
448EFIAPI\r
449BootScriptSaveDispatch (\r
450 IN UINT16 TableName,\r
451 IN EFI_PHYSICAL_ADDRESS EntryPoint\r
452 )\r
453/*++\r
454\r
455Routine Description:\r
456\r
457 GC_TODO: Add function description\r
458\r
459Arguments:\r
460\r
461 TableName - GC_TODO: add argument description\r
462 EntryPoint - GC_TODO: add argument description\r
463\r
464Returns:\r
465\r
466 EFI_NOT_FOUND - GC_TODO: Add description for return value\r
467 EFI_SUCCESS - GC_TODO: Add description for return value\r
468\r
469--*/\r
470{\r
471 return EFI_SUCCESS;\r
472}\r
473\r
474EFI_STATUS\r
475EFIAPI\r
476BootScriptSaveDispatch2Image (\r
477 IN UINT16 TableName,\r
478 IN EFI_GUID *FfsName,\r
479 IN EFI_PHYSICAL_ADDRESS Context,\r
480 IN EFI_HANDLE ParentHandle\r
481 )\r
482/*++\r
483\r
484Routine Description:\r
485\r
486 Save dispatching specified arbitrary code to boot script with opcode \r
487 EFI_BOOT_SCRIPT_DISPATCH_OPCODE\r
488\r
489Arguments:\r
490\r
491 TableName - Desired boot script table\r
492\r
493 FfsName - The file name of the code to be dispatched.\r
494\r
495 Context - The data that will be passed into code.\r
496\r
497 ParentHandle - The caller's image handle.\r
498\r
499Returns:\r
500\r
501 EFI_NOT_FOUND - BootScriptSave Protocol not exist.\r
502 \r
503 EFI_STATUS - BootScriptSave Protocol exist, always returns EFI_SUCCESS\r
504\r
505--*/\r
506{\r
507 return EFI_SUCCESS;\r
508}\r