]> git.proxmox.com Git - mirror_edk2.git/blame - MdePkg/Include/Library/S3BootScriptLib.h
MdePkg: Add S3 library interfaces and base implementations
[mirror_edk2.git] / MdePkg / Include / Library / S3BootScriptLib.h
CommitLineData
fe69ac84 1/** @file \r
2 Defines library APIs used by modules to save EFI Boot Script Opcodes. \r
3 These OpCode will be restored by S3 related modules. \r
4 Note that some of the API defined in the Library class may not \r
5 be provided in the Framework version library instance, which means some of these \r
6 APIs cannot be used if the underlying firmware is Framework and not PI.\r
7\r
8 Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>\r
9\r
10 This program and the accompanying materials\r
11 are licensed and made available under the terms and conditions\r
12 of the BSD License which accompanies this distribution. The\r
13 full text of the license may be found at\r
14 http://opensource.org/licenses/bsd-license.php\r
15\r
16 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
17 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
18\r
19**/\r
20\r
21#ifndef _S3_BOOT_SCRIPT_LIB_H_\r
22#define _S3_BOOT_SCRIPT_LIB_H_\r
23\r
24#include <Library/BaseLib.h>\r
25#include <IndustryStandard/SmBus.h>\r
26\r
27/**\r
28 Macro that converts PCI Bus, PCI Device, PCI Function and PCI Register to an\r
29 address that can be passed to the S3 Boot Script Library PCI functions.\r
30\r
31 @param Bus PCI Bus number. Range 0..255.\r
32 @param Device PCI Device number. Range 0..31.\r
33 @param Function PCI Function number. Range 0..7.\r
34 @param Register PCI Register number. Range 0..255 for PCI. Range 0..4095\r
35 for PCI Express.\r
36\r
37 @return The encoded PCI address.\r
38\r
39**/\r
40#define S3_BOOT_SCRIPT_LIB_PCI_ADDRESS(Bus,Device,Function,Register) \\r
41 (UINT64) ( \\r
42 (((UINTN) Bus) << 24) | \\r
43 (((UINTN) Device) << 16) | \\r
44 (((UINTN) Function) << 8) | \\r
45 (((UINTN) (Register)) < 256 ? ((UINTN) (Register)) : (UINT64) (LShiftU64 ((UINT64) (Register), 32))))\r
46 \r
47///\r
48/// S3 Boot Script Width.\r
49///\r
50typedef enum {\r
51 S3BootScriptWidthUint8, ///< 8-bit operation.\r
52 S3BootScriptWidthUint16, ///< 16-bit operation.\r
53 S3BootScriptWidthUint32, ///< 32-bit operation. \r
54 S3BootScriptWidthUint64, ///< 64-bit operation.\r
55 S3BootScriptWidthFifoUint8, ///< 8-bit FIFO operation.\r
56 S3BootScriptWidthFifoUint16, ///< 16-bit FIFO operation.\r
57 S3BootScriptWidthFifoUint32, ///< 32-bit FIFO operation.\r
58 S3BootScriptWidthFifoUint64, ///< 64-bit FIFO operation.\r
59 S3BootScriptWidthFillUint8, ///< 8-bit Fill operation.\r
60 S3BootScriptWidthFillUint16, ///< 16-bit Fill operation.\r
61 S3BootScriptWidthFillUint32, ///< 32-bit Fill operation.\r
62 S3BootScriptWidthFillUint64, ///< 64-bit Fill operation.\r
63 S3BootScriptWidthMaximum\r
64} S3_BOOT_SCRIPT_LIB_WIDTH;\r
65\r
66/**\r
67 Save I/O write to boot script.\r
68\r
69 @param[in] Width The width of the I/O operations.\r
70 @param[in] Address The base address of the I/O operations.\r
71 @param[in] Count The number of I/O operations to perform.\r
72 @param[in] Buffer The source buffer from which to write data.\r
73\r
74 @retval RETURN_OUT_OF_RESOURCES Not enough memory for the table to perform \r
75 the operation.\r
76 @retval RETURN_SUCCESS The opcode was added.\r
77\r
78**/\r
79RETURN_STATUS\r
80EFIAPI\r
81S3BootScriptSaveIoWrite (\r
82 IN S3_BOOT_SCRIPT_LIB_WIDTH Width,\r
83 IN UINT64 Address,\r
84 IN UINTN Count,\r
85 IN VOID *Buffer\r
86 );\r
87\r
88/**\r
89 Adds a record for an I/O modify operation into a S3 boot script table.\r
90\r
91 @param[in] Width The width of the I/O operations.\r
92 @param[in] Address The base address of the I/O operations.\r
93 @param[in] Data A pointer to the data to be OR-ed.\r
94 @param[in] DataMask A pointer to the data mask to be AND-ed with the data\r
95 read from the register.\r
96\r
97 @retval RETURN_OUT_OF_RESOURCES Not enough memory for the table to perform \r
98 the operation.\r
99 @retval RETURN_SUCCESS The opcode was added.\r
100\r
101**/\r
102RETURN_STATUS\r
103EFIAPI\r
104S3BootScriptSaveIoReadWrite (\r
105 IN S3_BOOT_SCRIPT_LIB_WIDTH Width,\r
106 IN UINT64 Address,\r
107 IN VOID *Data,\r
108 IN VOID *DataMask\r
109 );\r
110\r
111/**\r
112 Adds a record for a memory write operation into a specified boot script table.\r
113\r
114 @param[in] Width The width of the I/O operations.\r
115 @param[in] Address The base address of the memory operations\r
116 @param[in] Count The number of memory operations to perform.\r
117 @param[in] Buffer The source buffer from which to write the data.\r
118\r
119 @retval RETURN_OUT_OF_RESOURCES Not enough memory for the table to perform \r
120 the operation.\r
121 @retval RETURN_SUCCESS The opcode was added.\r
122**/\r
123RETURN_STATUS\r
124EFIAPI\r
125S3BootScriptSaveMemWrite (\r
126 IN S3_BOOT_SCRIPT_LIB_WIDTH Width,\r
127 IN UINT64 Address,\r
128 IN UINTN Count,\r
129 IN VOID *Buffer\r
130 );\r
131\r
132/**\r
133 Adds a record for a memory modify operation into a specified boot script table.\r
134\r
135 @param[in] Width The width of the I/O operations.\r
136 @param[in] Address The base address of the memory operations. Address needs \r
137 alignment, if required\r
138 @param[in] Data A pointer to the data to be OR-ed.\r
139 @param[in] DataMask A pointer to the data mask to be AND-ed with the data \r
140 read from the register.\r
141\r
142 @retval RETURN_OUT_OF_RESOURCES Not enough memory for the table to perform \r
143 the operation.\r
144 @retval RETURN_SUCCESS The opcode was added.\r
145**/\r
146RETURN_STATUS\r
147EFIAPI\r
148S3BootScriptSaveMemReadWrite (\r
149 IN S3_BOOT_SCRIPT_LIB_WIDTH Width,\r
150 IN UINT64 Address,\r
151 IN VOID *Data,\r
152 IN VOID *DataMask\r
153 );\r
154\r
155/**\r
156 Adds a record for a PCI configuration space write operation into a specified boot script table.\r
157\r
158 @param[in] Width The width of the I/O operations.\r
159 @param[in] Address The address within the PCI configuration space.\r
160 @param[in] Count The number of PCI operations to perform.\r
161 @param[in] Buffer The source buffer from which to write the data.\r
162\r
163 @retval RETURN_OUT_OF_RESOURCES Not enough memory for the table to perform \r
164 the operation.\r
165 @retval RETURN_SUCCESS The opcode was added.\r
166**/\r
167RETURN_STATUS\r
168EFIAPI\r
169S3BootScriptSavePciCfgWrite (\r
170 IN S3_BOOT_SCRIPT_LIB_WIDTH Width,\r
171 IN UINT64 Address,\r
172 IN UINTN Count,\r
173 IN VOID *Buffer\r
174 );\r
175\r
176/**\r
177 Adds a record for a PCI configuration space modify operation into a specified boot script table.\r
178\r
179 @param[in] Width The width of the I/O operations.\r
180 @param[in] Address The address within the PCI configuration space.\r
181 @param[in] Data A pointer to the data to be OR-ed.The size depends on Width.\r
182 @param[in] DataMask A pointer to the data mask to be AND-ed.\r
183\r
184 @retval RETURN_OUT_OF_RESOURCES Not enough memory for the table to perform \r
185 the operation.\r
186 @retval RETURN__SUCCESS The opcode was added.\r
187**/\r
188RETURN_STATUS\r
189EFIAPI\r
190S3BootScriptSavePciCfgReadWrite (\r
191 IN S3_BOOT_SCRIPT_LIB_WIDTH Width,\r
192 IN UINT64 Address,\r
193 IN VOID *Data,\r
194 IN VOID *DataMask\r
195 );\r
196\r
197/**\r
198 Adds a record for a PCI configuration space modify operation into a specified boot script table.\r
199\r
200 @param[in] Width The width of the I/O operations.\r
201 @param[in] Segment The PCI segment number for Address.\r
202 @param[in] Address The address within the PCI configuration space.\r
203 @param[in] Count The number of PCI operations to perform.\r
204 @param[in] Buffer The source buffer from which to write the data.\r
205\r
206 @retval RETURN_OUT_OF_RESOURCES Not enough memory for the table to perform \r
207 the operation.\r
208 @retval RETURN_SUCCESS The opcode was added.\r
209**/\r
210RETURN_STATUS\r
211EFIAPI\r
212S3BootScriptSavePciCfg2Write (\r
213 IN S3_BOOT_SCRIPT_LIB_WIDTH Width,\r
214 IN UINT16 Segment,\r
215 IN UINT64 Address,\r
216 IN UINTN Count,\r
217 IN VOID *Buffer\r
218 );\r
219\r
220/**\r
221 Adds a record for a PCI configuration space modify operation into a specified boot script table.\r
222\r
223 @param[in] Width The width of the I/O operations.\r
224 @param[in] Segment The PCI segment number for Address.\r
225 @param[in] Address The address within the PCI configuration space.\r
226 @param[in] Data A pointer to the data to be OR-ed. The size depends on Width.\r
227 @param[in] DataMask A pointer to the data mask to be AND-ed.\r
228\r
229 @retval RETURN_OUT_OF_RESOURCES Not enough memory for the table to perform \r
230 the operation.\r
231 @retval RETURN_SUCCESS The opcode was added.\r
232**/\r
233RETURN_STATUS\r
234EFIAPI\r
235S3BootScriptSavePciCfg2ReadWrite (\r
236 IN S3_BOOT_SCRIPT_LIB_WIDTH Width,\r
237 IN UINT16 Segment,\r
238 IN UINT64 Address,\r
239 IN VOID *Data,\r
240 IN VOID *DataMask\r
241 );\r
242\r
243/**\r
244 Adds a record for an SMBus command execution into a specified boot script table.\r
245\r
246 @param[in] SmBusAddress Address that encodes the SMBUS Slave Address, SMBUS \r
247 Command, SMBUS Data Length, and PEC.\r
248 @param[in] Operation Indicates which particular SMBus protocol it will use \r
249 to execute the SMBus transactions.\r
250 @param[in] Length A pointer to signify the number of bytes that this \r
251 operation will do.\r
252 @param[in] Buffer Contains the value of data to execute to the SMBUS \r
253 slave device.\r
254 \r
255 @retval RETURN_OUT_OF_RESOURCES Not enough memory for the table to perform \r
256 the operation.\r
257 @retval RETURN_SUCCESS The opcode was added.\r
258**/\r
259RETURN_STATUS\r
260EFIAPI\r
261S3BootScriptSaveSmbusExecute (\r
262 IN UINTN SmBusAddress, \r
263 IN EFI_SMBUS_OPERATION Operation,\r
264 IN UINTN *Length,\r
265 IN VOID *Buffer\r
266 );\r
267\r
268/**\r
269 Adds a record for an execution stall on the processor into a specified boot script table.\r
270\r
271 @param[in] Duration The duration in microseconds of the stall.\r
272 \r
273 @retval RETURN_OUT_OF_RESOURCES Not enough memory for the table to perform \r
274 the operation.\r
275 @retval RETURN_SUCCESS The opcode was added.\r
276**/\r
277RETURN_STATUS\r
278EFIAPI\r
279S3BootScriptSaveStall (\r
280 IN UINTN Duration\r
281 );\r
282\r
283/**\r
284 Adds a record for an execution stall on the processor into a specified boot script table.\r
285\r
286 @param[in] EntryPoint The entry point of the code to be dispatched.\r
287 @param[in] Context The argument to be passed into the EntryPoint of the code \r
288 to be dispatched.\r
289 \r
290 @retval RETURN_OUT_OF_RESOURCES Not enough memory for the table to perform \r
291 the operation.\r
292 @retval RETURN_SUCCESS The opcode was added.\r
293**/\r
294RETURN_STATUS\r
295EFIAPI\r
296S3BootScriptSaveDispatch2 (\r
297 IN VOID *EntryPoint,\r
298 IN VOID *Context\r
299 );\r
300\r
301/**\r
302 Adds a record for dispatching specified arbitrary code into a specified boot script table.\r
303\r
304 @param[in] EntryPoint The entry point of the code to be dispatched.\r
305 \r
306 @retval RETURN_OUT_OF_RESOURCES Not enough memory for the table to perform \r
307 the operation.\r
308 @retval RETURN_SUCCESS The opcode was added.\r
309**/\r
310RETURN_STATUS\r
311EFIAPI\r
312S3BootScriptSaveDispatch (\r
313 IN VOID *EntryPoint\r
314 );\r
315\r
316/**\r
317 Adds a record for memory reads of the memory location and continues when the exit \r
318 criteria is satisfied, or after a defined duration.\r
319 \r
320 @param[in] Width The width of the memory operations.\r
321 @param[in] Address The base address of the memory operations.\r
322 @param[in] BitMask A pointer to the bit mask to be AND-ed with the data read \r
323 from the register.\r
324 @param[in] BitValue A pointer to the data value after to be Masked.\r
325 @param[in] Duration The duration in microseconds of the stall.\r
326 @param[in] LoopTimes The times of the register polling.\r
327\r
328 @retval RETURN_OUT_OF_RESOURCES Not enough memory for the table to perform \r
329 the operation.\r
330 @retval RETURN_SUCCESS The opcode was added.\r
331\r
332**/\r
333RETURN_STATUS\r
334EFIAPI\r
335S3BootScriptSaveMemPoll (\r
336 IN S3_BOOT_SCRIPT_LIB_WIDTH Width,\r
337 IN UINT64 Address,\r
338 IN VOID *BitMask,\r
339 IN VOID *BitValue,\r
340 IN UINTN Duration,\r
341 IN UINTN LoopTimes\r
342 );\r
343\r
344/**\r
345 Store arbitrary information in the boot script table. This opcode is a no-op on \r
346 dispatch and is only used for debugging script issues.\r
347 \r
348 @param[in] InformationLength Length of the data in bytes\r
349 @param[in] Information Information to be logged in the boot scrpit\r
350 \r
351 @retval RETURN_UNSUPPORTED In runtime, this method is not supported.\r
352 @retval RETURN_OUT_OF_RESOURCES Not enough memory for the table to perform \r
353 the operation.\r
354 @retval RETURN_SUCCESS The opcode was added.\r
355\r
356**/\r
357RETURN_STATUS\r
358EFIAPI\r
359S3BootScriptSaveInformation (\r
360 IN UINT32 InformationLength, \r
361 IN VOID *Information\r
362 );\r
363/**\r
364 Adds a record for I/O reads the I/O location and continues when the exit criteria\r
365 is satisfied, or after a defined duration.\r
366 \r
367 @param Width The width of the I/O operations. \r
368 @param Address The base address of the I/O operations.\r
369 @param Data The comparison value used for the polling exit criteria.\r
370 @param DataMask The mask used for the polling criteria. The bits in \r
371 the bytes below Width which are zero in Data are \r
372 ignored when polling the memory address.\r
373 @param Delay The number of 100ns units to poll. Note that timer \r
374 available may be of insufficient granularity, so the \r
375 delay may be longer.\r
376\r
377 @retval RETURN_OUT_OF_RESOURCES Not enough memory for the table to perform the \r
378 operation.\r
379 @retval RETURN_SUCCESS The opcode was added.\r
380 @note The FRAMEWORK version implementation does not support this API \r
381**/\r
382RETURN_STATUS\r
383EFIAPI\r
384S3BootScriptSaveIoPoll (\r
385 IN S3_BOOT_SCRIPT_LIB_WIDTH Width,\r
386 IN UINT64 Address,\r
387 IN VOID *Data,\r
388 IN VOID *DataMask, \r
389 IN UINT64 Delay \r
390 );\r
391\r
392/**\r
393 Adds a record for PCI configuration space reads and continues when the exit \r
394 criteria is satisfied ,or after a defined duration.\r
395\r
396 @param Width The width of the I/O operations. \r
397 @param Address The address within the PCI configuration space.\r
398 @param Data The comparison value used for the polling exit \r
399 criteria.\r
400 @param DataMask Mask used for the polling criteria. The bits in \r
401 the bytes below Width which are zero in Data are\r
402 ignored when polling the memory address.\r
403 @param Delay The number of 100ns units to poll. Note that timer \r
404 available may be of insufficient granularity, so the \r
405 delay may be longer.\r
406\r
407 @retval RETURN_OUT_OF_RESOURCES Not enough memory for the table to perform the \r
408 operation.\r
409 @retval RETURN_SUCCESS The opcode was added.\r
410 @note The FRAMEWORK version implementation does not support this API \r
411**/\r
412RETURN_STATUS\r
413EFIAPI\r
414S3BootScriptSavePciPoll (\r
415 IN S3_BOOT_SCRIPT_LIB_WIDTH Width,\r
416 IN UINT64 Address,\r
417 IN VOID *Data,\r
418 IN VOID *DataMask,\r
419 IN UINT64 Delay\r
420 );\r
421/**\r
422 Adds a record for PCI configuration space reads and continues when the exit criteria \r
423 is satisfied, or after a defined duration.\r
424\r
425 @param Width The width of the I/O operations. \r
426 @param Segment The PCI segment number for Address.\r
427 @param Address The address within the PCI configuration space.\r
428 @param Data The comparison value used for the polling exit \r
429 criteria.\r
430 @param DataMask Mask used for the polling criteria. The bits in \r
431 the bytes below Width which are zero\r
432 in Data are ignored when polling the memory address\r
433 @param Delay The number of 100ns units to poll. Note that timer \r
434 available may be of insufficient granularity so the delay \r
435 may be longer.\r
436\r
437 @retval RETURN_OUT_OF_RESOURCES Not enough memory for the table to perform the \r
438 operation.\r
439 @retval RETURN_SUCCESS The opcode was added.\r
440 @note A known Limitations in the implementation: When interpreting the opcode \r
441 EFI_BOOT_SCRIPT_PCI_CONFIG2_WRITE_OPCODE, EFI_BOOT_SCRIPT_PCI_CONFIG2_READ_WRITE_OPCODE\r
442 and EFI_BOOT_SCRIPT_PCI_CONFIG2_POLL_OPCODE, the 'Segment' parameter is assumed as \r
443 Zero, or else, assert.\r
444 The FRAMEWORK version implementation does not support this API.\r
445\r
446**/\r
447RETURN_STATUS\r
448EFIAPI\r
449S3BootScriptSavePci2Poll (\r
450 IN S3_BOOT_SCRIPT_LIB_WIDTH Width,\r
451 IN UINT16 Segment,\r
452 IN UINT64 Address,\r
453 IN VOID *Data,\r
454 IN VOID *DataMask,\r
455 IN UINT64 Delay\r
456 );\r
457/**\r
458 Save ASCII string information specified by Buffer to boot script with opcode \r
459 EFI_BOOT_SCRIPT_INFORMATION_OPCODE.\r
460\r
461 @param[in] String The Null-terminated ASCII string to store into the S3 boot \r
462 script table.\r
463\r
464 @retval RETURN_UNSUPPORTED In runtime, this method is not supported.\r
465 @retval RETURN_OUT_OF_RESOURCES Not enough memory for the table to perform \r
466 the operation.\r
467 @retval RETURN_SUCCESS The opcode was added.\r
468\r
469**/\r
470RETURN_STATUS\r
471EFIAPI\r
472S3BootScriptSaveInformationAsciiString (\r
473 IN CONST CHAR8 *String\r
474 );\r
475\r
476/**\r
477 This is an function to close the S3 boot script table. The function could only \r
478 be called in BOOT time phase. To comply with the Framework spec definition on \r
479 EFI_BOOT_SCRIPT_SAVE_PROTOCOL.CloseTable(), this function will fulfill following things:\r
480 1. Closes the specified boot script table\r
481 2. It allocates a new memory pool to duplicate all the boot scripts in the specified table. \r
482 Once this function is called, the table maintained by the library will be destroyed \r
483 after it is copied into the allocated pool.\r
484 3. Any attempts to add a script record after calling this function will cause a \r
485 new table to be created by the library.\r
486 4. The base address of the allocated pool will be returned in Address. Note that \r
487 after using the boot script table, the CALLER is responsible for freeing the \r
488 pool that is allocated by this function. \r
489\r
490 In Spec PI1.1, this EFI_BOOT_SCRIPT_SAVE_PROTOCOL.CloseTable() is retired. This \r
491 API is supplied here to meet the requirements of the Framework Spec.\r
492 \r
493 If anyone does call CloseTable() on a real platform, then the caller is responsible\r
494 for figuring out how to get the script to run on an S3 resume because the boot script \r
495 maintained by the lib will be destroyed.\r
496 \r
497 @return the base address of the new copy of the boot script tble. \r
498\r
499**/\r
500UINT8*\r
501EFIAPI\r
502S3BootScriptCloseTable (\r
503 VOID\r
504 );\r
505\r
506/**\r
507 Executes the S3 boot script table.\r
508\r
509 @retval RETURN_SUCCESS The boot script table was executed successfully.\r
510 @retval RETURN_UNSUPPORTED Invalid script table or opcode. \r
511\r
512**/\r
513RETURN_STATUS\r
514EFIAPI\r
515S3BootScriptExecute (\r
516 VOID\r
517 );\r
518/**\r
519 Move the last boot script entry to the position \r
520\r
521 @param BeforeOrAfter Specifies whether the opcode is stored before \r
522 (TRUE) or after (FALSE) the positionin the boot \r
523 script table specified by Position. If Position \r
524 is NULL or points to NULL then the new opcode is \r
525 inserted at the beginning of the table (if TRUE) \r
526 or end of the table (if FALSE).\r
527 @param Position On entry, specifies the position in the boot script \r
528 table where the opcode will be inserted, either \r
529 before or after, depending on BeforeOrAfter. On \r
530 exit, specifies the position of the inserted opcode \r
531 in the boot script table.\r
532\r
533 @retval RETURN_OUT_OF_RESOURCES The table is not available.\r
534 @retval RETURN_INVALID_PARAMETER The Position is not a valid position in the \r
535 boot script table.\r
536 @retval RETURN_SUCCESS The opcode was inserted.\r
537 @note The FRAMEWORK version implementation does not support this API. \r
538**/\r
539RETURN_STATUS\r
540EFIAPI\r
541S3BootScriptMoveLastOpcode (\r
542 IN BOOLEAN BeforeOrAfter,\r
543 IN OUT VOID **Position OPTIONAL\r
544 );\r
545/**\r
546 Find a label within the boot script table and, if not present, optionally create it.\r
547\r
548 @param BeforeOrAfter Specifies whether the opcode is stored before (TRUE)\r
549 or after (FALSE) the position in the boot script table \r
550 specified by Position.\r
551 @param CreateIfNotFound Specifies whether the label will be created if the \r
552 label does not exists (TRUE) or not (FALSE).\r
553 @param Position On entry, specifies the position in the boot script \r
554 table where the opcode will be inserted, either \r
555 before or after, depending on BeforeOrAfter. On exit, \r
556 specifies the positionof the inserted opcode in \r
557 the boot script table.\r
558 @param Label Points to the label which will be inserted in the \r
559 boot script table.\r
560 @retval EFI_SUCCESS The operation succeeded. A record was added into \r
561 the specified script table.\r
562 @retval EFI_INVALID_PARAMETER The parameter is illegal or the given boot script \r
563 is not supported. If the opcode is unknow or not \r
564 supported because of the PCD Feature Flags.\r
565 @retval EFI_OUT_OF_RESOURCES There is insufficient memory to store the boot script.\r
566 @note The FRAMEWORK version implementation does not support this API \r
567\r
568**/\r
569RETURN_STATUS\r
570EFIAPI \r
571S3BootScriptLabel (\r
572 IN BOOLEAN BeforeOrAfter,\r
573 IN BOOLEAN CreateIfNotFound,\r
574 IN OUT VOID **Position OPTIONAL,\r
575 IN CONST CHAR8 *Label\r
576 );\r
577/**\r
578 Compare two positions in the boot script table and return their relative position.\r
579 @param Position1 The positions in the boot script table to compare\r
580 @param Position2 The positions in the boot script table to compare\r
581 @param RelativePosition On return, points to the result of the comparison\r
582\r
583 @retval EFI_SUCCESS The operation succeeded. A record was added into the\r
584 specified script table.\r
585 @retval EFI_INVALID_PARAMETER The parameter is illegal or the given boot script \r
586 is not supported. If the opcode is unknow or not s\r
587 upported because of the PCD Feature Flags.\r
588 @retval EFI_OUT_OF_RESOURCES There is insufficient memory to store the boot script.\r
589 @note The FRAMEWORK version implementation does not support this API \r
590**/\r
591RETURN_STATUS\r
592EFIAPI \r
593S3BootScriptCompare (\r
594 IN UINT8 *Position1,\r
595 IN UINT8 *Position2,\r
596 OUT UINTN *RelativePosition\r
597 );\r
598\r
599#endif\r