Go to file
Andy Gross ecb0f3e159 arm: mpu: Account for stack guard size correctly
This patch fixes a couple of issues with the stack guard size and
properly constructs the STACK_ALIGN and STACK_ALIGN_SIZE definitions.

The ARM AAPCS requires that the stack pointers be 8 byte aligned.  The
STACK_ALIGN_SIZE definition is meant to contain the stack pointer
alignment requirements.  This is the required alignment at public API
boundaries (ie stack frames).

The STACK_ALIGN definition is the required alignment for the start
address for stack buffer storage.  STACK_ALIGN is used to validate
the allocation sizes for stack buffers.

The MPU_GUARD_ALIGN_AND_SIZE definition is the minimum alignment and
size for the MPU.  The minimum size and alignment just so happen to be
32 bytes for vanilla ARM MPU implementations.

When defining stack buffers, the stack guard alignment requirements
must be taken into consideration when allocating the stack memory.
The __align() must be filled in with either STACK_ALIGN_SIZE or the
align/size of the MPU stack guard.  The align/size for the guard region
will be 0 when CONFIG_MPU_STACK_GUARD is not set, and 32 bytes when it
is.

The _ARCH_THREAD_STACK_XXXXXX APIs need to know the minimum alignment
requirements for the stack buffer memory and the stack guard size to
correctly allocate and reference the stack memory.  This is reflected
in the macros with the use of the STACK_ALIGN definition and the
MPU_GUARD_ALIGN_AND_SIZE definition.

Signed-off-by: Andy Gross <andy.gross@linaro.org>
2017-08-31 11:20:26 -05:00
.known-issues net: doc: Add missing defgroups to network header files 2017-07-31 20:59:09 +03:00
arch arm: mpu: Account for stack guard size correctly 2017-08-31 11:20:26 -05:00
boards boards: zedboard_pulpino: Update yaml for amount of flash 2017-08-24 10:26:33 -04:00
doc doc: update release notes for v1.9 2017-08-30 08:08:27 -04:00
drivers drivers: ieee802154: cc2520: Fix compiler warning 2017-08-30 11:54:43 -04:00
dts tests: bluetooth: tester: Make UART usage consistent 2017-08-30 10:07:07 -05:00
ext crypto: mbedtls: Update mbedTLS to 2.6.0 2017-08-30 21:42:02 -04:00
include arm: mpu: Account for stack guard size correctly 2017-08-31 11:20:26 -05:00
kernel kernel: Use SYS_DLIST_FOR_EACH_CONTAINER whenever possible 2017-08-25 09:08:50 -04:00
lib newlib: xtensa: Fix a newlib link error 2017-08-10 09:33:13 -05:00
misc subsystem: cleanup misc and make cpp a subsystem 2017-07-06 09:13:46 -05:00
samples net: app: Add IP header to packets received by TLS/DTLS tunnel 2017-08-30 08:12:10 -04:00
scripts scripts/extract_dts_includes.py: Allow for includes in common yaml files 2017-08-18 08:55:31 -05:00
subsys net: tcp: Queue FIN instead of sending it immediately 2017-08-31 11:58:24 -04:00
tests tests/ieee802154: Fix a coverity warning 2017-08-31 08:56:05 -04:00
.checkpatch.conf checkpatch: update checkpatch to warn about C99 type usage 2017-04-21 17:24:04 +00:00
.gitattributes
.gitignore scripts: Convert gen_offset_header to Python 2017-07-24 11:20:04 -07:00
.gitlint gitlint: ignore titles prefixed with Revert 2017-08-08 09:04:25 -04:00
.mailmap mailmap: added axy (for Anas Nashif) 2016-12-21 13:49:59 +00:00
.shippable.yml ci: boards: retry sanitycheck without --subset arg 2017-08-14 19:20:24 -04:00
CODEOWNERS cc3200: Remove TI cc3200 SOC and LaunchXL board support 2017-08-15 11:02:48 -05:00
CONTRIBUTING.rst doc: require license information for external code 2017-08-03 11:48:55 -04:00
Kbuild build: remove unused Kconfig variables 2017-08-03 07:19:29 -05:00
Kconfig license: Replace Apache boilerplate with SPDX tag 2017-01-19 03:50:58 +00:00
Kconfig.zephyr kconfig: move dts Kconfigs to dts/ 2017-08-03 07:19:29 -05:00
LICENSE
MAINTAINERS cc3200: Remove TI cc3200 SOC and LaunchXL board support 2017-08-15 11:02:48 -05:00
Makefile release: Zephyr 1.9.0-rc2 2017-08-25 16:47:33 -04:00
Makefile.inc build: remove deprecated qemu/qemugdb targets 2017-08-03 11:48:55 -04:00
Makefile.test tests: introduce Makefile.test 2017-01-03 17:48:44 +00:00
README.rst doc: Add security doc mention in GitHub README 2017-08-25 14:22:56 -04:00
zephyr-env.sh env: Remove usage of -P in grep 2017-07-15 11:12:35 -07:00

