The system is stuck on the UEFI screen and does not start

I modified mine according to the link inside /build/nvidia-uefi/edk2-nvidia/Silicon/NVIDIA/Library/PlatformBootManagerLib/PlatformBm.c

I blocked the next two places
1203 //
1204 // Register platform-specific boot options and keyboard shortcuts.
1205 //
1206 //add by bxl for uart start into uefi
1207 //PlatformRegisterOptionsAndKeys ();

1561 //
1562 // Display system and hotkey information after console is ready.
1563 //
1564 //add by bxl for uart start into uefi
1565 //DisplaySystemAndHotkeyInformation ();

However, when I replace the compiled uefi on the system startup, I will report the following error, what is the reason for this?