nios2: use gen_isr_tables mechanism
Change-Id: If1ffcedf86a015789b42e7aec45dae3cc58f74fa Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
This commit is contained in:
parent
122467e9ee
commit
c99c686b2c
6 changed files with 30 additions and 67 deletions
|
@ -74,14 +74,12 @@ typedef unsigned int vaddr_t;
|
|||
*/
|
||||
#define _ARCH_IRQ_CONNECT(irq_p, priority_p, isr_p, isr_param_p, flags_p) \
|
||||
({ \
|
||||
enum { IRQ = irq_p }; \
|
||||
static struct _isr_table_entry _CONCAT(_isr_irq, irq_p) \
|
||||
__attribute__ ((used)) \
|
||||
__attribute__ ((section(STRINGIFY(_CONCAT(.gnu.linkonce.isr_irq, irq_p))))) = \
|
||||
{isr_param_p, isr_p}; \
|
||||
_ISR_DECLARE(irq_p, 0, isr_p, isr_param_p); \
|
||||
irq_p; \
|
||||
})
|
||||
|
||||
extern void _irq_spurious(void *unused);
|
||||
|
||||
static ALWAYS_INLINE unsigned int _arch_irq_lock(void)
|
||||
{
|
||||
unsigned int key, tmp;
|
||||
|
|
|
@ -61,6 +61,9 @@ MEMORY
|
|||
RESET (rx) : ORIGIN = _RESET_VECTOR, LENGTH = 0x20
|
||||
FLASH (rx) : ORIGIN = _RESET_VECTOR + 0x20 , LENGTH = (_ROM_SIZE - 0x20)
|
||||
SRAM (wx) : ORIGIN = _EXC_VECTOR, LENGTH = _RAM_SIZE - (_EXC_VECTOR - _RAM_ADDR)
|
||||
/* Used by and documented in include/linker/intlist.ld */
|
||||
IDT_LIST (wx) : ORIGIN = 0xFFFFF7FF, LENGTH = 2K
|
||||
|
||||
}
|
||||
|
||||
#else
|
||||
|
@ -69,6 +72,9 @@ MEMORY
|
|||
{
|
||||
RESET (wx) : ORIGIN = _RESET_VECTOR, LENGTH = 0x20
|
||||
SRAM (wx) : ORIGIN = _EXC_VECTOR, LENGTH = _RAM_SIZE - (_EXC_VECTOR - _RAM_ADDR)
|
||||
|
||||
/* Used by and documented in include/linker/intlist.ld */
|
||||
IDT_LIST (wx) : ORIGIN = 0xFFFFF7FF, LENGTH = 2K
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -158,18 +164,9 @@ SECTIONS
|
|||
|
||||
SECTION_DATA_PROLOGUE(_DATA_SECTION_NAME,,)
|
||||
{
|
||||
|
||||
KEEP(*(.isr_irq*))
|
||||
|
||||
/* sections for IRQ0-9 */
|
||||
KEEP(*(SORT(.gnu.linkonce.isr_irq[0-9])))
|
||||
|
||||
/* sections for IRQ10-99 */
|
||||
KEEP(*(SORT(.gnu.linkonce.isr_irq[0-9][0-9])))
|
||||
|
||||
/* sections for IRQ100-999 */
|
||||
KEEP(*(SORT(.gnu.linkonce.isr_irq[0-9][0-9][0-9])))
|
||||
|
||||
#ifdef CONFIG_GEN_SW_ISR_TABLE
|
||||
KEEP(*(SW_ISR_TABLE))
|
||||
#endif
|
||||
*(.data)
|
||||
*(".data.*")
|
||||
|
||||
|
@ -241,6 +238,10 @@ SECTIONS
|
|||
#ifdef CONFIG_CUSTOM_SECTIONS_LD
|
||||
/* Located in project source directory */
|
||||
#include <custom-sections.ld>
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_GEN_ISR_TABLES
|
||||
#include <linker/intlist.ld>
|
||||
#endif
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue