2 This is an thunk implementation of the BootScript at run time.
4 SmmScriptLib in Framework implementation is to save S3 Boot Script in SMM runtime.
5 Here is the header file to define the API in this thunk library.
7 Copyright (c) 2010, Intel Corporation. All rights reserved.<BR>
9 This program and the accompanying materials
10 are licensed and made available under the terms and conditions
11 of the BSD License which accompanies this distribution. The
12 full text of the license may be found at
13 http://opensource.org/licenses/bsd-license.php
15 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
16 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
20 #ifndef _SMM_SCRIPT_SAVE_H_
21 #define _SMM_SCRIPT_SAVE_H_
24 #include "EfiBootScript.h"
25 #include "PiSmmDefinition.h"
26 #include "PiSmmS3SaveState.h"
29 typedef EFI_PHYSICAL_ADDRESS EFI_SMM_SCRIPT_TABLE
;
31 Intialize Boot Script table.
33 This function should be called in SMM mode. The Thunk implementation is try to
34 locate SmmSaveState protocol.
36 @param SystemTable Pointer to the EFI sytem table
37 @param SmmScriptTablePages The expected ScriptTable page number
38 @param SmmScriptTableBase The returned ScriptTable base address
40 @retval EFI_OUT_OF_RESOURCES No resource to do the initialization.
41 @retval EFI_SUCCESS Function has completed successfully.
46 InitializeSmmScriptLib (
47 IN EFI_SYSTEM_TABLE
*SystemTable
,
48 IN UINTN SmmScriptTablePages
,
49 OUT EFI_PHYSICAL_ADDRESS
*SmmScriptTableBase
52 Create Boot Script table.
54 It will be ignore and just return EFI_SUCCESS since the boot script table is
55 maintained by DxeBootScriptLib. Create Table is not needed.
57 @param ScriptTable Pointer to the boot script table to create.
58 @param Type The type of table to creat.
61 @retval EFI_SUCCESS Function has completed successfully.
66 SmmBootScriptCreateTable (
67 IN OUT EFI_SMM_SCRIPT_TABLE
*ScriptTable
,
71 Adds a record into a specified Framework boot script table.
73 This function is used to store a boot script record into a given boot
74 script table in SMM runtime. The parameter is the same with definitionin BootScriptSave Protocol.
76 @param ScriptTable Pointer to the script table to write to. In the thunk implementation, this parameter is ignored
77 since the boot script table is maintained by BootScriptLib.
79 @param OpCode The operation code (opcode) number.
80 @param ... Argument list that is specific to each opcode.
82 @retval EFI_SUCCESS The operation succeeded. A record was added into the
83 specified script table.
84 @retval EFI_INVALID_PARAMETER The parameter is illegal or the given boot script is not supported.
85 If the opcode is unknow or not supported because of the PCD
87 @retval EFI_OUT_OF_RESOURCES There is insufficient memory to store the boot script.
92 IN OUT EFI_SMM_SCRIPT_TABLE
*ScriptTable
,
98 Close Boot Script table.
100 It will be ignore and just return EFI_SUCCESS since the boot script table
101 is maintained by DxeBootScriptLib.
103 @param ScriptTableBase Pointer to the boot script table to create.
104 @param ScriptTablePtr Pointer to the script table to write to.
105 @param Type The type of table to creat.
107 @retval EFI_SUCCESS - Function has completed successfully.
112 SmmBootScriptCloseTable (
113 IN EFI_SMM_SCRIPT_TABLE ScriptTableBase
,
114 IN EFI_SMM_SCRIPT_TABLE ScriptTablePtr
,