]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Universal/StatusCodeHandler/RuntimeDxe/StatusCodeHandlerRuntimeDxe.h
MdeModulePkg: Replace BSD License with BSD+Patent License
[mirror_edk2.git] / MdeModulePkg / Universal / StatusCodeHandler / RuntimeDxe / StatusCodeHandlerRuntimeDxe.h
index 9986f1140f8aa227534d978daf0c01e7d3d83b54..fd4689c2d745ddd455af80a642077856c017b7b1 100644 (file)
@@ -1,14 +1,9 @@
 /** @file\r
   Internal include file for Status Code Handler Driver.\r
 \r
-  Copyright (c) 2006 - 2009, 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
+  Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>\r
+  (C) Copyright 2016 Hewlett Packard Enterprise Development LP<BR>\r
+  SPDX-License-Identifier: BSD-2-Clause-Patent\r
 \r
 **/\r
 \r
@@ -23,6 +18,7 @@
 #include <Guid/EventGroup.h>\r
 \r
 #include <Library/SynchronizationLib.h>\r
+#include <Library/BaseMemoryLib.h>\r
 #include <Library/DebugLib.h>\r
 #include <Library/ReportStatusCodeLib.h>\r
 #include <Library/PrintLib.h>\r
 #include <Library/SerialPortLib.h>\r
 \r
 //\r
-// Runtime memory status code worker definition\r
+// Define the maximum message length\r
 //\r
-typedef struct {\r
-  UINT32   RecordIndex;\r
-  UINT32   NumberOfRecords;\r
-  UINT32   MaxRecordsNumber;\r
-} RUNTIME_MEMORY_STATUSCODE_HEADER;\r
+#define MAX_DEBUG_MESSAGE_LENGTH 0x100\r
 \r
 extern RUNTIME_MEMORY_STATUSCODE_HEADER  *mRtMemoryStatusCodeTable;\r
 \r
 /**\r
   Locates Serial I/O Protocol as initialization for serial status code worker.\r
\r
+\r
   @retval EFI_SUCCESS  Serial I/O Protocol is successfully located.\r
 \r
 **/\r
@@ -59,7 +51,7 @@ EfiSerialStatusCodeInitializeWorker (
 \r
 /**\r
   Convert status code value and extended data to readable ASCII string, send string to serial I/O device.\r
\r
+\r
   @param  CodeType         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\r
@@ -77,6 +69,7 @@ EfiSerialStatusCodeInitializeWorker (
 \r
 **/\r
 EFI_STATUS\r
+EFIAPI\r
 SerialStatusCodeReportWorker (\r
   IN EFI_STATUS_CODE_TYPE     CodeType,\r
   IN EFI_STATUS_CODE_VALUE    Value,\r
@@ -87,8 +80,9 @@ SerialStatusCodeReportWorker (
 \r
 /**\r
   Initialize runtime memory status code table as initialization for runtime memory status code worker\r
\r
+\r
   @retval EFI_SUCCESS  Runtime memory status code table successfully initialized.\r
+  @retval others       Errors from gBS->InstallConfigurationTable().\r
 \r
 **/\r
 EFI_STATUS\r
@@ -97,9 +91,9 @@ RtMemoryStatusCodeInitializeWorker (
   );\r
 \r
 /**\r
-  Report status code into runtime memory. If the runtime pool is full, roll back to the \r
+  Report status code into runtime memory. If the runtime pool is full, roll back to the\r
   first record and overwrite it.\r
\r
+\r
   @param  CodeType                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\r
@@ -110,11 +104,12 @@ RtMemoryStatusCodeInitializeWorker (
                                   This parameter allows the status code driver to apply different rules to\r
                                   different callers.\r
   @param  Data                    This optional parameter may be used to pass additional data.\r
\r
+\r
   @retval EFI_SUCCESS             Status code successfully recorded in runtime memory status code table.\r
 \r
 **/\r
 EFI_STATUS\r
+EFIAPI\r
 RtMemoryStatusCodeReportWorker (\r
   IN EFI_STATUS_CODE_TYPE               CodeType,\r
   IN EFI_STATUS_CODE_VALUE              Value,\r