-
Notifications
You must be signed in to change notification settings - Fork 6.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
arch: arm: Add vectored interrupt support for Cortex-R.
This commit defines a new Cortex-R configuration 'VIC_IRQ_VECTOR' and implements IRQ initialisation routine to configure SCTLR.VE. Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
- Loading branch information
1 parent
74ed57c
commit 4581910
Showing
4 changed files
with
39 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,6 +6,7 @@ zephyr_library_sources( | |
vector_table.S | ||
reset.S | ||
fault.c | ||
irq_init.c | ||
irq_manage.c | ||
reboot.c | ||
stacks.c | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
/* | ||
* Copyright (c) 2019 Stephanos Ioannidis <root@stephanos.io> | ||
* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
/** | ||
* @file | ||
* @brief ARM Cortex-R interrupt initialization | ||
*/ | ||
|
||
#include <arch/cpu.h> | ||
|
||
/** | ||
* @brief Initialize interrupts | ||
* | ||
* @return N/A | ||
*/ | ||
|
||
void z_arm_int_lib_init(void) | ||
{ | ||
/* Configure hardware vectored interrupt mode.*/ | ||
#if defined(CONFIG_VIC_IRQ_VECTOR) | ||
__asm__ volatile( | ||
"mrc p15, #0, r0, c1, c0, #0;" | ||
"orr r0, r0, #0x01000000;" /* [24] VE bit */ | ||
"mcr p15, #0, r0, c1, c0, #0;" | ||
: : : "memory"); | ||
#endif | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters