Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0 */
0002 #ifndef _SPARC_VADDRS_H
0003 #define _SPARC_VADDRS_H
0004 
0005 #include <asm/head.h>
0006 
0007 /*
0008  * asm/vaddrs.h:  Here we define the virtual addresses at
0009  *                      which important things will be mapped.
0010  *
0011  * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu)
0012  * Copyright (C) 2000 Anton Blanchard (anton@samba.org)
0013  */
0014 
0015 #define SRMMU_MAXMEM        0x0c000000
0016 
0017 #define SRMMU_NOCACHE_VADDR (KERNBASE + SRMMU_MAXMEM)
0018                 /* = 0x0fc000000 */
0019 /* XXX Empiricals - this needs to go away - KMW */
0020 #define SRMMU_MIN_NOCACHE_PAGES (550)
0021 #define SRMMU_MAX_NOCACHE_PAGES (1280)
0022 
0023 /* The following constant is used in mm/srmmu.c::srmmu_nocache_calcsize()
0024  * to determine the amount of memory that will be reserved as nocache:
0025  *
0026  * 256 pages will be taken as nocache per each
0027  * SRMMU_NOCACHE_ALCRATIO MB of system memory.
0028  *
0029  * limits enforced: nocache minimum = 256 pages
0030  *          nocache maximum = 1280 pages
0031  */
0032 #define SRMMU_NOCACHE_ALCRATIO  64  /* 256 pages per 64MB of system RAM */
0033 
0034 #ifndef __ASSEMBLY__
0035 #include <asm/kmap_size.h>
0036 
0037 enum fixed_addresses {
0038     FIX_HOLE,
0039 #ifdef CONFIG_HIGHMEM
0040     FIX_KMAP_BEGIN,
0041     FIX_KMAP_END = (KM_MAX_IDX * NR_CPUS),
0042 #endif
0043     __end_of_fixed_addresses
0044 };
0045 #endif
0046 
0047 /* Leave one empty page between IO pages at 0xfd000000 and
0048  * the top of the fixmap.
0049  */
0050 #define FIXADDR_TOP     (0xfcfff000UL)
0051 #define FIXADDR_SIZE        ((FIX_KMAP_END + 1) << PAGE_SHIFT)
0052 #define FIXADDR_START       (FIXADDR_TOP - FIXADDR_SIZE)
0053 
0054 #define __fix_to_virt(x)        (FIXADDR_TOP - ((x) << PAGE_SHIFT))
0055 
0056 #define SUN4M_IOBASE_VADDR  0xfd000000 /* Base for mapping pages */
0057 #define IOBASE_VADDR        0xfe000000
0058 #define IOBASE_END      0xfe600000
0059 
0060 #define KADB_DEBUGGER_BEGVM 0xffc00000 /* Where kern debugger is in virt-mem */
0061 #define KADB_DEBUGGER_ENDVM 0xffd00000
0062 #define DEBUG_FIRSTVADDR    KADB_DEBUGGER_BEGVM
0063 #define DEBUG_LASTVADDR     KADB_DEBUGGER_ENDVM
0064 
0065 #define LINUX_OPPROM_BEGVM  0xffd00000
0066 #define LINUX_OPPROM_ENDVM  0xfff00000
0067 
0068 #define DVMA_VADDR      0xfff00000 /* Base area of the DVMA on suns */
0069 #define DVMA_END        0xfffc0000
0070 
0071 #endif /* !(_SPARC_VADDRS_H) */