Bug fix: fixed memory sharing tests failure.
Previously here passing cpu_id, means it is physical core id.
Due to this CHECK condition is failing inside the fucntion, now
passing cpu_index of the cpu.
Signed-off-by: Mahesh Bireddy <mahesh.reddybireddy@arm.com>
Change-Id: I1f6e8f1f53062341de679b981a11de97c0637797
diff --git a/src/api.c b/src/api.c
index 5170a41..062a495 100644
--- a/src/api.c
+++ b/src/api.c
@@ -1467,8 +1467,8 @@
* sender can't change it underneath us.
*/
memory_region =
- (struct spci_memory_region *)cpu_get_buffer(current->cpu->id);
- message_buffer_size = cpu_get_buffer_size(current->cpu->id);
+ (struct spci_memory_region *)cpu_get_buffer(current->cpu);
+ message_buffer_size = cpu_get_buffer_size(current->cpu);
if (length > HF_MAILBOX_SIZE || length > message_buffer_size) {
return spci_error(SPCI_INVALID_PARAMETERS);
}