Skip to content

Instantly share code, notes, and snippets.

@retrage
Created December 21, 2019 04:03
Show Gist options
  • Save retrage/8488eb1be48e40ccf14c404585dde3fd to your computer and use it in GitHub Desktop.
Save retrage/8488eb1be48e40ccf14c404585dde3fd to your computer and use it in GitHub Desktop.
BitVisor loadvmm.efi printhex
static void
printhex (EFI_SYSTEM_TABLE *systab, uint64_t val, int width)
{
CHAR16 msg[2];
if (width > 1 || val >= 0x10)
printhex (systab, val >> 4, width - 1);
msg[0] = L"0123456789ABCDEF"[val & 0xF];
msg[1] = L'\0';
systab->ConOut->OutputString (systab->ConOut, msg);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment