Commit | Line | Data |
---|---|---|
1da177e4 LT |
1 | /* |
2 | * This file is subject to the terms and conditions of the GNU General Public | |
3 | * License. See the file "COPYING" in the main directory of this archive | |
4 | * for more details. | |
5 | * | |
6 | * Copyright (C) 1994 - 1999, 2000, 03, 04 Ralf Baechle | |
7 | * Copyright (C) 2000, 2002 Maciej W. Rozycki | |
8 | * Copyright (C) 1990, 1999, 2000 Silicon Graphics, Inc. | |
9 | */ | |
10 | #ifndef _ASM_MACH_GENERIC_SPACES_H | |
11 | #define _ASM_MACH_GENERIC_SPACES_H | |
12 | ||
c4612c85 | 13 | #include <linux/const.h> |
1da177e4 | 14 | |
41b0483e FBH |
15 | /* |
16 | * This gives the physical RAM offset. | |
17 | */ | |
18 | #ifndef PHYS_OFFSET | |
19 | #define PHYS_OFFSET _AC(0, UL) | |
20 | #endif | |
21 | ||
875d43e7 | 22 | #ifdef CONFIG_32BIT |
1da177e4 | 23 | |
c4612c85 FBH |
24 | #define CAC_BASE _AC(0x80000000, UL) |
25 | #define IO_BASE _AC(0xa0000000, UL) | |
26 | #define UNCAC_BASE _AC(0xa0000000, UL) | |
09bb9ce1 FBH |
27 | |
28 | #ifndef MAP_BASE | |
c4612c85 | 29 | #define MAP_BASE _AC(0xc0000000, UL) |
09bb9ce1 | 30 | #endif |
1da177e4 LT |
31 | |
32 | /* | |
33 | * Memory above this physical address will be considered highmem. | |
34 | */ | |
35 | #ifndef HIGHMEM_START | |
c4612c85 | 36 | #define HIGHMEM_START _AC(0x20000000, UL) |
1da177e4 LT |
37 | #endif |
38 | ||
875d43e7 | 39 | #endif /* CONFIG_32BIT */ |
1da177e4 | 40 | |
875d43e7 | 41 | #ifdef CONFIG_64BIT |
1da177e4 | 42 | |
09bb9ce1 | 43 | #ifndef CAC_BASE |
1da177e4 | 44 | #ifdef CONFIG_DMA_NONCOHERENT |
c4612c85 | 45 | #define CAC_BASE _AC(0x9800000000000000, UL) |
1da177e4 | 46 | #else |
c4612c85 | 47 | #define CAC_BASE _AC(0xa800000000000000, UL) |
1da177e4 | 48 | #endif |
09bb9ce1 FBH |
49 | #endif |
50 | ||
51 | #ifndef IO_BASE | |
c4612c85 | 52 | #define IO_BASE _AC(0x9000000000000000, UL) |
09bb9ce1 FBH |
53 | #endif |
54 | ||
55 | #ifndef UNCAC_BASE | |
c4612c85 | 56 | #define UNCAC_BASE _AC(0x9000000000000000, UL) |
09bb9ce1 FBH |
57 | #endif |
58 | ||
59 | #ifndef MAP_BASE | |
c4612c85 FBH |
60 | #define MAP_BASE _AC(0xc000000000000000, UL) |
61 | #endif | |
62 | ||
63 | /* | |
64 | * Memory above this physical address will be considered highmem. | |
65 | * Fixme: 59 bits is a fictive number and makes assumptions about processors | |
66 | * in the distant future. Nobody will care for a few years :-) | |
67 | */ | |
68 | #ifndef HIGHMEM_START | |
69 | #define HIGHMEM_START (_AC(1, UL) << _AC(59, UL)) | |
09bb9ce1 | 70 | #endif |
1da177e4 LT |
71 | |
72 | #define TO_PHYS(x) ( ((x) & TO_PHYS_MASK)) | |
73 | #define TO_CAC(x) (CAC_BASE | ((x) & TO_PHYS_MASK)) | |
74 | #define TO_UNCAC(x) (UNCAC_BASE | ((x) & TO_PHYS_MASK)) | |
75 | ||
875d43e7 | 76 | #endif /* CONFIG_64BIT */ |
1da177e4 | 77 | |
c4612c85 FBH |
78 | /* |
79 | * This handles the memory map. | |
80 | */ | |
81 | #ifndef PAGE_OFFSET | |
db385015 | 82 | #define PAGE_OFFSET (CAC_BASE + PHYS_OFFSET) |
c4612c85 FBH |
83 | #endif |
84 | ||
1da177e4 | 85 | #endif /* __ASM_MACH_GENERIC_SPACES_H */ |