iPXE - Open Source Boot Firmware

[librm] Add facility to provide register and stack dump for CPU exceptions
authorMichael Brown <mcb30@ipxe.org>
Sun, 18 Mar 2018 12:54:57 +0000 (14:54 +0200)
committerMichael Brown <mcb30@ipxe.org>
Sun, 18 Mar 2018 12:59:34 +0000 (14:59 +0200)
commit89e31f8491895e6196d4ba56aee3809261aa6b89
treef7104a5cdd168eedc241618211457f5104548e06
parent0c43bb934ab531f86a850a930e9cf599650f582d
[librm] Add facility to provide register and stack dump for CPU exceptions

When DEBUG=librm_mgmt is enabled, intercept CPU exceptions and provide
a register and stack dump, then drop to an emergency shell.  Exiting
from the shell will almost certainly not work, but this provides an
opportunity to view the register and stack dump and carry out some
basic debugging.

Note that we can intercept only the first 8 CPU exceptions, since a
PXE ROM is not permitted to rebase the PIC.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
src/arch/x86/include/librm.h
src/arch/x86/transitions/librm.S
src/arch/x86/transitions/librm_mgmt.c