Replace the existing Apache 2.0 boilerplate header with an SPDX tag throughout the zephyr code tree. This patch was generated via a script run over the master branch. Also updated doc/porting/application.rst that had a dependency on line numbers in a literal include. Manually updated subsys/logging/sys_log.c that had a malformed header in the original file. Also cleanup several cases that already had a SPDX tag and we either got a duplicate or missed updating. Jira: ZEP-1457 Change-Id: I6131a1d4ee0e58f5b938300c2d2fc77d2e69572c Signed-off-by: David B. Kinder <david.b.kinder@intel.com> Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
42 lines
1.1 KiB
C
42 lines
1.1 KiB
C
/*
|
|
* Copyright (c) 2014 Wind River Systems, Inc.
|
|
*
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
|
|
/**
|
|
* @file
|
|
* @brief ARM Cortex-M interrupt initialization
|
|
*
|
|
* The ARM Cortex-M architecture provides its own k_thread_abort() to deal with
|
|
* different CPU modes (handler vs thread) when a fiber aborts. When its entry
|
|
* point returns or when it aborts itself, the CPU is in thread mode and must
|
|
* call _Swap() (which triggers a service call), but when in handler mode, the
|
|
* CPU must exit handler mode to cause the context switch, and thus must queue
|
|
* the PendSV exception.
|
|
*/
|
|
|
|
#include <toolchain.h>
|
|
#include <sections.h>
|
|
#include <kernel.h>
|
|
#include <arch/cpu.h>
|
|
|
|
/**
|
|
*
|
|
* @brief Initialize interrupts
|
|
*
|
|
* Ensures all interrupts have their priority set to _EXC_IRQ_DEFAULT_PRIO and
|
|
* not 0, which they have it set to when coming out of reset. This ensures that
|
|
* interrupt locking via BASEPRI works as expected.
|
|
*
|
|
* @return N/A
|
|
*/
|
|
|
|
void _IntLibInit(void)
|
|
{
|
|
int irq = 0;
|
|
|
|
for (; irq < CONFIG_NUM_IRQS; irq++) {
|
|
_NvicIrqPrioSet(irq, _EXC_IRQ_DEFAULT_PRIO);
|
|
}
|
|
}
|