blob: 8ca25e1105e6b9536d4df82c1e413e8bea232b6b [file] [log] [blame]
Tom Rini83d290c2018-05-06 17:58:06 -04001/* SPDX-License-Identifier: GPL-2.0+ */
Simon Glasse47b2d62017-03-31 08:40:38 -06002/*
3 * (C) Copyright 2011
4 * Graeme Russ, <graeme.russ@gmail.com>
Simon Glasse47b2d62017-03-31 08:40:38 -06005 */
6
7#ifndef _RELOCATE_H_
8#define _RELOCATE_H_
9
Simon Glass2ac00c02021-09-25 07:03:18 -060010#ifndef USE_HOSTCC
11#include <asm/global_data.h>
12
13DECLARE_GLOBAL_DATA_PTR;
14#endif
Simon Glasse47b2d62017-03-31 08:40:38 -060015
16/**
17 * copy_uboot_to_ram() - Copy U-Boot to its new relocated position
18 *
Heinrich Schuchardt185f8122022-01-19 18:05:50 +010019 * Return: 0 if OK, -ve on error
Simon Glasse47b2d62017-03-31 08:40:38 -060020 */
21int copy_uboot_to_ram(void);
22
23/**
24 * clear_bss() - Clear the BSS (Blocked Start by Symbol) segment
25 *
26 * This clears the memory used by global variables
27 *
Heinrich Schuchardt185f8122022-01-19 18:05:50 +010028 * Return: 0 if OK, -ve on error
Simon Glasse47b2d62017-03-31 08:40:38 -060029 */
30int clear_bss(void);
31
32/**
33 * do_elf_reloc_fixups() - Fix up ELF relocations in the relocated code
34 *
35 * This processes the relocation tables to ensure that the code can run in its
36 * new location.
37 *
Heinrich Schuchardt185f8122022-01-19 18:05:50 +010038 * Return: 0 if OK, -ve on error
Simon Glasse47b2d62017-03-31 08:40:38 -060039 */
40int do_elf_reloc_fixups(void);
41
Simon Glasse47b2d62017-03-31 08:40:38 -060042#endif /* _RELOCATE_H_ */