xref: /openbmc/linux/arch/sparc/include/asm/vaddrs.h (revision b2441318)
1b2441318SGreg Kroah-Hartman /* SPDX-License-Identifier: GPL-2.0 */
2a439fe51SSam Ravnborg #ifndef _SPARC_VADDRS_H
3a439fe51SSam Ravnborg #define _SPARC_VADDRS_H
4a439fe51SSam Ravnborg 
5a439fe51SSam Ravnborg #include <asm/head.h>
6a439fe51SSam Ravnborg 
7a439fe51SSam Ravnborg /*
8a439fe51SSam Ravnborg  * asm/vaddrs.h:  Here we define the virtual addresses at
9a439fe51SSam Ravnborg  *                      which important things will be mapped.
10a439fe51SSam Ravnborg  *
11a439fe51SSam Ravnborg  * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu)
12a439fe51SSam Ravnborg  * Copyright (C) 2000 Anton Blanchard (anton@samba.org)
13a439fe51SSam Ravnborg  */
14a439fe51SSam Ravnborg 
15a439fe51SSam Ravnborg #define SRMMU_MAXMEM		0x0c000000
16a439fe51SSam Ravnborg 
17a439fe51SSam Ravnborg #define SRMMU_NOCACHE_VADDR	(KERNBASE + SRMMU_MAXMEM)
18a439fe51SSam Ravnborg 				/* = 0x0fc000000 */
19a439fe51SSam Ravnborg /* XXX Empiricals - this needs to go away - KMW */
20a439fe51SSam Ravnborg #define SRMMU_MIN_NOCACHE_PAGES (550)
21a439fe51SSam Ravnborg #define SRMMU_MAX_NOCACHE_PAGES	(1280)
22a439fe51SSam Ravnborg 
23a439fe51SSam Ravnborg /* The following constant is used in mm/srmmu.c::srmmu_nocache_calcsize()
24a439fe51SSam Ravnborg  * to determine the amount of memory that will be reserved as nocache:
25a439fe51SSam Ravnborg  *
26a439fe51SSam Ravnborg  * 256 pages will be taken as nocache per each
27a439fe51SSam Ravnborg  * SRMMU_NOCACHE_ALCRATIO MB of system memory.
28a439fe51SSam Ravnborg  *
29a439fe51SSam Ravnborg  * limits enforced:	nocache minimum = 256 pages
30a439fe51SSam Ravnborg  *			nocache maximum = 1280 pages
31a439fe51SSam Ravnborg  */
32a439fe51SSam Ravnborg #define SRMMU_NOCACHE_ALCRATIO	64	/* 256 pages per 64MB of system RAM */
33a439fe51SSam Ravnborg 
341b6d06d8SSam Ravnborg #ifndef __ASSEMBLY__
351b6d06d8SSam Ravnborg #include <asm/kmap_types.h>
361b6d06d8SSam Ravnborg 
371b6d06d8SSam Ravnborg enum fixed_addresses {
381b6d06d8SSam Ravnborg 	FIX_HOLE,
391b6d06d8SSam Ravnborg #ifdef CONFIG_HIGHMEM
401b6d06d8SSam Ravnborg 	FIX_KMAP_BEGIN,
411b6d06d8SSam Ravnborg 	FIX_KMAP_END = (KM_TYPE_NR * NR_CPUS),
421b6d06d8SSam Ravnborg #endif
431b6d06d8SSam Ravnborg 	__end_of_fixed_addresses
441b6d06d8SSam Ravnborg };
451b6d06d8SSam Ravnborg #endif
461b6d06d8SSam Ravnborg 
471b6d06d8SSam Ravnborg /* Leave one empty page between IO pages at 0xfd000000 and
481b6d06d8SSam Ravnborg  * the top of the fixmap.
491b6d06d8SSam Ravnborg  */
501b6d06d8SSam Ravnborg #define FIXADDR_TOP		(0xfcfff000UL)
511b6d06d8SSam Ravnborg #define FIXADDR_SIZE		((FIX_KMAP_END + 1) << PAGE_SHIFT)
521b6d06d8SSam Ravnborg #define FIXADDR_START		(FIXADDR_TOP - FIXADDR_SIZE)
531b6d06d8SSam Ravnborg 
541b6d06d8SSam Ravnborg #define __fix_to_virt(x)        (FIXADDR_TOP - ((x) << PAGE_SHIFT))
551b6d06d8SSam Ravnborg 
56a439fe51SSam Ravnborg #define SUN4M_IOBASE_VADDR	0xfd000000 /* Base for mapping pages */
57a439fe51SSam Ravnborg #define IOBASE_VADDR		0xfe000000
58a439fe51SSam Ravnborg #define IOBASE_END		0xfe600000
59a439fe51SSam Ravnborg 
60a439fe51SSam Ravnborg #define KADB_DEBUGGER_BEGVM	0xffc00000 /* Where kern debugger is in virt-mem */
61a439fe51SSam Ravnborg #define KADB_DEBUGGER_ENDVM	0xffd00000
62a439fe51SSam Ravnborg #define DEBUG_FIRSTVADDR	KADB_DEBUGGER_BEGVM
63a439fe51SSam Ravnborg #define DEBUG_LASTVADDR		KADB_DEBUGGER_ENDVM
64a439fe51SSam Ravnborg 
65a439fe51SSam Ravnborg #define LINUX_OPPROM_BEGVM	0xffd00000
66a439fe51SSam Ravnborg #define LINUX_OPPROM_ENDVM	0xfff00000
67a439fe51SSam Ravnborg 
68a439fe51SSam Ravnborg #define DVMA_VADDR		0xfff00000 /* Base area of the DVMA on suns */
69a439fe51SSam Ravnborg #define DVMA_END		0xfffc0000
70a439fe51SSam Ravnborg 
71a439fe51SSam Ravnborg #endif /* !(_SPARC_VADDRS_H) */
72