1 /* SPDX-License-Identifier: GPL-2.0 */
3 * Copyright (C) 1994 - 1999, 2000, 03, 04 Ralf Baechle
4 * Copyright (C) 2000, 2002 Maciej W. Rozycki
5 * Copyright (C) 1990, 1999, 2000 Silicon Graphics, Inc.
7 #ifndef _ASM_MACH_GENERIC_SPACES_H
8 #define _ASM_MACH_GENERIC_SPACES_H
10 #include <asm/const.h>
13 * This gives the physical RAM offset.
16 #define PHYS_OFFSET _AC(0, UL)
20 #ifdef CONFIG_KVM_GUEST
21 #define CAC_BASE _AC(0x40000000, UL)
23 #define CAC_BASE _AC(0x80000000, UL)
26 #define IO_BASE _AC(0xa0000000, UL)
29 #define UNCAC_BASE _AC(0xa0000000, UL)
33 #ifdef CONFIG_KVM_GUEST
34 #define MAP_BASE _AC(0x60000000, UL)
36 #define MAP_BASE _AC(0xc0000000, UL)
41 * Memory above this physical address will be considered highmem.
44 #define HIGHMEM_START _AC(0x20000000, UL)
47 #endif /* CONFIG_32BIT */
52 #ifdef CONFIG_DMA_NONCOHERENT
53 #define CAC_BASE _AC(0x9800000000000000, UL)
55 #define CAC_BASE _AC(0xa800000000000000, UL)
60 #define IO_BASE _AC(0x9000000000000000, UL)
64 #define UNCAC_BASE _AC(0x9000000000000000, UL)
68 #define MAP_BASE _AC(0xc000000000000000, UL)
72 * Memory above this physical address will be considered highmem.
73 * Fixme: 59 bits is a fictive number and makes assumptions about processors
74 * in the distant future. Nobody will care for a few years :-)
77 #define HIGHMEM_START (_AC(1, UL) << _AC(59, UL))
80 #define TO_PHYS(x) ( ((x) & TO_PHYS_MASK))
81 #define TO_CAC(x) (CAC_BASE | ((x) & TO_PHYS_MASK))
82 #define TO_UNCAC(x) (UNCAC_BASE | ((x) & TO_PHYS_MASK))
84 #endif /* CONFIG_64BIT */
87 * This handles the memory map.
90 #define PAGE_OFFSET (CAC_BASE + PHYS_OFFSET)
94 #ifdef CONFIG_KVM_GUEST
95 #define FIXADDR_TOP ((unsigned long)(long)(int)0x7ffe0000)
97 #define FIXADDR_TOP ((unsigned long)(long)(int)0xfffe0000)
101 #endif /* __ASM_MACH_GENERIC_SPACES_H */