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