diff options
Diffstat (limited to 'include/asm-sparc64/pgtable.h')
-rw-r--r-- | include/asm-sparc64/pgtable.h | 34 |
1 files changed, 21 insertions, 13 deletions
diff --git a/include/asm-sparc64/pgtable.h b/include/asm-sparc64/pgtable.h index a2b4f5ed4625..8c6dfc6c7af6 100644 --- a/include/asm-sparc64/pgtable.h +++ b/include/asm-sparc64/pgtable.h | |||
@@ -24,21 +24,23 @@ | |||
24 | #include <asm/processor.h> | 24 | #include <asm/processor.h> |
25 | #include <asm/const.h> | 25 | #include <asm/const.h> |
26 | 26 | ||
27 | /* The kernel image occupies 0x4000000 to 0x1000000 (4MB --> 16MB). | 27 | /* The kernel image occupies 0x4000000 to 0x1000000 (4MB --> 32MB). |
28 | * The page copy blockops use 0x1000000 to 0x18000000 (16MB --> 24MB). | 28 | * The page copy blockops can use 0x2000000 to 0x10000000. |
29 | * The PROM resides in an area spanning 0xf0000000 to 0x100000000. | 29 | * The PROM resides in an area spanning 0xf0000000 to 0x100000000. |
30 | * The vmalloc area spans 0x140000000 to 0x200000000. | 30 | * The vmalloc area spans 0x100000000 to 0x200000000. |
31 | * Since modules need to be in the lowest 32-bits of the address space, | ||
32 | * we place them right before the OBP area from 0x10000000 to 0xf0000000. | ||
31 | * There is a single static kernel PMD which maps from 0x0 to address | 33 | * There is a single static kernel PMD which maps from 0x0 to address |
32 | * 0x400000000. | 34 | * 0x400000000. |
33 | */ | 35 | */ |
34 | #define TLBTEMP_BASE _AC(0x0000000001000000,UL) | 36 | #define TLBTEMP_BASE _AC(0x0000000002000000,UL) |
35 | #define MODULES_VADDR _AC(0x0000000002000000,UL) | 37 | #define MODULES_VADDR _AC(0x0000000010000000,UL) |
36 | #define MODULES_LEN _AC(0x000000007e000000,UL) | 38 | #define MODULES_LEN _AC(0x00000000e0000000,UL) |
37 | #define MODULES_END _AC(0x0000000080000000,UL) | 39 | #define MODULES_END _AC(0x00000000f0000000,UL) |
38 | #define VMALLOC_START _AC(0x0000000140000000,UL) | ||
39 | #define VMALLOC_END _AC(0x0000000200000000,UL) | ||
40 | #define LOW_OBP_ADDRESS _AC(0x00000000f0000000,UL) | 40 | #define LOW_OBP_ADDRESS _AC(0x00000000f0000000,UL) |
41 | #define HI_OBP_ADDRESS _AC(0x0000000100000000,UL) | 41 | #define HI_OBP_ADDRESS _AC(0x0000000100000000,UL) |
42 | #define VMALLOC_START _AC(0x0000000100000000,UL) | ||
43 | #define VMALLOC_END _AC(0x0000000200000000,UL) | ||
42 | 44 | ||
43 | /* XXX All of this needs to be rethought so we can take advantage | 45 | /* XXX All of this needs to be rethought so we can take advantage |
44 | * XXX cheetah's full 64-bit virtual address space, ie. no more hole | 46 | * XXX cheetah's full 64-bit virtual address space, ie. no more hole |
@@ -58,13 +60,13 @@ | |||
58 | * table can map | 60 | * table can map |
59 | */ | 61 | */ |
60 | #define PMD_SHIFT (PAGE_SHIFT + (PAGE_SHIFT-3)) | 62 | #define PMD_SHIFT (PAGE_SHIFT + (PAGE_SHIFT-3)) |
61 | #define PMD_SIZE (1UL << PMD_SHIFT) | 63 | #define PMD_SIZE (_AC(1,UL) << PMD_SHIFT) |
62 | #define PMD_MASK (~(PMD_SIZE-1)) | 64 | #define PMD_MASK (~(PMD_SIZE-1)) |
63 | #define PMD_BITS (PAGE_SHIFT - 2) | 65 | #define PMD_BITS (PAGE_SHIFT - 2) |
64 | 66 | ||
65 | /* PGDIR_SHIFT determines what a third-level page table entry can map */ | 67 | /* PGDIR_SHIFT determines what a third-level page table entry can map */ |
66 | #define PGDIR_SHIFT (PAGE_SHIFT + (PAGE_SHIFT-3) + PMD_BITS) | 68 | #define PGDIR_SHIFT (PAGE_SHIFT + (PAGE_SHIFT-3) + PMD_BITS) |
67 | #define PGDIR_SIZE (1UL << PGDIR_SHIFT) | 69 | #define PGDIR_SIZE (_AC(1,UL) << PGDIR_SHIFT) |
68 | #define PGDIR_MASK (~(PGDIR_SIZE-1)) | 70 | #define PGDIR_MASK (~(PGDIR_SIZE-1)) |
69 | #define PGDIR_BITS (PAGE_SHIFT - 2) | 71 | #define PGDIR_BITS (PAGE_SHIFT - 2) |
70 | 72 | ||
@@ -96,7 +98,9 @@ | |||
96 | #define _PAGE_NFO _AC(0x1000000000000000,UL) /* No Fault Only */ | 98 | #define _PAGE_NFO _AC(0x1000000000000000,UL) /* No Fault Only */ |
97 | #define _PAGE_IE _AC(0x0800000000000000,UL) /* Invert Endianness */ | 99 | #define _PAGE_IE _AC(0x0800000000000000,UL) /* Invert Endianness */ |
98 | #define _PAGE_SOFT2 _AC(0x07FC000000000000,UL) /* Software bits, set 2 */ | 100 | #define _PAGE_SOFT2 _AC(0x07FC000000000000,UL) /* Software bits, set 2 */ |
99 | #define _PAGE_RES1 _AC(0x0003000000000000,UL) /* Reserved */ | 101 | #define _PAGE_RES1 _AC(0x0002000000000000,UL) /* Reserved */ |
102 | #define _PAGE_SZ32MB _AC(0x0001000000000000,UL) /* (Panther) 32MB page */ | ||
103 | #define _PAGE_SZ256MB _AC(0x2001000000000000,UL) /* (Panther) 256MB page */ | ||
100 | #define _PAGE_SN _AC(0x0000800000000000,UL) /* (Cheetah) Snoop */ | 104 | #define _PAGE_SN _AC(0x0000800000000000,UL) /* (Cheetah) Snoop */ |
101 | #define _PAGE_RES2 _AC(0x0000780000000000,UL) /* Reserved */ | 105 | #define _PAGE_RES2 _AC(0x0000780000000000,UL) /* Reserved */ |
102 | #define _PAGE_PADDR_SF _AC(0x000001FFFFFFE000,UL) /* (Spitfire) paddr[40:13]*/ | 106 | #define _PAGE_PADDR_SF _AC(0x000001FFFFFFE000,UL) /* (Spitfire) paddr[40:13]*/ |
@@ -334,7 +338,11 @@ static inline void set_pte_at(struct mm_struct *mm, unsigned long addr, pte_t *p | |||
334 | #define pte_clear(mm,addr,ptep) \ | 338 | #define pte_clear(mm,addr,ptep) \ |
335 | set_pte_at((mm), (addr), (ptep), __pte(0UL)) | 339 | set_pte_at((mm), (addr), (ptep), __pte(0UL)) |
336 | 340 | ||
337 | extern pgd_t swapper_pg_dir[1]; | 341 | extern pgd_t swapper_pg_dir[2048]; |
342 | extern pmd_t swapper_low_pmd_dir[2048]; | ||
343 | |||
344 | extern void paging_init(void); | ||
345 | extern unsigned long find_ecache_flush_span(unsigned long size); | ||
338 | 346 | ||
339 | /* These do nothing with the way I have things setup. */ | 347 | /* These do nothing with the way I have things setup. */ |
340 | #define mmu_lockarea(vaddr, len) (vaddr) | 348 | #define mmu_lockarea(vaddr, len) (vaddr) |