Skip to content

Instantly share code, notes, and snippets.

@gabonator
Created January 26, 2023 11:26
Show Gist options
  • Save gabonator/53fac3a642d4b9e1caa0077780551da5 to your computer and use it in GitHub Desktop.
Save gabonator/53fac3a642d4b9e1caa0077780551da5 to your computer and use it in GitHub Desktop.
uefi debug print, debug anywhere or in release
#include <Library/SerialPortLib.h>
#include <Library/PrintLib.h>
VOID EFIAPI InternalPrintMessage(IN CONST CHAR8 *Format, ...)
{
CHAR8 Buffer[1024];
VA_LIST Marker;
VA_START (Marker, Format);
AsciiVSPrint (Buffer, sizeof (Buffer), Format, Marker);
VA_END (Marker);
SerialPortWrite ((UINT8 *)Buffer, AsciiStrLen (Buffer));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment