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