]> git.proxmox.com Git - mirror_edk2.git/blobdiff - IntelFrameworkPkg/Include/Protocol/BootScriptSave.h
Initial directory structure of IntelFrameworkPkg.
[mirror_edk2.git] / IntelFrameworkPkg / Include / Protocol / BootScriptSave.h
diff --git a/IntelFrameworkPkg/Include/Protocol/BootScriptSave.h b/IntelFrameworkPkg/Include/Protocol/BootScriptSave.h
new file mode 100644 (file)
index 0000000..fc34723
--- /dev/null
@@ -0,0 +1,102 @@
+/** @file\r
+  Definition of the Boot Script Save protocol.\r
+\r
+  Copyright (c) 2007, Intel Corporation\r
+  All rights reserved. This program and the accompanying materials\r
+  are licensed and made available under the terms and conditions of the BSD License\r
+  which accompanies this distribution.  The full text of the license may be found at\r
+  http://opensource.org/licenses/bsd-license.php\r
+\r
+  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+\r
+  Module Name:  BootScriptSave.h\r
+\r
+  @par Revision Reference:\r
+  This protocol defined in the Boot Script Specification, Version 0.91.\r
+\r
+**/\r
+\r
+#ifndef _BOOT_SCRIPT_SAVE_PROTOCOL_H\r
+#define _BOOT_SCRIPT_SAVE_PROTOCOL_H\r
+\r
+//\r
+// S3 Save Protocol GUID\r
+//\r
+#define EFI_BOOT_SCRIPT_SAVE_PROTOCOL_GUID \\r
+  { \\r
+    0x470e1529, 0xb79e, 0x4e32, {0xa0, 0xfe, 0x6a, 0x15, 0x6d, 0x29, 0xf9, 0xb2 } \\r
+  }\r
+\r
+typedef struct _EFI_BOOT_SCRIPT_SAVE_PROTOCOL EFI_BOOT_SCRIPT_SAVE_PROTOCOL;\r
+\r
+//\r
+// Protocol Member_Function\r
+//\r
+/**\r
+  Adds a record into a specified Framework boot script table.\r
+\r
+  @param  This                  A pointer to the EFI_BOOT_SCRIPT_SAVE_PROTOCOL instance.\r
+  @param  TableName             Name of the script table.Currently, the only meaningful\r
+                                value is EFI_ACPI_S3_RESUME_SCRIPT_TABLE.\r
+  @param  OpCode                The operation code (opcode) number.\r
+  @param  ...                   Argument list that is specific to each opcode.\r
+\r
+  @retval EFI_SUCCESS           The operation succeeded. A record was added into the specified script table.\r
+  @retval EFI_INVALID_PARAMETER The parameter is illegal or the given boot script is not supported.\r
+  @retval EFI_OUT_OF_RESOURCES  There is insufficient memory to store the boot script.\r
+\r
+**/\r
+typedef\r
+EFI_STATUS\r
+(EFIAPI *EFI_BOOT_SCRIPT_WRITE) (\r
+  IN EFI_BOOT_SCRIPT_SAVE_PROTOCOL            *This,\r
+  IN UINT16                                   TableName,\r
+  IN UINT16                                   OpCode,\r
+  ...\r
+  );\r
+\r
+/**\r
+  Closes the specified script table.\r
+\r
+  @param  This                  A pointer to the EFI_BOOT_SCRIPT_SAVE_PROTOCOL instance.\r
+  @param  TableName             Name of the script table.\r
+  @param  Address               A pointer to the physical address where the table begins.\r
+\r
+  @retval EFI_SUCCESS           The table was successfully returned.\r
+  @retval EFI_NOT_FOUND         The specified table was not created previously.\r
+  @retval EFI_OUT_OF_RESOURCES  Memory is insufficient to hold the reorganized boot script table.\r
+\r
+**/\r
+typedef\r
+EFI_STATUS\r
+(EFIAPI *EFI_BOOT_SCRIPT_CLOSE_TABLE) (\r
+  IN EFI_BOOT_SCRIPT_SAVE_PROTOCOL            *This,\r
+  IN UINT16                                   TableName,\r
+  OUT EFI_PHYSICAL_ADDRESS                    *Address\r
+  );\r
+\r
+//\r
+// S3 Save Protocol data structure\r
+//\r
+/**\r
+  @par Protocol Description:\r
+  The EFI_BOOT_SCRIPT_SAVE_PROTOCOL publishes the Framework boot script abstractions\r
+  to store or record various boot scripts into boot script tables.\r
+\r
+  @param Write\r
+  Writes various boot scripts to a boot script table.\r
+\r
+  @param CloseTable\r
+  Retrieves and closes a script table.\r
+\r
+**/\r
+struct _EFI_BOOT_SCRIPT_SAVE_PROTOCOL {\r
+  EFI_BOOT_SCRIPT_WRITE       Write;\r
+  EFI_BOOT_SCRIPT_CLOSE_TABLE CloseTable;\r
+};\r
+\r
+extern EFI_GUID gEfiBootScriptSaveProtocolGuid;\r
+\r
+#endif\r
+\r