Пример #1
0
void boot_aon_handle_spurious_irq(void)
{
	/* The PIC IRR register may be asserted by the application before a warm
	 * reset. IRR cannot be cleared by software, so let's just catch this
	 * single spurious interrupt. */
	qm_int_vector_request(QM_IRQ_AONPT_0_INT_VECTOR, aonpt_spurious_isr);
	qm_int_vector_request(QM_IRQ_COMPARATOR_0_INT_VECTOR,
			      aon_cmp_spurious_isr);
	qm_int_vector_request(QM_IRQ_RTC_0_INT_VECTOR, rtc_spurious_isr);
#if (QUARK_SE)
	qm_int_vector_request(QM_IRQ_AON_GPIO_0_INT_VECTOR,
			      aongpio_spurious_isr);
#endif
}
Пример #2
0
/*
 * C runtime initialization.
 * This will be called from rom_startup.s
 */
void rom_startup(void)
{
	void (*lmt_app_entry)(void) = (void *)LMT_APP_ADDR;

	extern uint32_t __bss_start[];
	extern uint32_t __data_vma[];
	extern uint32_t __data_lma[];
	extern uint32_t __data_size[];
	extern uint32_t __bss_end[];

	/* Zero out bss */
	memset(__bss_start, 0x00, (uint32_t)__bss_end - (uint32_t)__bss_start);

	/* Copy initialised variables */
	memcpy(__data_vma, __data_lma, (size_t)__data_size);

	power_setup();
	clock_setup();

	boot_sense_jtag_probe();

	/* Interrupt initialisation */
	irq_setup();
	idt_init();
	boot_aon_handle_spurious_irq();
#if (DEBUG)
	qm_int_vector_request(QM_X86_DOUBLE_FAULT_INT, double_fault_isr);
#endif
	soc_boot_init_interrupt_controller();
	__asm__ __volatile__("sti");

#if (ENABLE_FIRMWARE_MANAGER)
	fm_hook();
#endif /* ENABLE_FIRMWARE_MANAGER */

	/*
	 * Execute application on Lakemont, provided that the application has
	 * been
	 * programmed.
	 */

	/* Execute application, provided that it has been programmed. */
	if (0xffffffff != *(uint32_t *)LMT_APP_ADDR) {
		lmt_app_entry();
	}

	soc_boot_sleep();
}