>> +STATIC
>> +VOID
>> +OnEndOfDxe (
>> + IN EFI_EVENT Event,
>> + IN VOID *Context
>> + )
>> +{
>> + UINT32 BootMode;
>> +
>> + BootMode = MmioRead32 (SCTRL_BAK_DATA0) & BOOT_MODE_MASK;
>> + if (BootMode == BOOT_MODE_RECOVERY) {
>> + SerialPortWrite ((UINT8 *)"WARNING: CAN NOT BOOT KERNEL IN RECOVERY
>> MODE!\r\n", 48);
>> + SerialPortWrite ((UINT8 *)"Switch to normal boot mode, then reboot to
>> boot kernel.\r\n", 57);
>
> I commented on v1:
> ---
> 1) Why this use of SerialPortWrite instead of Print?
> 2) This cast to (UINT8 *) works by accident. Please don't do this.
> 3) Please _never_ use hand-coded values for compile-time determined
> (and known) information. In this case the output string length.
> ---
> Please change to Print().
>
I can't use Print() at here since console isn't ready. The OnEndOfDxe() is
executed
before console ready. SerialPortWrite () is the only choice to me.
I'll fix other issues with comments.
Best Regards
Haojian
_______________________________________________
edk2-devel mailing list
[email protected]
https://lists.01.org/mailman/listinfo/edk2-devel