diff --git a/module/dvfs/doc/module_dvfs_architecture.md b/module/dvfs/doc/module_dvfs_architecture.md index 047ca4560901575dd08b197b4824c3ae34aef06a..408ed6bf0eb5df28587689f453dc4c097e17f293 100644 --- a/module/dvfs/doc/module_dvfs_architecture.md +++ b/module/dvfs/doc/module_dvfs_architecture.md @@ -1,5 +1,5 @@ \ingroup GroupModules Modules -\defgroup GroupDVFS DVFS HAL +\defgroup GroupDvfs Dynamic Voltage and Frequency Scaling (DVFS) # DVFS Module Architecture {#module_dvfs_architecture_architecture} diff --git a/module/dvfs/src/mod_dvfs.c b/module/dvfs/src/mod_dvfs.c index 838f106f6c87bec697a5bbb46e28a2aca421d996..e9d85521e5c8c4649b830871a5e54b38067cdcc1 100644 --- a/module/dvfs/src/mod_dvfs.c +++ b/module/dvfs/src/mod_dvfs.c @@ -151,7 +151,7 @@ struct mod_dvfs_domain_ctx { bool request_pending; }; -struct mod_dvfs_ctx { +static struct mod_dvfs_ctx { /* Number of DVFS domains */ uint32_t dvfs_domain_element_count; @@ -1296,6 +1296,9 @@ static int dvfs_process_bind_request( if (!fwk_id_is_equal(target_id, fwk_module_id_dvfs)) return FWK_E_PARAM; + if (!fwk_id_is_equal(api_id, mod_dvfs_api_id_dvfs)) + return FWK_E_ACCESS; + /* We don't do any permissions management */ *api = &mod_dvfs_domain_api; diff --git a/module/scmi_perf/src/mod_scmi_perf.c b/module/scmi_perf/src/mod_scmi_perf.c index 43d135e20766f00848b8b7d149b97b0145cf60f7..48b22348ce4cb775e35f7a667a8c277cc5975480 100644 --- a/module/scmi_perf/src/mod_scmi_perf.c +++ b/module/scmi_perf/src/mod_scmi_perf.c @@ -1345,8 +1345,10 @@ static int scmi_perf_bind(fwk_id_t id, unsigned int round) return status; #endif - return fwk_module_bind(FWK_ID_MODULE(FWK_MODULE_IDX_DVFS), - FWK_ID_API(FWK_MODULE_IDX_DVFS, 0), &scmi_perf_ctx.dvfs_api); + return fwk_module_bind( + FWK_ID_MODULE(FWK_MODULE_IDX_DVFS), + FWK_ID_API(FWK_MODULE_IDX_DVFS, MOD_DVFS_API_IDX_DVFS), + &scmi_perf_ctx.dvfs_api); } static int scmi_perf_process_bind_request(fwk_id_t source_id, diff --git a/tools/build_system/doc.md b/tools/build_system/doc.md index d721f0037e796001b36271f3b35426c1b4500861..f80935ed9c37d0ff5181c2528e09e4982e944a07 100644 --- a/tools/build_system/doc.md +++ b/tools/build_system/doc.md @@ -83,6 +83,28 @@ The following parameters are mandatory: firmware. The source files (.S and .c) can be either at product or firmware level. +The following parameters are optional (default is 'no' when omitted): +* __BS_FIRMWARE_HAS_SCMI_NOTIFICATIONS__ <yes|no> - SCMI Notification. When set + to yes, firmware can provide notifications of events taking place in the + platform, such as changes in power state, and others where implemented. +* __BS_FIRMWARE_HAS_FAST_CHANNELS__ <yes|no> - SCMI FastChannels. When set to + yes, FastChannels can be discovered via specific commands over SCMI and the + platform accepts FastChannels commands for implemented commands. +* __BS_FIRMWARE_HAS_RESOURCE_PERMISSIONS__ <yes|no> - Resource Permission for + SCMI agents. When set to yes, the platform supports a custom-defined set of + permissions for each agents and for each SCMI protocol. +* __BS_FIRMWARE_HAS_DEBUG_UNIT__ <yes|no> - Debug Unit interface. When set to + yes, the HAL debug module __mod_debug__ can be used as an interface between + power domain and its debug drivers. +* __BS_FIRMWARE_HAS_SCMI_RESET__ <yes|no> - SCMI Reset domain. When set to yes, + the platform supports the SCMI reset management protocol. +* __BS_FIRMWARE_HAS_STATISTICS__ <yes|no> - SCMI Performance statistics. When + set to yes, the platform can provide support for performance statistics over + SCMI. +* __BUILD_HAS_SCMI_SENSOR_EVENTS__ <yes|no> - SCMI Sensor trip points. When + set to yes, the platform supports the configuration of trip points and + generates SCMI notifications on cross-over events for the trip points. + The format of the __BS_FIRMWARE_MODULES__ parameter can be seen in the following example: \code @@ -219,6 +241,26 @@ When building a firmware and its dependencies, the BS_FIRMWARE_HAS_STATISTICS parameter controls whether statistics support is enabled or not. +SCMI Agent Resource Permissions {#section_resource_permission} +=============================== + +When building a firmware and its dependencies, it is possible to enable a set +of predefined access rules for protocols and agents via the +BS_FIRMWARE_HAS_RESOURCE_PERMISSIONS parameter. + +SCMI Reset Domain Protocol {#section_scmi_domain_reset} +========================== + +When building a firmware and its dependencies, the SCMI Reset protocol is +enabled to control of reset-capable domains in the platform. This is possible +via the BS_FIRMWARE_HAS_SCMI_RESET parameter. + +SCMI Sensor Event Notifications {#section_scmi_sensor_event_notifications} +=============================== + +When building a firmware and its dependencies, the BUILD_HAS_SCMI_SENSOR_EVENTS +parameter controls if SCMI event notifications are enabled. + Definitions ===========