xref: /openbmc/linux/arch/sparc/include/asm/vaddrs.h (revision 0da85d1e)
1 #ifndef _SPARC_VADDRS_H
2 #define _SPARC_VADDRS_H
3 
4 #include <asm/head.h>
5 
6 /*
7  * asm/vaddrs.h:  Here we define the virtual addresses at
8  *                      which important things will be mapped.
9  *
10  * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu)
11  * Copyright (C) 2000 Anton Blanchard (anton@samba.org)
12  */
13 
14 #define SRMMU_MAXMEM		0x0c000000
15 
16 #define SRMMU_NOCACHE_VADDR	(KERNBASE + SRMMU_MAXMEM)
17 				/* = 0x0fc000000 */
18 /* XXX Empiricals - this needs to go away - KMW */
19 #define SRMMU_MIN_NOCACHE_PAGES (550)
20 #define SRMMU_MAX_NOCACHE_PAGES	(1280)
21 
22 /* The following constant is used in mm/srmmu.c::srmmu_nocache_calcsize()
23  * to determine the amount of memory that will be reserved as nocache:
24  *
25  * 256 pages will be taken as nocache per each
26  * SRMMU_NOCACHE_ALCRATIO MB of system memory.
27  *
28  * limits enforced:	nocache minimum = 256 pages
29  *			nocache maximum = 1280 pages
30  */
31 #define SRMMU_NOCACHE_ALCRATIO	64	/* 256 pages per 64MB of system RAM */
32 
33 #ifndef __ASSEMBLY__
34 #include <asm/kmap_types.h>
35 
36 enum fixed_addresses {
37 	FIX_HOLE,
38 #ifdef CONFIG_HIGHMEM
39 	FIX_KMAP_BEGIN,
40 	FIX_KMAP_END = (KM_TYPE_NR * NR_CPUS),
41 #endif
42 	__end_of_fixed_addresses
43 };
44 #endif
45 
46 /* Leave one empty page between IO pages at 0xfd000000 and
47  * the top of the fixmap.
48  */
49 #define FIXADDR_TOP		(0xfcfff000UL)
50 #define FIXADDR_SIZE		((FIX_KMAP_END + 1) << PAGE_SHIFT)
51 #define FIXADDR_START		(FIXADDR_TOP - FIXADDR_SIZE)
52 
53 #define __fix_to_virt(x)        (FIXADDR_TOP - ((x) << PAGE_SHIFT))
54 
55 #define SUN4M_IOBASE_VADDR	0xfd000000 /* Base for mapping pages */
56 #define IOBASE_VADDR		0xfe000000
57 #define IOBASE_END		0xfe600000
58 
59 #define KADB_DEBUGGER_BEGVM	0xffc00000 /* Where kern debugger is in virt-mem */
60 #define KADB_DEBUGGER_ENDVM	0xffd00000
61 #define DEBUG_FIRSTVADDR	KADB_DEBUGGER_BEGVM
62 #define DEBUG_LASTVADDR		KADB_DEBUGGER_ENDVM
63 
64 #define LINUX_OPPROM_BEGVM	0xffd00000
65 #define LINUX_OPPROM_ENDVM	0xfff00000
66 
67 #define DVMA_VADDR		0xfff00000 /* Base area of the DVMA on suns */
68 #define DVMA_END		0xfffc0000
69 
70 #endif /* !(_SPARC_VADDRS_H) */
71