X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=arch%2Farm%2Flib%2Finterrupts.c;h=36299d6e54315d196db182e8110a02b3febf1ae1;hb=04da42770b0cc3bea8841972bfc9568299ece826;hp=28ba3f14f36275205d4125593e2f1c59b75738b4;hpb=83d290c56fab2d38cd1ab4c4cc7099559c1d5046;p=platform%2Fkernel%2Fu-boot.git diff --git a/arch/arm/lib/interrupts.c b/arch/arm/lib/interrupts.c index 28ba3f1..36299d6 100644 --- a/arch/arm/lib/interrupts.c +++ b/arch/arm/lib/interrupts.c @@ -19,28 +19,31 @@ */ #include +#include #include +#include #include #include -#include DECLARE_GLOBAL_DATA_PTR; -int interrupt_init (void) +int interrupt_init(void) { /* * setup up stacks if necessary */ IRQ_STACK_START_IN = gd->irq_sp + 8; + enable_interrupts(); + return 0; } -void enable_interrupts (void) +void enable_interrupts(void) { return; } -int disable_interrupts (void) +int disable_interrupts(void) { return 0; } @@ -48,7 +51,7 @@ int disable_interrupts (void) void bad_mode (void) { panic ("Resetting CPU ...\n"); - reset_cpu (0); + reset_cpu(0); } static void show_efi_loaded_images(struct pt_regs *regs) @@ -56,6 +59,30 @@ static void show_efi_loaded_images(struct pt_regs *regs) efi_print_image_infos((void *)instruction_pointer(regs)); } +static void dump_instr(struct pt_regs *regs) +{ + unsigned long addr = instruction_pointer(regs); + const int thumb = thumb_mode(regs); + const int width = thumb ? 4 : 8; + int i; + + if (thumb) + addr &= ~1L; + else + addr &= ~3L; + printf("Code: "); + for (i = -4; i < 1 + !!thumb; i++) { + unsigned int val; + + if (thumb) + val = ((u16 *)addr)[i]; + else + val = ((u32 *)addr)[i]; + printf(i == 0 ? "(%0*x) " : "%0*x ", width, val); + } + printf("\n"); +} + void show_regs (struct pt_regs *regs) { unsigned long __maybe_unused flags; @@ -96,6 +123,7 @@ void show_regs (struct pt_regs *regs) fast_interrupts_enabled (regs) ? "on" : "off", processor_modes[processor_mode (regs)], thumb_mode (regs) ? " (T)" : ""); + dump_instr(regs); } /* fixup PC to point to the instruction leading to the exception */