]> git.proxmox.com Git - mirror_edk2.git/blobdiff - EdkModulePkg/Universal/StatusCode/Pei/PeiStatusCode.c
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1436 6f19259b...
[mirror_edk2.git] / EdkModulePkg / Universal / StatusCode / Pei / PeiStatusCode.c
index 9c36deecf09e9d654c4f9840deef989e6dcb508e..29db86d4d32e7798916f89e6f3af1b3796b1cdfd 100644 (file)
@@ -2,14 +2,14 @@
 /** @file\r
   Generic PeiStatusCode Module.\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:  PeiStatusCode.c\r
 \r
@@ -19,8 +19,8 @@
 \r
 /**\r
   Report status code to all supported device.\r
- * \r
- * \r
+  \r
+  \r
   @param  PeiServices\r
 \r
   @param  Type          Indicates the type of status code being reported.  \r
@@ -41,6 +41,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
@@ -53,11 +56,12 @@ ReportDispatcher (
   IN EFI_STATUS_CODE_DATA     *Data OPTIONAL\r
   );\r
 \r
-\r
+STATIC\r
 EFI_PEI_PROGRESS_CODE_PPI     mStatusCodePpi           = { \r
   ReportDispatcher\r
   };\r
 \r
+STATIC\r
 EFI_PEI_PPI_DESCRIPTOR        mStatusCodePpiDescriptor = {\r
   EFI_PEI_PPI_DESCRIPTOR_PPI | EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST,\r
   &gEfiPeiStatusCodePpiGuid,\r
@@ -66,8 +70,8 @@ EFI_PEI_PPI_DESCRIPTOR        mStatusCodePpiDescriptor = {
 \r
 /**\r
   Report status code to all supported device.\r
- * \r
- * \r
+  \r
+  \r
   @param  PeiServices\r
 \r
   @param  CodeType      Indicates the type of status code being reported.  \r
@@ -88,6 +92,9 @@ EFI_PEI_PPI_DESCRIPTOR        mStatusCodePpiDescriptor = {
                         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
@@ -140,7 +147,6 @@ ReportDispatcher (
 \r
 **/\r
 EFI_STATUS\r
-EFIAPI\r
 PeiStatusCodeDriverEntry (\r
   IN EFI_FFS_FILE_HEADER       *FfsHeader,\r
   IN EFI_PEI_SERVICES          **PeiServices\r
@@ -155,13 +161,16 @@ PeiStatusCodeDriverEntry (
   // if enable UseOEM, then initialize Oem status code.\r
   //\r
   if (FeaturePcdGet (PcdStatusCodeUseSerial)) {\r
-    SerialPortInitialize();\r
+    Status = SerialPortInitialize();\r
+    ASSERT_EFI_ERROR (Status);\r
   }\r
   if (FeaturePcdGet (PcdStatusCodeUseMemory)) {\r
-    MemoryStatusCodeInitializeWorker ();\r
+    Status = MemoryStatusCodeInitializeWorker ();\r
+    ASSERT_EFI_ERROR  (Status);\r
   }\r
   if (FeaturePcdGet (PcdStatusCodeUseOEM)) {\r
-    OemHookStatusCodeInitialize ();\r
+    Status = OemHookStatusCodeInitialize ();\r
+    ASSERT_EFI_ERROR  (Status);\r
   }\r
 \r
   //\r