reloc.h 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. /*
  2. * GRUB -- GRand Unified Bootloader
  3. * Copyright (C) 2013 Free Software Foundation, Inc.
  4. *
  5. * GRUB is free software: you can redistribute it and/or modify
  6. * it under the terms of the GNU General Public License as published by
  7. * the Free Software Foundation, either version 3 of the License, or
  8. * (at your option) any later version.
  9. *
  10. * GRUB is distributed in the hope that it will be useful,
  11. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. * GNU General Public License for more details.
  14. *
  15. * You should have received a copy of the GNU General Public License
  16. * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
  17. */
  18. #ifndef GRUB_ARM64_RELOC_H
  19. #define GRUB_ARM64_RELOC_H 1
  20. struct grub_arm64_trampoline
  21. {
  22. grub_uint32_t ldr; /* ldr x16, 8 */
  23. grub_uint32_t br; /* br x16 */
  24. grub_uint64_t addr;
  25. };
  26. int grub_arm_64_check_xxxx26_offset (grub_int64_t offset);
  27. void
  28. grub_arm64_set_xxxx26_offset (grub_uint32_t *place, grub_int64_t offset);
  29. int
  30. grub_arm64_check_hi21_signed (grub_int64_t offset);
  31. void
  32. grub_arm64_set_hi21 (grub_uint32_t *place, grub_int64_t offset);
  33. void
  34. grub_arm64_set_abs_lo12 (grub_uint32_t *place, grub_int64_t target);
  35. void
  36. grub_arm64_set_abs_lo12_ldst64 (grub_uint32_t *place, grub_int64_t target);
  37. #endif