]> git.proxmox.com Git - mirror_edk2.git/blob - IntelFrameworkPkg/Include/Protocol/BootScriptSave.h
0a9976f49a98cf10b0408c9918e52adee429aadf
[mirror_edk2.git] / IntelFrameworkPkg / Include / Protocol / BootScriptSave.h
1 /** @file
2 This protocol is used to store or record various boot scripts into boot
3 script tables.
4
5 Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>
6 SPDX-License-Identifier: BSD-2-Clause-Patent
7
8 @par Revision Reference:
9 This protocol defined in the Boot Script Specification, Version 0.91.
10
11 **/
12
13 #ifndef _BOOT_SCRIPT_SAVE_PROTOCOL_H_
14 #define _BOOT_SCRIPT_SAVE_PROTOCOL_H_
15
16 ///
17 /// S3 Save Protocol GUID.
18 ///
19 #define EFI_BOOT_SCRIPT_SAVE_PROTOCOL_GUID \
20 { \
21 0x470e1529, 0xb79e, 0x4e32, {0xa0, 0xfe, 0x6a, 0x15, 0x6d, 0x29, 0xf9, 0xb2 } \
22 }
23
24 typedef struct _EFI_BOOT_SCRIPT_SAVE_PROTOCOL EFI_BOOT_SCRIPT_SAVE_PROTOCOL;
25
26 /**
27 Adds a record into a specified Framework boot script table.
28
29 @param This A pointer to the EFI_BOOT_SCRIPT_SAVE_PROTOCOL instance.
30 @param TableName The name of the script table. Currently, the only meaningful
31 value is EFI_ACPI_S3_RESUME_SCRIPT_TABLE.
32 @param OpCode The operation code (opcode) number.
33 @param ... The argument list that is specific to each opcode.
34
35 @retval EFI_SUCCESS The operation succeeded. A record was added into the specified script table.
36 @retval EFI_INVALID_PARAMETER The parameter is illegal, or the given boot script is not supported.
37 @retval EFI_OUT_OF_RESOURCES There is insufficient memory to store the boot script.
38
39 **/
40 typedef
41 EFI_STATUS
42 (EFIAPI *EFI_BOOT_SCRIPT_WRITE)(
43 IN EFI_BOOT_SCRIPT_SAVE_PROTOCOL *This,
44 IN UINT16 TableName,
45 IN UINT16 OpCode,
46 ...
47 );
48
49 /**
50 Closes the specified script table.
51
52 @param This A pointer to the EFI_BOOT_SCRIPT_SAVE_PROTOCOL instance.
53 @param TableName The name of the script table.
54 @param Address A pointer to the physical address where the table begins.
55
56 @retval EFI_SUCCESS The table was successfully returned.
57 @retval EFI_NOT_FOUND The specified table was not created previously.
58 @retval EFI_OUT_OF_RESOURCES Memory is insufficient to hold the reorganized boot script table.
59
60 **/
61 typedef
62 EFI_STATUS
63 (EFIAPI *EFI_BOOT_SCRIPT_CLOSE_TABLE)(
64 IN EFI_BOOT_SCRIPT_SAVE_PROTOCOL *This,
65 IN UINT16 TableName,
66 OUT EFI_PHYSICAL_ADDRESS *Address
67 );
68
69 ///
70 /// The EFI_BOOT_SCRIPT_SAVE_PROTOCOL publishes the Framework boot script abstractions
71 /// to store or record various boot scripts into boot script tables.
72 ///
73 struct _EFI_BOOT_SCRIPT_SAVE_PROTOCOL {
74 EFI_BOOT_SCRIPT_WRITE Write; ///< Writes various boot scripts to a boot script table.
75 EFI_BOOT_SCRIPT_CLOSE_TABLE CloseTable; ///< Retrieves and closes a script table.
76 };
77
78 extern EFI_GUID gEfiBootScriptSaveProtocolGuid;
79
80 #endif