plat_zynqmp.c 410 B

12345678910111213141516171819202122
  1. /*
  2. * Copyright (c) 2015-2018, Arm Limited and Contributors. All rights reserved.
  3. *
  4. * SPDX-License-Identifier: BSD-3-Clause
  5. */
  6. #include <plat/common/platform.h>
  7. #include <plat_private.h>
  8. int32_t plat_core_pos_by_mpidr(u_register_t mpidr)
  9. {
  10. if (mpidr & MPIDR_CLUSTER_MASK) {
  11. return -1;
  12. }
  13. if ((mpidr & MPIDR_CPU_MASK) >= PLATFORM_CORE_COUNT) {
  14. return -1;
  15. }
  16. return zynqmp_calc_core_pos(mpidr);
  17. }