feat(spmc): add FFA_PARTITION_INFO_GET_REGS
Add basic and incomplete implementation of FFA_PARTITION_INFO_GET_REGS
ABI. This new ABI allows to get partition information without the need
for rx/tx buffer and helps in situations where having an rx/tx buffer
mapped and available is difficult (ex. uefi runtime services).
The implementation simply returns error now and future patches will add
functionality.
Signed-off-by: Raghu Krishnamurthy <raghu.ncstate@gmail.com>
Change-Id: I5084581cee02927569366877333b120f75137781
diff --git a/src/api.c b/src/api.c
index 452ba78..71e156e 100644
--- a/src/api.c
+++ b/src/api.c
@@ -418,6 +418,18 @@
.arg3 = partition_info_size};
}
+struct ffa_value api_ffa_partition_info_get_regs(struct vcpu *current,
+ const struct ffa_uuid *uuid,
+ const uint16_t start_index,
+ const uint16_t tag)
+{
+ (void)current;
+ (void)uuid;
+ (void)start_index;
+ (void)tag;
+ return ffa_error(FFA_NOT_SUPPORTED);
+}
+
struct ffa_value api_ffa_partition_info_get(struct vcpu *current,
const struct ffa_uuid *uuid,
const uint32_t flags)
@@ -2260,6 +2272,7 @@
case FFA_MEM_PERM_GET_64:
case FFA_MEM_PERM_SET_64:
case FFA_MSG_SEND2_32:
+ case FFA_PARTITION_INFO_GET_REGS_64:
#endif
return (struct ffa_value){.func = FFA_SUCCESS_32};
diff --git a/src/arch/aarch64/hypervisor/handler.c b/src/arch/aarch64/hypervisor/handler.c
index e2a9ed8..7860dff 100644
--- a/src/arch/aarch64/hypervisor/handler.c
+++ b/src/arch/aarch64/hypervisor/handler.c
@@ -529,6 +529,27 @@
*args = api_ffa_partition_info_get(current, &uuid, args->arg5);
return true;
}
+ case FFA_PARTITION_INFO_GET_REGS_64: {
+ struct ffa_uuid uuid;
+ uint32_t w0;
+ uint32_t w1;
+ uint32_t w2;
+ uint32_t w3;
+ uint16_t start_index;
+ uint16_t tag;
+
+ w0 = (uint32_t)(args->arg1 & 0xFFFFFFFF);
+ w1 = (uint32_t)(args->arg1 >> 32);
+ w2 = (uint32_t)(args->arg2 & 0xFFFFFFFF);
+ w3 = (uint32_t)(args->arg2 >> 32);
+ ffa_uuid_init(w0, w1, w2, w3, &uuid);
+
+ start_index = (uint32_t)args->arg3 & 0xFFFF;
+ tag = (uint32_t)args->arg3 >> 16;
+ *args = api_ffa_partition_info_get_regs(current, &uuid,
+ start_index, tag);
+ return true;
+ }
case FFA_ID_GET_32:
*args = api_ffa_id_get(current);
return true;