Back to home page

OSCL-LXR

 
 

    


0001 =================================
0002 Kernel Memory Layout on ARM Linux
0003 =================================
0004 
0005                 Russell King <rmk@arm.linux.org.uk>
0006 
0007                      November 17, 2005 (2.6.15)
0008 
0009 This document describes the virtual memory layout which the Linux
0010 kernel uses for ARM processors.  It indicates which regions are
0011 free for platforms to use, and which are used by generic code.
0012 
0013 The ARM CPU is capable of addressing a maximum of 4GB virtual memory
0014 space, and this must be shared between user space processes, the
0015 kernel, and hardware devices.
0016 
0017 As the ARM architecture matures, it becomes necessary to reserve
0018 certain regions of VM space for use for new facilities; therefore
0019 this document may reserve more VM space over time.
0020 
0021 =============== =============== ===============================================
0022 Start           End             Use
0023 =============== =============== ===============================================
0024 ffff8000        ffffffff        copy_user_page / clear_user_page use.
0025                                 For SA11xx and Xscale, this is used to
0026                                 setup a minicache mapping.
0027 
0028 ffff4000        ffffffff        cache aliasing on ARMv6 and later CPUs.
0029 
0030 ffff1000        ffff7fff        Reserved.
0031                                 Platforms must not use this address range.
0032 
0033 ffff0000        ffff0fff        CPU vector page.
0034                                 The CPU vectors are mapped here if the
0035                                 CPU supports vector relocation (control
0036                                 register V bit.)
0037 
0038 fffe0000        fffeffff        XScale cache flush area.  This is used
0039                                 in proc-xscale.S to flush the whole data
0040                                 cache. (XScale does not have TCM.)
0041 
0042 fffe8000        fffeffff        DTCM mapping area for platforms with
0043                                 DTCM mounted inside the CPU.
0044 
0045 fffe0000        fffe7fff        ITCM mapping area for platforms with
0046                                 ITCM mounted inside the CPU.
0047 
0048 ffc80000        ffefffff        Fixmap mapping region.  Addresses provided
0049                                 by fix_to_virt() will be located here.
0050 
0051 ffc00000        ffc7ffff        Guard region
0052 
0053 ff800000        ffbfffff        Permanent, fixed read-only mapping of the
0054                                 firmware provided DT blob
0055 
0056 fee00000        feffffff        Mapping of PCI I/O space. This is a static
0057                                 mapping within the vmalloc space.
0058 
0059 VMALLOC_START   VMALLOC_END-1   vmalloc() / ioremap() space.
0060                                 Memory returned by vmalloc/ioremap will
0061                                 be dynamically placed in this region.
0062                                 Machine specific static mappings are also
0063                                 located here through iotable_init().
0064                                 VMALLOC_START is based upon the value
0065                                 of the high_memory variable, and VMALLOC_END
0066                                 is equal to 0xff800000.
0067 
0068 PAGE_OFFSET     high_memory-1   Kernel direct-mapped RAM region.
0069                                 This maps the platforms RAM, and typically
0070                                 maps all platform RAM in a 1:1 relationship.
0071 
0072 PKMAP_BASE      PAGE_OFFSET-1   Permanent kernel mappings
0073                                 One way of mapping HIGHMEM pages into kernel
0074                                 space.
0075 
0076 MODULES_VADDR   MODULES_END-1   Kernel module space
0077                                 Kernel modules inserted via insmod are
0078                                 placed here using dynamic mappings.
0079 
0080 TASK_SIZE       MODULES_VADDR-1 KASAn shadow memory when KASan is in use.
0081                                 The range from MODULES_VADDR to the top
0082                                 of the memory is shadowed here with 1 bit
0083                                 per byte of memory.
0084 
0085 00001000        TASK_SIZE-1     User space mappings
0086                                 Per-thread mappings are placed here via
0087                                 the mmap() system call.
0088 
0089 00000000        00000fff        CPU vector page / null pointer trap
0090                                 CPUs which do not support vector remapping
0091                                 place their vector page here.  NULL pointer
0092                                 dereferences by both the kernel and user
0093                                 space are also caught via this mapping.
0094 =============== =============== ===============================================
0095 
0096 Please note that mappings which collide with the above areas may result
0097 in a non-bootable kernel, or may cause the kernel to (eventually) panic
0098 at run time.
0099 
0100 Since future CPUs may impact the kernel mapping layout, user programs
0101 must not access any memory which is not mapped inside their 0x0001000
0102 to TASK_SIZE address range.  If they wish to access these areas, they
0103 must set up their own mappings using open() and mmap().