arch: arm: Update to support local ISR declaration

This commit updates the arm and arm64 architecture files
to support the new ISR handlers creation parser.

Signed-off-by: Radosław Koppel <radoslaw.koppel@nordicsemi.no>
This commit is contained in:
Radoslaw Koppel 2023-12-19 16:54:18 +01:00 committed by Carles Cufí
parent 8174c7e049
commit 1ff24b34eb
9 changed files with 56 additions and 1 deletions

View file

@ -35,3 +35,11 @@ else()
zephyr_linker_sources(ROM_START SORT_KEY 0x0vectors vector_table.ld)
zephyr_linker_sources(ROM_START SORT_KEY 0x1vectors cortex_m/vector_table_pad.ld)
endif()
if(CONFIG_GEN_SW_ISR_TABLE)
if(CONFIG_DYNAMIC_INTERRUPTS)
zephyr_linker_sources(RWDATA swi_tables.ld)
else()
zephyr_linker_sources(RODATA swi_tables.ld)
endif()
endif()

View file

@ -0,0 +1,8 @@
/*
* Copyright (c) 2023 Nordic Semiconductor ASA
*
* SPDX-License-Identifier: Apache-2.0
*/
#if LINKER_ZEPHYR_FINAL
INCLUDE zephyr/isr_tables_swi.ld
#endif

View file

@ -51,6 +51,10 @@ _vector_start = .;
KEEP(*(.exc_vector_table))
KEEP(*(".exc_vector_table.*"))
#if LINKER_ZEPHYR_FINAL && CONFIG_ISR_TABLES_LOCAL_DECLARATION
INCLUDE zephyr/isr_tables_vt.ld
#else
KEEP(*(.vectors))
#endif
_vector_end = .;

View file

@ -55,3 +55,11 @@ if(CMAKE_C_COMPILER_ID STREQUAL "GNU")
endif()
add_subdirectory_ifdef(CONFIG_XEN xen)
if(CONFIG_GEN_SW_ISR_TABLE)
if(CONFIG_DYNAMIC_INTERRUPTS)
zephyr_linker_sources(RWDATA swi_tables.ld)
else()
zephyr_linker_sources(RODATA swi_tables.ld)
endif()
endif()

View file

@ -0,0 +1,8 @@
/*
* Copyright (c) 2023 Nordic Semiconductor ASA
*
* SPDX-License-Identifier: Apache-2.0
*/
#if LINKER_ZEPHYR_FINAL
INCLUDE zephyr/isr_tables_swi.ld
#endif

View file

@ -39,6 +39,11 @@ zephyr_linker_sources_ifdef(CONFIG_GEN_ISR_TABLES
${ZEPHYR_BASE}/include/zephyr/linker/intlist.ld
)
zephyr_linker_sources_ifdef(CONFIG_ISR_TABLES_LOCAL_DECLARATION
SECTIONS
${ZEPHYR_BASE}/include/zephyr/linker/isr-local-drop-unused.ld
)
zephyr_linker_sources_ifdef(CONFIG_GEN_IRQ_VECTOR_TABLE
ROM_START
SORT_KEY 0x0vectors

View file

@ -111,8 +111,11 @@ SECTIONS
KEEP(*(.exc_vector_table))
KEEP(*(".exc_vector_table.*"))
#if LINKER_ZEPHYR_FINAL && CONFIG_ISR_TABLES_LOCAL_DECLARATION
INCLUDE zephyr/isr_tables_vt.ld
#else
KEEP(*(.vectors))
#endif
_vector_end = .;
*(.text)

View file

@ -1,7 +1,9 @@
/* SPDX-License-Identifier: Apache-2.0 */
#if !(LINKER_ZEPHYR_FINAL && CONFIG_ISR_TABLES_LOCAL_DECLARATION)
. = ALIGN(CONFIG_ARCH_IRQ_VECTOR_TABLE_ALIGN);
KEEP(*(_IRQ_VECTOR_TABLE_SECTION_SYMS))
#endif
/*
* Some ARM platforms require this symbol to be placed after the IRQ vector

View file

@ -0,0 +1,9 @@
/* SPDX-License-Identifier: Apache-2.0 */
#if LINKER_ZEPHYR_FINAL && CONFIG_ISR_TABLES_LOCAL_DECLARATION
/DISCARD/ :
{
KEEP(*(.vectors))
KEEP(*(_IRQ_VECTOR_TABLE_SECTION_SYMS))
}
#endif