1 /*
2  * Arm SCP/MCP Software
3  * Copyright (c) 2021, Arm Limited and Contributors. All rights reserved.
4  *
5  * SPDX-License-Identifier: BSD-3-Clause
6  */
7 
8 #ifndef MOD_TRAFFIC_COP_H
9 #define MOD_TRAFFIC_COP_H
10 
11 #include <fwk_id.h>
12 
13 #include <stddef.h>
14 #include <stdint.h>
15 
16 /*!
17  * \ingroup GroupModules
18  *  \defgroup GroupTrafficCop Traffic Cop
19  * \{
20  */
21 
22 /*!
23  * \brief Perf Constraint Lookup Table (PCT) entry.
24  *
25  * \details The table entries should be provided in numerically descending
26  *          order with respect to the number of online cores. The first
27  *          entry must represent the maximum number of cores.
28  */
29 struct mod_tcop_pct_table {
30     /*! Number of cores online. */
31     uint32_t cores_online;
32 
33     /*! Maximum allowed performance level for this number of online cores. */
34     uint32_t perf_limit;
35 };
36 
37 /*!
38  * \brief Traffic Cop sub-element configuration.
39  *
40  * \details The configuration data of each core.
41  */
42 struct mod_tcop_core_config {
43     /*! Identifier of the power domain associated with each core. */
44     fwk_id_t pd_id;
45 
46     /*! Core initial power state when the platfrom starts is ON. */
47     bool core_starts_online;
48 };
49 
50 /*!
51  * \brief Traffic Cop domain configuration.
52  *
53  */
54 struct mod_tcop_domain_config {
55     /*! Identifier of the performance domain associated with tcop domain. */
56     fwk_id_t perf_id;
57 
58     /*! Perf Constraint Table (PCT) for each domain. */
59     struct mod_tcop_pct_table *pct;
60 
61     /*! Size of the Perf Constraint Table in bytes. */
62     size_t pct_size;
63 
64     /*! List of core configurations. */
65     struct mod_tcop_core_config const *core_config;
66 };
67 
68 /*!
69  * \}
70  */
71 
72 #endif /* MOD_TRAFFC_COP_H */
73