Add a new macro MEM_DOMAIN_ALIGN_AND_SIZE for mmu and mpu mem alignment. MEM_DOMAIN_ALIGN_AND_SIZE is - CONFIG_MMU_PAGE_SIZE, when mmu is enabled. - CONFIG_ARM_MPU_REGION_MIN_ALIGN_AND_SIZE when mpu enabled. Signed-off-by: Jaxson Han <jaxson.han@arm.com>
66 lines
1.3 KiB
C
66 lines
1.3 KiB
C
/*
|
|
* Copyright (c) 2019 Carlo Caione <ccaione@baylibre.com>
|
|
*
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
|
|
/**
|
|
* @file
|
|
* @brief Per-arch thread definition
|
|
*
|
|
* This file contains definitions for
|
|
*
|
|
* struct _thread_arch
|
|
* struct _callee_saved
|
|
*
|
|
* necessary to instantiate instances of struct k_thread.
|
|
*/
|
|
|
|
#ifndef ZEPHYR_INCLUDE_ARCH_ARM64_THREAD_H_
|
|
#define ZEPHYR_INCLUDE_ARCH_ARM64_THREAD_H_
|
|
|
|
#ifndef _ASMLANGUAGE
|
|
#include <zephyr/types.h>
|
|
|
|
struct _callee_saved {
|
|
uint64_t x19;
|
|
uint64_t x20;
|
|
uint64_t x21;
|
|
uint64_t x22;
|
|
uint64_t x23;
|
|
uint64_t x24;
|
|
uint64_t x25;
|
|
uint64_t x26;
|
|
uint64_t x27;
|
|
uint64_t x28;
|
|
uint64_t x29;
|
|
uint64_t sp_el0;
|
|
uint64_t sp_elx;
|
|
};
|
|
|
|
typedef struct _callee_saved _callee_saved_t;
|
|
|
|
struct z_arm64_fp_context {
|
|
__int128 q0, q1, q2, q3, q4, q5, q6, q7;
|
|
__int128 q8, q9, q10, q11, q12, q13, q14, q15;
|
|
__int128 q16, q17, q18, q19, q20, q21, q22, q23;
|
|
__int128 q24, q25, q26, q27, q28, q29, q30, q31;
|
|
uint32_t fpsr, fpcr;
|
|
};
|
|
|
|
struct _thread_arch {
|
|
#if defined(CONFIG_USERSPACE) && defined(CONFIG_ARM_MMU)
|
|
struct arm_mmu_ptables *ptables;
|
|
#endif
|
|
#ifdef CONFIG_FPU_SHARING
|
|
struct z_arm64_fp_context saved_fp_context;
|
|
#endif
|
|
uint8_t exception_depth;
|
|
};
|
|
|
|
typedef struct _thread_arch _thread_arch_t;
|
|
|
|
#endif /* _ASMLANGUAGE */
|
|
|
|
#endif /* ZEPHYR_INCLUDE_ARCH_ARM64_THREAD_H_ */
|