]> git.proxmox.com Git - mirror_edk2.git/blobdiff - EdkModulePkg/Universal/StatusCode/Dxe/Common/DxeStatusCodeCommon.c
Fix EDKT497. In the patch:
[mirror_edk2.git] / EdkModulePkg / Universal / StatusCode / Dxe / Common / DxeStatusCodeCommon.c
index ae45d886bed157675e9e89e4a8d87cf3fdc1fc3f..1ac1c74a5e0bc3cd34db1d1bc7ea69da98ddc345 100644 (file)
@@ -1,14 +1,14 @@
 /** @file\r
   Status code driver for IA32/X64/EBC 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:  DxeStatusCodeCommon.c\r
 \r
@@ -27,7 +27,7 @@
                         This includes 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
-                        Type EFI_STATUS_CODE_VALUE is defined in ¡°Related Definitions¡± below.  \r
+                        Type EFI_STATUS_CODE_VALUE is defined in "Related Definitions" below.  \r
                         Specific values are discussed in the Intel? Platform Innovation Framework for EFI Status Code Specification.\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
@@ -39,6 +39,9 @@
                         Type EFI_STATUS_CODE_DATA is defined in "Related Definitions" below.  \r
                         The contents of this data type may have additional GUID-specific data.  The standard GUIDs and \r
                         their associated data structures are defined in the Intel? Platform Innovation Framework for EFI Status Codes Specification.\r
+\r
+  @return               Always return EFI_SUCCESS.\r
+\r
 **/\r
 EFI_STATUS \r
 EFIAPI\r
@@ -52,7 +55,8 @@ ReportDispatcher (
 \r
 //\r
 // Declaration of status code protocol.\r
-// \r
+//\r
+STATIC\r
 EFI_STATUS_CODE_PROTOCOL  mEfiStatusCodeProtocol  = {\r
   ReportDispatcher\r
 };\r
@@ -79,7 +83,6 @@ DXE_STATUS_CODE_CONTROLLER gDxeStatusCode = {
 \r
 **/\r
 EFI_STATUS\r
-EFIAPI\r
 DxeStatusCodeDriverEntry (\r
   IN EFI_HANDLE         ImageHandle,\r
   IN EFI_SYSTEM_TABLE   *SystemTable\r
@@ -119,7 +122,7 @@ DxeStatusCodeDriverEntry (
                         This includes 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
-                        Type EFI_STATUS_CODE_VALUE is defined in ¡°Related Definitions¡± below.  \r
+                        Type EFI_STATUS_CODE_VALUE is defined in "Related Definitions" below.  \r
                         Specific values are discussed in the Intel? Platform Innovation Framework for EFI Status Code Specification.\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
@@ -131,6 +134,9 @@ DxeStatusCodeDriverEntry (
                         Type EFI_STATUS_CODE_DATA is defined in "Related Definitions" below.  \r
                         The contents of this data type may have additional GUID-specific data.  The standard GUIDs and \r
                         their associated data structures are defined in the Intel? Platform Innovation Framework for EFI Status Codes Specification.\r
+\r
+  @return               Always return EFI_SUCCESS.\r
+\r
 **/\r
 EFI_STATUS \r
 EFIAPI\r
@@ -142,11 +148,14 @@ ReportDispatcher (
   IN EFI_STATUS_CODE_DATA     *Data      OPTIONAL\r
   )\r
 {\r
+       volatile int tt = 1;\r
+       while (tt) {\r
+       }\r
   //\r
   // 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 (&gDxeStatusCode.StatusCodeNestStatus, 0, 1)) {\r
+  if (1 == InterlockedCompareExchange32 (&gDxeStatusCode.StatusCodeNestStatus, 0, 1)) {\r
     return EFI_DEVICE_ERROR;\r
   }\r
 \r
@@ -200,7 +209,7 @@ ReportDispatcher (
   to virtual address.\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