Linux Audio

Check our new training course

Loading...
v3.15
  1/*
  2 * This file is subject to the terms and conditions of the GNU General Public
  3 * License.  See the file "COPYING" in the main directory of this archive
  4 * for more details.
  5 *
  6 * Copyright (C) 1994 - 1999, 2000, 03, 04 Ralf Baechle
  7 * Copyright (C) 2000, 2002  Maciej W. Rozycki
  8 * Copyright (C) 1990, 1999, 2000 Silicon Graphics, Inc.
  9 */
 10#ifndef _ASM_MACH_GENERIC_SPACES_H
 11#define _ASM_MACH_GENERIC_SPACES_H
 12
 13#include <linux/const.h>
 14
 
 
 
 
 
 
 15/*
 16 * This gives the physical RAM offset.
 17 */
 18#ifndef PHYS_OFFSET
 19#define PHYS_OFFSET		_AC(0, UL)
 20#endif
 
 
 
 
 21
 22#ifdef CONFIG_32BIT
 23#ifdef CONFIG_KVM_GUEST
 24#define CAC_BASE		_AC(0x40000000, UL)
 25#else
 26#define CAC_BASE		_AC(0x80000000, UL)
 27#endif
 28#ifndef IO_BASE
 29#define IO_BASE			_AC(0xa0000000, UL)
 30#endif
 31#ifndef UNCAC_BASE
 32#define UNCAC_BASE		_AC(0xa0000000, UL)
 33#endif
 34
 35#ifndef MAP_BASE
 36#ifdef CONFIG_KVM_GUEST
 37#define MAP_BASE		_AC(0x60000000, UL)
 38#else
 39#define MAP_BASE		_AC(0xc0000000, UL)
 40#endif
 41#endif
 42
 43/*
 44 * Memory above this physical address will be considered highmem.
 45 */
 46#ifndef HIGHMEM_START
 47#define HIGHMEM_START		_AC(0x20000000, UL)
 48#endif
 49
 50#endif /* CONFIG_32BIT */
 51
 52#ifdef CONFIG_64BIT
 53
 54#ifndef CAC_BASE
 55#ifdef CONFIG_DMA_NONCOHERENT
 56#define CAC_BASE		_AC(0x9800000000000000, UL)
 57#else
 58#define CAC_BASE		_AC(0xa800000000000000, UL)
 59#endif
 60#endif
 61
 62#ifndef IO_BASE
 63#define IO_BASE			_AC(0x9000000000000000, UL)
 64#endif
 65
 66#ifndef UNCAC_BASE
 67#define UNCAC_BASE		_AC(0x9000000000000000, UL)
 68#endif
 69
 70#ifndef MAP_BASE
 71#define MAP_BASE		_AC(0xc000000000000000, UL)
 72#endif
 73
 74/*
 75 * Memory above this physical address will be considered highmem.
 76 * Fixme: 59 bits is a fictive number and makes assumptions about processors
 77 * in the distant future.  Nobody will care for a few years :-)
 78 */
 79#ifndef HIGHMEM_START
 80#define HIGHMEM_START		(_AC(1, UL) << _AC(59, UL))
 81#endif
 82
 83#define TO_PHYS(x)		(	      ((x) & TO_PHYS_MASK))
 84#define TO_CAC(x)		(CAC_BASE   | ((x) & TO_PHYS_MASK))
 85#define TO_UNCAC(x)		(UNCAC_BASE | ((x) & TO_PHYS_MASK))
 86
 87#endif /* CONFIG_64BIT */
 88
 89/*
 90 * This handles the memory map.
 91 */
 92#ifndef PAGE_OFFSET
 93#define PAGE_OFFSET		(CAC_BASE + PHYS_OFFSET)
 94#endif
 95
 96#ifndef FIXADDR_TOP
 
 
 
 97#define FIXADDR_TOP		((unsigned long)(long)(int)0xfffe0000)
 
 98#endif
 99
