]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteSmmCommon.h
MdeModulePkg/FaultTolerantWriteDxe: factor out boot service accesses
[mirror_edk2.git] / MdeModulePkg / Universal / FaultTolerantWriteDxe / FaultTolerantWriteSmmCommon.h
index 061673bce2da05fcb785b4a635bcad787aeda374..61293ca864e8fd4efbb861f7e095fd065bcfbe92 100644 (file)
@@ -1,15 +1,15 @@
 /** @file\r
 \r
-  The common header file for SMM FTW module and SMM FTW DXE Module. \r
+  The common header file for SMM FTW module and SMM FTW DXE Module.\r
 \r
-Copyright (c) 2011, Intel Corporation. All rights reserved. <BR>\r
-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
+Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved. <BR>\r
+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
 **/\r
 \r
@@ -77,4 +77,43 @@ typedef struct {
   UINT8                                 Data[1];\r
 } SMM_FTW_GET_LAST_WRITE_HEADER;\r
 \r
+/**\r
+  Shared entry point of the module\r
+\r
+  @retval EFI_SUCCESS           The initialization finished successfully.\r
+  @retval EFI_OUT_OF_RESOURCES  Allocate memory error\r
+  @retval EFI_INVALID_PARAMETER Workspace or Spare block does not exist\r
+\r
+**/\r
+EFI_STATUS\r
+MmFaultTolerantWriteInitialize (\r
+  VOID\r
+  );\r
+\r
+/**\r
+  This function checks if the buffer is valid per processor architecture and\r
+  does not overlap with SMRAM.\r
+\r
+  @param Buffer The buffer start address to be checked.\r
+  @param Length The buffer length to be checked.\r
+\r
+  @retval TRUE  This buffer is valid per processor architecture and does not\r
+                overlap with SMRAM.\r
+  @retval FALSE This buffer is not valid per processor architecture or overlaps\r
+                with SMRAM.\r
+**/\r
+BOOLEAN\r
+FtwSmmIsBufferOutsideSmmValid (\r
+  IN EFI_PHYSICAL_ADDRESS  Buffer,\r
+  IN UINT64                Length\r
+  );\r
+\r
+/**\r
+  Notify the system that the SMM FTW driver is ready\r
+**/\r
+VOID\r
+FtwNotifySmmReady (\r
+  VOID\r
+  );\r
+\r
 #endif\r