diff options
Diffstat (limited to 'arch/x86/machine/param.h')
-rw-r--r-- | arch/x86/machine/param.h | 99 |
1 files changed, 0 insertions, 99 deletions
diff --git a/arch/x86/machine/param.h b/arch/x86/machine/param.h deleted file mode 100644 index 7f1fc2e4..00000000 --- a/arch/x86/machine/param.h +++ /dev/null @@ -1,99 +0,0 @@ -/* - * Copyright (c) 2010-2014 Richard Braun. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * - * - * This file is a top header in the inclusion hierarchy, and shouldn't include - * other headers that may cause circular dependencies. - */ - -#ifndef _X86_PARAM_H -#define _X86_PARAM_H - -#include <kern/macros.h> - -/* - * 4 KiB pages. - */ -#define PAGE_SHIFT 12 -#define PAGE_SIZE (1 << PAGE_SHIFT) -#define PAGE_MASK (PAGE_SIZE - 1) - -/* - * Virtual memory properties. - */ - -/* - * User space boundaries. - */ -#define VM_MIN_ADDRESS DECL_CONST(0, UL) - -#ifdef __LP64__ -#define VM_MAX_ADDRESS DECL_CONST(0x800000000000, UL) -#else /* __LP64__ */ -#define VM_MAX_ADDRESS DECL_CONST(0xc0000000, UL) -#endif/* __LP64__ */ - -/* - * Kernel space boundaries. - */ -#ifdef __LP64__ -#define VM_MIN_KERNEL_ADDRESS DECL_CONST(0xffff800000000000, UL) -#define VM_MAX_KERNEL_ADDRESS DECL_CONST(0xfffffffffffff000, UL) -#else /* __LP64__ */ -#define VM_MIN_KERNEL_ADDRESS VM_MAX_ADDRESS -#define VM_MAX_KERNEL_ADDRESS DECL_CONST(0xfffff000, UL) -#endif /* __LP64__ */ - -/* - * Direct physical mapping boundaries. - */ -#ifdef __LP64__ -#define VM_MIN_DIRECTMAP_ADDRESS VM_MIN_KERNEL_ADDRESS -#define VM_MAX_DIRECTMAP_ADDRESS DECL_CONST(0xffffc00000000000, UL) -#else /* __LP64__ */ -#define VM_MIN_DIRECTMAP_ADDRESS VM_MAX_ADDRESS -#define VM_MAX_DIRECTMAP_ADDRESS DECL_CONST(0xf8000000, UL) -#endif /* __LP64__ */ - -/* - * Kernel mapping offset. - * - * On 32-bits systems, the kernel is linked at addresses included in the - * direct physical mapping, whereas on 64-bits systems, it is linked at - * -2 GiB because the "kernel" memory model is used when compiling (see - * the -mcmodel=kernel gcc option). - */ -#ifdef __LP64__ -#define VM_KERNEL_OFFSET DECL_CONST(0xffffffff80000000, UL) -#else /* __LP64__ */ -#define VM_KERNEL_OFFSET VM_MIN_DIRECTMAP_ADDRESS -#endif /* __LP64__ */ - -/* - * Kernel virtual space boundaries. - * - * In addition to the direct physical mapping, the kernel has its own virtual - * memory space. - */ -#define VM_MIN_KMEM_ADDRESS VM_MAX_DIRECTMAP_ADDRESS - -#ifdef __LP64__ -#define VM_MAX_KMEM_ADDRESS VM_KERNEL_OFFSET -#else /* __LP64__ */ -#define VM_MAX_KMEM_ADDRESS VM_MAX_KERNEL_ADDRESS -#endif /* __LP64__ */ - -#endif /* _X86_PARAM_H */ |