1 /* 2 * Copyright (c) 2020, Arm Limited. All rights reserved. 3 * 4 * SPDX-License-Identifier: BSD-3-Clause 5 */ 6 7 #ifndef FCONF_HW_CONFIG_GETTER_H 8 #define FCONF_HW_CONFIG_GETTER_H 9 10 #include <lib/fconf/fconf.h> 11 12 /* Hardware Config related getter */ 13 #define hw_config__gicv3_config_getter(prop) gicv3_config.prop 14 #define hw_config__topology_getter(prop) soc_topology.prop 15 #define hw_config__uart_serial_config_getter(prop) uart_serial_config.prop 16 #define hw_config__cpu_timer_getter(prop) cpu_timer.prop 17 18 struct gicv3_config_t { 19 uint64_t gicd_base; 20 uint64_t gicr_base; 21 }; 22 23 struct hw_topology_t { 24 uint32_t plat_cluster_count; 25 uint32_t cluster_cpu_count; 26 uint32_t plat_cpu_count; 27 uint32_t plat_max_pwr_level; 28 }; 29 30 struct uart_serial_config_t { 31 uint64_t uart_base; 32 uint32_t uart_clk; 33 }; 34 35 struct cpu_timer_t { 36 uint32_t clock_freq; 37 }; 38 39 int fconf_populate_gicv3_config(uintptr_t config); 40 int fconf_populate_topology(uintptr_t config); 41 int fconf_populate_uart_config(uintptr_t config); 42 int fconf_populate_cpu_timer(uintptr_t config); 43 44 extern struct gicv3_config_t gicv3_config; 45 extern struct hw_topology_t soc_topology; 46 extern struct uart_serial_config_t uart_serial_config; 47 extern struct cpu_timer_t cpu_timer; 48 #endif /* FCONF_HW_CONFIG_GETTER_H */ 49