// The point type always equal to PHYSICAL_MODE on IA32/X64/EBC architecture\r
// Otherwise, VIRTUAL_MODE/PHYSICAL_MODE would be used on Ipf architecture, \r
// \r
-enum {\r
+typedef enum {\r
PHYSICAL_MODE,\r
VIRTUAL_MODE\r
-};\r
+} PROCESSOR_MODE;\r
\r
typedef struct {\r
UINTN Signature;\r
\r
@param Data This optional parameter may be used to pass additional data\r
\r
- @return The function always return EFI_SUCCESS.\r
+ @retval EFI_SUCCESS Success to report status code to serial I/O.\r
+ @retval EFI_DEVICE_ERROR EFI serial device can not work after ExitBootService() is called .\r
\r
**/\r
EFI_STATUS\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
/** @file\r
- Status code driver for IA32/X64/EBC architecture.\r
+* Status code driver for IPF architecture.\r
\r
Copyright (c) 2006, Intel Corporation \r
All rights reserved. This program and the accompanying materials \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 (&DxeStatusCode->StatusCodeNestStatus, 0, 1)) {\r
- ReturnVal.Status = EFI_DEVICE_ERROR ;\r
+ if (1 == InterlockedCompareExchange32 (&DxeStatusCode->StatusCodeNestStatus, 0, 1)) {\r
+ ReturnVal.Status = EFI_DEVICE_ERROR;\r
return ReturnVal;\r
}\r
\r
IN EFI_SYSTEM_TABLE *SystemTable\r
)\r
{\r
+ EFI_STATUS Status;\r
+\r
//\r
// Dispatch initialization request to supported devices\r
//\r
//\r
// Initialize ESAL capabilities.\r
//\r
- RegisterEsalClass (\r
- &gEfiExtendedSalStatusCodeServicesProtocolGuid,\r
- &gDxeStatusCode,\r
- ReportEsalServiceEntry,\r
- StatusCode,\r
- NULL\r
- );\r
+ Status = RegisterEsalClass (\r
+ &gEfiExtendedSalStatusCodeServicesProtocolGuid,\r
+ &gDxeStatusCode,\r
+ ReportEsalServiceEntry,\r
+ StatusCode,\r
+ NULL\r
+ );\r
+ ASSERT_EFI_ERROR (Status);\r
\r
return EFI_SUCCESS;\r
}\r