1 /* 2 * Copyright (c) 2024-2025, Linaro Limited. All rights reserved. 3 * 4 * SPDX-License-Identifier: BSD-3-Clause 5 */ 6 7 #ifndef SBSA_PLATFORM_H 8 #define SBSA_PLATFORM_H 9 10 #include <stdint.h> 11 12 #include <platform_def.h> 13 14 struct platform_cpu_data { 15 uint32_t nodeid; 16 uint32_t mpidr; 17 }; 18 19 struct platform_memory_data { 20 uint32_t nodeid; 21 uint64_t addr_base; 22 uint64_t addr_size; 23 }; 24 25 /* 26 * sockets: the number of sockets on sbsa-ref platform. 27 * clusters: the number of clusters in one socket. 28 * cores: the number of cores in one cluster. 29 * threads: the number of threads in one core. 30 */ 31 struct platform_cpu_topology { 32 uint32_t sockets; 33 uint32_t clusters; 34 uint32_t cores; 35 uint32_t threads; 36 }; 37 38 struct qemu_platform_info { 39 uint32_t num_cpus; 40 uint32_t num_memnodes; 41 struct platform_cpu_data cpu[PLATFORM_CORE_COUNT]; 42 struct platform_cpu_topology cpu_topo; 43 struct platform_memory_data memory[PLAT_MAX_MEM_NODES]; 44 }; 45 46 void sbsa_platform_init(void); 47 48 #endif /* SBSA_PLATFORM_H */ 49