1 /* !! 1 /* SPDX-License-Identifier: GPL-2.0 */ 2 * Copyright (C) 2008-2009 Michal Simek <monstr !! 2 /* ld script for sparc32/sparc64 kernel */ 3 * Copyright (C) 2008-2009 PetaLogix << 4 * Copyright (C) 2006 Atmark Techno, Inc. << 5 * << 6 * This file is subject to the terms and condi << 7 * License. See the file "COPYING" in the main << 8 * for more details. << 9 */ << 10 3 11 OUTPUT_ARCH(microblaze) !! 4 #include <asm-generic/vmlinux.lds.h> 12 ENTRY(microblaze_start) << 13 << 14 #define RO_EXCEPTION_TABLE_ALIGN 16 << 15 5 16 #include <asm/cache.h> << 17 #include <asm/page.h> 6 #include <asm/page.h> 18 #include <asm-generic/vmlinux.lds.h> << 19 #include <asm/thread_info.h> 7 #include <asm/thread_info.h> 20 8 21 #ifdef __MICROBLAZEEL__ !! 9 #ifdef CONFIG_SPARC32 22 jiffies = jiffies_64; !! 10 #define INITIAL_ADDRESS 0x10000 + SIZEOF_HEADERS >> 11 #define TEXTSTART 0xf0004000 >> 12 >> 13 #define SMP_CACHE_BYTES_SHIFT 5 >> 14 23 #else 15 #else >> 16 #define SMP_CACHE_BYTES_SHIFT 6 >> 17 #define INITIAL_ADDRESS 0x4000 >> 18 #define TEXTSTART 0x0000000000404000 >> 19 >> 20 #endif >> 21 >> 22 #define SMP_CACHE_BYTES (1 << SMP_CACHE_BYTES_SHIFT) >> 23 >> 24 #ifdef CONFIG_SPARC32 >> 25 OUTPUT_FORMAT("elf32-sparc", "elf32-sparc", "elf32-sparc") >> 26 OUTPUT_ARCH(sparc) >> 27 ENTRY(_start) 24 jiffies = jiffies_64 + 4; 28 jiffies = jiffies_64 + 4; >> 29 #else >> 30 /* sparc64 */ >> 31 OUTPUT_FORMAT("elf64-sparc", "elf64-sparc", "elf64-sparc") >> 32 OUTPUT_ARCH(sparc:v9a) >> 33 ENTRY(_start) >> 34 jiffies = jiffies_64; >> 35 #endif >> 36 >> 37 #ifdef CONFIG_SPARC64 >> 38 ASSERT((swapper_tsb == 0x0000000000408000), "Error: sparc64 early assembler too large") 25 #endif 39 #endif 26 40 27 SECTIONS { !! 41 SECTIONS 28 . = CONFIG_KERNEL_START; !! 42 { 29 microblaze_start = CONFIG_KERNEL_BASE_ !! 43 #ifdef CONFIG_SPARC64 30 .text : AT(ADDR(.text) - LOAD_OFFSET) !! 44 swapper_pg_dir = 0x0000000000402000; 31 _text = . ; !! 45 #endif 32 _stext = . ; !! 46 . = INITIAL_ADDRESS; >> 47 .text TEXTSTART : >> 48 { >> 49 _text = .; 33 HEAD_TEXT 50 HEAD_TEXT 34 TEXT_TEXT 51 TEXT_TEXT 35 *(.fixup) << 36 EXIT_TEXT << 37 EXIT_CALL << 38 SCHED_TEXT 52 SCHED_TEXT 39 LOCK_TEXT 53 LOCK_TEXT 40 KPROBES_TEXT 54 KPROBES_TEXT 41 IRQENTRY_TEXT 55 IRQENTRY_TEXT 42 SOFTIRQENTRY_TEXT 56 SOFTIRQENTRY_TEXT 43 . = ALIGN (4) ; !! 57 *(.gnu.warning) 44 _etext = . ; !! 58 } = 0 45 } !! 59 _etext = .; 46 60 47 . = ALIGN (8) ; !! 61 RO_DATA(PAGE_SIZE) 48 __fdt_blob : AT(ADDR(__fdt_blob) - LOA << 49 _fdt_start = . ; << 50 *(__fdt_blob) ; << 51 . = _fdt_start + 0x10000; << 52 _fdt_end = . ; << 53 } << 54 << 55 . = ALIGN(16); << 56 RO_DATA(4096) << 57 << 58 /* << 59 * sdata2 section can go anywhere, but << 60 * and SDA2_BASE must point to the mid << 61 */ << 62 .sdata2 : AT(ADDR(.sdata2) - LOAD_OFFS << 63 _ssrw = .; << 64 . = ALIGN(PAGE_SIZE); /* page << 65 *(.sdata2) << 66 . = ALIGN(8); << 67 _essrw = .; << 68 _ssrw_size = _essrw - _ssrw; << 69 _KERNEL_SDA2_BASE_ = _ssrw + (_ssrw_si << 70 } << 71 << 72 _sdata = . ; << 73 RW_DATA(32, PAGE_SIZE, THREAD_SIZE) << 74 _edata = . ; << 75 << 76 /* Under the microblaze ABI, .sdata an << 77 . = ALIGN(8); << 78 .sdata : AT(ADDR(.sdata) - LOAD_OFFSET << 79 _ssro = .; << 80 *(.sdata) << 81 } << 82 << 83 .sbss : AT(ADDR(.sbss) - LOAD_OFFSET) << 84 _ssbss = .; << 85 *(.sbss) << 86 _esbss = .; << 87 _essro = .; << 88 _ssro_size = _essro - _ssro ; << 89 _KERNEL_SDA_BASE_ = _ssro + (_ << 90 } << 91 << 92 PERCPU_SECTION(L1_CACHE_BYTES) << 93 62 94 . = ALIGN(PAGE_SIZE); !! 63 /* Start of data section */ 95 __init_begin = .; !! 64 _sdata = .; 96 << 97 INIT_TEXT_SECTION(PAGE_SIZE) << 98 65 99 .init.data : AT(ADDR(.init.data) - LOA !! 66 .data1 : { 100 INIT_DATA !! 67 *(.data1) 101 } 68 } >> 69 RW_DATA(SMP_CACHE_BYTES, 0, THREAD_SIZE) 102 70 103 . = ALIGN(4); !! 71 /* End of data section */ 104 .init.ivt : AT(ADDR(.init.ivt) - LOAD_ !! 72 _edata = .; 105 __ivt_start = .; << 106 *(.init.ivt) << 107 __ivt_end = .; << 108 } << 109 73 110 .init.setup : AT(ADDR(.init.setup) - L !! 74 .fixup : { 111 INIT_SETUP(0) !! 75 __start___fixup = .; >> 76 *(.fixup) >> 77 __stop___fixup = .; 112 } 78 } >> 79 EXCEPTION_TABLE(16) 113 80 114 .initcall.init : AT(ADDR(.initcall.ini !! 81 . = ALIGN(PAGE_SIZE); 115 INIT_CALLS !! 82 __init_begin = ALIGN(PAGE_SIZE); 116 } !! 83 INIT_TEXT_SECTION(PAGE_SIZE) >> 84 __init_text_end = .; >> 85 INIT_DATA_SECTION(16) 117 86 118 .con_initcall.init : AT(ADDR(.con_init !! 87 . = ALIGN(4); 119 CON_INITCALL !! 88 .tsb_ldquad_phys_patch : { >> 89 __tsb_ldquad_phys_patch = .; >> 90 *(.tsb_ldquad_phys_patch) >> 91 __tsb_ldquad_phys_patch_end = .; >> 92 } >> 93 >> 94 .tsb_phys_patch : { >> 95 __tsb_phys_patch = .; >> 96 *(.tsb_phys_patch) >> 97 __tsb_phys_patch_end = .; >> 98 } >> 99 >> 100 .cpuid_patch : { >> 101 __cpuid_patch = .; >> 102 *(.cpuid_patch) >> 103 __cpuid_patch_end = .; >> 104 } >> 105 >> 106 .sun4v_1insn_patch : { >> 107 __sun4v_1insn_patch = .; >> 108 *(.sun4v_1insn_patch) >> 109 __sun4v_1insn_patch_end = .; >> 110 } >> 111 .sun4v_2insn_patch : { >> 112 __sun4v_2insn_patch = .; >> 113 *(.sun4v_2insn_patch) >> 114 __sun4v_2insn_patch_end = .; >> 115 } >> 116 .leon_1insn_patch : { >> 117 __leon_1insn_patch = .; >> 118 *(.leon_1insn_patch) >> 119 __leon_1insn_patch_end = .; >> 120 } >> 121 .swapper_tsb_phys_patch : { >> 122 __swapper_tsb_phys_patch = .; >> 123 *(.swapper_tsb_phys_patch) >> 124 __swapper_tsb_phys_patch_end = .; >> 125 } >> 126 .swapper_4m_tsb_phys_patch : { >> 127 __swapper_4m_tsb_phys_patch = .; >> 128 *(.swapper_4m_tsb_phys_patch) >> 129 __swapper_4m_tsb_phys_patch_end = .; >> 130 } >> 131 .popc_3insn_patch : { >> 132 __popc_3insn_patch = .; >> 133 *(.popc_3insn_patch) >> 134 __popc_3insn_patch_end = .; >> 135 } >> 136 .popc_6insn_patch : { >> 137 __popc_6insn_patch = .; >> 138 *(.popc_6insn_patch) >> 139 __popc_6insn_patch_end = .; >> 140 } >> 141 .pause_3insn_patch : { >> 142 __pause_3insn_patch = .; >> 143 *(.pause_3insn_patch) >> 144 __pause_3insn_patch_end = .; >> 145 } >> 146 .sun_m7_1insn_patch : { >> 147 __sun_m7_1insn_patch = .; >> 148 *(.sun_m7_1insn_patch) >> 149 __sun_m7_1insn_patch_end = .; >> 150 } >> 151 .sun_m7_2insn_patch : { >> 152 __sun_m7_2insn_patch = .; >> 153 *(.sun_m7_2insn_patch) >> 154 __sun_m7_2insn_patch_end = .; >> 155 } >> 156 .get_tick_patch : { >> 157 __get_tick_patch = .; >> 158 *(.get_tick_patch) >> 159 __get_tick_patch_end = .; >> 160 } >> 161 .pud_huge_patch : { >> 162 __pud_huge_patch = .; >> 163 *(.pud_huge_patch) >> 164 __pud_huge_patch_end = .; >> 165 } >> 166 .fast_win_ctrl_1insn_patch : { >> 167 __fast_win_ctrl_1insn_patch = .; >> 168 *(.fast_win_ctrl_1insn_patch) >> 169 __fast_win_ctrl_1insn_patch_end = .; 120 } 170 } >> 171 PERCPU_SECTION(SMP_CACHE_BYTES) 121 172 122 __init_end_before_initramfs = .; !! 173 . = ALIGN(PAGE_SIZE); >> 174 .exit.text : { >> 175 EXIT_TEXT >> 176 } 123 177 124 .init.ramfs : AT(ADDR(.init.ramfs) - L !! 178 .exit.data : { 125 INIT_RAM_FS !! 179 EXIT_DATA 126 } 180 } 127 181 >> 182 . = ALIGN(PAGE_SIZE); 128 __init_end = .; 183 __init_end = .; >> 184 BSS_SECTION(0, 0, 0) >> 185 _end = . ; 129 186 130 .bss ALIGN (PAGE_SIZE) : AT(ADDR(.bss) !! 187 STABS_DEBUG 131 /* page aligned when MMU used !! 188 DWARF_DEBUG 132 __bss_start = . ; !! 189 ELF_DETAILS 133 *(.bss*) << 134 *(COMMON) << 135 . = ALIGN (4) ; << 136 __bss_stop = . ; << 137 } << 138 . = ALIGN(PAGE_SIZE); << 139 _end = .; << 140 190 141 DISCARDS 191 DISCARDS 142 } 192 }
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.