Heinrich Schuchardt 04cc7914f2 efi_selftest: implement exception test for sandbox
Provide a unit test that causes an illegal instruction to occur.

The test can be run with the following commands:

    => setenv efi_selftest exception
    => bootefi selftest

This might be the output:

    Executing 'exception'
    EFI application triggers exception.
    Illegal instruction
    pc = 0x1444d016, pc_reloc = 0xffffaa078e8dd016
    UEFI image [0x0000000000000000:0xffffffffffffffff] '/\selftest'
    UEFI image [0x000000001444b000:0x0000000014451fff] pc=0x2016 '/bug.efi'
    Resetting ...

It would tell us that the exception was triggered by an instruction
0x2016 bytes after the load address of the binary with filename /bug.efi.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
2020-12-13 07:58:17 -07:00
..
2020-05-18 21:19:18 -04:00
2020-05-18 21:19:18 -04:00
2011-01-18 23:38:08 +01:00
2019-12-02 18:23:07 -05:00
2019-10-31 07:22:53 -04:00
2010-09-19 19:29:47 +02:00
2020-10-30 10:56:11 -04:00
2020-04-24 10:51:32 -04:00
2020-12-10 09:14:58 +01:00
2020-11-05 14:58:45 +08:00
2012-04-29 14:14:08 +02:00
2019-12-06 16:44:20 -05:00
2020-05-18 21:19:18 -04:00
2020-06-12 13:14:07 -04:00
2020-05-18 21:19:18 -04:00
2020-11-05 14:58:45 +08:00
2020-08-24 14:11:31 -04:00
2020-10-14 11:16:34 -04:00
2020-05-01 11:03:24 -04:00
2020-05-18 21:19:18 -04:00
2020-10-27 21:13:15 +01:00
2020-05-18 18:36:55 -04:00
2019-05-05 08:48:50 -04:00