]> git.proxmox.com Git - mirror_edk2.git/blobdiff - EdkModulePkg/Universal/StatusCode/Dxe/Ipf/DxeStatusCodeIpf.c
1. Add the fix for the following Bugs:
[mirror_edk2.git] / EdkModulePkg / Universal / StatusCode / Dxe / Ipf / DxeStatusCodeIpf.c
index 756c2744958cfeb5dd0bbed81b94af8d8fec9945..614ad5094e8704f338550e3bbc4d2cf2004acde1 100644 (file)
@@ -1,14 +1,14 @@
 /** @file\r
-  Status code driver for IA32/X64/EBC architecture.\r
+* Status code driver for IPF architecture.\r
 \r
-// Copyright (c) 2006, Intel Corporation. All rights reserved. \r
-// This software and associated documentation (if any) is furnished\r
-// under a license and may only be used or copied in accordance\r
-// with the terms of the license. Except as permitted by such\r
-// license, no part of this software or documentation may be\r
-// reproduced, stored in a retrieval system, or transmitted in any\r
-// form or by any means without the express written consent of\r
-// Intel Corporation.\r
+  Copyright (c) 2006, Intel Corporation                                                         \r
+  All rights reserved. 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
   Module Name:  DxeStatusCodeIpf.c\r
 \r
@@ -76,8 +76,8 @@ ReportEsalServiceEntry (
     // Use atom operation to avoid the reentant of report.\r
     // If current status is not zero, then the function is reentrancy.\r
     //\r
-    if (InterlockedCompareExchange32 (&DxeStatusCode->StatusCodeNestStatus, 0, 1)) {\r
-      ReturnVal.Status = EFI_DEVICE_ERROR ;\r
+    if (1 == InterlockedCompareExchange32 (&DxeStatusCode->StatusCodeNestStatus, 0, 1)) {\r
+      ReturnVal.Status = EFI_DEVICE_ERROR;\r
       return ReturnVal;\r
     }\r
 \r
@@ -145,12 +145,13 @@ ReportEsalServiceEntry (
 \r
 **/\r
 EFI_STATUS\r
-EFIAPI\r
 DxeStatusCodeDriverEntry (\r
   IN EFI_HANDLE        ImageHandle,\r
   IN EFI_SYSTEM_TABLE  *SystemTable\r
   )\r
 {\r
+  EFI_STATUS Status;\r
+\r
   //\r
   // Dispatch initialization request to supported devices\r
   //\r
@@ -159,13 +160,14 @@ DxeStatusCodeDriverEntry (
   //\r
   // Initialize ESAL capabilities.\r
   //\r
-  RegisterEsalClass (\r
-    &gEfiExtendedSalStatusCodeServicesProtocolGuid,\r
-    &gDxeStatusCode,\r
-    ReportEsalServiceEntry,\r
-    StatusCode,\r
-    NULL\r
-    );\r
+  Status = RegisterEsalClass (\r
+             &gEfiExtendedSalStatusCodeServicesProtocolGuid,\r
+             &gDxeStatusCode,\r
+             ReportEsalServiceEntry,\r
+             StatusCode,\r
+             NULL\r
+             );\r
+  ASSERT_EFI_ERROR (Status);\r
 \r
   return EFI_SUCCESS;\r
 }\r
@@ -176,7 +178,7 @@ DxeStatusCodeDriverEntry (
   virtual mode.\r
 \r
   @param  Event         Event whose notification function is being invoked.\r
-  @param  Context       Pointer to the notification function¡¯s context, which is\r
+  @param  Context       Pointer to the notification function's context, which is\r
                         always zero in current implementation.\r
 \r
 **/\r