fconf_dyn_cfg_getter.h 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. /*
  2. * Copyright (c) 2019-2023, Arm Limited. All rights reserved.
  3. *
  4. * SPDX-License-Identifier: BSD-3-Clause
  5. */
  6. #ifndef FCONF_DYN_CFG_GETTER_H
  7. #define FCONF_DYN_CFG_GETTER_H
  8. #include <lib/fconf/fconf.h>
  9. #define FCONF_INVALID_IDX 0xFFFFFFFFU
  10. /* Dynamic configuration related getter */
  11. #define dyn_cfg__dtb_getter(id) dyn_cfg_dtb_info_getter(id)
  12. struct dyn_cfg_dtb_info_t {
  13. uintptr_t config_addr;
  14. uint32_t config_max_size;
  15. unsigned int config_id;
  16. /*
  17. * A platform uses this address to copy the configuration
  18. * to another location during the boot-flow.
  19. * - e.g. HW_CONFIG
  20. */
  21. uintptr_t secondary_config_addr;
  22. };
  23. unsigned int dyn_cfg_dtb_info_get_index(unsigned int config_id);
  24. struct dyn_cfg_dtb_info_t *dyn_cfg_dtb_info_getter(unsigned int config_id);
  25. int fconf_populate_dtb_registry(uintptr_t config);
  26. /* Set config information in global DTB array */
  27. void set_config_info(uintptr_t config_addr, uintptr_t secondary_config_addr,
  28. uint32_t config_max_size,
  29. unsigned int config_id);
  30. #endif /* FCONF_DYN_CFG_GETTER_H */