|
|
|
/* Copyright (C) 2021,2022 fef <owo@fef.moe>. All rights reserved. */
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
#ifndef _ARCH_VMPARAM_H_
|
|
|
|
#error "This file is not meant to be included directly, use <arch/vmparam.h>"
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/** @brief Userland memory region */
|
|
|
|
#define USER_OFFSET 0x0000000000000000 /* +0 TB */
|
|
|
|
#define USER_LENGTH 0x0000800000000000 /* 128 TB */
|
|
|
|
|
|
|
|
/** @brief Recursive Page Map Level 4 map */
|
|
|
|
#define X86_PMAP_OFFSET 0xffff800000000000 /* -128 TB */
|
|
|
|
#define X86_PMAP_LENGTH 0x0000004020101000 /* ~ 256.5 GB */
|
|
|
|
|
|
|
|
/** @brief Direct (contiguous) mapping of physical memory */
|
|
|
|
#define DMAP_OFFSET 0xfffff80000000000 /* -8 TB */
|
|
|
|
#define DMAP_LENGTH 0x0000040000000000 /* 4 TB */
|
|
|
|
|
|
|
|
/** @brief Kernel region (image, heap, etc) */
|
|
|
|
#define KERN_OFFSET 0xfffffe0000000000 /* -2 TB */
|
|
|
|
#define KERN_LENGTH 0x0000020000000000 /* 2 TB */
|
|
|
|
|
|
|
|
/** @brief Where the kernel image is actually mapped to */
|
|
|
|
#define KERNBASE 0xffffffff80000000 /* -2 GB */
|
|
|
|
#define KERNBASE_LENGTH 0x0000000080000000
|
|
|
|
|
|
|
|
#define VM_PAGE_ARRAY_OFFSET KERN_OFFSET
|
|
|
|
#define VM_PAGE_ARRAY_LENGTH (KERN_OFFSET - KERNBASE)
|