~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/arch/hexagon/include/asm/mem-layout.h

Version: ~ [ linux-5.10-rc1 ] ~ [ linux-5.9.1 ] ~ [ linux-5.8.16 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.72 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.152 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.202 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.240 ] ~ [ linux-4.8.17 ] ~ [ linux-4.7.10 ] ~ [ linux-4.6.7 ] ~ [ linux-4.5.7 ] ~ [ linux-4.4.240 ] ~ [ linux-4.3.6 ] ~ [ linux-4.2.8 ] ~ [ linux-4.1.52 ] ~ [ linux-4.0.9 ] ~ [ linux-3.19.8 ] ~ [ linux-3.18.140 ] ~ [ linux-3.17.8 ] ~ [ linux-3.16.85 ] ~ [ linux-3.15.10 ] ~ [ linux-3.14.79 ] ~ [ linux-3.13.11 ] ~ [ linux-3.12.74 ] ~ [ linux-3.11.10 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.5 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /*
  2  * Memory layout definitions for the Hexagon architecture
  3  *
  4  * Copyright (c) 2010-2013, The Linux Foundation. All rights reserved.
  5  *
  6  * This program is free software; you can redistribute it and/or modify
  7  * it under the terms of the GNU General Public License version 2 and
  8  * only version 2 as published by the Free Software Foundation.
  9  *
 10  * This program is distributed in the hope that it will be useful,
 11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
 12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 13  * GNU General Public License for more details.
 14  *
 15  * You should have received a copy of the GNU General Public License
 16  * along with this program; if not, write to the Free Software
 17  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
 18  * 02110-1301, USA.
 19  */
 20 
 21 #ifndef _ASM_HEXAGON_MEM_LAYOUT_H
 22 #define _ASM_HEXAGON_MEM_LAYOUT_H
 23 
 24 #include <linux/const.h>
 25 
 26 /*
 27  * Have to do this for ginormous numbers, else they get printed as
 28  * negative numbers, which the linker no likey when you try to
 29  * assign it to the location counter.
 30  */
 31 
 32 #define PAGE_OFFSET                     _AC(0xc0000000, UL)
 33 
 34 /*
 35  * Compiling for a platform that needs a crazy physical offset
 36  * (like if the memory starts at 1GB and up) means we need
 37  * an actual PHYS_OFFSET.  Should be set up in head.S.
 38  */
 39 
 40 #ifdef CONFIG_HEXAGON_PHYS_OFFSET
 41 #ifndef __ASSEMBLY__
 42 extern unsigned long    __phys_offset;
 43 #endif
 44 #define PHYS_OFFSET     __phys_offset
 45 #endif
 46 
 47 #ifndef PHYS_OFFSET
 48 #define PHYS_OFFSET     0
 49 #endif
 50 
 51 #define PHYS_PFN_OFFSET (PHYS_OFFSET >> PAGE_SHIFT)
 52 #define ARCH_PFN_OFFSET PHYS_PFN_OFFSET
 53 
 54 #define TASK_SIZE                       (PAGE_OFFSET)
 55 
 56 /*  not sure how these are used yet  */
 57 #define STACK_TOP                       TASK_SIZE
 58 #define STACK_TOP_MAX                   TASK_SIZE
 59 
 60 #ifndef __ASSEMBLY__
 61 enum fixed_addresses {
 62         FIX_KMAP_BEGIN,
 63         FIX_KMAP_END,  /*  check for per-cpuism  */
 64         __end_of_fixed_addresses
 65 };
 66 
 67 #define MIN_KERNEL_SEG (PAGE_OFFSET >> PGDIR_SHIFT)   /* L1 shift is 22 bits */
 68 extern int max_kernel_seg;
 69 
 70 /*
 71  * Start of vmalloc virtual address space for kernel;
 72  * supposed to be based on the amount of physical memory available
 73  */
 74 
 75 #define VMALLOC_START ((unsigned long) __va(high_memory + VMALLOC_OFFSET))
 76 
 77 /* Gap between physical ram and vmalloc space for guard purposes. */
 78 #define VMALLOC_OFFSET PAGE_SIZE
 79 
 80 /*
 81  * Create the space between VMALLOC_START and FIXADDR_TOP backwards
 82  * from the ... "top".
 83  *
 84  * Permanent IO mappings will live at 0xfexx_xxxx
 85  * Hypervisor occupies the last 16MB page at 0xffxxxxxx
 86  */
 87 
 88 #define FIXADDR_TOP     0xfe000000
 89 #define FIXADDR_SIZE    (__end_of_fixed_addresses << PAGE_SHIFT)
 90 #define FIXADDR_START   (FIXADDR_TOP - FIXADDR_SIZE)
 91 
 92 /*
 93  * "permanent kernel mappings", defined as long-lasting mappings of
 94  * high-memory page frames into the kernel address space.
 95  */
 96 
 97 #define LAST_PKMAP      PTRS_PER_PTE
 98 #define LAST_PKMAP_MASK (LAST_PKMAP - 1)
 99 #define PKMAP_NR(virt)  ((virt - PKMAP_BASE) >> PAGE_SHIFT)
100 #define PKMAP_ADDR(nr)  (PKMAP_BASE + ((nr) << PAGE_SHIFT))
101 
102 /*
103  * To the "left" of the fixed map space is the kmap space
104  *
105  * "Permanent Kernel Mappings"; fancy (or less fancy) PTE table
106  * that looks like it's actually walked.
107  * Need to check the alignment/shift usage; some archs use
108  * PMD_MASK on this value
109  */
110 #define PKMAP_BASE (FIXADDR_START-PAGE_SIZE*LAST_PKMAP)
111 
112 /*
113  * 2 pages of guard gap between where vmalloc area ends
114  * and pkmap_base begins.
115  */
116 #define VMALLOC_END (PKMAP_BASE-PAGE_SIZE*2)
117 #endif /*  !__ASSEMBLY__  */
118 
119 
120 #endif /* _ASM_HEXAGON_MEM_LAYOUT_H */
121 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | Wiki (Japanese) | Wiki (English) | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

osdn.jp