platform_def.h 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. /*
  2. * Copyright (c) 2020, 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 "../axg_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_AFFLVL2
  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. #define PLAT_SYS_CPU_CFG7 (U(1) << 25)
  25. #define PLAT_AO_TIMESTAMP_CNTL U(0x1ff)
  26. /* Local power state for power domains in Run state. */
  27. #define PLAT_LOCAL_STATE_RUN U(0)
  28. /* Local power state for retention. Valid only for CPU power domains */
  29. #define PLAT_LOCAL_STATE_RET U(1)
  30. /* Local power state for power-down. Valid for CPU and cluster power domains. */
  31. #define PLAT_LOCAL_STATE_OFF U(2)
  32. /*
  33. * Macros used to parse state information from State-ID if it is using the
  34. * recommended encoding for State-ID.
  35. */
  36. #define PLAT_LOCAL_PSTATE_WIDTH U(4)
  37. #define PLAT_LOCAL_PSTATE_MASK ((U(1) << PLAT_LOCAL_PSTATE_WIDTH) - 1)
  38. /*
  39. * Some data must be aligned on the biggest cache line size in the platform.
  40. * This is known only to the platform as it might have a combination of
  41. * integrated and external caches.
  42. */
  43. #define CACHE_WRITEBACK_SHIFT U(6)
  44. #define CACHE_WRITEBACK_GRANULE (U(1) << CACHE_WRITEBACK_SHIFT)
  45. /* Memory-related defines */
  46. #define PLAT_PHY_ADDR_SPACE_SIZE (ULL(1) << 32)
  47. #define PLAT_VIRT_ADDR_SPACE_SIZE (ULL(1) << 32)
  48. #define MAX_MMAP_REGIONS 16
  49. #define MAX_XLAT_TABLES 8
  50. #endif /* PLATFORM_DEF_H */