]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - processor-sdk/open-amp.git/commitdiff
Apps: zynqmp: Add API to get rsc table
authorWendy Liang <jliang@xilinx.com>
Wed, 5 Oct 2016 20:48:25 +0000 (13:48 -0700)
committerWendy Liang <jliang@xilinx.com>
Fri, 14 Oct 2016 00:14:50 +0000 (17:14 -0700)
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 <jliang@xilinx.com>
apps/machine/zynqmp/rsc_table.c

index 51a72ea94e5e2ab85f15cae053130002ff304223..fdcffc7102907bd98861f9ebbaa81a85e879b97c 100644 (file)
@@ -54,7 +54,7 @@
 
 #define NUM_TABLE_ENTRIES           1
 
 
 #define NUM_TABLE_ENTRIES           1
 
-const struct remote_resource_table __resource resources = {
+struct remote_resource_table __resource resources = {
        /* Version */
        1,
 
        /* Version */
        1,
 
@@ -79,3 +79,10 @@ const struct remote_resource_table __resource resources = {
        {
         RING_RX, VRING_ALIGN, VRING_SIZE, 2, 0},
 };
        {
         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;
+}