aboutsummaryrefslogtreecommitdiff
path: root/module
AgeCommit message (Collapse)Author
2020-11-28module: add support for CMN-700 interconnectVijayenthiran Subramaniam
Add initial support for CMN-700 interconnect controller. This include discovery of mesh, configuring SAM tables, programming the nodes and sufficient support for single chip operation. When compared to previous CMN generations (such as CMN-600 or CMN-650), CMN-700 supports crosspoints (XP) with more than 2 ports and is compliant with CXL protocol standard. Signed-off-by: Vijayenthiran Subramaniam <vijayenthiran.subramaniam@arm.com> Change-Id: Ibee8ff2d1711b20b5793d36b8f9f4ee06367a266
2020-11-28isys_rom: idle on failure to boot from ram firmwareThomas Abraham
On failure to boot from RAM firmware, ensure that the processor is held in a idle state. Change-Id: I5376c18062c54a17b577266cafda099218aefee4 Signed-off-by: Thomas Abraham <thomas.abraham@arm.com>
2020-11-28bootloader: ensure module config is providedThomas Abraham
Prior to using the module config data, ensure that there is a valid config data to use. Change-Id: I899fe4b53b076f354f5215a723cbb2d1d1bd0b68 Signed-off-by: Thomas Abraham <thomas.abraham@arm.com>
2020-11-28module/ppuv1: remove a incorrect assert checkVijayenthiran Subramaniam
The PID controller implements give of the eight PCID registers. So remove a check on all the eight PCID registers. Change-Id: I523243dcf8509e58afde4947106d6307b43dbd43 Signed-off-by: Vijayenthiran Subramaniam <vijayenthiran.subramaniam@arm.com>
2020-11-18mod_scmi : Deny access for PSCI agent for configured protocolsAhmed Gadallah
In this change , when resource permission module is disabled if a protocol is listed in the disabled protocols for PSCI agent then this protocol couldn't be accessed by PSCI agent and SCMI_DENIED_ERROR is returned. Change-Id: Id35ba35628eabd9b7bca7bb48b7016f60155dcec Signed-off-by: Ahmed Gadallah <ahmed.gadallah@arm.com>
2020-11-17scmi_sensor: simplifies fwk_unexpected exitLeandro Belli
This patch adds a new tag exit_unexpected to remove multiple calls to fwk_unexpected function. This allows to reduce and simplify code. Change-Id: I004e22b73506a59517cfd911b4fea3be4178cf6f Signed-off-by: Leandro Belli <leandro.belli@arm.com>
2020-11-17scmi_sensor: add support for SENSOR_TRIP_POINT_NOTIFYLeandro Belli
This patch includes a callback function for SENSOR_TRIP_POINT_NOTIFY and checks sensor-id parameter. It adds a notification api for sensor trip point. To enable this feature the build flag BUILD_HAS_SCMI_SENSOR_EVENTS and BUILD_HAS_SCMI_NOTIFICATIONS should be set. Change-Id: I14ba2edf2d2e5430f920966d46e3f94456f9dc2c Signed-off-by: Leandro Belli <leandro.belli@arm.com>
2020-11-17scmi_sensor: add support for SENSOR_TRIP_POINT_CONFIGLeandro Belli
This patch includes a callback function for SENSOR_TRIP_POINT_CONFIG and checks sensor-id parameter. It allows setting a trip point value with all the settings enabled. Every sensor should specify the mod_sensor_trip_point_info struct inside the sensor configuration if needed. To enable this feature the build flag BUILD_HAS_SCMI_SENSOR_EVENTS should be set. Change-Id: I4acbc74ef284bd53d60e0bcd4c4e992921f2f5a4 Signed-off-by: Leandro Belli <leandro.belli@arm.com>
2020-11-13scmi_power_domain: Fix attributes query notifications flagLuca Vizzarro
As per SCMIv2 specifications section 4.3.2.4, when querying the power domain attributes, the attribute at bit 31 must be set when the queried domain supports notifications. Because DEVICE and DEVICE_DEBUG types of power domain domain support notifications, these must set this bit when their attributes are queried. This commit enforces this behaviour. Change-Id: Ib307e61a86cdf0fcd63a91f982ce5bbcce39d013 Signed-off-by: Luca Vizzarro <Luca.Vizzarro@arm.com>
2020-11-11module: Add Mock Clock moduleLuca Vizzarro
The mock clock module allows to smoothly test the firmware while using an emulated system, e.g. FVP. Some clock device drivers require hardware features, such as I2C, in order to function correctly. Under an emulated environment, these features cannot be always reproduced, so the mock clock module allows to replace these clock drivers for a smooth operation. Change-Id: I022c56cdf0cadb062742f83d413fa9bdf4adc5aa Signed-off-by: Luca Vizzarro <Luca.Vizzarro@arm.com>
2020-11-10fip: move fip config parameters to caller moduleManoj Kumar
This patch modifies the fip module such that the base address used by the fip module becomes flexible and is passed by the caller module (n1sdp_rom/morello_rom) in runtime. This change also removes the config_fip.c file to avoid using single fixed base address set at build time. These parameters will be passed as arguments to get_entry function from the caller module which now has the flexibility to dynamically parse any memory address. Change-Id: I1c94ca624df4f4557d76a2ba5dacaa743ed43a25 Signed-off-by: Manoj Kumar <manoj.kumar3@arm.com>
2020-11-05scmi: fix errors when "BS_FIRMWARE_HAS_RESOURCE_PERMISSIONS=no"Ahmed Gadallah
Errors fixed when "BS_FIRMWARE_HAS_RESOURCE_PERMISSIONS=no": 1) When an agent of type PSCI sends a "Base protocol: Protocol attributes" command, the number of all protocols supported by the SCP is returned instead of the number of protocols available for PSCI agents only. 2) When an agent of type PSCI sends a "Base protocol: Discover list protocols" command, all protocols supported by the SCP are returned instead of the protocols available for PSCI agents only. Signed-off-by: Ahmed Gadallah <ahmed.gadallah@arm.com> Change-Id: Ib0a4930216d8da29c79c6724bd74cb51d5184b5b
2020-10-26mock_sensor: fix error 'status' variable undefined.Leandro Belli
This change fixes an undefined variable error in the get_value function. Change-Id: Ib289094dcd945057505565e1179f6f4cf561de11 Signed-off-by: Leandro Belli <leandro.belli@arm.com>
2020-10-22mod_scmi_clock: Fix rate_set invalid paramsLuca Vizzarro
The SCMI v2 specs defines that the RATE_SET command flags bits 31:4 are reserved and must be zero. This commit fixes this behaviour by returning INVALID_PARAMETERS as expected when any of these are set. Change-Id: Ib217bbfa4aa52f1c9051906bb88db76e0422ec1c Signed-off-by: Luca Vizzarro <Luca.Vizzarro@arm.com>
2020-10-22mod_scmi_clock: Fix set_request_respondLuca Vizzarro
Whenever a function would return the status value FWK_E_PARAM, the set_request_respond function, which is in charge of responding to requests in certain cases, would respond with SCMI_GENERIC_ERROR. This is an erratic behaviour, as there is a specific SCMI status code, SCMI_INVALID_PARAMETERS, which is especially dedicated for parameters error as in FWK_E_PARAM. This commit fixes this behaviour by adding FWK_E_PARAM to the conditions. Change-Id: Ib2b15294433cae90ede71ebf00f1b6ad868db914 Signed-off-by: Luca Vizzarro <Luca.Vizzarro@arm.com>
2020-10-22mod_scmi_clock: Fix config set default valuesLuca Vizzarro
At startup all clocks may be running by default. Nonetheless, the mod_scmi_clock_config_set_policy function, which is the API the CLOCK_CONFIG_SET command refers to, sets its clocks state to be stopped by default. This commit fixes this behaviour, by giving the option per platform through its configuration to set the state of the clocks at startup (running/stopped). Change-Id: If39a2d710e4d778b10b649d07f05cfe17ad29e54 Signed-off-by: Luca Vizzarro <Luca.Vizzarro@arm.com>
2020-10-22mod_scmi_clock: Fix ret val describe ratesLuca Vizzarro
When the rate_index parameter is set to be out of bounds of the clock entries array, the return value should be OUT_OF_RANGE according to the SCMIv2 spec. This commit changes the return value from INVALID_PARAMETER to the correct one. Change-Id: I3f002823a3c9c710dd809953793901fbcb08fe4f Signed-off-by: Luca Vizzarro <Luca.Vizzarro@arm.com>
2020-10-22mod_scmi_clock: Fix config set invalid paramsLuca Vizzarro
SCMI v2 specifies that any reserved bits in command's attributes must be zero. This commit enables compliance to CLOCK_CONFIG_SET Change-Id: I5de91df28c2f12a26f0e10e797a1335c5be0c417 Signed-off-by: Luca Vizzarro <Luca.Vizzarro@arm.com>
2020-10-22mod_scmi_reset: Fix RESET invalid reset_stateLuca Vizzarro
As per section 4.8.1 of the SCMI v2 spec, the only valid reset id for the Architectural reset state type is 0. All the other IDs available in the 32-bit space are reserved for future use. This commit brings an early exit condition that returns SCMI_INVALID_PARAMETERS when it detects that any of those ids are used. Change-Id: I81d7aee541e7577e58e242da6bebf14edd00b753 Signed-off-by: Luca Vizzarro <Luca.Vizzarro@arm.com>
2020-10-22mod_scmi_reset: Fix RESET_NOTIFY invalid notify_enableLuca Vizzarro
As per section 4.8.2.6 of the SCMI v2 spec, the request notify_enable parameter bits 31 to 1 must be set to zero. With this, this commit enforces this requirement by returning SCMI_INVALID_PARAMETERS whenever any of these bits are set. Change-Id: Ic691254da83941d2179befc3e9209c9dbb7550ff Signed-off-by: Luca Vizzarro <Luca.Vizzarro@arm.com>
2020-10-22mod_scmi_reset: Fix invalid cmd return valueLuca Vizzarro
As per section 4.1.4 of the SCMI v2 spec, the correct error code to return whenever an invalid command is requested is SCMI_NOT_FOUND. The original behaviour of the reset domain protocol was to return SCMI_NOT_SUPPORTED. This commit fixes this mistake. Change-Id: Iee9eacf1fd71352be88ed0299d155f33842cd56c Signed-off-by: Luca Vizzarro <Luca.Vizzarro@arm.com>
2020-10-22mod_scmi_reset: Fix reset invalid paramsLuca Vizzarro
As per section 4.8.2.5 of the SCMI v2 spec, the request flags bits 31 to 3 must be set to zero. With this, this commit enforces this requirement by returning SCMI_INVALID_PARAMETERS whenever any of these bits are set. Change-Id: Ic5c327a78e6864fd759864b9b2c780aac2d021d6 Signed-off-by: Luca Vizzarro <Luca.Vizzarro@arm.com>
2020-10-22mod_scmi_reset: Fix protocol versionLuca Vizzarro
The protocol version for the reset domain protocol should be 0x10000 as specified in section 4.8.2.1 of th SCMI v2 spec. This was erroneously set to 0x20000 instead. Change-Id: I14a5e8ba26a520200bb6303bbd891c790e81f3cc Signed-off-by: Luca Vizzarro <Luca.Vizzarro@arm.com>
2020-10-22mod_scmi_sys_power: Fix PSCI access levelLuca Vizzarro
The POWER_STATE_NOTIFY command erroneously denies access to the PSCI agent when there is no explicit declaration in the SCMI v2 spec that its access is indeed denied. This commit removes this condition, therefore enabling the PSCI aent to access this command. Change-Id: Ie356def6b313091f3ba113bd806be21adeac9d09 Signed-off-by: Luca Vizzarro <Luca.Vizzarro@arm.com>
2020-10-22mod_scmi_power: Fix invalid device return valueLuca Vizzarro
The SCMI power domain protocol does not support notifications for all the the domains. Specifically, only DEVICE type ones do. The code originally correctly picked this up and returned with an error, with the exception that this error was SCMI_DENIED. As per section 4.1.4 of the SCMI v2 spec, this error is dedicated to permissions-related problems. As this is not the case, this commit replaces this error with a more suitable SCMI_NOT_SUPPORTED. Change-Id: I537391bcce57a7849dae2ed26924ca1ad0b1016b Signed-off-by: Luca Vizzarro <Luca.Vizzarro@arm.com>
2020-10-21scmi_system_power/boards: Add default timer_id and add extra checkLeandro Belli
When SCMI notifications are supported a timer is required to handle graceful request. If this feature is not used timer_id must be set to FWK_ID_NONE. This patch also adds check for FWK_ID_NONE to prevent a binding with no configuration set. Change-Id: I25f982c2e8d686ac80dd0ebc2d9e64eac1522f3c Signed-off-by: Leandro Belli <leandro.belli@arm.com>
2020-10-07module: power domain: add a missing returnVincent Guittot
Signed-off-by: Vincent Guittot <vincent.guittot@linaro.org>
2020-10-07dvfs: Fix set_rate frequency multiplierNicola Mazzucato
The recent change of frequency unit from Hz to kHz has left one set_rate call with the previous units, resulting in a failed frequency change. Align the remaining set_rate with the correct frequency unit. Change-Id: I850e4433fe9b9f56a3167461afca482e3f1dcf88 Signed-off-by: Nicola Mazzucato <nicola.mazzucato@arm.com>
2020-10-07mod_scmi_perf: Fix mispelling of _SCMI_Nicola Mazzucato
Fix some mispelling of SCMI (it is not SMCI). Change-Id: Ib2a6eb5ecfe6592236a583c2dded2aadae4ce4af Signed-off-by: Nicola Mazzucato <nicola.mazzucato@arm.com>
2020-10-07Update mod_scmi_voltage_domain.cjimqui01
Remove unused variables.
2020-10-07module: Voltage Domain driver and related SCMIv3 protocol driverEtienne Carriere
Introduces a basic Voltage Domain driver and a SCMI voltage domain protocol driver. SCMI voltage domain protocol is introduced in SCMI specification v3. Module voltage_domain is a generic HAL for voltage domains, aka power supply regulators drivers. Based on module configuration, the module binds each element to the voltage domain backend driver thru a generic driver interface: - set & get config, using SCMI voltage domain configuration format. - set & get voltage level, in microvolt (uV) Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
2020-10-06module: dvfs: fix get_opp_for_voltageVincent Guittot
get_opp_for_voltage() should use voltage instead of level where looking for an OPP. Signed-off-by: Vincent Guittot <vincent.guittot@linaro.org>
2020-10-02docs: Fix multiple `\retval` commands errorsChris Kay
More recent versions of Doxygen now complain when multiple `\retval` commands are found with the same return value. This commit fixes these issues, replacing them instead with a single `\retval` containing a list of possible reasons the function might return the value. Change-Id: I8d1a09de92ffb0f6c9c662b2c28c999f52dd7d1d Signed-off-by: Chris Kay <chris.kay@arm.com>
2020-10-02docs: Fix unbalanced Doxygen groupsChris Kay
This commit fixes a number of places where Doxygen groups commands have been mismatched. Change-Id: If2e18c5e45a9a5d16a5c1f48fdaa975189957400 Signed-off-by: Chris Kay <chris.kay@arm.com>
2020-10-02docs: Replace `\ref` with `::`Chris Kay
The code-base is currently fairly inconsistent with its usage of the `::` prefix and the `\ref`. This commit replaces any instances of `\ref` with `::`. Change-Id: I02c1b6e2caf0f333388f44ac51ede060aa0568c3 Signed-off-by: Chris Kay <chris.kay@arm.com>
2020-10-02docs: Normalize Doxygen paragraph indentationChris Kay
Doxygen continutation line intendation across the code-base is currently inconsistent in spite of the code-style documentation specifying a two-tab indent on continuation lines. Change-Id: I0944d749042972797bde1997f02afd98d4028c1a Signed-off-by: Chris Kay <chris.kay@arm.com>
2020-10-02docs: Prefer `\` to `@` in Doxygen commentsChris Kay
This commit replaces any instances of `@`-style Doxygen commands with their `\`-style equivalents. This is done for consistency across the codebase. The `\sa` Doxygen command has been added to the Clang-Format configuration to prevent it from reflowing see-also comments, which often exceed the column limit due to referring to long URLs. Change-Id: Ia4ebe8bd310293da9e2af55fe253f0762807e88a Signed-off-by: Chris Kay <chris.kay@arm.com>
2020-10-02docs: Ensure Doxygen return values use referencesChris Kay
At present a lot of the code-base uses `\retval` commands to framework status codes but does not explicitly link to them. In some cases it's necessary to explicitly link to these status codes to have Doxygen generate a link to the relevant enumeration, and we can do this by prefixing the name with `::`. This style is already used in much of the code-base, so should not conflict with any existing styles. Change-Id: Ifc78eb425981bee3a01c791757a41a61c20e636c Signed-off-by: Chris Kay <chris.kay@arm.com>
2020-09-21fwk: Remove all FWK_LOG_TRACE code when LOG_LEVEL=TRACE not setJim Quigley
The logging framework does not remove the FWK_LOG_x code completely when LEVEL_x is not set. This can lead to embedded code or macro's being executed unnecessarily impacting performance. Change-Id: I741b383cb74b2cf27740640769ea8f0fcd08fa2e Signed-off-by: Jim Quigley <jim.quigley@arm.com>
2020-09-15power_domain: Add check for get_last_core_pd_idLeandro Belli
This patch implements a validation check such that when the get_last_core_pd_id() function is called by the driver, the module returns an error if the system is not performing system_supend. Change-Id: Ied3a2f17b2fb471933232c8209e4d3048c4a1e8b Signed-off-by: Leandro Belli <leandro.belli@arm.com>
2020-09-08mod_scmi: Fix ret val query protocol listLuca Vizzarro
When the skip number is the same as the total number of protocols available for the BASE_DISCOVER_LIST_PROTOCOLS command, this returns INVALID_PARAMETERS, instead of SUCCESS with protocols number of 0. This commit fixes this bug. Change-Id: I11e7fcd1b797cfadb2ccb65e9c2902b5a3e5b129 Signed-off-by: Luca Vizzarro <Luca.Vizzarro@arm.com>
2020-09-08mod_scmi_perf: Fix return values describe fast chansLuca Vizzarro
The return value of the DESCRIBE_FAST_CHANNELS command of the SCMI performance domain is supposed to be NOT_SUPPORTED when the given msg_id lies within the implemented messages ids. When out of range the return value should then be NOT_FOUND. Change-Id: I0a7cc1e2e9106a1a8e57d6650e946dd4d2c90c08 Signed-off-by: Luca Vizzarro <Luca.Vizzarro@arm.com>
2020-09-08power_domain: Selectively disable pre and post transition notifications.Girish Pathak
This change allows a platform to configure pre and post state transition notifications to be disabled for a power domain, in a case for some reason if it is not desired e.g. optimization where notifications handling code won't execute unnecessarily if there are no subscribers for the notifications for that domain. By default pre and post state transition notifications are enabled for all domains. Change-Id: I9bbff3f2d2702abf1566ea846e70b22fa9c45ea4 Signed-off-by: Girish Pathak <girish.pathak@arm.com>
2020-09-08cli: Remove dependencies on UART implementationChris Kay
With the introduction of the I/O framework component, the CLI can now refer to a standard output configured by the firmware for sending and receiving UART data. This patch therefore moves any CLI-specific UART platform interfaces to the I/O component with the standard input and output streams. Change-Id: Iac55f592b438a603193da568e16eaf39fca115cf Signed-off-by: Chris Kay <chris.kay@arm.com>
2020-09-08fwk: Introduce input/output componentChris Kay
This change introduces the framework input/output (I/O) component, which enables low-level read and write operations to arbitrary entities. This component is available before the module runtime is available, and can therefore be used for debugging module initialization routines and console input/output (assuming an entity is available to handle it). For documentation on the I/O component, see `<fwk_io.h>`. This supplants much of the existing logging implementation, including the `log` module, though the public logging component interface remains largely the same. The "always-on backend"/"dynamic backend" concept has been removed as the logging component now uses the I/O component under the hood. See For documentation on the Log component, see `<fwk_log.h>`. Change-Id: I9cfcbe63220969b5a2f47333a89c8d1b287589ac Signed-off-by: Chris Kay <chris.kay@arm.com>
2020-09-08pl011: Refactor and fix module dependenciesChris Kay
This change refactors the PL011 in preparation for future I/O patches. Aside from general code style updates, this patch fixes a hidden dependency on the system power module, removes its dependency on the clock module, and introduces more safety checks around when the device is powered on and off. Change-Id: Ic3e87739cfd4a365372310745f737f685cf57455 Signed-off-by: Chris Kay <chris.kay@arm.com>
2020-09-08misc: Migrate banner printing into logging frameworkChris Kay
In an effort to simplify and unify the configuration required for doing printing and logging, the banner printing logic originally in the logging module has been moved into the logging framework directly. Change-Id: Id0f2e40046d2e27ae5fd7da9be27c0e29b24fcfc Signed-off-by: Chris Kay <chris.kay@arm.com>
2020-09-08bootloader: Unify bootloader messagesChris Kay
This commit adds a bootloading message to the bootloader module and unifies the error messages in the `msys-rom` and `isys-rom` modules. Change-Id: I69ab6e46af958c6b9c22f8578b2d253eb76bd137 Signed-off-by: Chris Kay <chris.kay@arm.com>
2020-09-07scmi_sensor: Fix get readings invalid flags responseLuca Vizzarro
The READING_GET command currently accepts any value in the bits 31:1 in its flags. According to the SCMI v2 specs these bits are reserved and must be zero. This commit ensures that the command returns SCMI_INVALID_PARAMETERS when any of those bits are set. Change-Id: I8d0c486d6aa0a2df8c13b8d3f7319606402dd729 Signed-off-by: Luca Vizzarro <Luca.Vizzarro@arm.com>
2020-09-01module/mod_scmi_power_domain: Add SCMI notification support.Girish Pathak
This change adds SCMI notification support in power domain protocol. Due to very frequent power state changes of the cores and clusters, SCMI notifications are not supported for these domains. Change-Id: I8d4b6ced96ff45ef281ef234be2d289a5492561d Signed-off-by: Girish Pathak <girish.pathak@arm.com>