1
2
3
4
5
6
7
8#include <common.h>
9#include <efi_loader.h>
10#include <irq_func.h>
11#include <os.h>
12#include <asm/global_data.h>
13#include <asm-generic/signal.h>
14#include <asm/u-boot-sandbox.h>
15
16DECLARE_GLOBAL_DATA_PTR;
17
18int interrupt_init(void)
19{
20 return 0;
21}
22
23void enable_interrupts(void)
24{
25 return;
26}
27int disable_interrupts(void)
28{
29 return 0;
30}
31
32void os_signal_action(int sig, unsigned long pc)
33{
34 efi_restore_gd();
35
36 switch (sig) {
37 case SIGILL:
38 printf("\nIllegal instruction\n");
39 break;
40 case SIGBUS:
41 printf("\nBus error\n");
42 break;
43 case SIGSEGV:
44 printf("\nSegmentation violation\n");
45 break;
46 default:
47 break;
48 }
49 printf("pc = 0x%lx, ", pc);
50 printf("pc_reloc = 0x%lx\n\n", pc - gd->reloc_off);
51 efi_print_image_infos((void *)pc);
52
53 if (IS_ENABLED(CONFIG_SANDBOX_CRASH_RESET)) {
54 printf("resetting ...\n\n");
55 sandbox_reset();
56 } else {
57 sandbox_exit();
58 }
59}
60