3 Copyright (c) 2006 - 2007, Intel Corporation<BR>
4 All rights reserved. This program and the accompanying materials
5 are licensed and made available under the terms and conditions of the BSD License
6 which accompanies this distribution. The full text of the license may be found at
7 http://opensource.org/licenses/bsd-license.php
9 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
18 Support for EFI script.
23 // The package level header files this module uses
27 // The protocols, PPI and GUID defintions for this module
30 // The Library classes this module consumes
32 #include <Library/BootScriptLib.h>
36 BootScriptSaveIoWrite (
38 IN EFI_BOOT_SCRIPT_WIDTH Width
,
47 Save I/O write to boot script
51 TableName - Desired boot script table
53 (Standard EFI IO write script parameter)
57 EFI_NOT_FOUND - BootScriptSave Protocol not exist.
59 EFI_STATUS - BootScriptSave Protocol exist, always returns EFI_SUCCESS
62 // GC_TODO: Width - add argument and description to function comment
63 // GC_TODO: Address - add argument and description to function comment
64 // GC_TODO: Count - add argument and description to function comment
65 // GC_TODO: Buffer - add argument and description to function comment
72 BootScriptSaveIoReadWrite (
74 IN EFI_BOOT_SCRIPT_WIDTH Width
,
83 Save I/O write to boot script
87 TableName - Desired boot script table
89 (Standard EFI IO read write script parameter)
93 EFI_NOT_FOUND - BootScriptSave Protocol not exist.
95 EFI_STATUS - BootScriptSave Protocol exist, always returns EFI_SUCCESS
98 // GC_TODO: Width - add argument and description to function comment
99 // GC_TODO: Address - add argument and description to function comment
100 // GC_TODO: Data - add argument and description to function comment
101 // GC_TODO: DataMask - add argument and description to function comment
108 BootScriptSaveMemWrite (
110 IN EFI_BOOT_SCRIPT_WIDTH Width
,
119 Save I/O write to boot script
123 TableName - Desired boot script table
125 (Standard EFI MEM write script parameter)
129 EFI_NOT_FOUND - BootScriptSave Protocol not exist.
131 EFI_STATUS - BootScriptSave Protocol exist, always returns EFI_SUCCESS
134 // GC_TODO: Width - add argument and description to function comment
135 // GC_TODO: Address - add argument and description to function comment
136 // GC_TODO: Count - add argument and description to function comment
137 // GC_TODO: Buffer - add argument and description to function comment
144 BootScriptSaveMemReadWrite (
146 IN EFI_BOOT_SCRIPT_WIDTH Width
,
155 Save I/O write to boot script
159 TableName - Desired boot script table
161 (Standard EFI MEM read write script parameter)
165 EFI_NOT_FOUND - BootScriptSave Protocol not exist.
167 EFI_STATUS - BootScriptSave Protocol exist, always returns EFI_SUCCESS
170 // GC_TODO: Width - add argument and description to function comment
171 // GC_TODO: Address - add argument and description to function comment
172 // GC_TODO: Data - add argument and description to function comment
173 // GC_TODO: DataMask - add argument and description to function comment
180 BootScriptSavePciCfgWrite (
182 IN EFI_BOOT_SCRIPT_WIDTH Width
,
191 Save I/O write to boot script
195 TableName - Desired boot script table
197 (Standard EFI PCI write script parameter)
201 EFI_NOT_FOUND - BootScriptSave Protocol not exist.
203 EFI_STATUS - BootScriptSave Protocol exist, always returns EFI_SUCCESS
206 // GC_TODO: Width - add argument and description to function comment
207 // GC_TODO: Address - add argument and description to function comment
208 // GC_TODO: Count - add argument and description to function comment
209 // GC_TODO: Buffer - add argument and description to function comment
216 BootScriptSavePciCfgReadWrite (
218 IN EFI_BOOT_SCRIPT_WIDTH Width
,
227 Save I/O write to boot script
231 TableName - Desired boot script table
233 (Standard EFI PCI read write script parameter)
237 EFI_NOT_FOUND - BootScriptSave Protocol not exist.
239 EFI_STATUS - BootScriptSave Protocol exist, always returns EFI_SUCCESS
242 // GC_TODO: Width - add argument and description to function comment
243 // GC_TODO: Address - add argument and description to function comment
244 // GC_TODO: Data - add argument and description to function comment
245 // GC_TODO: DataMask - add argument and description to function comment
252 BootScriptSaveSmbusExecute (
254 IN EFI_SMBUS_DEVICE_ADDRESS SlaveAddress
,
255 IN EFI_SMBUS_DEVICE_COMMAND Command
,
256 IN EFI_SMBUS_OPERATION Operation
,
265 Save I/O write to boot script
269 TableName - Desired boot script table
271 (Standard EFI Smbus execute script parameter)
275 EFI_NOT_FOUND - BootScriptSave Protocol not exist.
277 EFI_STATUS - BootScriptSave Protocol exist, always returns EFI_SUCCESS
280 // GC_TODO: SlaveAddress - add argument and description to function comment
281 // GC_TODO: Command - add argument and description to function comment
282 // GC_TODO: Operation - add argument and description to function comment
283 // GC_TODO: PecCheck - add argument and description to function comment
284 // GC_TODO: Length - add argument and description to function comment
285 // GC_TODO: Buffer - add argument and description to function comment
292 BootScriptSaveStall (
300 Save I/O write to boot script
304 TableName - Desired boot script table
306 (Standard EFI stall script parameter)
310 EFI_NOT_FOUND - BootScriptSave Protocol not exist.
312 EFI_STATUS - BootScriptSave Protocol exist, always returns EFI_SUCCESS
315 // GC_TODO: Duration - add argument and description to function comment
322 BootScriptSaveDispatch2 (
324 IN EFI_PHYSICAL_ADDRESS EntryPoint
,
325 IN EFI_PHYSICAL_ADDRESS Context
331 GC_TODO: Add function description
335 TableName - GC_TODO: add argument description
336 EntryPoint - GC_TODO: add argument description
340 EFI_NOT_FOUND - GC_TODO: Add description for return value
341 EFI_SUCCESS - GC_TODO: Add description for return value
350 BootScriptSaveInformation (
353 IN EFI_PHYSICAL_ADDRESS Buffer
359 GC_TODO: Add function description
363 TableName - GC_TODO: add argument description
364 EntryPoint - GC_TODO: add argument description
368 EFI_NOT_FOUND - GC_TODO: Add description for return value
369 EFI_SUCCESS - GC_TODO: Add description for return value
378 BootScriptSaveInformationUnicodeString (
380 IN CONST CHAR16
*String
386 Save unicode string information specified by Buffer to
387 boot script with opcode EFI_BOOT_SCRIPT_INFORMATION_OPCODE
391 TableName - Desired boot script table
393 FfsName - The file name of the code to be dispatched.
395 Context - The data that will be passed into code.
397 ParentHandle - The caller's image handle.
401 EFI_NOT_FOUND - BootScriptSave Protocol not exist.
403 EFI_STATUS - BootScriptSave Protocol exist, always returns EFI_SUCCESS
412 BootScriptSaveInformationAsciiString (
414 IN CONST CHAR8
*String
420 Save ASCII string information specified by Buffer to
421 boot script with opcode EFI_BOOT_SCRIPT_INFORMATION_OPCODE
425 TableName - Desired boot script table
427 FfsName - The file name of the code to be dispatched.
429 Context - The data that will be passed into code.
431 ParentHandle - The caller's image handle.
435 EFI_NOT_FOUND - BootScriptSave Protocol not exist.
437 EFI_STATUS - BootScriptSave Protocol exist, always returns EFI_SUCCESS
447 BootScriptSaveDispatch (
449 IN EFI_PHYSICAL_ADDRESS EntryPoint
455 GC_TODO: Add function description
459 TableName - GC_TODO: add argument description
460 EntryPoint - GC_TODO: add argument description
464 EFI_NOT_FOUND - GC_TODO: Add description for return value
465 EFI_SUCCESS - GC_TODO: Add description for return value
474 BootScriptSaveDispatch2Image (
476 IN EFI_GUID
*FfsName
,
477 IN EFI_PHYSICAL_ADDRESS Context
,
478 IN EFI_HANDLE ParentHandle
484 Save dispatching specified arbitrary code to boot script with opcode
485 EFI_BOOT_SCRIPT_DISPATCH_OPCODE
489 TableName - Desired boot script table
491 FfsName - The file name of the code to be dispatched.
493 Context - The data that will be passed into code.
495 ParentHandle - The caller's image handle.
499 EFI_NOT_FOUND - BootScriptSave Protocol not exist.
501 EFI_STATUS - BootScriptSave Protocol exist, always returns EFI_SUCCESS