UINTN CharCount;\r
VA_LIST Marker;\r
EFI_DEBUG_INFO *DebugInfo;\r
+ EFI_TPL CurrentTpl;\r
\r
\r
- if (FeaturePcdGet (PcdStatusCodeUseEfiSerial) && EfiAtRuntime ()) {\r
- return EFI_DEVICE_ERROR;\r
+ if (FeaturePcdGet (PcdStatusCodeUseEfiSerial)) {\r
+ if (EfiAtRuntime ()) {\r
+ return EFI_DEVICE_ERROR;\r
+ }\r
+ CurrentTpl = gBS->RaiseTPL (EFI_TPL_HIGH_LEVEL);\r
+ gBS->RestoreTPL (CurrentTpl);\r
+\r
+ if (CurrentTpl > EFI_TPL_CALLBACK ) {\r
+ return EFI_DEVICE_ERROR;\r
+ }\r
}\r
\r
Buffer[0] = '\0';\r