Zephyr Project
##############

.. raw:: html

   <a href="https://bestpractices.coreinfrastructure.org/projects/74"><img
   src="https://bestpractices.coreinfrastructure.org/projects/74/badge"></a>

The Zephyr Project is a scalable real-time operating system (RTOS) supporting
multiple hardware architectures, optimized for resource constrained devices,
and built with security in mind.

The Zephyr OS is based on a small-footprint kernel designed for use on
resource-constrained systems: from simple embedded environmental sensors and
LED wearables to sophisticated smart watches and IoT wireless gateways.

The Zephyr kernel supports multiple architectures, including ARM Cortex-M,
Intel x86, ARC, NIOS II, Tensilica Xtensa, and RISC V, and a large number of
`supported boards`_.

.. below included in doc/introduction/introduction.rst

.. start_include_here

Community Support
*****************

The Zephyr Project Developer Community includes developers from member
organizations and the general community all joining in the development of
software within the Zephyr Project. Members contribute and discuss ideas,
submit bugs and bug fixes, and provide training. They also help those in need
through the community's forums such as mailing lists and IRC channels. Anyone
can join the developer community and the community is always willing to help
its members and the User Community to get the most out of the Zephyr Project.

Welcome to the Zephyr community!

Resources
*********

Here's a quick summary of resources to find your way around the Zephyr Project
support systems:

* **Zephyr Project Website**: The https://zephyrproject.org website is the
  central source of information about the Zephyr Project. On this site, you'll
  find background and current information about the project as well as all the
  relevant links to project material.  For a quick start, refer to the
  `Zephyr Introduction`_ and `Getting Started Guide`_.

* **Releases**: Source code for Zephyr kernel releases are available at
  https://zephyrproject.org/downloads. On this page,
  you'll find release information, and links to download or clone source
  code from our GitHub repository.  You'll also find links for the Zephyr
  SDK, a moderated collection of tools and libraries used to develop your
  applications.

* **Source Code in GitHub**: Zephyr Project source code is maintained on a
  public GitHub repository at https://github.com/zephyrproject-rtos/zephyr.
  You'll find information about getting access to the repository and how to
  contribute to the project in this `Contribution Guide`_ document.

* **Samples Code**: In addition to the kernel source code, there are also
  many documented `Sample and Demo Code Examples`_ that can help show you
  how to use Zephyr services and subsystems.

* **Documentation**: Extensive Project technical documentation is developed
  along with the Zephyr kernel itself, and can be found at
  https://zephyrproject.org/doc.  Additional documentation is maintained in
  the `Zephyr GitHub wiki`_.

* **Issue Reporting and Tracking**: Requirements and Issue tracking is done in
  our JIRA system: https://jira.zephyrproject.org. You can browse through the
  reported issues and submit issues of your own.

* **Security-related Issue Reporting**: For security-related inquiries or
  reporting suspected security-related bugs in the Zephyr OS, please
  send email to vulnerabilities@zephyrproject.org.  We will assess and fix
  flaws according to our security policy outlined in the Zephyr Project
  `Security Overview`_.

* **Mailing List**: The `Zephyr Mailing Lists`_ are perhaps the most convenient
  way to track developer discussions and to ask your own support questions to
  the Zephyr project community.
  You can also read through message archives to follow
  past posts and discussions, a good thing to do to discover more about the
  Zephyr project.

* **IRC Chatting**: You can chat online with the Zephyr project developer
  community and other users in our IRC channel #zephyrproject on the
  freenode.net IRC server. You can use the http://webchat.freenode.net web
  client or use a client-side application such as pidgin.


.. _supported boards: https://www.zephyrproject.org/doc/boards/boards.html
.. _Zephyr Introduction: https://www.zephyrproject.org/doc/introduction/introducing_zephyr.html
.. _Getting Started Guide: https://www.zephyrproject.org/doc/getting_started/getting_started.html
.. _Contribution Guide: https://www.zephyrproject.org/doc/contribute/contribute_guidelines.html
.. _Zephyr GitHub wiki: https://github.com/zephyrproject-rtos/zephyr/wiki
.. _Zephyr Mailing Lists: https://lists.zephyrproject.org/
.. _Sample and Demo Code Examples: https://www.zephyrproject.org/doc/samples/samples.html
.. _Security Overview: https://www.zephyrproject.org/doc/security/security-overview.html