From: Wendy Liang Date: Wed, 5 Oct 2016 20:48:25 +0000 (-0700) Subject: Apps: zynqmp: Add API to get rsc table X-Git-Tag: v2016.10~8 X-Git-Url: https://git.ti.com/gitweb?p=processor-sdk%2Fopen-amp.git;a=commitdiff_plain;h=2a27bac0701b78108cd7b891f7e325a97e902b1c Apps: zynqmp: Add API to get rsc table This API is introduced for applications to get the resource table across different platforms. For baremetal/RTOS, you don't actually need this API, but for Linux userspace, it is required as it can have multiple resource talbes for different remotes. Signed-off-by: Wendy Liang --- diff --git a/apps/machine/zynqmp/rsc_table.c b/apps/machine/zynqmp/rsc_table.c index 51a72ea..fdcffc7 100644 --- a/apps/machine/zynqmp/rsc_table.c +++ b/apps/machine/zynqmp/rsc_table.c @@ -54,7 +54,7 @@ #define NUM_TABLE_ENTRIES 1 -const struct remote_resource_table __resource resources = { +struct remote_resource_table __resource resources = { /* Version */ 1, @@ -79,3 +79,10 @@ const struct remote_resource_table __resource resources = { { RING_RX, VRING_ALIGN, VRING_SIZE, 2, 0}, }; + +void *get_resource_table (int rsc_id, int *len) +{ + (void) rsc_id; + *len = sizeof(resources); + return &resources; +}