summaryrefslogtreecommitdiffstats
path: root/OvmfPkg/SmmControl2Dxe/SmiFeatures.h
diff options
context:
space:
mode:
Diffstat (limited to 'OvmfPkg/SmmControl2Dxe/SmiFeatures.h')
-rw-r--r--OvmfPkg/SmmControl2Dxe/SmiFeatures.h49
1 files changed, 49 insertions, 0 deletions
diff --git a/OvmfPkg/SmmControl2Dxe/SmiFeatures.h b/OvmfPkg/SmmControl2Dxe/SmiFeatures.h
new file mode 100644
index 0000000000..9d5f1dbcb5
--- /dev/null
+++ b/OvmfPkg/SmmControl2Dxe/SmiFeatures.h
@@ -0,0 +1,49 @@
+/**@file
+ Negotiate SMI features with QEMU, and configure UefiCpuPkg/PiSmmCpuDxeSmm
+ accordingly.
+
+ Copyright (C) 2016-2017, Red Hat, Inc.
+
+ This program and the accompanying materials are licensed and made available
+ under the terms and conditions of the BSD License which accompanies this
+ distribution. The full text of the license may be found at
+ http://opensource.org/licenses/bsd-license.php
+
+ THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT
+ WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+**/
+
+#ifndef __SMI_FEATURES_H__
+#define __SMI_FEATURES_H__
+
+#include <Protocol/S3SaveState.h>
+
+/**
+ Negotiate SMI features with QEMU.
+
+ @retval FALSE If SMI feature negotiation is not supported by QEMU. This is
+ not an error, it just means that SaveSmiFeatures() should not
+ be called.
+
+ @retval TRUE SMI feature negotiation is supported, and it has completed
+ successfully as well. (Failure to negotiate is a fatal error
+ and the function never returns in that case.)
+**/
+BOOLEAN
+NegotiateSmiFeatures (
+ VOID
+ );
+
+/**
+ Append a boot script fragment that will re-select the previously negotiated
+ SMI features during S3 resume.
+
+ @param[in] S3SaveState The EFI_S3_SAVE_STATE_PROTOCOL instance to append to
+ the S3 boot script with.
+**/
+VOID
+SaveSmiFeatures (
+ IN EFI_S3_SAVE_STATE_PROTOCOL *S3SaveState
+ );
+
+#endif