There is no way to see anything about the faults occuring in loader.efi. Some intel BIOSes do output a line into serial port at 115200/8/1 regardless of the current port settings with the EFI error number, but this is too little, and not always available, esp. if the user does not know where to look.
The patch adds a simple facility to grab exceptions and at least dump generic registers and some exception details. Initially I thought to install the grab always, but the relative complexity of correctly take over the BIOS IDT setup makes me think that it is better to install it as needed. So there are two commands, 'grab' and 'ungrab'. First one takes over, second undoes the first. It is supposed that user would execute 'grab' by the developer direction of collecting the debugging data.
Fault handlers use dedicated stack to improve chances of catching stack/TSS exceptions. Due to this, I copy BIOS IDT into private copy, and need to find a free GDT slot for TSS. This explains somewhat complicated efi_redirect_exceptions().