diff options
author | Rik van Riel <riel@redhat.com> | 2009-05-05 17:28:56 -0400 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2009-05-05 22:10:18 -0400 |
commit | c898faf91b3ec6b0f6efa35831b3984fa3331db0 (patch) | |
tree | 5fa6850127cfe510e1e2d45b6c80044e29a137f5 | |
parent | a454ab3110175d710f4f9a96226a26ce4d5d5de2 (diff) |
x86: 46 bit physical address support on 64 bits
Extend the maximum addressable memory on x86-64 from 2^44 to
2^46 bytes. This requires some shuffling around of the vmalloc
and virtual memmap memory areas, to keep them away from the
direct mapping of up to 64TB of physical memory.
This patch also introduces a guard hole between the vmalloc
area and the virtual memory map space. There's really no
good reason why we wouldn't have a guard hole there.
[ Impact: future hardware enablement ]
Signed-off-by: Rik van Riel <riel@redhat.com>
LKML-Reference: <20090505172856.6820db22@cuia.bos.redhat.com>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
-rw-r--r-- | Documentation/x86/x86_64/mm.txt | 9 | ||||
-rw-r--r-- | arch/x86/include/asm/page_64_types.h | 2 | ||||
-rw-r--r-- | arch/x86/include/asm/pgtable_64_types.h | 8 | ||||
-rw-r--r-- | arch/x86/include/asm/sparsemem.h | 2 |
4 files changed, 11 insertions, 10 deletions
diff --git a/Documentation/x86/x86_64/mm.txt b/Documentation/x86/x86_64/mm.txt index 29b52b14d0b4..539413235845 100644 --- a/Documentation/x86/x86_64/mm.txt +++ b/Documentation/x86/x86_64/mm.txt | |||
@@ -6,10 +6,11 @@ Virtual memory map with 4 level page tables: | |||
6 | 0000000000000000 - 00007fffffffffff (=47 bits) user space, different per mm | 6 | 0000000000000000 - 00007fffffffffff (=47 bits) user space, different per mm |
7 | hole caused by [48:63] sign extension | 7 | hole caused by [48:63] sign extension |
8 | ffff800000000000 - ffff80ffffffffff (=40 bits) guard hole | 8 | ffff800000000000 - ffff80ffffffffff (=40 bits) guard hole |
9 | ffff880000000000 - ffffc0ffffffffff (=57 TB) direct mapping of all phys. memory | 9 | ffff880000000000 - ffffc8ffffffffff (=64 TB) direct mapping of all phys. memory |
10 | ffffc10000000000 - ffffc1ffffffffff (=40 bits) hole | 10 | ffffc80000000000 - ffffc8ffffffffff (=40 bits) hole |
11 | ffffc20000000000 - ffffe1ffffffffff (=45 bits) vmalloc/ioremap space | 11 | ffffc90000000000 - ffffe8ffffffffff (=45 bits) vmalloc/ioremap space |
12 | ffffe20000000000 - ffffe2ffffffffff (=40 bits) virtual memory map (1TB) | 12 | ffffe90000000000 - ffffe9ffffffffff (=40 bits) hole |
13 | ffffea0000000000 - ffffeaffffffffff (=40 bits) virtual memory map (1TB) | ||
13 | ... unused hole ... | 14 | ... unused hole ... |
14 | ffffffff80000000 - ffffffffa0000000 (=512 MB) kernel text mapping, from phys 0 | 15 | ffffffff80000000 - ffffffffa0000000 (=512 MB) kernel text mapping, from phys 0 |
15 | ffffffffa0000000 - fffffffffff00000 (=1536 MB) module mapping space | 16 | ffffffffa0000000 - fffffffffff00000 (=1536 MB) module mapping space |
diff --git a/arch/x86/include/asm/page_64_types.h b/arch/x86/include/asm/page_64_types.h index 3f587188ae68..6fadb020bd2b 100644 --- a/arch/x86/include/asm/page_64_types.h +++ b/arch/x86/include/asm/page_64_types.h | |||
@@ -47,7 +47,7 @@ | |||
47 | #define __START_KERNEL (__START_KERNEL_map + __PHYSICAL_START) | 47 | #define __START_KERNEL (__START_KERNEL_map + __PHYSICAL_START) |
48 | #define __START_KERNEL_map _AC(0xffffffff80000000, UL) | 48 | #define __START_KERNEL_map _AC(0xffffffff80000000, UL) |
49 | 49 | ||
50 | /* See Documentation/x86_64/mm.txt for a description of the memory map. */ | 50 | /* See Documentation/x86/x86_64/mm.txt for a description of the memory map. */ |
51 | #define __PHYSICAL_MASK_SHIFT 46 | 51 | #define __PHYSICAL_MASK_SHIFT 46 |
52 | #define __VIRTUAL_MASK_SHIFT 48 | 52 | #define __VIRTUAL_MASK_SHIFT 48 |
53 | 53 | ||
diff --git a/arch/x86/include/asm/pgtable_64_types.h b/arch/x86/include/asm/pgtable_64_types.h index fbf42b8e0383..766ea16fbbbd 100644 --- a/arch/x86/include/asm/pgtable_64_types.h +++ b/arch/x86/include/asm/pgtable_64_types.h | |||
@@ -51,11 +51,11 @@ typedef struct { pteval_t pte; } pte_t; | |||
51 | #define PGDIR_SIZE (_AC(1, UL) << PGDIR_SHIFT) | 51 | #define PGDIR_SIZE (_AC(1, UL) << PGDIR_SHIFT) |
52 | #define PGDIR_MASK (~(PGDIR_SIZE - 1)) | 52 | #define PGDIR_MASK (~(PGDIR_SIZE - 1)) |
53 | 53 | ||
54 | 54 | /* See Documentation/x86/x86_64/mm.txt for a description of the memory map. */ | |
55 | #define MAXMEM _AC(__AC(1, UL) << MAX_PHYSMEM_BITS, UL) | 55 | #define MAXMEM _AC(__AC(1, UL) << MAX_PHYSMEM_BITS, UL) |
56 | #define VMALLOC_START _AC(0xffffc20000000000, UL) | 56 | #define VMALLOC_START _AC(0xffffc90000000000, UL) |
57 | #define VMALLOC_END _AC(0xffffe1ffffffffff, UL) | 57 | #define VMALLOC_END _AC(0xffffe8ffffffffff, UL) |
58 | #define VMEMMAP_START _AC(0xffffe20000000000, UL) | 58 | #define VMEMMAP_START _AC(0xffffea0000000000, UL) |
59 | #define MODULES_VADDR _AC(0xffffffffa0000000, UL) | 59 | #define MODULES_VADDR _AC(0xffffffffa0000000, UL) |
60 | #define MODULES_END _AC(0xffffffffff000000, UL) | 60 | #define MODULES_END _AC(0xffffffffff000000, UL) |
61 | #define MODULES_LEN (MODULES_END - MODULES_VADDR) | 61 | #define MODULES_LEN (MODULES_END - MODULES_VADDR) |
diff --git a/arch/x86/include/asm/sparsemem.h b/arch/x86/include/asm/sparsemem.h index e3cc3c063ec5..4517d6b93188 100644 --- a/arch/x86/include/asm/sparsemem.h +++ b/arch/x86/include/asm/sparsemem.h | |||
@@ -27,7 +27,7 @@ | |||
27 | #else /* CONFIG_X86_32 */ | 27 | #else /* CONFIG_X86_32 */ |
28 | # define SECTION_SIZE_BITS 27 /* matt - 128 is convenient right now */ | 28 | # define SECTION_SIZE_BITS 27 /* matt - 128 is convenient right now */ |
29 | # define MAX_PHYSADDR_BITS 44 | 29 | # define MAX_PHYSADDR_BITS 44 |
30 | # define MAX_PHYSMEM_BITS 44 /* Can be max 45 bits */ | 30 | # define MAX_PHYSMEM_BITS 46 |
31 | #endif | 31 | #endif |
32 | 32 | ||
33 | #endif /* CONFIG_SPARSEMEM */ | 33 | #endif /* CONFIG_SPARSEMEM */ |