]> git.proxmox.com Git - mirror_edk2.git/blob - IntelFrameworkPkg/Include/Protocol/BootScriptSave.h
get the multiple phase definition by including the Bootscript Ppi definition.
[mirror_edk2.git] / IntelFrameworkPkg / Include / Protocol / BootScriptSave.h
1 /** @file
2 Definition of the Boot Script Save protocol.
3
4 Copyright (c) 2007, Intel Corporation
5 All rights reserved. This program and the accompanying materials
6 are licensed and made available under the terms and conditions of the BSD License
7 which accompanies this distribution. The full text of the license may be found at
8 http://opensource.org/licenses/bsd-license.php
9
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
12
13 Module Name: BootScriptSave.h
14
15 @par Revision Reference:
16 This protocol defined in the Boot Script Specification, Version 0.91.
17
18 **/
19
20 #ifndef _BOOT_SCRIPT_SAVE_PROTOCOL_H
21 #define _BOOT_SCRIPT_SAVE_PROTOCOL_H
22
23 #include <PiDxe.h>
24 //
25 // To get the multiple phase definitions defined in Boot Script Specification
26 //
27 #include <Ppi/BootScriptExecuter.h>
28
29 //
30 // S3 Save Protocol GUID
31 //
32 #define EFI_BOOT_SCRIPT_SAVE_PROTOCOL_GUID \
33 { \
34 0x470e1529, 0xb79e, 0x4e32, {0xa0, 0xfe, 0x6a, 0x15, 0x6d, 0x29, 0xf9, 0xb2 } \
35 }
36
37 typedef struct _EFI_BOOT_SCRIPT_SAVE_PROTOCOL EFI_BOOT_SCRIPT_SAVE_PROTOCOL;
38
39 //
40 // Protocol Member_Function
41 //
42 /**
43 Adds a record into a specified Framework boot script table.
44
45 @param This A pointer to the EFI_BOOT_SCRIPT_SAVE_PROTOCOL instance.
46 @param TableName Name of the script table.Currently, the only meaningful
47 value is EFI_ACPI_S3_RESUME_SCRIPT_TABLE.
48 @param OpCode The operation code (opcode) number.
49 @param ... Argument list that is specific to each opcode.
50
51 @retval EFI_SUCCESS The operation succeeded. A record was added into the specified script table.
52 @retval EFI_INVALID_PARAMETER The parameter is illegal or the given boot script is not supported.
53 @retval EFI_OUT_OF_RESOURCES There is insufficient memory to store the boot script.
54
55 **/
56 typedef
57 EFI_STATUS
58 (EFIAPI *EFI_BOOT_SCRIPT_WRITE) (
59 IN EFI_BOOT_SCRIPT_SAVE_PROTOCOL *This,
60 IN UINT16 TableName,
61 IN UINT16 OpCode,
62 ...
63 );
64
65 /**
66 Closes the specified script table.
67
68 @param This A pointer to the EFI_BOOT_SCRIPT_SAVE_PROTOCOL instance.
69 @param TableName Name of the script table.
70 @param Address A pointer to the physical address where the table begins.
71
72 @retval EFI_SUCCESS The table was successfully returned.
73 @retval EFI_NOT_FOUND The specified table was not created previously.
74 @retval EFI_OUT_OF_RESOURCES Memory is insufficient to hold the reorganized boot script table.
75
76 **/
77 typedef
78 EFI_STATUS
79 (EFIAPI *EFI_BOOT_SCRIPT_CLOSE_TABLE) (
80 IN EFI_BOOT_SCRIPT_SAVE_PROTOCOL *This,
81 IN UINT16 TableName,
82 OUT EFI_PHYSICAL_ADDRESS *Address
83 );
84
85 //
86 // S3 Save Protocol data structure
87 //
88 /**
89 @par Protocol Description:
90 The EFI_BOOT_SCRIPT_SAVE_PROTOCOL publishes the Framework boot script abstractions
91 to store or record various boot scripts into boot script tables.
92
93 @param Write
94 Writes various boot scripts to a boot script table.
95
96 @param CloseTable
97 Retrieves and closes a script table.
98
99 **/
100 struct _EFI_BOOT_SCRIPT_SAVE_PROTOCOL {
101 EFI_BOOT_SCRIPT_WRITE Write;
102 EFI_BOOT_SCRIPT_CLOSE_TABLE CloseTable;
103 };
104
105 extern EFI_GUID gEfiBootScriptSaveProtocolGuid;
106
107 #endif
108