100#endif /* __ASM_MACH_GENERIC_SPACES_H */
v5.9
  1/*
  2 * This file is subject to the terms and conditions of the GNU General Public
  3 * License.  See the file "COPYING" in the main directory of this archive
  4 * for more details.
  5 *
  6 * Copyright (C) 1994 - 1999, 2000, 03, 04 Ralf Baechle
  7 * Copyright (C) 2000, 2002  Maciej W. Rozycki
  8 * Copyright (C) 1990, 1999, 2000 Silicon Graphics, Inc.
  9 */
 10#ifndef _ASM_MACH_GENERIC_SPACES_H
 11#define _ASM_MACH_GENERIC_SPACES_H
 12
 13#include <linux/const.h>
 14
 15#include <asm/mipsregs.h>
 16
 17#ifndef IO_SPACE_LIMIT
 18#define IO_SPACE_LIMIT 0xffff
 19#endif
 20
 21/*
 22 * This gives the physical RAM offset.
 23 */
 24#ifndef __ASSEMBLY__
 25# if defined(CONFIG_MIPS_AUTO_PFN_OFFSET)
 26#  define PHYS_OFFSET		((unsigned long)PFN_PHYS(ARCH_PFN_OFFSET))
 27# elif !defined(PHYS_OFFSET)
 28#  define PHYS_OFFSET		_AC(0, UL)
 29# endif
 30#endif /* __ASSEMBLY__ */
 31
 32#ifdef CONFIG_32BIT
 33#ifdef CONFIG_KVM_GUEST
 34#define CAC_BASE		_AC(0x40000000, UL)
 35#else
 36#define CAC_BASE		_AC(0x80000000, UL)
 37#endif
 38#ifndef IO_BASE
 39#define IO_BASE			_AC(0xa0000000, UL)
 40#endif
 41#ifndef UNCAC_BASE
 42#define UNCAC_BASE		_AC(0xa0000000, UL)
 43#endif
 44
 45#ifndef MAP_BASE
 46#ifdef CONFIG_KVM_GUEST
 47#define MAP_BASE		_AC(0x60000000, UL)
 48#else
 49#define MAP_BASE		_AC(0xc0000000, UL)
 50#endif
 51#endif
 52
 53/*
 54 * Memory above this physical address will be considered highmem.
 55 */
 56#ifndef HIGHMEM_START
 57#define HIGHMEM_START		_AC(0x20000000, UL)
 58#endif
 59
 60#endif /* CONFIG_32BIT */
 61
 62#ifdef CONFIG_64BIT
 63
 64#ifndef CAC_BASE
 65#define CAC_BASE	PHYS_TO_XKPHYS(read_c0_config() & CONF_CM_CMASK, 0)
 
 
 
 
 66#endif
 67
 68#ifndef IO_BASE
 69#define IO_BASE			_AC(0x9000000000000000, UL)
 70#endif
 71
 72#ifndef UNCAC_BASE
 73#define UNCAC_BASE		_AC(0x9000000000000000, UL)
 74#endif
 75
 76#ifndef MAP_BASE
 77#define MAP_BASE		_AC(0xc000000000000000, UL)
 78#endif
 79
 80/*
 81 * Memory above this physical address will be considered highmem.
 82 * Fixme: 59 bits is a fictive number and makes assumptions about processors
 83 * in the distant future.  Nobody will care for a few years :-)
 84 */
 85#ifndef HIGHMEM_START
 86#define HIGHMEM_START		(_AC(1, UL) << _AC(59, UL))
 87#endif
 88
 89#define TO_PHYS(x)		(	      ((x) & TO_PHYS_MASK))
 90#define TO_CAC(x)		(CAC_BASE   | ((x) & TO_PHYS_MASK))
 91#define TO_UNCAC(x)		(UNCAC_BASE | ((x) & TO_PHYS_MASK))
 92
 93#endif /* CONFIG_64BIT */
 94
 95/*
 96 * This handles the memory map.
 97 */
 98#ifndef PAGE_OFFSET
 99#define PAGE_OFFSET		(CAC_BASE + PHYS_OFFSET)
100#endif
101
102#ifndef FIXADDR_TOP
103#ifdef CONFIG_KVM_GUEST
104#define FIXADDR_TOP		((unsigned long)(long)(int)0x7ffe0000)
105#else
106#define FIXADDR_TOP		((unsigned long)(long)(int)0xfffe0000)
107#endif
108#endif
109
110#endif /* __ASM_MACH_GENERIC_SPACES_H */