summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--IntelFrameworkModulePkg/Universal/StatusCode/Pei/MemoryStausCodeWorker.c75
-rw-r--r--IntelFrameworkModulePkg/Universal/StatusCode/Pei/PeiStatusCode.c80
-rw-r--r--IntelFrameworkModulePkg/Universal/StatusCode/Pei/PeiStatusCode.h139
-rw-r--r--IntelFrameworkModulePkg/Universal/StatusCode/Pei/PeiStatusCode.inf6
-rw-r--r--IntelFrameworkModulePkg/Universal/StatusCode/Pei/SerialStatusCodeWorker.c60
5 files changed, 171 insertions, 189 deletions
diff --git a/IntelFrameworkModulePkg/Universal/StatusCode/Pei/MemoryStausCodeWorker.c b/IntelFrameworkModulePkg/Universal/StatusCode/Pei/MemoryStausCodeWorker.c
index c8ebabbec5..809b62f9c0 100644
--- a/IntelFrameworkModulePkg/Universal/StatusCode/Pei/MemoryStausCodeWorker.c
+++ b/IntelFrameworkModulePkg/Universal/StatusCode/Pei/MemoryStausCodeWorker.c
@@ -1,7 +1,7 @@
/** @file
- Memory status code worker in PEI.
+ PEI memory status code worker.
- Copyright (c) 2006, Intel Corporation
+ Copyright (c) 2006 - 2009, Intel Corporation
All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -10,19 +10,17 @@
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
- Module Name: MemoryStatusCodeWorker.c
-
**/
#include "PeiStatusCode.h"
/**
- Create one memory status code GUID'ed HOB, use PacketIndex
- to identify the packet.
+ Worker function to create one memory status code GUID'ed HOB,
+ using PacketIndex to identify the packet.
@param PacketIndex Index of records packet.
- @return Always return pointer of memory status code packet.
+ @return Pointer to the memory status code packet.
**/
MEMORY_STATUSCODE_PACKET_HEADER *
@@ -35,30 +33,23 @@ CreateMemoryStatusCodePacket (
//
// Build GUID'ed HOB with PCD defined size.
//
- PacketHeader =
- (MEMORY_STATUSCODE_PACKET_HEADER *) BuildGuidHob (
- &gMemoryStatusCodeRecordGuid,
- PcdGet16 (PcdStatusCodeMemorySize) *
- 1024 +
- sizeof (MEMORY_STATUSCODE_PACKET_HEADER)
- );
+ PacketHeader = BuildGuidHob (
+ &gMemoryStatusCodeRecordGuid,
+ PcdGet16 (PcdStatusCodeMemorySize) * 1024 + sizeof (MEMORY_STATUSCODE_PACKET_HEADER)
+ );
ASSERT (PacketHeader != NULL);
- PacketHeader->MaxRecordsNumber = (PcdGet16 (PcdStatusCodeMemorySize) * 1024)/ sizeof (MEMORY_STATUSCODE_RECORD);
+ PacketHeader->MaxRecordsNumber = (PcdGet16 (PcdStatusCodeMemorySize) * 1024) / sizeof (MEMORY_STATUSCODE_RECORD);
PacketHeader->PacketIndex = PacketIndex;
PacketHeader->RecordIndex = 0;
return PacketHeader;
}
-
-
/**
- Initialize memory status code.
- Create one GUID'ed HOB with PCD defined size. If create required size
- GUID'ed HOB failed, then ASSERT().
+ Create the first memory status code GUID'ed HOB as initialization for memory status code worker.
- @return The function always return EFI_SUCCESS
+ @retval EFI_SUCCESS The GUID'ed HOB is created successfully.
**/
EFI_STATUS
@@ -76,23 +67,24 @@ MemoryStatusCodeInitializeWorker (
/**
- Report status code into GUID'ed HOB..
+ Report status code into GUID'ed HOB.
- @param CodeType Indicates the type of status code being reported. Type EFI_STATUS_CODE_TYPE is defined in "Related Definitions" below.
+ This function reports status code into GUID'ed HOB. If not all packets are full, then
+ write status code into available entry. Otherwise, create a new packet for it.
- @param Value Describes the current status of a hardware or software entity.
- This included information about the class and subclass that is used to classify the entity
- as well as an operation. For progress codes, the operation is the current activity.
- For error codes, it is the exception. For debug codes, it is not defined at this time.
- Type EFI_STATUS_CODE_VALUE is defined in "Related Definitions" below.
- Specific values are discussed in the Intel? Platform Innovation Framework for EFI Status Code Specification.
+ @param CodeType Indicates the type of status code being reported.
+ @param Value Describes the current status of a hardware or
+ software entity. This includes information about the class and
+ subclass that is used to classify the entity as well as an operation.
+ For progress codes, the operation is the current activity.
+ For error codes, it is the exception.For debug codes,it is not defined at this time.
+ @param Instance The enumeration of a hardware or software entity within
+ the system. A system may contain multiple entities that match a class/subclass
+ pairing. The instance differentiates between them. An instance of 0 indicates
+ that instance information is unavailable, not meaningful, or not relevant.
+ Valid instance numbers start with 1.
- @param Instance The enumeration of a hardware or software entity within the system.
- A system may contain multiple entities that match a class/subclass pairing.
- The instance differentiates between them. An instance of 0 indicates that instance information is unavailable,
- not meaningful, or not relevant. Valid instance numbers start with 1.
-
- @return The function always return EFI_SUCCESS.
+ @retval EFI_SUCCESS The function always return EFI_SUCCESS.
**/
EFI_STATUS
@@ -105,11 +97,14 @@ MemoryStatusCodeReportWorker (
EFI_PEI_HOB_POINTERS Hob;
MEMORY_STATUSCODE_PACKET_HEADER *PacketHeader;
- MEMORY_STATUSCODE_RECORD *Record = NULL;
- UINT16 PacketIndex = 0;;
+ MEMORY_STATUSCODE_RECORD *Record;
+ UINT16 PacketIndex;
+
+ Record = NULL;
+ PacketIndex = 0;
//
- // Journal GUID'ed HOBs to find empty record entry, if found, then save status code in it.
+ // Journal GUID'ed HOBs to find empty record entry. if found, then save status code in it.
// otherwise, create a new GUID'ed HOB.
//
Hob.Raw = GetFirstGuidHob (&gMemoryStatusCodeRecordGuid);
@@ -132,9 +127,9 @@ MemoryStatusCodeReportWorker (
Hob.Raw = GetNextGuidHob (&gMemoryStatusCodeRecordGuid, Hob.Raw);
}
- if (NULL == Record) {
+ if (Record == NULL) {
//
- // In order to save status code , create new packet.
+ // No available entry found, so create new packet.
//
PacketHeader = CreateMemoryStatusCodePacket (PacketIndex);
diff --git a/IntelFrameworkModulePkg/Universal/StatusCode/Pei/PeiStatusCode.c b/IntelFrameworkModulePkg/Universal/StatusCode/Pei/PeiStatusCode.c
index cd6b5e5033..726ae5b72b 100644
--- a/IntelFrameworkModulePkg/Universal/StatusCode/Pei/PeiStatusCode.c
+++ b/IntelFrameworkModulePkg/Universal/StatusCode/Pei/PeiStatusCode.c
@@ -1,7 +1,7 @@
/** @file
- Generic PeiStatusCode Module.
+ Status code PEIM which produces Status Code PPI.
- Copyright (c) 2006, Intel Corporation
+ Copyright (c) 2006 - 2009, Intel Corporation
All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -10,13 +10,11 @@
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
- Module Name: PeiStatusCode.c
-
**/
#include "PeiStatusCode.h"
-EFI_PEI_PROGRESS_CODE_PPI mStatusCodePpi = {
+EFI_PEI_PROGRESS_CODE_PPI mStatusCodePpi = {
ReportDispatcher
};
@@ -27,40 +25,38 @@ EFI_PEI_PPI_DESCRIPTOR mStatusCodePpiDescriptor = {
};
/**
- Report status code to all supported device.
-
-
- @param PeiServices
-
- @param CodeType Indicates the type of status code being reported.
- The type EFI_STATUS_CODE_TYPE is defined in "Related Definitions" below.
- @param Value Describes the current status of a hardware or software entity.
- This includes information about the class and subclass that is used to classify the entity
- as well as an operation. For progress codes, the operation is the current activity.
- For error codes, it is the exception. For debug codes, it is not defined at this time.
- Type EFI_STATUS_CODE_VALUE is defined in "Related Definitions" below.
- Specific values are discussed in the Intel? Platform Innovation Framework for EFI Status Code Specification.
- @param Instance The enumeration of a hardware or software entity within the system.
- A system may contain multiple entities that match a class/subclass pairing.
- The instance differentiates between them. An instance of 0 indicates that instance
- information is unavailable, not meaningful, or not relevant. Valid instance numbers start with 1.
- @param CallerId This optional parameter may be used to identify the caller.
- This parameter allows the status code driver to apply different rules to different callers.
- @param Data This optional parameter may be used to pass additional data.
- Type EFI_STATUS_CODE_DATA is defined in "Related Definitions" below.
- The contents of this data type may have additional GUID-specific data. The standard GUIDs and
- their associated data structures are defined in the Intel? Platform Innovation Framework for EFI Status Codes Specification.
-
- @return Always return EFI_SUCCESS.
+ Publishes an interface that allows PEIMs to report status codes.
+
+ This function implements EFI_PEI_PROGRESS_CODE_PPI.ReportStatusCode().
+ It publishes an interface that allows PEIMs to report status codes.
+
+ @param PeiServices An indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation.
+ @param CodeType Indicates the type of status code being reported.
+ @param Value Describes the current status of a hardware or
+ software entity. This includes information about the class and
+ subclass that is used to classify the entity as well as an operation.
+ For progress codes, the operation is the current activity.
+ For error codes, it is the exception.For debug codes,it is not defined at this time.
+ @param Instance The enumeration of a hardware or software entity within
+ the system. A system may contain multiple entities that match a class/subclass
+ pairing. The instance differentiates between them. An instance of 0 indicates
+ that instance information is unavailable, not meaningful, or not relevant.
+ Valid instance numbers start with 1.
+ @param CallerId This optional parameter may be used to identify the caller.
+ This parameter allows the status code driver to apply different rules to
+ different callers.
+ @param Data This optional parameter may be used to pass additional data.
+
+ @retval EFI_SUCCESS The function completed successfully.
**/
EFI_STATUS
EFIAPI
ReportDispatcher (
IN CONST EFI_PEI_SERVICES **PeiServices,
- IN EFI_STATUS_CODE_TYPE CodeType,
- IN EFI_STATUS_CODE_VALUE Value,
- IN UINT32 Instance,
+ IN EFI_STATUS_CODE_TYPE CodeType,
+ IN EFI_STATUS_CODE_VALUE Value,
+ IN UINT32 Instance,
IN CONST EFI_GUID *CallerId OPTIONAL,
IN CONST EFI_STATUS_CODE_DATA *Data OPTIONAL
)
@@ -82,6 +78,9 @@ ReportDispatcher (
);
}
if (FeaturePcdGet (PcdStatusCodeUseOEM)) {
+ //
+ // Call OEM hook status code library API to report status code to OEM device
+ //
OemHookStatusCodeReport (
CodeType,
Value,
@@ -95,13 +94,16 @@ ReportDispatcher (
}
/**
- Initialize PEI status codes and publish the status code
- PPI.
+ Entry point of Status Code PEIM.
+
+ This function is the entry point of this Status Code PEIM.
+ It initializes supported status code devices according to PCD settings,
+ and installs Status Code PPI.
@param FileHandle Handle of the file being invoked.
@param PeiServices Describes the list of possible PEI Services.
- @return The function always returns success.
+ @retval EFI_SUCESS The entry point of DXE IPL PEIM executes successfully.
**/
EFI_STATUS
@@ -133,9 +135,9 @@ PeiStatusCodeDriverEntry (
}
//
- // Install PeiStatusCodePpi.
- // PeiServices use this Ppi to output status code.
- // use library
+ // Install Status Code PPI.
+ // It serves the PEI Service ReportStatusCode.
+ //
Status = PeiServicesInstallPpi (&mStatusCodePpiDescriptor);
ASSERT_EFI_ERROR (Status);
diff --git a/IntelFrameworkModulePkg/Universal/StatusCode/Pei/PeiStatusCode.h b/IntelFrameworkModulePkg/Universal/StatusCode/Pei/PeiStatusCode.h
index 9493a49c07..a609393e99 100644
--- a/IntelFrameworkModulePkg/Universal/StatusCode/Pei/PeiStatusCode.h
+++ b/IntelFrameworkModulePkg/Universal/StatusCode/Pei/PeiStatusCode.h
@@ -1,7 +1,7 @@
/** @file
- Heade file of status code PEIM
+ Internal include file for Status Code PEIM.
- Copyright (c) 2006, Intel Corporation
+ Copyright (c) 2006 - 2009, Intel Corporation
All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -38,47 +38,39 @@
/**
Convert status code value and extended data to readable ASCII string, send string to serial I/O device.
- @param CodeType Indicates the type of status code being reported. Type EFI_STATUS_CODE_TYPE is defined in "Related Definitions" below.
-
- @param Value Describes the current status of a hardware or software entity.
- This included information about the class and subclass that is used to classify the entity
- as well as an operation. For progress codes, the operation is the current activity.
- For error codes, it is the exception. For debug codes, it is not defined at this time.
- Type EFI_STATUS_CODE_VALUE is defined in "Related Definitions" below.
- Specific values are discussed in the Intel? Platform Innovation Framework for EFI Status Code Specification.
-
- @param Instance The enumeration of a hardware or software entity within the system.
- A system may contain multiple entities that match a class/subclass pairing.
- The instance differentiates between them. An instance of 0 indicates that instance information is unavailable,
- not meaningful, or not relevant. Valid instance numbers start with 1.
-
-
- @param CallerId This optional parameter may be used to identify the caller.
- This parameter allows the status code driver to apply different rules to different callers.
- Type EFI_GUID is defined in InstallProtocolInterface() in the UEFI 2.0 Specification.
-
-
- @param Data This optional parameter may be used to pass additional data
-
- @return The function always return EFI_SUCCESS.
+ @param CodeType Indicates the type of status code being reported.
+ @param Value Describes the current status of a hardware or
+ software entity. This includes information about the class and
+ subclass that is used to classify the entity as well as an operation.
+ For progress codes, the operation is the current activity.
+ For error codes, it is the exception.For debug codes,it is not defined at this time.
+ @param Instance The enumeration of a hardware or software entity within
+ the system. A system may contain multiple entities that match a class/subclass
+ pairing. The instance differentiates between them. An instance of 0 indicates
+ that instance information is unavailable, not meaningful, or not relevant.
+ Valid instance numbers start with 1.
+ @param CallerId This optional parameter may be used to identify the caller.
+ This parameter allows the status code driver to apply different rules to
+ different callers.
+ @param Data This optional parameter may be used to pass additional data.
+
+ @retval EFI_SUCCESS Status code reported to serial I/O successfully.
**/
EFI_STATUS
SerialStatusCodeReportWorker (
- IN EFI_STATUS_CODE_TYPE CodeType,
- IN EFI_STATUS_CODE_VALUE Value,
- IN UINT32 Instance,
+ IN EFI_STATUS_CODE_TYPE CodeType,
+ IN EFI_STATUS_CODE_VALUE Value,
+ IN UINT32 Instance,
IN CONST EFI_GUID *CallerId,
IN CONST EFI_STATUS_CODE_DATA *Data OPTIONAL
);
/**
- Initialize memory status code.
- Create one GUID'ed HOB with PCD defined size. If create required size
- GUID'ed HOB failed, then ASSERT().
+ Create the first memory status code GUID'ed HOB as initialization for memory status code worker.
- @return The function always return EFI_SUCCESS
+ @retval EFI_SUCCESS The GUID'ed HOB is created successfully.
**/
EFI_STATUS
@@ -89,21 +81,22 @@ MemoryStatusCodeInitializeWorker (
/**
Report status code into GUID'ed HOB.
- @param CodeType Indicates the type of status code being reported. Type EFI_STATUS_CODE_TYPE is defined in "Related Definitions" below.
+ This function reports status code into GUID'ed HOB. If not all packets are full, then
+ write status code into available entry. Otherwise, create a new packet for it.
- @param Value Describes the current status of a hardware or software entity.
- This included information about the class and subclass that is used to classify the entity
- as well as an operation. For progress codes, the operation is the current activity.
- For error codes, it is the exception. For debug codes, it is not defined at this time.
- Type EFI_STATUS_CODE_VALUE is defined in "Related Definitions" below.
- Specific values are discussed in the Intel? Platform Innovation Framework for EFI Status Code Specification.
+ @param CodeType Indicates the type of status code being reported.
+ @param Value Describes the current status of a hardware or
+ software entity. This includes information about the class and
+ subclass that is used to classify the entity as well as an operation.
+ For progress codes, the operation is the current activity.
+ For error codes, it is the exception.For debug codes,it is not defined at this time.
+ @param Instance The enumeration of a hardware or software entity within
+ the system. A system may contain multiple entities that match a class/subclass
+ pairing. The instance differentiates between them. An instance of 0 indicates
+ that instance information is unavailable, not meaningful, or not relevant.
+ Valid instance numbers start with 1.
- @param Instance The enumeration of a hardware or software entity within the system.
- A system may contain multiple entities that match a class/subclass pairing.
- The instance differentiates between them. An instance of 0 indicates that instance information is unavailable,
- not meaningful, or not relevant. Valid instance numbers start with 1.
-
- @return The function always return EFI_SUCCESS.
+ @retval EFI_SUCCESS The function always return EFI_SUCCESS.
**/
EFI_STATUS
@@ -114,44 +107,42 @@ MemoryStatusCodeReportWorker (
);
/**
- Report status code to all supported device.
-
-
- @param PeiServices
-
- @param Type Indicates the type of status code being reported.
- The type EFI_STATUS_CODE_TYPE is defined in "Related Definitions" below.
- @param Value Describes the current status of a hardware or software entity.
- This includes information about the class and subclass that is used to classify the entity
- as well as an operation. For progress codes, the operation is the current activity.
- For error codes, it is the exception. For debug codes, it is not defined at this time.
- Type EFI_STATUS_CODE_VALUE is defined in "Related Definitions" below.
- Specific values are discussed in the Intel? Platform Innovation Framework for EFI Status Code Specification.
- @param Instance The enumeration of a hardware or software entity within the system.
- A system may contain multiple entities that match a class/subclass pairing.
- The instance differentiates between them. An instance of 0 indicates that instance
- information is unavailable, not meaningful, or not relevant. Valid instance numbers start with 1.
- @param CallerId This optional parameter may be used to identify the caller.
- This parameter allows the status code driver to apply different rules to different callers.
- @param Data This optional parameter may be used to pass additional data.
- Type EFI_STATUS_CODE_DATA is defined in "Related Definitions" below.
- The contents of this data type may have additional GUID-specific data. The standard GUIDs and
- their associated data structures are defined in the Intel? Platform Innovation Framework for EFI Status Codes Specification.
-
- @return Always return EFI_SUCCESS.
+ Publishes an interface that allows PEIMs to report status codes.
+
+ This function implements EFI_PEI_PROGRESS_CODE_PPI.ReportStatusCode().
+ It publishes an interface that allows PEIMs to report status codes.
+
+ @param PeiServices An indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation.
+ @param CodeType Indicates the type of status code being reported.
+ @param Value Describes the current status of a hardware or
+ software entity. This includes information about the class and
+ subclass that is used to classify the entity as well as an operation.
+ For progress codes, the operation is the current activity.
+ For error codes, it is the exception.For debug codes,it is not defined at this time.
+ @param Instance The enumeration of a hardware or software entity within
+ the system. A system may contain multiple entities that match a class/subclass
+ pairing. The instance differentiates between them. An instance of 0 indicates
+ that instance information is unavailable, not meaningful, or not relevant.
+ Valid instance numbers start with 1.
+ @param CallerId This optional parameter may be used to identify the caller.
+ This parameter allows the status code driver to apply different rules to
+ different callers.
+ @param Data This optional parameter may be used to pass additional data.
+
+ @retval EFI_SUCCESS The function completed successfully.
**/
EFI_STATUS
EFIAPI
ReportDispatcher (
IN CONST EFI_PEI_SERVICES **PeiServices,
- IN EFI_STATUS_CODE_TYPE Type,
- IN EFI_STATUS_CODE_VALUE Value,
- IN UINT32 Instance,
+ IN EFI_STATUS_CODE_TYPE CodeType,
+ IN EFI_STATUS_CODE_VALUE Value,
+ IN UINT32 Instance,
IN CONST EFI_GUID *CallerId OPTIONAL,
IN CONST EFI_STATUS_CODE_DATA *Data OPTIONAL
);
-#endif //__PEI_STATUS_CODE_H__
+#endif
diff --git a/IntelFrameworkModulePkg/Universal/StatusCode/Pei/PeiStatusCode.inf b/IntelFrameworkModulePkg/Universal/StatusCode/Pei/PeiStatusCode.inf
index af9cdfc875..15ab9dc737 100644
--- a/IntelFrameworkModulePkg/Universal/StatusCode/Pei/PeiStatusCode.inf
+++ b/IntelFrameworkModulePkg/Universal/StatusCode/Pei/PeiStatusCode.inf
@@ -1,7 +1,6 @@
#/** @file
-# Generic Status code Pei driver
+# Status code PEIM which produces Status Code PPI.
#
-# Customized output devices based on feature flags.
# Copyright (c) 2006 - 2009, Intel Corporation.
#
# All rights reserved. This program and the accompanying materials
@@ -16,7 +15,7 @@
[Defines]
INF_VERSION = 0x00010005
- BASE_NAME = PeiStatusCode
+ BASE_NAME = StatusCodePei
FILE_GUID = 1EC0F53A-FDE0-4576-8F25-7A1A410F58EB
MODULE_TYPE = PEIM
VERSION_STRING = 1.0
@@ -38,7 +37,6 @@
[Packages]
MdePkg/MdePkg.dec
- MdeModulePkg/MdeModulePkg.dec
IntelFrameworkPkg/IntelFrameworkPkg.dec
IntelFrameworkModulePkg/IntelFrameworkModulePkg.dec
diff --git a/IntelFrameworkModulePkg/Universal/StatusCode/Pei/SerialStatusCodeWorker.c b/IntelFrameworkModulePkg/Universal/StatusCode/Pei/SerialStatusCodeWorker.c
index 111f9e3f2c..7a618d9e1b 100644
--- a/IntelFrameworkModulePkg/Universal/StatusCode/Pei/SerialStatusCodeWorker.c
+++ b/IntelFrameworkModulePkg/Universal/StatusCode/Pei/SerialStatusCodeWorker.c
@@ -1,7 +1,7 @@
/** @file
Serial I/O status code reporting worker.
- Copyright (c) 2006, Intel Corporation
+ Copyright (c) 2006 - 2009, Intel Corporation
All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -16,36 +16,30 @@
/**
Convert status code value and extended data to readable ASCII string, send string to serial I/O device.
- @param CodeType Indicates the type of status code being reported. Type EFI_STATUS_CODE_TYPE is defined in "Related Definitions" below.
-
- @param Value Describes the current status of a hardware or software entity.
- This included information about the class and subclass that is used to classify the entity
- as well as an operation. For progress codes, the operation is the current activity.
- For error codes, it is the exception. For debug codes, it is not defined at this time.
- Type EFI_STATUS_CODE_VALUE is defined in "Related Definitions" below.
- Specific values are discussed in the Intel? Platform Innovation Framework for EFI Status Code Specification.
-
- @param Instance The enumeration of a hardware or software entity within the system.
- A system may contain multiple entities that match a class/subclass pairing.
- The instance differentiates between them. An instance of 0 indicates that instance information is unavailable,
- not meaningful, or not relevant. Valid instance numbers start with 1.
-
-
- @param CallerId This optional parameter may be used to identify the caller.
- This parameter allows the status code driver to apply different rules to different callers.
- Type EFI_GUID is defined in InstallProtocolInterface() in the UEFI 2.0 Specification.
-
-
- @param Data This optional parameter may be used to pass additional data
-
- @return The function always return EFI_SUCCESS.
+ @param CodeType Indicates the type of status code being reported.
+ @param Value Describes the current status of a hardware or
+ software entity. This includes information about the class and
+ subclass that is used to classify the entity as well as an operation.
+ For progress codes, the operation is the current activity.
+ For error codes, it is the exception.For debug codes,it is not defined at this time.
+ @param Instance The enumeration of a hardware or software entity within
+ the system. A system may contain multiple entities that match a class/subclass
+ pairing. The instance differentiates between them. An instance of 0 indicates
+ that instance information is unavailable, not meaningful, or not relevant.
+ Valid instance numbers start with 1.
+ @param CallerId This optional parameter may be used to identify the caller.
+ This parameter allows the status code driver to apply different rules to
+ different callers.
+ @param Data This optional parameter may be used to pass additional data.
+
+ @retval EFI_SUCCESS Status code reported to serial I/O successfully.
**/
EFI_STATUS
SerialStatusCodeReportWorker (
- IN EFI_STATUS_CODE_TYPE CodeType,
- IN EFI_STATUS_CODE_VALUE Value,
- IN UINT32 Instance,
+ IN EFI_STATUS_CODE_TYPE CodeType,
+ IN EFI_STATUS_CODE_VALUE Value,
+ IN UINT32 Instance,
IN CONST EFI_GUID *CallerId,
IN CONST EFI_STATUS_CODE_DATA *Data OPTIONAL
)
@@ -98,10 +92,6 @@ SerialStatusCodeReportWorker (
Instance
);
- //
- // Make sure we don't try to print values that weren't intended to be printed, especially NULL GUID pointers.
- //
-
if (CallerId != NULL) {
CharCount += AsciiSPrint (
&Buffer[CharCount - 1],
@@ -126,6 +116,9 @@ SerialStatusCodeReportWorker (
"\n\r"
);
} else if ((CodeType & EFI_STATUS_CODE_TYPE_MASK) == EFI_PROGRESS_CODE) {
+ //
+ // Print PROGRESS information into output buffer.
+ //
CharCount = AsciiSPrint (
Buffer,
EFI_STATUS_CODE_DATA_MAX_SIZE,
@@ -134,6 +127,9 @@ SerialStatusCodeReportWorker (
Instance
);
} else {
+ //
+ // Code type is not defined.
+ //
CharCount = AsciiSPrint (
Buffer,
EFI_STATUS_CODE_DATA_MAX_SIZE,
@@ -145,7 +141,7 @@ SerialStatusCodeReportWorker (
}
//
- // Callout to SerialPort Lib function to do print.
+ // Call SerialPort Lib function to do print.
//
SerialPortWrite ((UINT8 *) Buffer, CharCount);