Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1 | /* mem-layout.h: memory layout |
| 2 | * |
| 3 | * Copyright (C) 2004 Red Hat, Inc. All Rights Reserved. |
| 4 | * Written by David Howells (dhowells@redhat.com) |
| 5 | * |
| 6 | * This program is free software; you can redistribute it and/or |
| 7 | * modify it under the terms of the GNU General Public License |
| 8 | * as published by the Free Software Foundation; either version |
| 9 | * 2 of the License, or (at your option) any later version. |
| 10 | */ |
| 11 | |
| 12 | #ifndef _ASM_MEM_LAYOUT_H |
| 13 | #define _ASM_MEM_LAYOUT_H |
| 14 | |
| 15 | #ifndef __ASSEMBLY__ |
| 16 | #define __UL(X) ((unsigned long) (X)) |
| 17 | #else |
| 18 | #define __UL(X) (X) |
| 19 | #endif |
| 20 | |
| 21 | /* |
| 22 | * PAGE_SHIFT determines the page size |
| 23 | */ |
| 24 | #define PAGE_SHIFT 14 |
| 25 | |
| 26 | #ifndef __ASSEMBLY__ |
| 27 | #define PAGE_SIZE (1UL << PAGE_SHIFT) |
| 28 | #else |
| 29 | #define PAGE_SIZE (1 << PAGE_SHIFT) |
| 30 | #endif |
| 31 | |
| 32 | #define PAGE_MASK (~(PAGE_SIZE-1)) |
| 33 | |
| 34 | /*****************************************************************************/ |
| 35 | /* |
| 36 | * virtual memory layout from kernel's point of view |
| 37 | */ |
| 38 | #define PAGE_OFFSET ((unsigned long) &__page_offset) |
| 39 | |
| 40 | #ifdef CONFIG_MMU |
| 41 | |
| 42 | /* see Documentation/fujitsu/frv/mmu-layout.txt */ |
| 43 | #define KERNEL_LOWMEM_START __UL(0xc0000000) |
| 44 | #define KERNEL_LOWMEM_END __UL(0xd0000000) |
| 45 | #define VMALLOC_START __UL(0xd0000000) |
| 46 | #define VMALLOC_END __UL(0xd8000000) |
| 47 | #define PKMAP_BASE __UL(0xd8000000) |
| 48 | #define PKMAP_END __UL(0xdc000000) |
| 49 | #define KMAP_ATOMIC_SECONDARY_FRAME __UL(0xdc000000) |
| 50 | #define KMAP_ATOMIC_PRIMARY_FRAME __UL(0xdd000000) |
| 51 | |
| 52 | #endif |
| 53 | |
| 54 | #define KERNEL_IO_START __UL(0xe0000000) |
| 55 | |
| 56 | |
| 57 | /*****************************************************************************/ |
| 58 | /* |
| 59 | * memory layout from userspace's point of view |
| 60 | */ |
| 61 | #define BRK_BASE __UL(2 * 1024 * 1024 + PAGE_SIZE) |
| 62 | #define STACK_TOP __UL(2 * 1024 * 1024) |
Peter Zijlstra | b111757 | 2007-07-19 01:48:14 -0700 | [diff] [blame] | 63 | #define STACK_TOP_MAX STACK_TOP |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 64 | |
| 65 | /* userspace process size */ |
| 66 | #ifdef CONFIG_MMU |
| 67 | #define TASK_SIZE (PAGE_OFFSET) |
| 68 | #else |
| 69 | #define TASK_SIZE __UL(0xFFFFFFFFUL) |
| 70 | #endif |
| 71 | |
| 72 | /* base of area at which unspecified mmaps will start */ |
| 73 | #ifdef CONFIG_BINFMT_ELF_FDPIC |
| 74 | #define TASK_UNMAPPED_BASE __UL(16 * 1024 * 1024) |
| 75 | #else |
| 76 | #define TASK_UNMAPPED_BASE __UL(TASK_SIZE / 3) |
| 77 | #endif |
| 78 | |
| 79 | #endif /* _ASM_MEM_LAYOUT_H */ |