2 * Copyright (C) 1994 - 1999, 2000, 03, 04 Ralf Baechle
3 * Copyright (C) 2000, 2002 Maciej W. Rozycki
4 * Copyright (C) 1990, 1999, 2000 Silicon Graphics, Inc.
6 * SPDX-License-Identifier: GPL-2.0
8 #ifndef _ASM_MACH_GENERIC_SPACES_H
9 #define _ASM_MACH_GENERIC_SPACES_H
11 #include <asm/const.h>
14 * This gives the physical RAM offset.
17 #define PHYS_OFFSET _AC(0, UL)
21 #ifdef CONFIG_KVM_GUEST
22 #define CAC_BASE _AC(0x40000000, UL)
24 #define CAC_BASE _AC(0x80000000, UL)
27 #define IO_BASE _AC(0xa0000000, UL)
30 #define UNCAC_BASE _AC(0xa0000000, UL)
34 #ifdef CONFIG_KVM_GUEST
35 #define MAP_BASE _AC(0x60000000, UL)
37 #define MAP_BASE _AC(0xc0000000, UL)
42 * Memory above this physical address will be considered highmem.
45 #define HIGHMEM_START _AC(0x20000000, UL)
48 #endif /* CONFIG_32BIT */
53 #ifdef CONFIG_DMA_NONCOHERENT
54 #define CAC_BASE _AC(0x9800000000000000, UL)
56 #define CAC_BASE _AC(0xa800000000000000, UL)
61 #define IO_BASE _AC(0x9000000000000000, UL)
65 #define UNCAC_BASE _AC(0x9000000000000000, UL)
69 #define MAP_BASE _AC(0xc000000000000000, UL)
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 :-)
78 #define HIGHMEM_START (_AC(1, UL) << _AC(59, UL))
81 #define TO_PHYS(x) ( ((x) & TO_PHYS_MASK))
82 #define TO_CAC(x) (CAC_BASE | ((x) & TO_PHYS_MASK))
83 #define TO_UNCAC(x) (UNCAC_BASE | ((x) & TO_PHYS_MASK))
85 #endif /* CONFIG_64BIT */
88 * This handles the memory map.
91 #define PAGE_OFFSET (CAC_BASE + PHYS_OFFSET)
95 #ifdef CONFIG_KVM_GUEST
96 #define FIXADDR_TOP ((unsigned long)(long)(int)0x7ffe0000)
98 #define FIXADDR_TOP ((unsigned long)(long)(int)0xfffe0000)
102 #endif /* __ASM_MACH_GENERIC_SPACES_H */