]>
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 | |
3ffc17d8 PB |
15 | #include <asm/mipsregs.h> |
16 | ||
41b0483e FBH |
17 | /* |
18 | * This gives the physical RAM offset. | |
19 | */ | |
20 | #ifndef PHYS_OFFSET | |
21 | #define PHYS_OFFSET _AC(0, UL) | |
22 | #endif | |
23 | ||
875d43e7 | 24 | #ifdef CONFIG_32BIT |
9843b030 SL |
25 | #ifdef CONFIG_KVM_GUEST |
26 | #define CAC_BASE _AC(0x40000000, UL) | |
27 | #else | |
c4612c85 | 28 | #define CAC_BASE _AC(0x80000000, UL) |
9843b030 | 29 | #endif |
7ad18dd0 | 30 | #ifndef IO_BASE |
c4612c85 | 31 | #define IO_BASE _AC(0xa0000000, UL) |
7ad18dd0 SH |
32 | #endif |
33 | #ifndef UNCAC_BASE | |
c4612c85 | 34 | #define UNCAC_BASE _AC(0xa0000000, UL) |
7ad18dd0 | 35 | #endif |
09bb9ce1 FBH |
36 | |
37 | #ifndef MAP_BASE | |
9843b030 SL |
38 | #ifdef CONFIG_KVM_GUEST |
39 | #define MAP_BASE _AC(0x60000000, UL) | |
40 | #else | |
c4612c85 | 41 | #define MAP_BASE _AC(0xc0000000, UL) |
09bb9ce1 | 42 | #endif |
9843b030 | 43 | #endif |
1da177e4 LT |
44 | |
45 | /* | |
46 | * Memory above this physical address will be considered highmem. | |
47 | */ | |
48 | #ifndef HIGHMEM_START | |
c4612c85 | 49 | #define HIGHMEM_START _AC(0x20000000, UL) |
1da177e4 LT |
50 | #endif |
51 | ||
875d43e7 | 52 | #endif /* CONFIG_32BIT */ |
1da177e4 | 53 | |
875d43e7 | 54 | #ifdef CONFIG_64BIT |
1da177e4 | 55 | |
09bb9ce1 | 56 | #ifndef CAC_BASE |
3ffc17d8 | 57 | #define CAC_BASE PHYS_TO_XKPHYS(read_c0_config() & CONF_CM_CMASK, 0) |
09bb9ce1 FBH |
58 | #endif |
59 | ||
60 | #ifndef IO_BASE | |
c4612c85 | 61 | #define IO_BASE _AC(0x9000000000000000, UL) |
09bb9ce1 FBH |
62 | #endif |
63 | ||
64 | #ifndef UNCAC_BASE | |
c4612c85 | 65 | #define UNCAC_BASE _AC(0x9000000000000000, UL) |
09bb9ce1 FBH |
66 | #endif |
67 | ||
68 | #ifndef MAP_BASE | |
c4612c85 FBH |
69 | #define MAP_BASE _AC(0xc000000000000000, UL) |
70 | #endif | |
71 | ||
72 | /* | |
73 | * Memory above this physical address will be considered highmem. | |
74 | * Fixme: 59 bits is a fictive number and makes assumptions about processors | |
75 | * in the distant future. Nobody will care for a few years :-) | |
76 | */ | |
77 | #ifndef HIGHMEM_START | |
78 | #define HIGHMEM_START (_AC(1, UL) << _AC(59, UL)) | |
09bb9ce1 | 79 | #endif |
1da177e4 | 80 | |
70342287 | 81 | #define TO_PHYS(x) ( ((x) & TO_PHYS_MASK)) |
1da177e4 LT |
82 | #define TO_CAC(x) (CAC_BASE | ((x) & TO_PHYS_MASK)) |
83 | #define TO_UNCAC(x) (UNCAC_BASE | ((x) & TO_PHYS_MASK)) | |
84 | ||
875d43e7 | 85 | #endif /* CONFIG_64BIT */ |
1da177e4 | 86 | |
c4612c85 FBH |
87 | /* |
88 | * This handles the memory map. | |
89 | */ | |
90 | #ifndef PAGE_OFFSET | |
db385015 | 91 | #define PAGE_OFFSET (CAC_BASE + PHYS_OFFSET) |
c4612c85 FBH |
92 | #endif |
93 | ||
565b60de | 94 | #ifndef FIXADDR_TOP |
8e748c8d JH |
95 | #ifdef CONFIG_KVM_GUEST |
96 | #define FIXADDR_TOP ((unsigned long)(long)(int)0x7ffe0000) | |
97 | #else | |
565b60de KC |
98 | #define FIXADDR_TOP ((unsigned long)(long)(int)0xfffe0000) |
99 | #endif | |
8e748c8d | 100 | #endif |
565b60de | 101 | |
1da177e4 | 102 | #endif /* __ASM_MACH_GENERIC_SPACES_H */ |