\r
@param Record Point to record buffer which is acquired by AcquirRecordBuffer()\r
\r
- @retval EFI_SUCCESS If DataRecord is valid.\r
- @retval !EFI_SUCCESS The record list has empty.\r
-\r
**/\r
VOID\r
FreeRecordBuffer (\r
IN DATAHUB_STATUSCODE_RECORD *Record\r
)\r
-/*++\r
-\r
-Routine Description:\r
-\r
- Release a mRecordBuffer entry allocated by AquireEmptyRecordBuffer ().\r
-\r
-Arguments:\r
-\r
- RecordBuffer - Data to free\r
-\r
-Returns:\r
-\r
- EFI_SUCCESS - If DataRecord is valid\r
- EFI_UNSUPPORTED - The record list has empty\r
-\r
---*/\r
{\r
ASSERT (Record != NULL);\r
ASSERT (mNumberOfRecords != 0);\r
/**\r
Report status code into DataHub.\r
\r
- @param CodeType Indicates the type of status code being reported. Type EFI_STATUS_CODE_TYPE is defined in "Related Definitions¡± below.\r
+ @param CodeType Indicates the type of status code being reported. Type EFI_STATUS_CODE_TYPE is defined in "Related Definitions" below.\r
\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 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
\r
@param Instance The enumeration of a hardware or software entity within the system. \r
@param Data This optional parameter may be used to pass additional data\r
\r
@retval EFI_OUT_OF_RESOURCES Can not acquire record buffer.\r
+ @retval EFI_DEVICE_ERROR EFI serial device can not work after ExitBootService() is called .\r
@retval EFI_SUCCESS Success to cache status code and signal log data event.\r
\r
**/\r
// See whether in runtime phase or not.\r
//\r
if (EfiAtRuntime ()) {\r
- return EFI_SUCCESS;\r
+ return EFI_DEVICE_ERROR;\r
}\r
\r
- Record = (DATAHUB_STATUSCODE_RECORD *) AcquireRecordBuffer ();\r
+ Record = AcquireRecordBuffer ();\r
if (Record == NULL) {\r
//\r
// There are no empty record buffer in private buffers\r
)\r
{\r
DATAHUB_STATUSCODE_RECORD *Record;\r
- UINTN Size;\r
+ UINT32 Size;\r
UINT64 DataRecordClass;\r
LIST_ENTRY *Node;\r
\r
//\r
// Add in the size of the header we added.\r
//\r
- Size = sizeof (DATAHUB_STATUSCODE_RECORD) + Record->Data.Size;\r
+ Size = sizeof (DATAHUB_STATUSCODE_RECORD) + (UINT32) Record->Data.Size;\r
\r
if ((Record->CodeType & EFI_STATUS_CODE_TYPE_MASK) == EFI_PROGRESS_CODE) {\r
DataRecordClass = EFI_DATA_RECORD_CLASS_PROGRESS_CODE;\r
&gEfiStatusCodeRuntimeProtocolGuid,\r
DataRecordClass,\r
Record,\r
- (UINT32) Size\r
+ Size\r
);\r
\r
FreeRecordBuffer (Record);\r