plat_sp_min.ld.S 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. /*
  2. * Copyright (c) 2016, ARM Limited and Contributors. All rights reserved.
  3. *
  4. * SPDX-License-Identifier: BSD-3-Clause
  5. */
  6. #ifndef ROCKCHIP_PLAT_LD_S
  7. #define ROCKCHIP_PLAT_LD_S
  8. #include <lib/xlat_tables/xlat_tables_defs.h>
  9. MEMORY {
  10. SRAM (rwx): ORIGIN = SRAM_BASE, LENGTH = SRAM_SIZE
  11. PMUSRAM (rwx): ORIGIN = PMUSRAM_BASE, LENGTH = PMUSRAM_RSIZE
  12. }
  13. SECTIONS
  14. {
  15. . = SRAM_BASE;
  16. ASSERT(. == ALIGN(PAGE_SIZE),
  17. "SRAM_BASE address is not aligned on a page boundary.")
  18. .text_sram : ALIGN(PAGE_SIZE) {
  19. __bl32_sram_text_start = .;
  20. *(.sram.text)
  21. *(.sram.rodata)
  22. __bl32_sram_text_real_end = .;
  23. . = ALIGN(PAGE_SIZE);
  24. __bl32_sram_text_end = .;
  25. } >SRAM
  26. ASSERT((__bl32_sram_text_real_end - __bl32_sram_text_start) <=
  27. SRAM_TEXT_LIMIT, ".text_sram has exceeded its limit")
  28. .data_sram : ALIGN(PAGE_SIZE) {
  29. __bl32_sram_data_start = .;
  30. *(.sram.data)
  31. __bl32_sram_data_real_end = .;
  32. . = ALIGN(PAGE_SIZE);
  33. __bl32_sram_data_end = .;
  34. } >SRAM
  35. ASSERT((__bl32_sram_data_real_end - __bl32_sram_data_start) <=
  36. SRAM_DATA_LIMIT, ".data_sram has exceeded its limit")
  37. .stack_sram : ALIGN(PAGE_SIZE) {
  38. __bl32_sram_stack_start = .;
  39. . += PAGE_SIZE;
  40. __bl32_sram_stack_end = .;
  41. } >SRAM
  42. . = PMUSRAM_BASE;
  43. /*
  44. * pmu_cpuson_entrypoint request address
  45. * align 64K when resume, so put it in the
  46. * start of pmusram
  47. */
  48. .pmusram : {
  49. ASSERT(. == ALIGN(64 * 1024),
  50. ".pmusram.entry request 64K aligned.");
  51. *(.pmusram.entry)
  52. __bl32_pmusram_text_start = .;
  53. *(.pmusram.text)
  54. *(.pmusram.rodata)
  55. __bl32_pmusram_text_end = .;
  56. __bl32_pmusram_data_start = .;
  57. *(.pmusram.data)
  58. __bl32_pmusram_data_end = .;
  59. } >PMUSRAM
  60. }
  61. #endif /* ROCKCHIP_PLAT_LD_S */