18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */
28c2ecf20Sopenharmony_ci#ifndef _SPARC_VADDRS_H
38c2ecf20Sopenharmony_ci#define _SPARC_VADDRS_H
48c2ecf20Sopenharmony_ci
58c2ecf20Sopenharmony_ci#include <asm/head.h>
68c2ecf20Sopenharmony_ci
78c2ecf20Sopenharmony_ci/*
88c2ecf20Sopenharmony_ci * asm/vaddrs.h:  Here we define the virtual addresses at
98c2ecf20Sopenharmony_ci *                      which important things will be mapped.
108c2ecf20Sopenharmony_ci *
118c2ecf20Sopenharmony_ci * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu)
128c2ecf20Sopenharmony_ci * Copyright (C) 2000 Anton Blanchard (anton@samba.org)
138c2ecf20Sopenharmony_ci */
148c2ecf20Sopenharmony_ci
158c2ecf20Sopenharmony_ci#define SRMMU_MAXMEM		0x0c000000
168c2ecf20Sopenharmony_ci
178c2ecf20Sopenharmony_ci#define SRMMU_NOCACHE_VADDR	(KERNBASE + SRMMU_MAXMEM)
188c2ecf20Sopenharmony_ci				/* = 0x0fc000000 */
198c2ecf20Sopenharmony_ci/* XXX Empiricals - this needs to go away - KMW */
208c2ecf20Sopenharmony_ci#define SRMMU_MIN_NOCACHE_PAGES (550)
218c2ecf20Sopenharmony_ci#define SRMMU_MAX_NOCACHE_PAGES	(1280)
228c2ecf20Sopenharmony_ci
238c2ecf20Sopenharmony_ci/* The following constant is used in mm/srmmu.c::srmmu_nocache_calcsize()
248c2ecf20Sopenharmony_ci * to determine the amount of memory that will be reserved as nocache:
258c2ecf20Sopenharmony_ci *
268c2ecf20Sopenharmony_ci * 256 pages will be taken as nocache per each
278c2ecf20Sopenharmony_ci * SRMMU_NOCACHE_ALCRATIO MB of system memory.
288c2ecf20Sopenharmony_ci *
298c2ecf20Sopenharmony_ci * limits enforced:	nocache minimum = 256 pages
308c2ecf20Sopenharmony_ci *			nocache maximum = 1280 pages
318c2ecf20Sopenharmony_ci */
328c2ecf20Sopenharmony_ci#define SRMMU_NOCACHE_ALCRATIO	64	/* 256 pages per 64MB of system RAM */
338c2ecf20Sopenharmony_ci
348c2ecf20Sopenharmony_ci#ifndef __ASSEMBLY__
358c2ecf20Sopenharmony_ci#include <asm/kmap_types.h>
368c2ecf20Sopenharmony_ci
378c2ecf20Sopenharmony_cienum fixed_addresses {
388c2ecf20Sopenharmony_ci	FIX_HOLE,
398c2ecf20Sopenharmony_ci#ifdef CONFIG_HIGHMEM
408c2ecf20Sopenharmony_ci	FIX_KMAP_BEGIN,
418c2ecf20Sopenharmony_ci	FIX_KMAP_END = (KM_TYPE_NR * NR_CPUS),
428c2ecf20Sopenharmony_ci#endif
438c2ecf20Sopenharmony_ci	__end_of_fixed_addresses
448c2ecf20Sopenharmony_ci};
458c2ecf20Sopenharmony_ci#endif
468c2ecf20Sopenharmony_ci
478c2ecf20Sopenharmony_ci/* Leave one empty page between IO pages at 0xfd000000 and
488c2ecf20Sopenharmony_ci * the top of the fixmap.
498c2ecf20Sopenharmony_ci */
508c2ecf20Sopenharmony_ci#define FIXADDR_TOP		(0xfcfff000UL)
518c2ecf20Sopenharmony_ci#define FIXADDR_SIZE		((FIX_KMAP_END + 1) << PAGE_SHIFT)
528c2ecf20Sopenharmony_ci#define FIXADDR_START		(FIXADDR_TOP - FIXADDR_SIZE)
538c2ecf20Sopenharmony_ci
548c2ecf20Sopenharmony_ci#define __fix_to_virt(x)        (FIXADDR_TOP - ((x) << PAGE_SHIFT))
558c2ecf20Sopenharmony_ci
568c2ecf20Sopenharmony_ci#define SUN4M_IOBASE_VADDR	0xfd000000 /* Base for mapping pages */
578c2ecf20Sopenharmony_ci#define IOBASE_VADDR		0xfe000000
588c2ecf20Sopenharmony_ci#define IOBASE_END		0xfe600000
598c2ecf20Sopenharmony_ci
608c2ecf20Sopenharmony_ci#define KADB_DEBUGGER_BEGVM	0xffc00000 /* Where kern debugger is in virt-mem */
618c2ecf20Sopenharmony_ci#define KADB_DEBUGGER_ENDVM	0xffd00000
628c2ecf20Sopenharmony_ci#define DEBUG_FIRSTVADDR	KADB_DEBUGGER_BEGVM
638c2ecf20Sopenharmony_ci#define DEBUG_LASTVADDR		KADB_DEBUGGER_ENDVM
648c2ecf20Sopenharmony_ci
658c2ecf20Sopenharmony_ci#define LINUX_OPPROM_BEGVM	0xffd00000
668c2ecf20Sopenharmony_ci#define LINUX_OPPROM_ENDVM	0xfff00000
678c2ecf20Sopenharmony_ci
688c2ecf20Sopenharmony_ci#define DVMA_VADDR		0xfff00000 /* Base area of the DVMA on suns */
698c2ecf20Sopenharmony_ci#define DVMA_END		0xfffc0000
708c2ecf20Sopenharmony_ci
718c2ecf20Sopenharmony_ci#endif /* !(_SPARC_VADDRS_H) */
72