Zephyr API Documentation  2.7.0-rc2
A Scalable Open Source RTOS
arch.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2019 Carlo Caione <ccaione@baylibre.com>
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 */
6
16#ifndef ZEPHYR_INCLUDE_ARCH_ARM64_ARCH_H_
17#define ZEPHYR_INCLUDE_ARCH_ARM64_ARCH_H_
18
19/* Add include for DTS generated information */
20#include <devicetree.h>
21
22#include <arch/arm64/thread.h>
23#include <arch/arm64/exc.h>
24#include <arch/arm64/irq.h>
25#include <arch/arm64/misc.h>
27#include <arch/arm64/cpu.h>
28#include <arch/arm64/macro.inc>
29#include <arch/arm64/sys_io.h>
30#include <arch/arm64/timer.h>
31#include <arch/arm64/error.h>
32#ifdef CONFIG_ARM_MMU
33#include <arch/arm64/arm_mmu.h>
34#endif
38#include <arch/common/ffs.h>
39
40#ifdef __cplusplus
41extern "C" {
42#endif
43
44#ifndef _ASMLANGUAGE
45
46#include <sys/slist.h>
47
48/* Kernel macros for memory attribution
49 * (access permissions and cache-ability).
50 *
51 * The macros are to be stored in k_mem_partition_attr_t
52 * objects. The format of a k_mem_partition_attr_t object
53 * is an uint32_t composed by permission and attribute flags
54 * located in include/arch/arm64/arm_mmu.h
55 */
56
57/* Read-Write access permission attributes */
58#define K_MEM_PARTITION_P_RW_U_RW ((k_mem_partition_attr_t) \
59 {MT_P_RW_U_RW})
60#define K_MEM_PARTITION_P_RW_U_NA ((k_mem_partition_attr_t) \
61 {MT_P_RW_U_NA})
62#define K_MEM_PARTITION_P_RO_U_RO ((k_mem_partition_attr_t) \
63 {MT_P_RO_U_RO})
64#define K_MEM_PARTITION_P_RO_U_NA ((k_mem_partition_attr_t) \
65 {MT_P_RO_U_NA})
66
67/* Execution-allowed attributes */
68#define K_MEM_PARTITION_P_RX_U_RX ((k_mem_partition_attr_t) \
69 {MT_P_RX_U_RX})
70
71/* Typedef for the k_mem_partition attribute */
72typedef struct {
75
77#ifdef CONFIG_ARM_MMU
79#endif
81};
82
83#endif /* _ASMLANGUAGE */
84
85#ifdef __cplusplus
86}
87#endif
88
89#endif /* ZEPHYR_INCLUDE_ARCH_ARM64_ARCH_H_ */
uint32_t k_mem_partition_attr_t
Definition: arch.h:267
Cortex-A public interrupt handling.
Per-arch thread definition.
ARM AArch64 public error handling.
Cortex-A public exception handling.
Cortex-A public kernel miscellaneous.
Devicetree main header.
Single-linked list implementation.
struct _snode sys_snode_t
Definition: slist.h:33
__UINT32_TYPE__ uint32_t
Definition: stdint.h:60
Definition: arch.h:76
sys_snode_t node
Definition: arch.h:80
pentry_t * ptables
Definition: mmustructs.h:75
Definition: arm_mmu.h:168
uint32_t attrs
Definition: arch.h:73