112 lines · plain
1.. SPDX-License-Identifier: GPL-2.02 3=================4Memory Management5=================6 7Virtual memory layout8=====================9 10.. note::11 12 - Some aspects of the virtual memory layout setup are not13 clarified (number of page levels, alignment, DMA memory).14 15 - Unused gaps in the virtual memory layout could be present16 or not - depending on how partucular system is configured.17 No page tables are created for the unused gaps.18 19 - The virtual memory regions are tracked or untracked by KASAN20 instrumentation, as well as the KASAN shadow memory itself is21 created only when CONFIG_KASAN configuration option is enabled.22 23::24 25 =============================================================================26 | Physical | Virtual | VM area description27 =============================================================================28 +- 0 --------------+- 0 --------------+29 | | S390_lowcore | Low-address memory30 | +- 8 KB -----------+31 | | |32 | | |33 | | ... unused gap | KASAN untracked34 | | |35 +- AMODE31_START --+- AMODE31_START --+ .amode31 rand. phys/virt start36 |.amode31 text/data|.amode31 text/data| KASAN untracked37 +- AMODE31_END ----+- AMODE31_END ----+ .amode31 rand. phys/virt end (<2GB)38 | | |39 | | |40 +- __kaslr_offset_phys | kernel rand. phys start41 | | |42 | kernel text/data | |43 | | |44 +------------------+ | kernel phys end45 | | |46 | | |47 | | |48 | | |49 +- ident_map_size -+ |50 | |51 | ... unused gap | KASAN untracked52 | |53 +- __identity_base + identity mapping start (>= 2GB)54 | |55 | identity | phys == virt - __identity_base56 | mapping | virt == phys + __identity_base57 | |58 | | KASAN tracked59 | |60 | |61 | |62 | |63 | |64 | |65 | |66 | |67 | |68 | |69 | |70 | |71 | |72 | |73 | |74 +---- vmemmap -----+ 'struct page' array start75 | |76 | virtually mapped |77 | memory map | KASAN untracked78 | |79 +- __abs_lowcore --+80 | |81 | Absolute Lowcore | KASAN untracked82 | |83 +- __memcpy_real_area84 | |85 | Real Memory Copy| KASAN untracked86 | |87 +- VMALLOC_START --+ vmalloc area start88 | | KASAN untracked or89 | vmalloc area | KASAN shallowly populated in case90 | | CONFIG_KASAN_VMALLOC=y91 +- MODULES_VADDR --+ modules area start92 | | KASAN allocated per module or93 | modules area | KASAN shallowly populated in case94 | | CONFIG_KASAN_VMALLOC=y95 +- __kaslr_offset -+ kernel rand. virt start96 | | KASAN tracked97 | kernel text/data | phys == (kvirt - __kaslr_offset) +98 | | __kaslr_offset_phys99 +- kernel .bss end + kernel rand. virt end100 | |101 | ... unused gap | KASAN untracked102 | |103 +------------------+ UltraVisor Secure Storage limit104 | |105 | ... unused gap | KASAN untracked106 | |107 +KASAN_SHADOW_START+ KASAN shadow memory start108 | |109 | KASAN shadow | KASAN untracked110 | |111 +------------------+ ASCE limit112