Tom Rini | 10e4779 | 2018-05-06 17:58:06 -0400 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0+ */ |
Simon Glass | 9bce37c | 2013-03-05 14:39:37 +0000 | [diff] [blame] | 2 | /* |
| 3 | * Copyright (c) 2011 The Chromium OS Authors. |
Simon Glass | 9bce37c | 2013-03-05 14:39:37 +0000 | [diff] [blame] | 4 | */ |
| 5 | |
| 6 | /* Taken from Linux kernel, commit f56c3196 */ |
| 7 | |
| 8 | #ifndef _ASM_GENERIC_SECTIONS_H_ |
| 9 | #define _ASM_GENERIC_SECTIONS_H_ |
| 10 | |
Sean Anderson | 9efec31 | 2019-12-17 21:22:42 -0500 | [diff] [blame] | 11 | #include <linux/types.h> |
| 12 | |
Simon Glass | 9bce37c | 2013-03-05 14:39:37 +0000 | [diff] [blame] | 13 | /* References to section boundaries */ |
| 14 | |
| 15 | extern char _text[], _stext[], _etext[]; |
| 16 | extern char _data[], _sdata[], _edata[]; |
| 17 | extern char __bss_start[], __bss_stop[]; |
| 18 | extern char __init_begin[], __init_end[]; |
| 19 | extern char _sinittext[], _einittext[]; |
Simon Glass | 62cf912 | 2013-04-26 02:53:43 +0000 | [diff] [blame] | 20 | extern char _end[], _init[]; |
Simon Glass | 9bce37c | 2013-03-05 14:39:37 +0000 | [diff] [blame] | 21 | extern char __per_cpu_load[], __per_cpu_start[], __per_cpu_end[]; |
| 22 | extern char __kprobes_text_start[], __kprobes_text_end[]; |
| 23 | extern char __entry_text_start[], __entry_text_end[]; |
| 24 | extern char __initdata_begin[], __initdata_end[]; |
| 25 | extern char __start_rodata[], __end_rodata[]; |
Heinrich Schuchardt | 7804ae9 | 2017-09-05 03:19:37 +0200 | [diff] [blame] | 26 | extern char __efi_helloworld_begin[]; |
| 27 | extern char __efi_helloworld_end[]; |
Heinrich Schuchardt | 4b7d5c1 | 2020-07-14 21:25:28 +0200 | [diff] [blame] | 28 | extern char __efi_var_file_begin[]; |
| 29 | extern char __efi_var_file_end[]; |
Simon Glass | 9bce37c | 2013-03-05 14:39:37 +0000 | [diff] [blame] | 30 | |
Simon Glass | 8dee67a | 2021-03-15 17:25:38 +1300 | [diff] [blame] | 31 | /* Private data used by of-platdata devices/uclasses */ |
| 32 | extern char __priv_data_start[], __priv_data_end[]; |
| 33 | |
Simon Glass | 9bce37c | 2013-03-05 14:39:37 +0000 | [diff] [blame] | 34 | /* Start and end of .ctors section - used for constructor calls. */ |
| 35 | extern char __ctors_start[], __ctors_end[]; |
| 36 | |
Ilias Apalodimas | 9b37894 | 2024-03-15 08:43:47 +0200 | [diff] [blame] | 37 | extern char __efi_runtime_rel_start[], __efi_runtime_rel_stop[]; |
Ilias Apalodimas | 048a9ec | 2024-03-15 08:43:49 +0200 | [diff] [blame] | 38 | extern char __efi_runtime_start[], __efi_runtime_stop[]; |
Ilias Apalodimas | 9b37894 | 2024-03-15 08:43:47 +0200 | [diff] [blame] | 39 | |
Simon Glass | 9bce37c | 2013-03-05 14:39:37 +0000 | [diff] [blame] | 40 | /* function descriptor handling (if any). Override |
| 41 | * in asm/sections.h */ |
| 42 | #ifndef dereference_function_descriptor |
| 43 | #define dereference_function_descriptor(p) (p) |
| 44 | #endif |
| 45 | |
| 46 | /* random extra sections (if any). Override |
| 47 | * in asm/sections.h */ |
| 48 | #ifndef arch_is_kernel_text |
| 49 | static inline int arch_is_kernel_text(unsigned long addr) |
| 50 | { |
| 51 | return 0; |
| 52 | } |
| 53 | #endif |
| 54 | |
| 55 | #ifndef arch_is_kernel_data |
| 56 | static inline int arch_is_kernel_data(unsigned long addr) |
| 57 | { |
| 58 | return 0; |
| 59 | } |
| 60 | #endif |
| 61 | |
| 62 | /* U-Boot-specific things begin here */ |
| 63 | |
| 64 | /* Start of U-Boot text region */ |
| 65 | extern char __text_start[]; |
| 66 | |
Shiji Yang | bb11234 | 2023-08-03 09:47:16 +0800 | [diff] [blame] | 67 | /* This marks the text region which must be relocated */ |
| 68 | extern char __image_copy_start[], __image_copy_end[]; |
| 69 | |
| 70 | extern char __bss_end[]; |
| 71 | extern char __rel_dyn_start[], __rel_dyn_end[]; |
| 72 | extern char _image_binary_end[]; |
Simon Glass | 9bce37c | 2013-03-05 14:39:37 +0000 | [diff] [blame] | 73 | |
| 74 | /* |
| 75 | * This is the U-Boot entry point - prior to relocation it should be same |
| 76 | * as __text_start |
| 77 | */ |
| 78 | extern void _start(void); |
| 79 | |
Simon Glass | 9bce37c | 2013-03-05 14:39:37 +0000 | [diff] [blame] | 80 | #endif /* _ASM_GENERIC_SECTIONS_H_ */ |