X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=EdkModulePkg%2FUniversal%2FStatusCode%2FDxe%2FSerialStatusCodeWorker.c;h=0b16dfeadb5d8b562a962a3f5cf4606ca641a8dd;hp=69e3e10757b749636b351d027165347005cc00e5;hb=35d4cd92bd21a3538f6c300723b715b1df6911bb;hpb=534089527b1bbaf45305bec95c2c2a263a9ae424 diff --git a/EdkModulePkg/Universal/StatusCode/Dxe/SerialStatusCodeWorker.c b/EdkModulePkg/Universal/StatusCode/Dxe/SerialStatusCodeWorker.c index 69e3e10757..0b16dfeadb 100644 --- a/EdkModulePkg/Universal/StatusCode/Dxe/SerialStatusCodeWorker.c +++ b/EdkModulePkg/Universal/StatusCode/Dxe/SerialStatusCodeWorker.c @@ -46,13 +46,13 @@ EfiSerialStatusCodeInitializeWorker ( /** 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 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. + 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. @@ -90,10 +90,19 @@ SerialStatusCodeReportWorker ( UINTN CharCount; VA_LIST Marker; EFI_DEBUG_INFO *DebugInfo; + EFI_TPL CurrentTpl; - if (FeaturePcdGet (PcdStatusCodeUseEfiSerial) && EfiAtRuntime ()) { - return EFI_DEVICE_ERROR; + if (FeaturePcdGet (PcdStatusCodeUseEfiSerial)) { + if (EfiAtRuntime ()) { + return EFI_DEVICE_ERROR; + } + CurrentTpl = gBS->RaiseTPL (EFI_TPL_HIGH_LEVEL); + gBS->RestoreTPL (CurrentTpl); + + if (CurrentTpl > EFI_TPL_CALLBACK ) { + return EFI_DEVICE_ERROR; + } } Buffer[0] = '\0';