fconf_hw_config_getter.h 1.5 KB

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