*/
#include <common.h>
+#include <dm.h>
#include <asm/cache.h>
#include <asm/control_regs.h>
+#include <asm/i8259.h>
#include <asm/interrupt.h>
#include <asm/io.h>
-#include <asm/processor-flags.h>
-#include <linux/compiler.h>
+#include <asm/lapic.h>
#include <asm/msr.h>
+#include <asm/processor-flags.h>
#include <asm/processor.h>
#include <asm/u-boot-x86.h>
-#include <asm/i8259.h>
DECLARE_GLOBAL_DATA_PTR;
printf("EIP: %04x:[<%08lx>] EFLAGS: %08lx\n",
(u16)cs, eip, eflags);
+ if (gd->flags & GD_FLG_RELOC)
+ printf("Original EIP :[<%08lx>]\n", eip - gd->reloc_off);
printf("EAX: %08lx EBX: %08lx ECX: %08lx EDX: %08lx\n",
regs->eax, regs->ebx, regs->ecx, regs->edx);
int interrupt_init(void)
{
+ struct udevice *dev;
+ int ret;
+
+ /* Try to set up the interrupt router, but don't require one */
+ ret = uclass_first_device_err(UCLASS_IRQ, &dev);
+ if (ret && ret != -ENODEV)
+ return ret;
+
/*
* When running as an EFI application we are not in control of
* interrupts and should leave them alone.
/* Just in case... */
disable_interrupts();
-#ifdef CONFIG_SYS_PCAT_INTERRUPTS
+#ifdef CONFIG_I8259_PIC
/* Initialize the master/slave i8259 pic */
i8259_init();
#endif
+ lapic_setup();
+
/* Initialize core interrupt and exception functionality of CPU */
cpu_init_interrupts();