summaryrefslogtreecommitdiffstats
path: root/include/asm-frv/mem-layout.h
blob: aaf2a773d9d3d42070f221ca3443b24821a372cc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
/* mem-layout.h: memory layout
 *
 * Copyright (C) 2004 Red Hat, Inc. All Rights Reserved.
 * Written by David Howells (dhowells@redhat.com)
 *
 * 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
 * 2 of the License, or (at your option) any later version.
 */

#ifndef _ASM_MEM_LAYOUT_H
#define _ASM_MEM_LAYOUT_H

#ifndef __ASSEMBLY__
#define __UL(X)	((unsigned long) (X))
#else
#define __UL(X)	(X)
#endif

/*
 * PAGE_SHIFT determines the page size
 */
#define PAGE_SHIFT			14

#ifndef __ASSEMBLY__
#define PAGE_SIZE			(1UL << PAGE_SHIFT)
#else
#define PAGE_SIZE			(1 << PAGE_SHIFT)
#endif

#define PAGE_MASK			(~(PAGE_SIZE-1))

/*****************************************************************************/
/*
 * virtual memory layout from kernel's point of view
 */
#define PAGE_OFFSET			((unsigned long) &__page_offset)

#ifdef CONFIG_MMU

/* see Documentation/fujitsu/frv/mmu-layout.txt */
#define KERNEL_LOWMEM_START		__UL(0xc0000000)
#define KERNEL_LOWMEM_END		__UL(0xd0000000)
#define VMALLOC_START			__UL(0xd0000000)
#define VMALLOC_END			__UL(0xd8000000)
#define PKMAP_BASE			__UL(0xd8000000)
#define PKMAP_END			__UL(0xdc000000)
#define KMAP_ATOMIC_SECONDARY_FRAME	__UL(0xdc000000)
#define KMAP_ATOMIC_PRIMARY_FRAME	__UL(0xdd000000)

#endif

#define KERNEL_IO_START			__UL(0xe0000000)


/*****************************************************************************/
/*
 * memory layout from userspace's point of view
 */
#define BRK_BASE			__UL(2 * 1024 * 1024 + PAGE_SIZE)
#define STACK_TOP			__UL(2 * 1024 * 1024)
#define STACK_TOP_MAX	STACK_TOP

/* userspace process size */
#ifdef CONFIG_MMU
#define TASK_SIZE			(PAGE_OFFSET)
#else
#define TASK_SIZE			__UL(0xFFFFFFFFUL)
#endif

/* base of area at which unspecified mmaps will start */
#ifdef CONFIG_BINFMT_ELF_FDPIC
#define TASK_UNMAPPED_BASE		__UL(16 * 1024 * 1024)
#else
#define TASK_UNMAPPED_BASE		__UL(TASK_SIZE / 3)
#endif

#endif /* _ASM_MEM_LAYOUT_H */