No description
Find a file
Benjamin Walsh 7f4c294e5c arm: use interrupt stack during early init
The ARM Cortex-M early boot was using a custom stack at the end of the
SRAM instead of the interrupt stack. This works as long as no static
data that needs a known initial value occupies that stack space. This
has probably not been an issue because the .noinit section is at the
very end of the image, but it was still wrong to use that region of
memory for that initial stack.

To be able to use the interrupt stack during early boot, the stack has
to be released before an interrupt can happen. Since ARM Cortex-M uses
PendSV as a very low priority exception for context switching, if a
device driver installs and enables an interrupt during the PRE_KERNEL
initialization points, an interrupt could take precedence over PendSV
while the initial dummy thread has not yet been context switched of and
thus released the interrupt stack. To address this, rather than using
_Swap() and thus triggering PendSV, the initialization logic switches to
the main stack and branches to _main() directly instead.

Fixes ZEP-1309

Change-Id: If0b62cc66470b45b601e63826b5b3306e6a25ae9
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-11-23 00:23:59 +00:00
.known-issues known-issues: update rule for TCF summary line 2016-09-16 11:31:27 -07:00
arch arm: use interrupt stack during early init 2016-11-23 00:23:59 +00:00
boards boards: nucleo_f103rb: define user LED 2016-11-18 09:28:54 -05:00
doc doc: fix ring_buffer code snippet 2016-11-22 21:09:13 +05:30
drivers aio: Configuration issue in aio driver 2016-11-23 00:16:22 +00:00
ext tinycrypt/sha256: Array compared to NULL has no effect 2016-11-22 01:59:10 +00:00
include gpio: Add doxygen markup for internal only definitions. 2016-11-22 17:01:27 +00:00
kernel kernel: add support for switching to main thread without _Swap() 2016-11-23 00:23:58 +00:00
lib iot/zoap: Fix decoding of 16-bit delta 2016-11-18 23:13:08 +00:00
misc kernel/arch: consolidate tTCS and TNANO definitions 2016-11-12 07:04:52 -05:00
net net: ip: fix variable type mismatching issue 2016-11-18 00:21:09 +00:00
samples Merge "Merge bluetooth branch into master" 2016-11-19 01:52:15 +00:00
scripts win-build: Fixes a kconfig incompatibility for Windows 2016-11-18 23:22:21 +00:00
subsys Bluetooth: RFCOMM: Initiate DLC 2016-11-18 17:27:01 +05:30
tests tests: power_mgmt: Fix wrong value being passed to post_ops func 2016-11-23 00:21:52 +00:00
.checkpatch.conf checkpatch: ignore CONST_STRUCT warnings 2016-11-11 22:12:22 +00:00
.gitattributes First commit 2015-04-10 16:44:37 -07:00
.gitignore testcases: instruct git to ignore *log and outdir-* 2016-06-14 22:01:34 +00:00
.gitreview Add a .gitreview file 2016-02-20 14:25:01 +00:00
.mailmap mailmap: update with new emails 2016-10-07 16:15:24 +00:00
defaults.tc testcases: catch more fatal kernel error messages 2016-11-11 13:21:16 +00:00
Kbuild build: remove old kernel support 2016-11-07 11:34:18 -08:00
Kconfig kconfig: Do not put architecture in the title 2016-03-14 16:50:51 -04:00
Kconfig.zephyr usb: move usb subsystem to subsys/usb and cleanup header inclusion 2016-10-31 19:21:42 +00:00
LICENSE add top level Apache 2.0 license file 2016-02-05 20:24:37 -05:00
LICENSING.rst LICENSING: clarify licenses of imported / reused code 2016-11-11 01:36:14 +00:00
MAINTAINERS board_beetle: Add support for ARM V2M Beetle Board 2016-11-11 20:39:54 +00:00
Makefile build: Add __ZEPHYR__ to Makefile 2016-11-22 17:10:49 +00:00
Makefile.inc build: Document outputexports 2016-11-12 02:08:08 +00:00
zephyr-env.sh win-build: corrects scripts_path for windows build. 2016-10-15 15:09:54 +00:00