162306a36Sopenharmony_ci/* 262306a36Sopenharmony_ci * This file is subject to the terms and conditions of the GNU General Public 362306a36Sopenharmony_ci * License. See the file "COPYING" in the main directory of this archive 462306a36Sopenharmony_ci * for more details. 562306a36Sopenharmony_ci * 662306a36Sopenharmony_ci * Copyright (C) 2014 Imagination Technologies Ltd. 762306a36Sopenharmony_ci */ 862306a36Sopenharmony_ci 962306a36Sopenharmony_ci#ifndef _ASM_MALTA_SPACES_H 1062306a36Sopenharmony_ci#define _ASM_MALTA_SPACES_H 1162306a36Sopenharmony_ci 1262306a36Sopenharmony_ci#ifdef CONFIG_EVA 1362306a36Sopenharmony_ci 1462306a36Sopenharmony_ci/* 1562306a36Sopenharmony_ci * Traditional Malta Board Memory Map for EVA 1662306a36Sopenharmony_ci * 1762306a36Sopenharmony_ci * 0x00000000 - 0x0fffffff: 1st RAM region, 256MB 1862306a36Sopenharmony_ci * 0x10000000 - 0x1bffffff: GIC and CPC Control Registers 1962306a36Sopenharmony_ci * 0x1c000000 - 0x1fffffff: I/O And Flash 2062306a36Sopenharmony_ci * 0x20000000 - 0x7fffffff: 2nd RAM region, 1.5GB 2162306a36Sopenharmony_ci * 0x80000000 - 0xffffffff: Physical memory aliases to 0x0 (2GB) 2262306a36Sopenharmony_ci * 2362306a36Sopenharmony_ci * The kernel is still located in 0x80000000(kseg0). However, 2462306a36Sopenharmony_ci * the physical mask has been shifted to 0x80000000 which exploits the alias 2562306a36Sopenharmony_ci * on the Malta board. As a result of which, we override the __pa_symbol 2662306a36Sopenharmony_ci * to peform direct mapping from virtual to physical addresses. In other 2762306a36Sopenharmony_ci * words, the 0x80000000 virtual address maps to 0x80000000 physical address 2862306a36Sopenharmony_ci * which in turn aliases to 0x0. We do this in order to be able to use a flat 2962306a36Sopenharmony_ci * 2GB of memory (0x80000000 - 0xffffffff) so we can avoid the I/O hole in 3062306a36Sopenharmony_ci * 0x10000000 - 0x1fffffff. 3162306a36Sopenharmony_ci * The last 64KB of physical memory are reserved for correct HIGHMEM 3262306a36Sopenharmony_ci * macros arithmetics. 3362306a36Sopenharmony_ci * 3462306a36Sopenharmony_ci */ 3562306a36Sopenharmony_ci 3662306a36Sopenharmony_ci#define PAGE_OFFSET _AC(0x0, UL) 3762306a36Sopenharmony_ci#define PHYS_OFFSET _AC(0x80000000, UL) 3862306a36Sopenharmony_ci#define HIGHMEM_START _AC(0xffff0000, UL) 3962306a36Sopenharmony_ci 4062306a36Sopenharmony_ci#define __pa_symbol(x) (RELOC_HIDE((unsigned long)(x), 0)) 4162306a36Sopenharmony_ci 4262306a36Sopenharmony_ci#endif /* CONFIG_EVA */ 4362306a36Sopenharmony_ci 4462306a36Sopenharmony_ci#include <asm/mach-generic/spaces.h> 4562306a36Sopenharmony_ci 4662306a36Sopenharmony_ci#endif /* _ASM_MALTA_SPACES_H */ 47