| .. | .. |
|---|
| 1 | +/* SPDX-License-Identifier: GPL-2.0-only */ |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * Kernel page table mapping |
|---|
| 3 | 4 | * |
|---|
| 4 | 5 | * Copyright (C) 2015 ARM Ltd. |
|---|
| 5 | | - * |
|---|
| 6 | | - * This program is free software; you can redistribute it and/or modify |
|---|
| 7 | | - * it under the terms of the GNU General Public License version 2 as |
|---|
| 8 | | - * published by the Free Software Foundation. |
|---|
| 9 | | - * |
|---|
| 10 | | - * This program is distributed in the hope that it will be useful, |
|---|
| 11 | | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|---|
| 12 | | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|---|
| 13 | | - * GNU General Public License for more details. |
|---|
| 14 | | - * |
|---|
| 15 | | - * You should have received a copy of the GNU General Public License |
|---|
| 16 | | - * along with this program. If not, see <http://www.gnu.org/licenses/>. |
|---|
| 17 | 6 | */ |
|---|
| 18 | 7 | |
|---|
| 19 | 8 | #ifndef __ASM_KERNEL_PGTABLE_H |
|---|
| 20 | 9 | #define __ASM_KERNEL_PGTABLE_H |
|---|
| 21 | 10 | |
|---|
| 22 | | -#include <asm/pgtable.h> |
|---|
| 11 | +#include <asm/pgtable-hwdef.h> |
|---|
| 23 | 12 | #include <asm/sparsemem.h> |
|---|
| 24 | 13 | |
|---|
| 25 | 14 | /* |
|---|
| .. | .. |
|---|
| 97 | 86 | + EARLY_PGDS((vstart), (vend)) /* each PGDIR needs a next level page table */ \ |
|---|
| 98 | 87 | + EARLY_PUDS((vstart), (vend)) /* each PUD needs a next level page table */ \ |
|---|
| 99 | 88 | + EARLY_PMDS((vstart), (vend))) /* each PMD needs a next level page table */ |
|---|
| 100 | | -#define SWAPPER_DIR_SIZE (PAGE_SIZE * EARLY_PAGES(KIMAGE_VADDR + TEXT_OFFSET, _end)) |
|---|
| 89 | +#define INIT_DIR_SIZE (PAGE_SIZE * EARLY_PAGES(KIMAGE_VADDR, _end)) |
|---|
| 101 | 90 | #define IDMAP_DIR_SIZE (IDMAP_PGTABLE_LEVELS * PAGE_SIZE) |
|---|
| 102 | | - |
|---|
| 103 | | -#ifdef CONFIG_ARM64_SW_TTBR0_PAN |
|---|
| 104 | | -#define RESERVED_TTBR0_SIZE (PAGE_SIZE) |
|---|
| 105 | | -#else |
|---|
| 106 | | -#define RESERVED_TTBR0_SIZE (0) |
|---|
| 107 | | -#endif |
|---|
| 108 | 91 | |
|---|
| 109 | 92 | /* Initial memory map size */ |
|---|
| 110 | 93 | #if ARM64_SWAPPER_USES_SECTION_MAPS |
|---|