//\r
SerialPortWrite ((UINT8 *) Buffer, CharCount);\r
\r
+ //\r
+ // If register an unregister function of gEfiEventExitBootServicesGuid,\r
+ // then some log called in ExitBootServices() will be lost,\r
+ // so unregister the handler after receive the value of exit boot service.\r
+ //\r
+ if ((CodeType & EFI_STATUS_CODE_TYPE_MASK) == EFI_PROGRESS_CODE &&\r
+ Value == (EFI_SOFTWARE_EFI_BOOT_SERVICE | EFI_SW_BS_PC_EXIT_BOOT_SERVICES)) {\r
+ UnregisterSerialBootTimeHandlers();\r
+ }\r
+\r
return EFI_SUCCESS;\r
}\r
\r