1/* 2 * Copyright (c) 2017 Intel Corporation 3 * 4 * SPDX-License-Identifier: Apache-2.0 5 */ 6 7/* This creates a special section which is not included by the final binary, 8 * instead it is consumed by the gen_isr_tables.py script. 9 * 10 * What we create here is a data structure: 11 * 12 * struct { 13 * uint32_t num_vectors; <- typically CONFIG_NUM_IRQS 14 * struct _isr_list isrs[]; <- Usually of smaller size than num_vectors 15 * } 16 * 17 * Which indicates the memory address of the number of isrs that were 18 * defined, the total number of IRQ lines in the system, followed by 19 * an appropriate number of instances of struct _isr_list. See 20 * include/sw_isr_table.h 21 * 22 * You will need to declare a bogus memory region for IDT_LIST. It doesn't 23 * matter where this region goes as it is stripped from the final ELF image. 24 * The address doesn't even have to be valid on the target. However, it 25 * shouldn't overlap any other regions. On most arches the following should be 26 * fine: 27 * 28 * MEMORY { 29 * .. other regions .. 30 * IDT_LIST : ORIGIN = 0xfffff7ff, LENGTH = 2K 31 * } 32 */ 33 34#ifndef LINKER_ZEPHYR_FINAL 35SECTION_PROLOGUE(.intList,,) 36{ 37 KEEP(*(.irq_info*)) 38 KEEP(*(.intList*)) 39} GROUP_ROM_LINK_IN(IDT_LIST, IDT_LIST) 40#else 41/DISCARD/ : 42{ 43 KEEP(*(.irq_info*)) 44 KEEP(*(.intList*)) 45} 46#endif 47