2016-08-02 06:59:10 +08:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2010-2014 Wind River Systems, Inc.
|
|
|
|
*
|
2017-01-19 09:01:01 +08:00
|
|
|
* SPDX-License-Identifier: Apache-2.0
|
2016-08-02 06:59:10 +08:00
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @file
|
|
|
|
* @brief Interrupt support for IA-32 arch
|
|
|
|
*
|
|
|
|
* INTERNAL
|
|
|
|
* The _idt_base_address symbol is used to determine the base address of the IDT.
|
|
|
|
* (It is generated by the linker script, and doesn't correspond to an actual
|
|
|
|
* global variable.)
|
|
|
|
*/
|
|
|
|
|
2016-12-23 21:35:34 +08:00
|
|
|
#include <kernel.h>
|
2016-08-02 06:59:10 +08:00
|
|
|
#include <arch/cpu.h>
|
2016-11-08 23:36:50 +08:00
|
|
|
#include <kernel_structs.h>
|
2016-08-02 06:59:10 +08:00
|
|
|
#include <misc/__assert.h>
|
|
|
|
#include <misc/printk.h>
|
|
|
|
#include <irq.h>
|
|
|
|
|
|
|
|
extern void _SpuriousIntHandler(void *);
|
|
|
|
extern void _SpuriousIntNoErrCodeHandler(void *);
|
|
|
|
|
|
|
|
/*
|
|
|
|
* These 'dummy' variables are used in nanoArchInit() to force the inclusion of
|
|
|
|
* the spurious interrupt handlers. They *must* be declared in a module other
|
|
|
|
* than the one they are used in to get around garbage collection issues and
|
|
|
|
* warnings issued some compilers that they aren't used. Therefore care must
|
2016-11-08 23:36:50 +08:00
|
|
|
* be taken if they are to be moved. See kernel_structs.h for more information.
|
2016-08-02 06:59:10 +08:00
|
|
|
*/
|
|
|
|
void *_dummy_spurious_interrupt;
|
|
|
|
void *_dummy_exception_vector_stub;
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Place the addresses of the spurious interrupt handlers into the intList
|
|
|
|
* section. The genIdt tool can then populate any unused vectors with
|
|
|
|
* these routines.
|
|
|
|
*/
|
|
|
|
void *__attribute__((section(".spurIsr"))) MK_ISR_NAME(_SpuriousIntHandler) =
|
|
|
|
&_SpuriousIntHandler;
|
|
|
|
void *__attribute__((section(".spurNoErrIsr")))
|
|
|
|
MK_ISR_NAME(_SpuriousIntNoErrCodeHandler) =
|
|
|
|
&_SpuriousIntNoErrCodeHandler;
|
|
|
|
|