aboutsummaryrefslogtreecommitdiff
path: root/module/msys_rom
diff options
context:
space:
mode:
authorChris Kay <chris.kay@arm.com>2020-01-10 15:08:26 +0000
committerjimqui01 <54316584+jimqui01@users.noreply.github.com>2020-03-24 17:52:55 +0000
commit33b85df623d4032e790db2f366950f713b33a4f0 (patch)
treed1e04802c7014842a8a7beb8d5dd0fe4e0b6bc17 /module/msys_rom
parent819690283526d1d768dcea49b47bdb51c1de6e55 (diff)
fwk: Integrate logging functionality into the framework
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>
Diffstat (limited to 'module/msys_rom')
-rw-r--r--module/msys_rom/src/mod_msys_rom.c16
1 files changed, 2 insertions, 14 deletions
diff --git a/module/msys_rom/src/mod_msys_rom.c b/module/msys_rom/src/mod_msys_rom.c
index 6f00d9a7..d1fe41c9 100644
--- a/module/msys_rom/src/mod_msys_rom.c
+++ b/module/msys_rom/src/mod_msys_rom.c
@@ -29,7 +29,6 @@
struct msys_rom_ctx {
const struct msys_rom_config *rom_config;
- struct mod_log_api *log_api;
struct ppu_v1_boot_api *ppu_boot_api;
struct mod_bootloader_api *bootloader_api;
unsigned int notification_count; /* Notifications awaiting a response */
@@ -53,14 +52,11 @@ static int msys_deferred_setup(void)
ctx.ppu_boot_api->power_mode_on(ctx.rom_config->id_primary_cluster);
ctx.ppu_boot_api->power_mode_on(ctx.rom_config->id_primary_core);
- FWK_LOG_INFO(ctx.log_api, "[SYSTEM] Primary CPU powered\n");
+ FWK_LOG_INFO("[SYSTEM] Primary CPU powered");
status = ctx.bootloader_api->load_image();
- FWK_LOG_ERR(
- ctx.log_api,
- "[SYSTEM] Failed to load RAM firmware image: %d\n",
- status);
+ FWK_LOG_ERR("[SYSTEM] Failed to load RAM firmware image: %d", status);
return FWK_E_DATA;
}
@@ -88,14 +84,6 @@ static int msys_rom_bind(fwk_id_t id, unsigned int round)
/* Use second round only (round numbering is zero-indexed) */
if (round == 1) {
- /* Bind to the log component */
- status = fwk_module_bind(FWK_ID_MODULE(FWK_MODULE_IDX_LOG),
- FWK_ID_API(FWK_MODULE_IDX_LOG, 0),
- &ctx.log_api);
-
- if (status != FWK_SUCCESS)
- return FWK_E_PANIC;
-
/* Bind to the PPU module */
status = fwk_module_bind(FWK_ID_MODULE(FWK_MODULE_IDX_PPU_V1),
FWK_ID_API(FWK_MODULE_IDX_PPU_V1,