aboutsummaryrefslogtreecommitdiff
path: root/product/sgm775
AgeCommit message (Collapse)Author
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: 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-08sgm775: Use single-threaded modeChris Kay
When building with the debug CLI, SGM-775's firmware binary grows too large to fit into the available memory. This patch moves it to single-threaded mode by default. Change-Id: I779957dd32383def45eeee15011e7e744db982ab 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: Make logging device elements staticChris Kay
This commit modifies any `pl011`-like configuration file where the elements are not generated and converts them to static elements. This is necessary to make the identifiers available at an earlier stage, which is required to use them as standard input/output devices further up in the patch set. Change-Id: I4e4aeafa8427b12bba751122f2fb39d20e9fa14a Signed-off-by: Chris Kay <chris.kay@arm.com>
2020-09-08misc: Split `log`/`pl011` configuration filesChris Kay
A number of platforms merge the configuration files for the `log` and `pl011` modules. With the removal of the `log` module later on, it's easiest to clean up this split across all the platforms. Change-Id: Id537ddfdd244fbd69643e92967498816e10b16b4 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-08-28fwk: Use standard library memory allocatorChris Kay
This commit replaces the framework memory allocator with the system memory allocator. This change helps the compiler make better decisions around optimization, enables more accurate static analysis, and allows us to better move the framework across target platforms. In addition to this, the memory allocator now supports freeing allocated memory, enabling a fully dynamic system. Change-Id: Ifa129f23d429f04cea76cd5c1f49001031c50cb4 Signed-off-by: Chris Kay <chris.kay@arm.com>
2020-08-28SCMI: Performance notifications and fast channels need to be separatedJim Quigley
This patch allows the SCMI_PERF HAL to use whichever combination of the SCMI Notifications and Fast Channels mechanisms (or neither) when the DVFS module notifies it that there have been updates to the domain performance limits or level settings. Change-Id: I7e1c262edf33d090d21508eb8f1be293a0ab8e99 Signed-off-by: Jim Quigley <jim.quigley@arm.com>
2020-08-21SCMI: Redirect notifications onto the correct channelJim Quigley
SCMI notifications are being sent to the agent on the A2P service channel the agent used to request the notifications. They need to be rerouted to the corresponding P2A service channel. Change-Id: Ia375351afcf4b9128ffc10b235a33cbe510f9c52 Signed-off-by: Jim Quigley <jim.quigley@arm.com>
2020-08-14mod_scmi: Adapt available protocolsLuca Vizzarro
Originally the command BASE_DISCOVER_LIST_PROTOCOLS of the base SCMI protocol would always return all the implemented SCMI protocols. Through the use of the resource management module, the output can now vary according to the agent's level of access. In this commit the PSCI agent level of access has now been changed to the system power managament protocol only. Change-Id: I80a9f6bb1746b62b171232b977abdb1f10d8de63 Signed-off-by: Luca Vizzarro <Luca.Vizzarro@arm.com>
2020-08-13SCMI: Add platform-specific resource permissions handlersJim Quigley
This patch adds resource management handlers for platforms which implement vendor or platform-specific entensions to the SCMI specification. Change-Id: Ic6b666eeab546571c6acbd70421c979e9d3148ce Signed-off-by: Jim Quigley <jim.quigley@arm.com>
2020-08-06DVFS: Change frequency unit from Hz to kHz.Leandro Belli
This patch change the unit from Hz to kHz due to improve range capabilities. All platforms were updated. Change-Id: I45778c23330c55a35863a8c9d586b02c130d1c11 Signed-off-by: Leandro Belli <leandro.belli@arm.com>
2020-08-06DVFS/SCMI-perf: Abstract performance levels.Leandro Belli
This patch replace explicit frequency by an abstract performance level. All platforms were updated to use abstract performance levels. Change-Id: I6a7d8c4e12a593880275e95f27306b53ce96b2a8 Signed-off-by: Leandro Belli <leandro.belli@arm.com>
2020-07-16SCMI: Performance Protocol PermissionsJim Quigley
This patch adds the SCMI Performance Protocol Resource Permissions management. Change-Id: Id93882eade3c0614b86b8614625e0b504a8b1a2d Signed-off-by: Jim Quigley <jim.quigley@arm.com>
2020-07-16SCMI: Power Domain Protocol PermissionsJim Quigley
This patch adds the SCMI Power Domain Protocol Resource Permissions management. Change-Id: I41849eba98f201029bcf4f2ed2d6d59e8fc4e605 Signed-off-by: Jim Quigley <jim.quigley@arm.com>
2020-07-16SCMI: Clock Protocol PermissionsJim Quigley
This patch adds the SCMI Clock Protocol Resource Permissions management. Change-Id: Ie636c4317e65f17b53f5ba3f5ba7eba2c405a203 Signed-off-by: Jim Quigley <jim.quigley@arm.com>
2020-07-07fwk: Remove dependency on RTX threadsChris Kay
The multithreaded implementation of the framework currently depends directly on Keil RTX because it directly allocates the thread control block itself. This change instead replaces RTX's memory allocator with the framework's memory allocator in a way that RTX can now allocate its own threads through the generic CMSIS-RTOS interface. Change-Id: Ie1bf2760a8f21c38a9466ff945d553e0e293a363 Signed-off-by: Chris Kay <chris.kay@arm.com>
2020-07-07power_domain: Refactor power domain configurationTarek El-Sherbiny
Move element table creation into a separate function to be used by multiple platforms. Change-Id: I410616b18af27bd7c99bdcb0315b1bffb6a805bc Signed-off-by: Tarek El-Sherbiny <tarek.el-sherbiny@arm.com>
2020-07-07power_domain: Simplify power domain tree handlingTarek El-Sherbiny
Each power domain will have a linked list of children and a pointer to the parent. The configuration will provide the index of the parent. The parent pointer is populated based on this index. Change-Id: I55d476989a581ea70286001728c2200bcc2866f4 Signed-off-by: Tarek El-Sherbiny <tarek.el-sherbiny@arm.com>
2020-07-03sgm775/config_scmi: Fix notification API idsLuca Vizzarro
The SCMI configuration for the FVP SGM775 did not have the notification API correctly set up on its domains. As a consequence the SCP was not sending any notification to its subscribers, rendering it non conformant to the SCMI v2 specs, hence failing the SCMI v2 Test Suite. Change-Id: Idbf109711bb05ed506636e5fd5922e35e9a3d5e3 Signed-off-by: Luca Vizzarro <Luca.Vizzarro@arm.com>
2020-06-16SCMI: Protocol and Command IdentifiersJim Quigley
This patch gathers all SCMI protocol and command identifiers into a single file. This is required to support modules which implement features common to all SCMI protocols such as resource permissions. Change-Id: Id62ee9fbe8464e214b5c0d1753089eddd1787504 Signed-off-by: Jim Quigley <jim.quigley@arm.com>
2020-06-08misc: Add `gtimer` timestamps to supporting platformsChris Kay
Platforms that use the `gtimer` module can add logging timestamps through it. Change-Id: I61d1c7c3f44356636ecb6b044cc787ae861cb4b0 Signed-off-by: Chris Kay <chris.kay@arm.com>
2020-06-08fwk: Add support for static element tablesChris Kay
Element tables are always expected to be generated at module initialization time. Most modules, however, can provide these elements at compile-time. This commit adds support for doing so. Change-Id: I77c64ddcb6e406cc1eecbf60f1d6b817384ae4f8 Signed-off-by: Chris Kay <chris.kay@arm.com>
2020-06-05arch: Move interrupt numbers to CMSIS configurationChris Kay
Because we compile with `-fshort-enums`, the current CMSIS IRQ enumeration, which only holds the exception numbers, is reduced in width to a single 8-bit value. This means that any attempt to convert from a large interrupt number to an IRQn_Type, which CMSIS does in the next patch, is not safe. We fix this by moving the interrupt numbers to the IRQn_Type, so that we can use the CMSIS APIs to manage these interrupts. Change-Id: Ic2644b5b97fb6dab412d50b8168597c056727295 Signed-off-by: Chris Kay <chris.kay@arm.com>
2020-06-05arch: Do not create `FWK_`-prefixed definitionsChris Kay
The `FWK_` prefix is reserved for use by the framework. The architecture library must use `ARCH_`. Change-Id: If0db4b41a410a9ea920297cae22353e57abdcf86 Signed-off-by: Chris Kay <chris.kay@arm.com>
2020-06-05arch: Prefer `FMW_` prefix to `FIRMWARE_`Chris Kay
In line with the prefix traditionally used across the project, the "FIRMWARE_" prefix has been replaced with "FMW_" in the architecture library. Change-Id: Ib57a7a290d5f361882c19108171131e1d0df0ba7 Signed-off-by: Chris Kay <chris.kay@arm.com>
2020-05-13sds: Move debug SDS structures to NS-RAMPierre-Clément Tosi
Relocate the SDS structures used for debug to the NS-RAM to avoid the risk of polluting non-debug behaviour (e.g. SDS region overflow). Change-Id: I847a08417b42dff250951f541e861fef7261993c Signed-off-by: Pierre-Clément Tosi <pierre-clement.tosi@arm.com> Signed-off-by: Girish Pathak <girish.pathak@arm.com>
2020-05-13sds: Create an SDS region in NS-RAMPierre-Clément Tosi
Add a new SDS region in non-secure SCP-AP shared RAM (located right after the SCMI NS memory region) to allow SDS communications with non-EL3 AP code. Change-Id: I4b7b793d934ff574934326c96776ccdefce4f5b3 Signed-off-by: Pierre-Clément Tosi <pierre-clement.tosi@arm.com> Signed-off-by: Girish Pathak <girish.pathak@arm.com>
2020-05-13sds: Detect region overflow at compile timePierre-Clément Tosi
We can use sizes of all structures defined in config_sds.c to detect if SDS region is sufficient. Change-Id: Ia029c3a416226675cab75747dce1c0a4ab52c25b Signed-off-by: Pierre-Clément Tosi <pierre-clement.tosi@arm.com> Signed-off-by: Girish Pathak <girish.pathak@arm.com>
2020-05-13sds: Add support for having multiple SDS regionsPierre-Clément Tosi
Update the SDS internal functions to use more than one region (e.g. when creating or accessing an SDS structure) while keeping this multi-region layer invisible to the calling code (which relies on SDS structure IDs, exclusively). Update the module configuration code (incl. configuration data structures and types and handlers for the framework API). Update the platform-specific SDS configuration code to comply with the changes described above. Change-Id: Ic5669000e3f44797f373e94dd143bf2d87564b51 Signed-off-by: Pierre-Clément Tosi <pierre-clement.tosi@arm.com> Signed-off-by: Girish Pathak <girish.pathak@arm.com>
2020-05-13Replace BUILD_HAS_MOD_TEST with BUILD_MODE_DEBUGGirish Pathak
Currently there is no test module present in the source tree however some platforms are incorrectly using BUILD_HAS_MOD_TEST macro. Replace this with BUILD_MODE_DEBUG. Change-Id: I2405bb70c2f788303b2fa84a67709eea7b9965a7 Signed-off-by: Girish Pathak <girish.pathak@arm.com>
2020-05-01SCMIv2: Implement SCMIv2 fast channels performance protocol APIJim Quigley
This patch implements the SCMIv2 API describe_fast_channel() for the SCMI Performance Protocol. Change-Id: I278a4d58bc26a9d2edccc3a1bca9d882da07578b Signed-off-by: Jim Quigley <jim.quigley@arm.com>
2020-05-01SCMI: Add NOTIFY_LEVEL/_LIMIT SCMI commandsJim Quigley
This patch adds the SCMI performance protocol NOTIFY_LIMITS and NOTIFY_LEVELS functionality. Change-Id: I2d0e3173696617e050a846fd6452c60e01ca94ac Signed-off-by: Jim Quigley <jim.quigley@arm.com>
2020-03-24fwk: Integrate logging functionality into the frameworkChris Kay
This commit moves the message logging functionality, previously only available through the logging module, into the framework as a free-function interface. A number of improvements to this interface have been made, owing to the tighter integration this new interface has with the framework and its scheduler: - Simplistic synchronous logging can be enabled before the framework has fully initialized - Message logging may be filtered at preprocessing-time to reduce the size of the code and read-only data sections in the firmware binary - Logging is deprioritized at runtime to reduce response latency caused by logging to output devices Change-Id: I5112df359df8a304a176e68994e2408d91f6ac89 Signed-off-by: Chris Kay <chris.kay@arm.com>
2020-03-24fwk: Filter log messages by levelChris Kay
This commit introduces the ability to filter logs based on their criticality. Log messages that do not exceed the configured criticality are removed at preprocessing time. This, in turn, allows us to remove logging calls that do not meet the criticality requirement, reducing the size of the executable image and increasing the performance of release images. Change-Id: I56e14175b67a3e4e68fd03b8e457a802192898d1 Signed-off-by: Chris Kay <chris.kay@arm.com>
2020-03-24misc: Clean up include directivesChris Kay
This commit cleans up include directives across the project to reduce the number of implicit transitive dependencies in preparation for mass header changes in the logging patches later on. These changes were made using two tools: clang-include-fixer and include-what-you-use, which identify and remove headers that are unnecessary, and insert headers which are used but not referenced. Some manual tweaking was involved to handle special cases, like #ifdef'd includes. Includes have also been reordered and categorized according to their project locality, and non-module includes now use quotes rather than angle brackets. Change-Id: Id39dc473f44b73cb98f3b8949f9e768fd2ace6cd Signed-off-by: Chris Kay <chris.kay@arm.com>
2020-03-24fwk: Rename <fmw_memory.ld.S> to <fmw_memory.h>Chris Kay
This header file is used in non-linker script contexts, so it makes sense to provide a name to match. Change-Id: Ieac3a510baf77e814ecd400147389609b5f0f2b2 Signed-off-by: Chris Kay <chris.kay@arm.com>
2020-03-24scmi: Add extended logsChris Kay
This commit expands the detail of the log output of the SCMI module in order to aid in debugging. Details that were previously missing, including the message token and the service name, are now included. Change-Id: I00075b3e4474328f27dc7f6be5b0df21c18c0cfb Signed-off-by: Chris Kay <chris.kay@arm.com>
2020-03-23dbg: Add debugger CLI moduleAnthony Roberts
This module adds support for entering the CLI while running by pressing CTRL-E. It polls the UART in a non-blocking fashion using an alarm, and fires an event if the correct key combination is detected, in order to avoid running the CLI in the alarm ISR. Handling of further events in the queue is blocked until the CLI is exited. Events can still be queued, but will not be processed. Implements support for N1SDP and SGM775 in release mode. Change-Id: I4a20d71a9539935cba549e03ef4057ce6ddcb538 Signed-off-by: Anthony Roberts <anthony.roberts@arm.com>
2020-03-23dbg: Implement CLI UART APIs for PL011Anthony Roberts
This change adds the UART function implementations for the CLI for the PL011 driver, and enables it for the SGI575, SGM775, and N1SDP platforms. This is only used when the debugger functionality is enabled with the relevant flag. Change-Id: I45bf52c700231f7489cd30c21813cf1a3ea8e9f0 Signed-off-by: Anthony Roberts <anthony.roberts@arm.com>
2020-03-16scmi_power_domain: Split configuration from implementationNicola Mazzucato
With this patch the configuration for this module becomes a separate file for each platform, like all the other modules. Change-Id: If001c668d731c28f225ef188ebe097120f41d74a Signed-off-by: Nicola Mazzucato <nicola.mazzucato@arm.com> Signed-off-by: Girish Pathak <girish.pathak@arm.com>
2020-03-12fwk/fwk_mm_alloc: panic if memory allocation failedJim Quigley
Currently the framework will return NULL if the memory allocation fails. As the system will ultimately fail on receiving the error we could just panic instead, saving the memory used for the NULL checks. Change-Id: I731b87b7acb19d30df84936b07c76cbfe0d0726e Signed-off-by: Jim Quigley <jim.quigley@arm.com>
2020-03-11bootloader: Don't access R/W memory when bootloadingChris Kay
The RAM firmware image is loaded from the beginning of SRAM, which overlaps read/write data used by the ROM firmware. This has the potential to corrupt ROM runtime data that is still being loaded in and out of memory while it is preparing to boot the image. This patch removes the image booting logic from the `msys_rom` and `juno_rom` modules and moves it to the `bootloader` module to ensure that the transfer is properly and safely contained and controlled. Other changes to reduce exploitability including updating the stack pointer to the one expected by the RAM firmware rather than permitting it to continue from where the ROM firmware left off, and relocating the vector table to the one embedded in the RAM firmware image, which prevents the core from using the exception handlers created during ROM boot (which are in the heap and may have been corrupted while loading the RAM firmware). Change-Id: I4413c1cd058ca93ef04177424f1f29561b10872f Signed-off-by: Chris Kay <chris.kay@arm.com>
2020-03-03dvfs: Add support for SCMI power cost reportingChris Kay
Linux's scheduler relies on the power cost information so we need to return accurate power cost for each cluster/core. Change-Id: I68762fa5a2aab4ade5f7f7d8d160eded37b3c040 Signed-off-by: Raphael Gault <raphael.gault@arm.com> Signed-off-by: Girish Pathak <girish.pathak@arm.com>
2020-03-03sgm775: Add config_sid moduleChris Kay
This patch adds config_sid module for sgm775 based plaforms. It also adds config_system_info for sgm775 platform. Change-Id: I949755877d1144bbb5a822082675feeb66da7fbe Signed-off-by: Raphael Gault <raphael.gault@arm.com> Signed-off-by: Girish Pathak <girish.pathak@arm.com>
2020-03-02pl011: Add powerup/powerdown handlersNicola Mazzucato
This patch introduces a configurable power domain identifier such that the driver can be informed of power state changes. This is achieved through notifications for pre_state and post_state power changes. With this power domain identifier the module can receive notifications and action accordingly. The specific action is not yet implemented. Change-Id: I7751b6de5899a2c65aec3aef3e5e4b8c1d0cd07c Signed-off-by: Nicola Mazzucato <nicola.mazzucato@arm.com>
2020-01-06sgm775: Enable DVFS retry mechanismJim Quigley
This patch enables the DVFS retry mechanism for the sgm775 platform. Change-Id: I13f4a5b6aea3e1a7933fc3c81ce4fa5eb8069d26 Signed-off-by: Jim Quigley <jim.quigley@arm.com>