]> git.proxmox.com Git - mirror_edk2.git/blame - MdePkg/Include/Library/S3BootScriptLib.h
Add processor family 2 definition in SMBIOS header file.
[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
300f2c6a 8 Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>\r
fe69ac84 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
300f2c6a 284 Adds a record for dispatching specified arbitrary code into a specified boot script table.\r
fe69ac84 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
fe69ac84 351 @retval RETURN_OUT_OF_RESOURCES Not enough memory for the table to perform \r
352 the operation.\r
353 @retval RETURN_SUCCESS The opcode was added.\r
354\r
355**/\r
356RETURN_STATUS\r
357EFIAPI\r
358S3BootScriptSaveInformation (\r
359 IN UINT32 InformationLength, \r
360 IN VOID *Information\r
361 );\r
362/**\r
363 Adds a record for I/O reads the I/O location and continues when the exit criteria\r
364 is satisfied, or after a defined duration.\r
365 \r
366 @param Width The width of the I/O operations. \r
367 @param Address The base address of the I/O operations.\r
368 @param Data The comparison value used for the polling exit criteria.\r
369 @param DataMask The mask used for the polling criteria. The bits in \r
370 the bytes below Width which are zero in Data are \r
371 ignored when polling the memory address.\r
372 @param Delay The number of 100ns units to poll. Note that timer \r
373 available may be of insufficient granularity, so the \r
374 delay may be longer.\r
375\r
376 @retval RETURN_OUT_OF_RESOURCES Not enough memory for the table to perform the \r
377 operation.\r
378 @retval RETURN_SUCCESS The opcode was added.\r
379 @note The FRAMEWORK version implementation does not support this API \r
380**/\r
381RETURN_STATUS\r
382EFIAPI\r
383S3BootScriptSaveIoPoll (\r
384 IN S3_BOOT_SCRIPT_LIB_WIDTH Width,\r
385 IN UINT64 Address,\r
386 IN VOID *Data,\r
387 IN VOID *DataMask, \r
388 IN UINT64 Delay \r
389 );\r
390\r
391/**\r
392 Adds a record for PCI configuration space reads and continues when the exit \r
393 criteria is satisfied ,or after a defined duration.\r
394\r
395 @param Width The width of the I/O operations. \r
396 @param Address The address within the PCI configuration space.\r
397 @param Data The comparison value used for the polling exit \r
398 criteria.\r
399 @param DataMask Mask used for the polling criteria. The bits in \r
400 the bytes below Width which are zero in Data are\r
401 ignored when polling the memory address.\r
402 @param Delay The number of 100ns units to poll. Note that timer \r
403 available may be of insufficient granularity, so the \r
404 delay may be longer.\r
405\r
406 @retval RETURN_OUT_OF_RESOURCES Not enough memory for the table to perform the \r
407 operation.\r
408 @retval RETURN_SUCCESS The opcode was added.\r
409 @note The FRAMEWORK version implementation does not support this API \r
410**/\r
411RETURN_STATUS\r
412EFIAPI\r
413S3BootScriptSavePciPoll (\r
414 IN S3_BOOT_SCRIPT_LIB_WIDTH Width,\r
415 IN UINT64 Address,\r
416 IN VOID *Data,\r
417 IN VOID *DataMask,\r
418 IN UINT64 Delay\r
419 );\r
420/**\r
421 Adds a record for PCI configuration space reads and continues when the exit criteria \r
422 is satisfied, or after a defined duration.\r
423\r
424 @param Width The width of the I/O operations. \r
425 @param Segment The PCI segment number for Address.\r
426 @param Address The address within the PCI configuration space.\r
427 @param Data The comparison value used for the polling exit \r
428 criteria.\r
429 @param DataMask Mask used for the polling criteria. The bits in \r
430 the bytes below Width which are zero\r
431 in Data are ignored when polling the memory address\r
432 @param Delay The number of 100ns units to poll. Note that timer \r
433 available may be of insufficient granularity so the delay \r
434 may be longer.\r
435\r
436 @retval RETURN_OUT_OF_RESOURCES Not enough memory for the table to perform the \r
437 operation.\r
438 @retval RETURN_SUCCESS The opcode was added.\r
439 @note A known Limitations in the implementation: When interpreting the opcode \r
440 EFI_BOOT_SCRIPT_PCI_CONFIG2_WRITE_OPCODE, EFI_BOOT_SCRIPT_PCI_CONFIG2_READ_WRITE_OPCODE\r
441 and EFI_BOOT_SCRIPT_PCI_CONFIG2_POLL_OPCODE, the 'Segment' parameter is assumed as \r
442 Zero, or else, assert.\r
443 The FRAMEWORK version implementation does not support this API.\r
444\r
445**/\r
446RETURN_STATUS\r
447EFIAPI\r
448S3BootScriptSavePci2Poll (\r
449 IN S3_BOOT_SCRIPT_LIB_WIDTH Width,\r
450 IN UINT16 Segment,\r
451 IN UINT64 Address,\r
452 IN VOID *Data,\r
453 IN VOID *DataMask,\r
454 IN UINT64 Delay\r
455 );\r
456/**\r
457 Save ASCII string information specified by Buffer to boot script with opcode \r
458 EFI_BOOT_SCRIPT_INFORMATION_OPCODE.\r
459\r
460 @param[in] String The Null-terminated ASCII string to store into the S3 boot \r
461 script table.\r
462\r
fe69ac84 463 @retval RETURN_OUT_OF_RESOURCES Not enough memory for the table to perform \r
464 the operation.\r
465 @retval RETURN_SUCCESS The opcode was added.\r
466\r
467**/\r
468RETURN_STATUS\r
469EFIAPI\r
470S3BootScriptSaveInformationAsciiString (\r
471 IN CONST CHAR8 *String\r
472 );\r
473\r
474/**\r
475 This is an function to close the S3 boot script table. The function could only \r
476 be called in BOOT time phase. To comply with the Framework spec definition on \r
477 EFI_BOOT_SCRIPT_SAVE_PROTOCOL.CloseTable(), this function will fulfill following things:\r
478 1. Closes the specified boot script table\r
479 2. It allocates a new memory pool to duplicate all the boot scripts in the specified table. \r
480 Once this function is called, the table maintained by the library will be destroyed \r
481 after it is copied into the allocated pool.\r
482 3. Any attempts to add a script record after calling this function will cause a \r
483 new table to be created by the library.\r
484 4. The base address of the allocated pool will be returned in Address. Note that \r
485 after using the boot script table, the CALLER is responsible for freeing the \r
486 pool that is allocated by this function. \r
487\r
488 In Spec PI1.1, this EFI_BOOT_SCRIPT_SAVE_PROTOCOL.CloseTable() is retired. This \r
489 API is supplied here to meet the requirements of the Framework Spec.\r
490 \r
491 If anyone does call CloseTable() on a real platform, then the caller is responsible\r
492 for figuring out how to get the script to run on an S3 resume because the boot script \r
493 maintained by the lib will be destroyed.\r
494 \r
495 @return the base address of the new copy of the boot script tble. \r
496\r
497**/\r
498UINT8*\r
499EFIAPI\r
500S3BootScriptCloseTable (\r
501 VOID\r
502 );\r
503\r
504/**\r
505 Executes the S3 boot script table.\r
506\r
507 @retval RETURN_SUCCESS The boot script table was executed successfully.\r
508 @retval RETURN_UNSUPPORTED Invalid script table or opcode. \r
509\r
510**/\r
511RETURN_STATUS\r
512EFIAPI\r
513S3BootScriptExecute (\r
514 VOID\r
515 );\r
516/**\r
517 Move the last boot script entry to the position \r
518\r
519 @param BeforeOrAfter Specifies whether the opcode is stored before \r
520 (TRUE) or after (FALSE) the positionin the boot \r
521 script table specified by Position. If Position \r
522 is NULL or points to NULL then the new opcode is \r
523 inserted at the beginning of the table (if TRUE) \r
524 or end of the table (if FALSE).\r
525 @param Position On entry, specifies the position in the boot script \r
526 table where the opcode will be inserted, either \r
527 before or after, depending on BeforeOrAfter. On \r
528 exit, specifies the position of the inserted opcode \r
529 in the boot script table.\r
530\r
531 @retval RETURN_OUT_OF_RESOURCES The table is not available.\r
532 @retval RETURN_INVALID_PARAMETER The Position is not a valid position in the \r
533 boot script table.\r
534 @retval RETURN_SUCCESS The opcode was inserted.\r
535 @note The FRAMEWORK version implementation does not support this API. \r
536**/\r
537RETURN_STATUS\r
538EFIAPI\r
539S3BootScriptMoveLastOpcode (\r
540 IN BOOLEAN BeforeOrAfter,\r
541 IN OUT VOID **Position OPTIONAL\r
542 );\r
543/**\r
544 Find a label within the boot script table and, if not present, optionally create it.\r
545\r
546 @param BeforeOrAfter Specifies whether the opcode is stored before (TRUE)\r
547 or after (FALSE) the position in the boot script table \r
548 specified by Position.\r
549 @param CreateIfNotFound Specifies whether the label will be created if the \r
550 label does not exists (TRUE) or not (FALSE).\r
551 @param Position On entry, specifies the position in the boot script \r
552 table where the opcode will be inserted, either \r
553 before or after, depending on BeforeOrAfter. On exit, \r
554 specifies the positionof the inserted opcode in \r
555 the boot script table.\r
556 @param Label Points to the label which will be inserted in the \r
557 boot script table.\r
558 @retval EFI_SUCCESS The operation succeeded. A record was added into \r
559 the specified script table.\r
560 @retval EFI_INVALID_PARAMETER The parameter is illegal or the given boot script \r
561 is not supported. If the opcode is unknow or not \r
562 supported because of the PCD Feature Flags.\r
563 @retval EFI_OUT_OF_RESOURCES There is insufficient memory to store the boot script.\r
564 @note The FRAMEWORK version implementation does not support this API \r
565\r
566**/\r
567RETURN_STATUS\r
568EFIAPI \r
569S3BootScriptLabel (\r
570 IN BOOLEAN BeforeOrAfter,\r
571 IN BOOLEAN CreateIfNotFound,\r
572 IN OUT VOID **Position OPTIONAL,\r
573 IN CONST CHAR8 *Label\r
574 );\r
575/**\r
576 Compare two positions in the boot script table and return their relative position.\r
577 @param Position1 The positions in the boot script table to compare\r
578 @param Position2 The positions in the boot script table to compare\r
579 @param RelativePosition On return, points to the result of the comparison\r
580\r
581 @retval EFI_SUCCESS The operation succeeded. A record was added into the\r
582 specified script table.\r
583 @retval EFI_INVALID_PARAMETER The parameter is illegal or the given boot script \r
584 is not supported. If the opcode is unknow or not s\r
585 upported because of the PCD Feature Flags.\r
586 @retval EFI_OUT_OF_RESOURCES There is insufficient memory to store the boot script.\r
587 @note The FRAMEWORK version implementation does not support this API \r
588**/\r
589RETURN_STATUS\r
590EFIAPI \r
591S3BootScriptCompare (\r
592 IN UINT8 *Position1,\r
593 IN UINT8 *Position2,\r
594 OUT UINTN *RelativePosition\r
595 );\r
596\r
597#endif\r