relocate.h 773 B

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