platform_def.h 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. /*
  2. * Copyright (c) 2018-2019, ARM Limited and Contributors. All rights reserved.
  3. *
  4. * SPDX-License-Identifier: BSD-3-Clause
  5. */
  6. #ifndef PLATFORM_DEF_H
  7. #define PLATFORM_DEF_H
  8. #include <arch.h>
  9. #include <lib/utils_def.h>
  10. #include "../gxl_def.h"
  11. #define PLATFORM_LINKER_FORMAT "elf64-littleaarch64"
  12. #define PLATFORM_LINKER_ARCH aarch64
  13. #define PLATFORM_STACK_SIZE UL(0x1000)
  14. #define PLATFORM_MAX_CPUS_PER_CLUSTER U(4)
  15. #define PLATFORM_CLUSTER_COUNT U(1)
  16. #define PLATFORM_CLUSTER0_CORE_COUNT PLATFORM_MAX_CPUS_PER_CLUSTER
  17. #define PLATFORM_CORE_COUNT PLATFORM_CLUSTER0_CORE_COUNT
  18. #define AML_PRIMARY_CPU U(0)
  19. #define PLAT_MAX_PWR_LVL MPIDR_AFFLVL1
  20. #define PLAT_NUM_PWR_DOMAINS (PLATFORM_CLUSTER_COUNT + \
  21. PLATFORM_CORE_COUNT)
  22. #define PLAT_MAX_RET_STATE U(1)
  23. #define PLAT_MAX_OFF_STATE U(2)
  24. /* Local power state for power domains in Run state. */
  25. #define PLAT_LOCAL_STATE_RUN U(0)
  26. /* Local power state for retention. Valid only for CPU power domains */
  27. #define PLAT_LOCAL_STATE_RET U(1)
  28. /* Local power state for power-down. Valid for CPU and cluster power domains. */
  29. #define PLAT_LOCAL_STATE_OFF U(2)
  30. /*
  31. * Macros used to parse state information from State-ID if it is using the
  32. * recommended encoding for State-ID.
  33. */
  34. #define PLAT_LOCAL_PSTATE_WIDTH U(4)
  35. #define PLAT_LOCAL_PSTATE_MASK ((U(1) << PLAT_LOCAL_PSTATE_WIDTH) - 1)
  36. /*
  37. * Some data must be aligned on the biggest cache line size in the platform.
  38. * This is known only to the platform as it might have a combination of
  39. * integrated and external caches.
  40. */
  41. #define CACHE_WRITEBACK_SHIFT U(6)
  42. #define CACHE_WRITEBACK_GRANULE (U(1) << CACHE_WRITEBACK_SHIFT)
  43. /* Memory-related defines */
  44. #define PLAT_PHY_ADDR_SPACE_SIZE (ULL(1) << 32)
  45. #define PLAT_VIRT_ADDR_SPACE_SIZE (ULL(1) << 32)
  46. #define MAX_MMAP_REGIONS 12
  47. #define MAX_XLAT_TABLES 6
  48. #endif /* PLATFORM_DEF_H */