UEFI specification has an mechanism to pass data via
EFI_BOOT_SERVICES.Exit(). We can use this to pass
panic() message, so the use has an chance to get this
information in case the console is not usable or
available.
To do this, we allocate static string buffer (arbitrary
picked 2 lines - 160 chars) - it is possible the loader heap
is corrupted and malloc is not usable, and we pass it to BS->Exit().
Note: we still need to print this buffer on console too
for non-UEFI platforms.
The static buffer size does limit the length of the panic
message (assert may generate long messages), but we do not want to
waste too much of precious resource.