spl.c 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. /*
  2. * Copyright 2012 Stefan Roese <sr@denx.de>
  3. *
  4. * See file CREDITS for list of people who contributed to this
  5. * project.
  6. *
  7. * This program is free software; you can redistribute it and/or
  8. * modify it under the terms of the GNU General Public License as
  9. * published by the Free Software Foundation; either version 2 of
  10. * the License, or (at your option) any later version.
  11. *
  12. * This program is distributed in the hope that it will be useful,
  13. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  15. * GNU General Public License for more details.
  16. */
  17. #include <common.h>
  18. #include <config.h>
  19. #include <spl.h>
  20. #include <image.h>
  21. #include <linux/compiler.h>
  22. DECLARE_GLOBAL_DATA_PTR;
  23. /*
  24. * This function jumps to an image with argument. Normally an FDT or ATAGS
  25. * image.
  26. * arg: Pointer to paramter image in RAM
  27. */
  28. #ifdef CONFIG_SPL_OS_BOOT
  29. void __noreturn jump_to_image_linux(void *arg)
  30. {
  31. debug("Entering kernel arg pointer: 0x%p\n", arg);
  32. typedef void (*image_entry_arg_t)(void *, ulong r4, ulong r5, ulong r6,
  33. ulong r7, ulong r8, ulong r9)
  34. __attribute__ ((noreturn));
  35. image_entry_arg_t image_entry =
  36. (image_entry_arg_t)spl_image.entry_point;
  37. image_entry(arg, 0, 0, EPAPR_MAGIC, CONFIG_SYS_BOOTMAPSZ, 0, 0);
  38. }
  39. #endif /* CONFIG_SPL_OS_BOOT */