1/*
2 * Copyright 2018, Jaroslaw Pelczar <jarek@jpelczar.com>
3 * Distributed under the terms of the MIT License.
4 */
5#ifndef _KERNEL_ARCH_ARM64_ARCH_KERNEL_H_
6#define _KERNEL_ARCH_ARM64_ARCH_KERNEL_H_
7
8
9#include <kernel/arch/cpu.h>
10
11
12// memory layout
13#define KERNEL_BASE		0xffff000000000000
14#define KERNEL_SIZE		0x8000000000
15#define KERNEL_TOP		(KERNEL_BASE + (KERNEL_SIZE - 1))
16
17#define USER_BASE		0x1000
18#define USER_BASE_ANY	USER_BASE
19#define USER_SIZE		(0x0001000000000000UL - USER_BASE)
20#define USER_TOP		(0x0001000000000000UL - 1)
21
22#define KERNEL_USER_DATA_BASE	0x60000000
23#define USER_STACK_REGION		0x70000000
24#define USER_STACK_REGION_SIZE	((USER_TOP - USER_STACK_REGION) + 1)
25
26// Kernel physical memory map area.
27#define KERNEL_PMAP_BASE	0xffffff0000000000
28#define KERNEL_PMAP_SIZE	0x8000000000
29
30#endif /* _KERNEL_ARCH_ARM64_ARCH_KERNEL_H_ */
31