]> git.proxmox.com Git - mirror_edk2.git/blobdiff - IntelFrameworkModulePkg/Library/SmmRuntimeDxeReportStatusCodeLibFramework/SmmRuntimeDxeSupport.c
IntelFrameworkModulePkg: Clean up source files
[mirror_edk2.git] / IntelFrameworkModulePkg / Library / SmmRuntimeDxeReportStatusCodeLibFramework / SmmRuntimeDxeSupport.c
index 554be152b3dfbfbcecabc0450ebed1fa007f1573..d97a7f7753d06bc13c5ce5be326aa44002951ff7 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Library constructor & destructor, event handlers, and other internal worker functions.\r
 \r
-  Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2006 - 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
@@ -26,7 +26,7 @@ EFI_SMM_STATUS_CODE_PROTOCOL  *mSmmStatusCodeProtocol;
 \r
 /**\r
   Locates and caches SMM Status Code Protocol.\r
\r
+\r
 **/\r
 VOID\r
 SmmStatusCodeInitialize (\r
@@ -43,20 +43,20 @@ SmmStatusCodeInitialize (
 \r
 /**\r
   Report status code via SMM Status Code Protocol.\r
\r
+\r
   @param  Type          Indicates the type of status code being reported.\r
-  @param  Value         Describes the current status of a hardware or software entity.  \r
-                        This included information about the class and subclass that is used to classify the entity \r
-                        as well as an operation.  For progress codes, the operation is the current activity. \r
-                        For error codes, it is the exception.  For debug codes, it is not defined at this time. \r
-  @param  Instance      The enumeration of a hardware or software entity within the system.  \r
-                        A system may contain multiple entities that match a class/subclass pairing. \r
-                        The instance differentiates between them.  An instance of 0 indicates that instance information is unavailable, \r
+  @param  Value         Describes the current status of a hardware or software entity.\r
+                        This included information about the class and subclass that is used to classify the entity\r
+                        as well as an operation.  For progress codes, the operation is the current activity.\r
+                        For error codes, it is the exception.  For debug codes, it is not defined at this time.\r
+  @param  Instance      The enumeration of a hardware or software entity within the system.\r
+                        A system may contain multiple entities that match a class/subclass pairing.\r
+                        The instance differentiates between them.  An instance of 0 indicates that instance information is unavailable,\r
                         not meaningful, or not relevant.  Valid instance numbers start with 1.\r
-  @param  CallerId      This optional parameter may be used to identify the caller. \r
-                        This parameter allows the status code driver to apply different rules to different callers. \r
+  @param  CallerId      This optional parameter may be used to identify the caller.\r
+                        This parameter allows the status code driver to apply different rules to different callers.\r
   @param  Data          This optional parameter may be used to pass additional data\r
\r
+\r
   @retval EFI_SUCCESS   Always return EFI_SUCCESS.\r
 \r
 **/\r
@@ -99,9 +99,9 @@ InternalGetReportStatusCode (
   } else if (mInternalRT != NULL && mInternalRT->Hdr.Revision < 0x20000) {\r
     return ((FRAMEWORK_EFI_RUNTIME_SERVICES*)mInternalRT)->ReportStatusCode;\r
   } else if (!mHaveExitedBootServices) {\r
-       //\r
-       // Check gBS just in case. ReportStatusCode is called before gBS is initialized.\r
-       //\r
+    //\r
+    // Check gBS just in case. ReportStatusCode is called before gBS is initialized.\r
+    //\r
     if (gBS != NULL) {\r
       Status = gBS->LocateProtocol (&gEfiStatusCodeRuntimeProtocolGuid, NULL, (VOID**)&StatusCodeProtocol);\r
       if (!EFI_ERROR (Status) && StatusCodeProtocol != NULL) {\r
@@ -156,13 +156,13 @@ InternalReportStatusCode (
         return EFI_UNSUPPORTED;\r
       }\r
     }\r
-  \r
+\r
     //\r
     // A status code service is present in system, so pass in all the parameters to the service.\r
     //\r
     return (*mReportStatusCode) (Type, Value, Instance, (EFI_GUID *)CallerId, Data);\r
   }\r
-  \r
+\r
   return EFI_UNSUPPORTED;\r
 }\r
 \r
@@ -220,7 +220,7 @@ ReportStatusCodeLibExitBootServices (
 \r
   @param  ImageHandle   The firmware allocated handle for the EFI image.\r
   @param  SystemTable   A pointer to the EFI System Table.\r
-  \r
+\r
   @retval EFI_SUCCESS   The constructor always returns EFI_SUCCESS.\r
 \r
 **/\r
@@ -242,8 +242,8 @@ ReportStatusCodeLibConstruct (
     if (mInSmm) {\r
       Status = mSmmBase->SmmAllocatePool (\r
                            mSmmBase,\r
-                           EfiRuntimeServicesData, \r
-                           sizeof (EFI_STATUS_CODE_DATA) + EFI_STATUS_CODE_DATA_MAX_SIZE, \r
+                           EfiRuntimeServicesData,\r
+                           sizeof (EFI_STATUS_CODE_DATA) + EFI_STATUS_CODE_DATA_MAX_SIZE,\r
                            (VOID **) &mStatusCodeData\r
                            );\r
       ASSERT_EFI_ERROR (Status);\r
@@ -257,7 +257,7 @@ ReportStatusCodeLibConstruct (
   // If not in SMM mode, then allocate runtime memory for extended status code data.\r
   //\r
   // Library should not use the gRT directly, for it may be converted by other library instance.\r
-  // \r
+  //\r
   mInternalRT = gRT;\r
   mInSmm      = FALSE;\r
 \r
@@ -265,12 +265,12 @@ ReportStatusCodeLibConstruct (
   ASSERT (mStatusCodeData != NULL);\r
   //\r
   // Cache the report status code service\r
-  // \r
+  //\r
   mReportStatusCode = InternalGetReportStatusCode ();\r
 \r
   //\r
   // Register notify function for EVT_SIGNAL_VIRTUAL_ADDRESS_CHANGE\r
-  // \r
+  //\r
   Status = gBS->CreateEventEx (\r
                   EVT_NOTIFY_SIGNAL,\r
                   TPL_NOTIFY,\r
@@ -283,7 +283,7 @@ ReportStatusCodeLibConstruct (
 \r
   //\r
   // Register notify function for EVT_SIGNAL_EXIT_BOOT_SERVICES\r
-  // \r
+  //\r
   Status = gBS->CreateEventEx (\r
                   EVT_NOTIFY_SIGNAL,\r
                   TPL_NOTIFY,\r
@@ -299,13 +299,13 @@ ReportStatusCodeLibConstruct (
 \r
 /**\r
   The destructor function of SMM Runtime DXE Report Status Code Lib.\r
-  \r
+\r
   The destructor function frees memory allocated by constructor, and closes related events.\r
-  It will ASSERT() if that related operation fails and it will always return EFI_SUCCESS. \r
+  It will ASSERT() if that related operation fails and it will always return EFI_SUCCESS.\r
 \r
   @param  ImageHandle   The firmware allocated handle for the EFI image.\r
   @param  SystemTable   A pointer to the EFI System Table.\r
-  \r
+\r
   @retval EFI_SUCCESS   The constructor always returns EFI_SUCCESS.\r
 \r
 **/\r