]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - processor-sdk/open-amp.git/commitdiff
Apps: zynq7: Add API to get rsc table
authorWendy Liang <jliang@xilinx.com>
Fri, 30 Sep 2016 21:03:37 +0000 (14:03 -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.

apps/machine/zynq7/rsc_table.c

index fff7732164ed10ffe95cf3e450f16b1c8c4c8263..25f864238db0cadabc89ecda8a28bcc1d87eef34 100644 (file)
@@ -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;
+}
+