/packages/tools/u-boot/patches/u-boot-2011.03-rc1-0004-armv7-start.S-provide-a-hook-for-saving-boot-params.patch

http://github.com/OpenELEC/OpenELEC.tv · Patch · 51 lines · 43 code · 8 blank · 0 comment · 0 complexity · cc66e9d3fec9a59bcad4b0dbe2047f44 MD5 · raw file

  1. From 19eb02e3bb2e569b7269019eb0e116220daac23f Mon Sep 17 00:00:00 2001
  2. From: Aneesh V <aneesh@ti.com>
  3. Date: Thu, 17 Feb 2011 16:49:05 +0530
  4. Subject: [PATCH 04/22] armv7: start.S: provide a hook for saving boot params
  5. Provide a means by which u-boot/SPL can save parameters passed
  6. to it by ROM code or the pre-loader.
  7. A new function 'save_boot_params' has been defined and a default
  8. implentation provided. Please note that we do not have a stack yet.
  9. So, any implementation of this function should not use stack.
  10. Signed-off-by: Aneesh V <aneesh@ti.com>
  11. ---
  12. arch/arm/cpu/armv7/cpu.c | 7 +++++++
  13. arch/arm/cpu/armv7/start.S | 1 +
  14. 2 files changed, 8 insertions(+), 0 deletions(-)
  15. diff --git a/arch/arm/cpu/armv7/cpu.c b/arch/arm/cpu/armv7/cpu.c
  16. index a01e0d6..54533fc 100644
  17. --- a/arch/arm/cpu/armv7/cpu.c
  18. +++ b/arch/arm/cpu/armv7/cpu.c
  19. @@ -41,6 +41,13 @@
  20. static void cache_flush(void);
  21. +void save_boot_params_default(u32 r0, u32 r1, u32 r2, u32 r3)
  22. +{
  23. +}
  24. +
  25. +void save_boot_params(u32 r0, u32 r1, u32 r2, u32 r3)
  26. + __attribute__((weak, alias("save_boot_params_default")));
  27. +
  28. int cleanup_before_linux(void)
  29. {
  30. unsigned int i;
  31. diff --git a/arch/arm/cpu/armv7/start.S b/arch/arm/cpu/armv7/start.S
  32. index cb4f92f..3618190 100644
  33. --- a/arch/arm/cpu/armv7/start.S
  34. +++ b/arch/arm/cpu/armv7/start.S
  35. @@ -103,6 +103,7 @@ IRQ_STACK_START_IN:
  36. */
  37. reset:
  38. + bl save_boot_params
  39. /*
  40. * set the cpu to SVC32 mode
  41. */
  42. --
  43. 1.7.2.3