xref: /openbmc/u-boot/include/relocate.h (revision 0645c23a)
1 /*
2  * (C) Copyright 2011
3  * Graeme Russ, <graeme.russ@gmail.com>
4  *
5  * SPDX-License-Identifier:	GPL-2.0+
6  */
7 
8 #ifndef _RELOCATE_H_
9 #define _RELOCATE_H_
10 
11 #include <common.h>
12 
13 /**
14  * copy_uboot_to_ram() - Copy U-Boot to its new relocated position
15  *
16  * @return 0 if OK, -ve on error
17  */
18 int copy_uboot_to_ram(void);
19 
20 /**
21  * clear_bss() - Clear the BSS (Blocked Start by Symbol) segment
22  *
23  * This clears the memory used by global variables
24  *
25  * @return 0 if OK, -ve on error
26  */
27 int clear_bss(void);
28 
29 /**
30  * do_elf_reloc_fixups() - Fix up ELF relocations in the relocated code
31  *
32  * This processes the relocation tables to ensure that the code can run in its
33  * new location.
34  *
35  * @return 0 if OK, -ve on error
36  */
37 int do_elf_reloc_fixups(void);
38 
39 #endif	/* _RELOCATE_H_ */
40