board_marvell_def.h 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. /*
  2. * Copyright (C) 2018 Marvell International Ltd.
  3. *
  4. * SPDX-License-Identifier: BSD-3-Clause
  5. * https://spdx.org/licenses
  6. */
  7. #ifndef BOARD_MARVELL_DEF_H
  8. #define BOARD_MARVELL_DEF_H
  9. /*
  10. * Required platform porting definitions common to all ARM
  11. * development platforms
  12. */
  13. /* Size of cacheable stacks */
  14. #if IMAGE_BL1
  15. #if TRUSTED_BOARD_BOOT
  16. # define PLATFORM_STACK_SIZE 0x1000
  17. #else
  18. # define PLATFORM_STACK_SIZE 0x440
  19. #endif
  20. #elif IMAGE_BL2
  21. # if TRUSTED_BOARD_BOOT
  22. # define PLATFORM_STACK_SIZE 0x1000
  23. # else
  24. # define PLATFORM_STACK_SIZE 0x400
  25. # endif
  26. #elif IMAGE_BL31
  27. # define PLATFORM_STACK_SIZE 0x400
  28. #elif IMAGE_BL32
  29. # define PLATFORM_STACK_SIZE 0x440
  30. #endif
  31. /*
  32. * PLAT_MARVELL_MMAP_ENTRIES depends on the number of entries in the
  33. * plat_arm_mmap array defined for each BL stage.
  34. */
  35. #if IMAGE_BLE
  36. # define PLAT_MARVELL_MMAP_ENTRIES 3
  37. #endif
  38. #if IMAGE_BL1
  39. # if TRUSTED_BOARD_BOOT
  40. # define PLAT_MARVELL_MMAP_ENTRIES 7
  41. # else
  42. # define PLAT_MARVELL_MMAP_ENTRIES 6
  43. # endif /* TRUSTED_BOARD_BOOT */
  44. #endif
  45. #if IMAGE_BL2
  46. # define PLAT_MARVELL_MMAP_ENTRIES 8
  47. #endif
  48. #if IMAGE_BL31
  49. #define PLAT_MARVELL_MMAP_ENTRIES 5
  50. #endif
  51. /*
  52. * Platform specific page table and MMU setup constants
  53. */
  54. #if IMAGE_BL1
  55. #define MAX_XLAT_TABLES 4
  56. #elif IMAGE_BLE
  57. # define MAX_XLAT_TABLES 4
  58. #elif IMAGE_BL2
  59. # define MAX_XLAT_TABLES 4
  60. #elif IMAGE_BL31
  61. # define MAX_XLAT_TABLES 4
  62. #elif IMAGE_BL32
  63. # define MAX_XLAT_TABLES 4
  64. #endif
  65. #define MAX_IO_DEVICES 3
  66. #define MAX_IO_HANDLES 4
  67. #endif /* BOARD_MARVELL_DEF_H */