1 /* 2 * Arm SCP/MCP Software 3 * Copyright (c) 2020-2021, Arm Limited and Contributors. All rights reserved. 4 * 5 * SPDX-License-Identifier: BSD-3-Clause 6 */ 7 8 #include "morello_core.h" 9 #include "morello_scc_reg.h" 10 #include "morello_scp_pik.h" 11 12 #include <fwk_assert.h> 13 morello_core_get_core_per_cluster_count(unsigned int cluster)14unsigned int morello_core_get_core_per_cluster_count(unsigned int cluster) 15 { 16 assert(cluster < morello_core_get_cluster_count()); 17 18 return CORES_PER_CLUSTER; 19 } 20 morello_core_get_core_count(void)21unsigned int morello_core_get_core_count(void) 22 { 23 return (NUMBER_OF_CLUSTERS * CORES_PER_CLUSTER); 24 } 25 morello_core_get_cluster_count(void)26unsigned int morello_core_get_cluster_count(void) 27 { 28 return NUMBER_OF_CLUSTERS; 29 } 30 morello_is_multichip_enabled(void)31bool morello_is_multichip_enabled(void) 32 { 33 return ( 34 (SCC->PLATFORM_CTRL & SCC_PLATFORM_CTRL_MULTI_CHIP_MODE_MASK) >> 35 SCC_PLATFORM_CTRL_MULTI_CHIP_MODE_POS); 36 } 37 morello_get_chipid(void)38uint8_t morello_get_chipid(void) 39 { 40 return ((uint8_t)( 41 (SCC->PLATFORM_CTRL & SCC_PLATFORM_CTRL_CHIPID_MASK) >> 42 SCC_PLATFORM_CTRL_CHIPID_POS)); 43 } 44