From e0c554dd92f07eda9341b487822e402789954140 Mon Sep 17 00:00:00 2001 From: Wendy Liang Date: Fri, 30 Sep 2016 14:03:37 -0700 Subject: [PATCH] Apps: zynq7: 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. --- apps/machine/zynq7/rsc_table.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/apps/machine/zynq7/rsc_table.c b/apps/machine/zynq7/rsc_table.c index fff7732..25f8642 100644 --- a/apps/machine/zynq7/rsc_table.c +++ b/apps/machine/zynq7/rsc_table.c @@ -61,7 +61,7 @@ #define CARVEOUT_SRC { RSC_CARVEOUT, ELF_START, ELF_START, ELF_END, 0, 0, "ELF_COUT", }, -const struct remote_resource_table __resource resources = { +struct remote_resource_table __resource resources = { /* Version */ 1, @@ -89,3 +89,11 @@ 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; +} + -- 2.26.2