1
2
3
4
5
6
7
8
9
10#include <common.h>
11#include <efi_api.h>
12
13
14
15
16
17
18
19
20efi_status_t EFIAPI efi_main(efi_handle_t handle,
21 struct efi_system_table *systable)
22{
23 struct efi_simple_text_output_protocol *con_out = systable->con_out;
24
25 con_out->output_string(con_out,
26 L"EFI application triggers exception.\n");
27
28#if defined(CONFIG_ARM)
29
30
31
32
33 asm volatile (".word 0xe7f7defb\n");
34#elif defined(CONFIG_RISCV)
35 asm volatile (".word 0xffffffff\n");
36#elif defined(CONFIG_SANDBOX)
37 asm volatile (".word 0xffffffff\n");
38#elif defined(CONFIG_X86)
39 asm volatile (".word 0xffff\n");
40#endif
41 con_out->output_string(con_out, L"Exception not triggered.\n");
42 return EFI_ABORTED;
43}
44