]> git.proxmox.com Git - mirror_edk2.git/blobdiff - StandaloneMmPkg/Core/StandaloneMmCore.c
StandaloneMmPkg: Fix ECC error 4002 and 9002 in StandaloneMmCore
[mirror_edk2.git] / StandaloneMmPkg / Core / StandaloneMmCore.c
index fb6b3055e9c6da1fd4be0af78971bfd01e10fce7..8388ec289ca8d26cff02960aeeb579f418fba4fe 100644 (file)
@@ -2,14 +2,8 @@
   MM Core Main Entry Point\r
 \r
   Copyright (c) 2009 - 2014, Intel Corporation. All rights reserved.<BR>\r
-  Copyright (c) 2016 - 2018, ARM Limited. All rights reserved.<BR>\r
-  This program and the accompanying materials are licensed and made available\r
-  under the terms and conditions of the BSD License which accompanies this\r
-  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) 2016 - 2021, Arm Limited. All rights reserved.<BR>\r
+  SPDX-License-Identifier: BSD-2-Clause-Patent\r
 \r
 **/\r
 \r
@@ -155,9 +149,10 @@ MmExitBootServiceHandler (
   )\r
 {\r
   EFI_HANDLE  MmHandle;\r
-  EFI_STATUS  Status = EFI_SUCCESS;\r
+  EFI_STATUS  Status;\r
   STATIC BOOLEAN mInExitBootServices = FALSE;\r
 \r
+  Status = EFI_SUCCESS;\r
   if (!mInExitBootServices) {\r
     MmHandle = NULL;\r
     Status = MmInstallProtocolInterface (\r
@@ -193,9 +188,10 @@ MmReadyToBootHandler (
   )\r
 {\r
   EFI_HANDLE  MmHandle;\r
-  EFI_STATUS  Status = EFI_SUCCESS;\r
+  EFI_STATUS  Status;\r
   STATIC BOOLEAN mInReadyToBoot = FALSE;\r
 \r
+  Status = EFI_SUCCESS;\r
   if (!mInReadyToBoot) {\r
     MmHandle = NULL;\r
     Status = MmInstallProtocolInterface (\r
@@ -360,7 +356,7 @@ MmEntryPoint (
   //PlatformHookBeforeMmDispatch ();\r
 \r
   //\r
-  // If a legacy boot has occured, then make sure gMmCorePrivate is not accessed\r
+  // If a legacy boot has occurred, then make sure gMmCorePrivate is not accessed\r
   //\r
 \r
   //\r
@@ -418,6 +414,15 @@ MmEntryPoint (
   DEBUG ((DEBUG_INFO, "MmEntryPoint Done\n"));\r
 }\r
 \r
+/** Register the MM Entry Point provided by the MM Core with the\r
+    MM Configuration protocol.\r
+\r
+  @param [in]  Protocol   Pointer to the protocol.\r
+  @param [in]  Interface  Pointer to the MM Configuration protocol.\r
+  @param [in]  Handle     Handle.\r
+\r
+  @retval EFI_SUCCESS             Success.\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 MmConfigurationMmNotify (\r
@@ -452,6 +457,12 @@ MmConfigurationMmNotify (
   return EFI_SUCCESS;\r
 }\r
 \r
+/** Returns the HOB list size.\r
+\r
+  @param [in]  HobStart   Pointer to the start of the HOB list.\r
+\r
+  @retval Size of the HOB list.\r
+**/\r
 UINTN\r
 GetHobListSize (\r
   IN VOID *HobStart\r
@@ -479,12 +490,10 @@ GetHobListSize (
 \r
   Note: This function is called for both DXE invocation and MMRAM invocation.\r
 \r
-  @param  ImageHandle    The firmware allocated handle for the EFI image.\r
-  @param  SystemTable    A pointer to the EFI System Table.\r
-\r
-  @retval EFI_SUCCESS    The entry point is executed successfully.\r
-  @retval Other          Some error occurred when executing this entry point.\r
+  @param  HobStart       Pointer to the start of the HOB list.\r
 \r
+  @retval EFI_SUCCESS             Success.\r
+  @retval EFI_UNSUPPORTED         Unsupported operation.\r
 **/\r
 EFI_STATUS\r
 EFIAPI\r
@@ -596,9 +605,9 @@ StandaloneMmMain (
 \r
   //\r
   // No need to initialize memory service.\r
-  // It is done in constructor of StandaloneMmCoreMemoryAllocationLib(),\r
-  // so that the library linked with StandaloneMmCore can use AllocatePool() in constuctor.\r
-  //\r
+  // It is done in the constructor of StandaloneMmCoreMemoryAllocationLib(),\r
+  // so that the library linked with StandaloneMmCore can use AllocatePool() in\r
+  // the constructor.\r
 \r
   DEBUG ((DEBUG_INFO, "MmInstallConfigurationTable For HobList\n"));\r
   //\r