2016-11-08 23:36:50 +08:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2016 Intel Corporation
|
|
|
|
* Copyright (c) 2016 Wind River Systems, Inc.
|
|
|
|
*
|
2017-01-19 09:01:01 +08:00
|
|
|
* SPDX-License-Identifier: Apache-2.0
|
2016-11-08 23:36:50 +08:00
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @file
|
|
|
|
* @brief Private kernel definitions
|
|
|
|
*
|
|
|
|
* This file contains private kernel structures definitions and various
|
|
|
|
* other definitions for the Nios II processor architecture.
|
|
|
|
*
|
|
|
|
* This file is also included by assembly language files which must #define
|
|
|
|
* _ASMLANGUAGE before including this header file. Note that kernel
|
|
|
|
* assembly source files obtains structure offset values via "absolute
|
|
|
|
* symbols" in the offsets.o module.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef _kernel_arch_data__h_
|
|
|
|
#define _kernel_arch_data__h_
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#include <toolchain.h>
|
2017-06-17 23:30:47 +08:00
|
|
|
#include <linker/sections.h>
|
2016-11-08 23:36:50 +08:00
|
|
|
#include <arch/cpu.h>
|
2017-04-05 04:19:13 +08:00
|
|
|
#include <kernel_arch_thread.h>
|
2016-11-08 23:36:50 +08:00
|
|
|
|
|
|
|
#ifndef _ASMLANGUAGE
|
|
|
|
#include <kernel.h>
|
|
|
|
#include <nano_internal.h>
|
Introduce new sized integer typedefs
This is a start to move away from the C99 {u}int{8,16,32,64}_t types to
Zephyr defined u{8,16,32,64}_t and s{8,16,32,64}_t. This allows Zephyr
to define the sized types in a consistent manor across all the
architectures we support and not conflict with what various compilers
and libc might do with regards to the C99 types.
We introduce <zephyr/types.h> as part of this and have it include
<stdint.h> for now until we transition all the code away from the C99
types.
We go with u{8,16,32,64}_t and s{8,16,32,64}_t as there are some
existing variables defined u8 & u16 as well as to be consistent with
Zephyr naming conventions.
Jira: ZEP-2051
Change-Id: I451fed0623b029d65866622e478225dfab2c0ca8
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2017-04-19 23:32:08 +08:00
|
|
|
#include <zephyr/types.h>
|
2016-11-08 23:36:50 +08:00
|
|
|
#include <misc/util.h>
|
|
|
|
#include <misc/dlist.h>
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/* stacks */
|
|
|
|
|
|
|
|
#define STACK_ALIGN_SIZE 4
|
|
|
|
|
|
|
|
#define STACK_ROUND_UP(x) ROUND_UP(x, STACK_ALIGN_SIZE)
|
|
|
|
#define STACK_ROUND_DOWN(x) ROUND_DOWN(x, STACK_ALIGN_SIZE)
|
|
|
|
|
|
|
|
#ifndef _ASMLANGUAGE
|
|
|
|
|
|
|
|
struct _kernel_arch {
|
|
|
|
/* nothing for now */
|
|
|
|
};
|
|
|
|
|
|
|
|
typedef struct _kernel_arch _kernel_arch_t;
|
|
|
|
|
2017-07-26 09:47:07 +08:00
|
|
|
extern K_THREAD_STACK_DEFINE(_interrupt_stack, CONFIG_ISR_STACK_SIZE);
|
2016-11-08 23:36:50 +08:00
|
|
|
|
|
|
|
#endif /* _ASMLANGUAGE */
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif /* _kernel_arch_data__h_ */
|