seL4/include/kernel/stack.h
Hesham Almatary e9922b7456 Unify kernel stack definition/declaration and share it between architecures/modes
Rather than defining a kernel stack in random places for each
architecure for each mode (32/64) and for single/SMP modes, make the
stack definition shareable between all of the above. This is also useful
for the future ARM SMP work.
2017-01-17 15:52:58 +11:00

28 lines
902 B
C

/*
* Copyright 2016, Data61
* Commonwealth Scientific and Industrial Research Organisation (CSIRO)
* ABN 41 687 119 230.
*
* This software may be distributed and modified according to the terms of
* the GNU General Public License version 2. Note that NO WARRANTY is provided.
* See "LICENSE_GPLv2.txt" for details.
*
* @TAG(D61_GPL)
*/
#ifndef __KERNEL_STACK_H
#define __KERNEL_STACK_H
#include <config.h>
#include <util.h>
#include <mode/kernel/stack.h>
/* These are the stacks used in kernel, shared between architecures/modes.
* CONFIG_KERNEL_STACK_BITS is defined in kernel/Kconfig. The physical/offset
* address of the stack is per-arch-mode aligned. KERNEL_STACK_ALIGNMENT is
* defined for each arch/mode in <mode/kernel/stack.h>
*/
ALIGN(KERNEL_STACK_ALIGNMENT)
VISIBLE
char kernel_stack_alloc[CONFIG_MAX_NUM_NODES][BIT(CONFIG_KERNEL_STACK_BITS)];
#endif /* __KERNEL_STACK_H */