git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1435
6f19259b-4bc3-4df7-8a09-
765794883524
// Use atom operation to avoid the reentant of report.\r
// If current status is not zero, then the function is reentrancy.\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
return EFI_DEVICE_ERROR;\r
}\r
\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
@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
@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
// See whether in runtime phase or not.\r
//\r
if (EfiAtRuntime ()) {\r
+ return EFI_DEVICE_ERROR;\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
if (Record == NULL) {\r
//\r
// There are no empty record buffer in private buffers\r
CharCount += AsciiSPrint (\r
&Buffer[CharCount - 1],\r
(EFI_STATUS_CODE_DATA_MAX_SIZE - (sizeof (Buffer[0]) * CharCount)),\r
CharCount += AsciiSPrint (\r
&Buffer[CharCount - 1],\r
(EFI_STATUS_CODE_DATA_MAX_SIZE - (sizeof (Buffer[0]) * CharCount)),\r