fix: cactus_mm is too verbose on some tests
Changing logs printed with "INFO"/"NOTICE" to
"VERBOSE".
Signed-off-by: J-Alves <joao.alves@arm.com>
Change-Id: I89ff56fb631b1a1f393b6d3cdc59bbc7c43cee0a
(cherry picked from commit 66ee63286f790f61c56dfb8765b5668ccd8991aa)
diff --git a/spm/cactus_mm/cactus_mm_service_loop.c b/spm/cactus_mm/cactus_mm_service_loop.c
index dbec190..4226767 100644
--- a/spm/cactus_mm/cactus_mm_service_loop.c
+++ b/spm/cactus_mm/cactus_mm_service_loop.c
@@ -90,10 +90,13 @@
uint32_t ctx_size = svc_values.arg2;
uint64_t cookie = svc_values.arg3;
- NOTICE("Cactus: Received MM_COMMUNICATE_AARCH64 call\n");
- NOTICE("Cactus: Context address: 0x%llx\n", ctx_addr);
- NOTICE("Cactus: Context size : %u\n", ctx_size);
- NOTICE("Cactus: Cookie : 0x%llx\n", cookie);
+ (void) cookie;
+ (void) ctx_size;
+
+ VERBOSE("Cactus: Received MM_COMMUNICATE_AARCH64 call\n");
+ VERBOSE("Cactus: Context address: 0x%llx\n", ctx_addr);
+ VERBOSE("Cactus: Context size : %u\n", ctx_size);
+ VERBOSE("Cactus: Cookie : 0x%llx\n", cookie);
if (ctx_addr == 0) {
ERROR("Context address is invalid\n");
@@ -102,7 +105,7 @@
}
secure_partition_request_info_t *sps = (void *)(uintptr_t) ctx_addr;
- NOTICE("Received fast secure service request with ID #%u\n",
+ INFO("Received fast secure service request with ID #%u\n",
sps->id);
event_status_code = cactus_handle_fast_request(64, sps);
break;
@@ -114,10 +117,13 @@
uint32_t ctx_size = svc_values.arg2;
uint32_t cookie = svc_values.arg3;
- NOTICE("Cactus: Received MM_COMMUNICATE_AARCH32 call\n");
- NOTICE("Cactus: Context address: 0x%x\n", ctx_addr);
- NOTICE("Cactus: Context size : %u\n", ctx_size);
- NOTICE("Cactus: Cookie : 0x%x\n", cookie);
+ (void) cookie;
+ (void) ctx_size;
+
+ VERBOSE("Cactus: Received MM_COMMUNICATE_AARCH32 call\n");
+ VERBOSE("Cactus: Context address: 0x%x\n", ctx_addr);
+ VERBOSE("Cactus: Context size : %u\n", ctx_size);
+ VERBOSE("Cactus: Cookie : 0x%x\n", cookie);
if (ctx_addr == 0) {
ERROR("Context address is invalid\n");
@@ -126,8 +132,8 @@
}
secure_partition_request_info_t *sps = (void *)(uintptr_t) ctx_addr;
- NOTICE("Received fast secure service request with ID #%u\n",
- sps->id);
+ INFO("Received fast secure service request with ID #%u\n",
+ sps->id);
event_status_code = cactus_handle_fast_request(32, sps);
break;
}
diff --git a/spm/cactus_mm/cactus_mm_tests_memory_attributes.c b/spm/cactus_mm/cactus_mm_tests_memory_attributes.c
index 1a87f6c..9f25512 100644
--- a/spm/cactus_mm/cactus_mm_tests_memory_attributes.c
+++ b/spm/cactus_mm/cactus_mm_tests_memory_attributes.c
@@ -44,10 +44,10 @@
int pages_count,
uint32_t memory_access_controls)
{
- INFO("Requesting memory attributes change\n");
- INFO(" Start address : %p\n", (void *) base_address);
- INFO(" Number of pages: %i\n", pages_count);
- INFO(" Attributes : 0x%x\n", memory_access_controls);
+ VERBOSE("Requesting memory attributes change\n");
+ VERBOSE(" Start address : %p\n", (void *) base_address);
+ VERBOSE(" Number of pages: %i\n", pages_count);
+ VERBOSE(" Attributes : 0x%x\n", memory_access_controls);
svc_args svc_values = { SP_MEMORY_ATTRIBUTES_SET_AARCH64,
base_address,
@@ -62,8 +62,8 @@
*/
static int32_t request_get_mem_attr(uintptr_t base_address)
{
- INFO("Requesting memory attributes\n");
- INFO(" Base address : %p\n", (void *) base_address);
+ VERBOSE("Requesting memory attributes\n");
+ VERBOSE(" Base address : %p\n", (void *) base_address);
svc_args svc_values = { SP_MEMORY_ATTRIBUTES_GET_AARCH64,
base_address };
@@ -105,8 +105,9 @@
new_attr = mem_access_perm(SP_MEMORY_ATTRIBUTES_NON_EXEC, SP_MEMORY_ATTRIBUTES_ACCESS_RW);
ret = request_mem_attr_changes(addr, pages_count, new_attr);
+
expect(ret, SPM_SUCCESS);
- printf("Successfully changed memory attributes\n");
+ VERBOSE("Successfully changed memory attributes\n");
/* The attributes should be the ones we have just written. */
ret = request_get_mem_attr(addr);
@@ -118,12 +119,13 @@
++data) {
*data = 42;
}
- printf("Successfully wrote to the memory\n");
+ VERBOSE("Successfully wrote to the memory\n");
/* Let's revert back to the original attributes for the next test */
ret = request_mem_attr_changes(addr, pages_count, old_attr);
+
expect(ret, SPM_SUCCESS);
- printf("Successfully restored the old attributes\n");
+ VERBOSE("Successfully restored the old attributes\n");
/* The attributes should be the original ones again. */
ret = request_get_mem_attr(addr);