summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 2018282)
raw | patch | inline | side by side (parent: 2018282)
author | Wendy Liang <jliang@xilinx.com> | |
Mon, 23 Jan 2017 19:39:49 +0000 (11:39 -0800) | ||
committer | Wendy Liang <jliang@xilinx.com> | |
Fri, 3 Feb 2017 21:41:22 +0000 (13:41 -0800) |
Add fw_rsc_rproc_mem resource entry to tell the host the
remote processor's memory which can be used as shared memory.
Signed-off-by: Wendy Liang <jliang@xilinx.com>
remote processor's memory which can be used as shared memory.
Signed-off-by: Wendy Liang <jliang@xilinx.com>
lib/include/openamp/remoteproc.h | patch | blob | history | |
lib/include/openamp/rsc_table_parser.h | patch | blob | history | |
lib/remoteproc/rsc_table_parser.c | patch | blob | history |
index cf80e9809f10fba1f3d450d5fb85c883e2734081..e76b04fea2214192cff60889283bdd681648ab54 100644 (file)
RSC_DEVMEM = 1,
RSC_TRACE = 2,
RSC_VDEV = 3,
- RSC_LAST = 4,
+ RSC_RPROC_MEM = 4,
+ RSC_LAST = 5,
};
#define FW_RSC_ADDR_ANY (0xFFFFFFFFFFFFFFFF)
struct fw_rsc_vdev_vring vring[0];
} OPENAMP_PACKED_END;
+/**
+ * struct fw_rsc_rproc_mem - remote processor memory
+ * @da: device address
+ * @pa: physical address
+ * @len: length (in bytes)
+ * @reserved: reserved (must be zero)
+ *
+ * This resource entry tells the host to the remote processor
+ * memory that the host can be used as shared memory.
+ *
+ * These request entries should precede other shared resource entries
+ * such as vdevs, vrings.
+ */
+OPENAMP_PACKED_BEGIN
+struct fw_rsc_rproc_mem {
+ uint32_t type;
+ uint32_t da;
+ uint32_t pa;
+ uint32_t len;
+ uint32_t reserved;
+} OPENAMP_PACKED_END;
+
/**
* struct remote_proc
*
index 676e6f263d222cfc93ada589128b5af488477023..0b35d188f6562cd92d6003396b393a310f9e54af 100644 (file)
int handle_trace_rsc(struct remote_proc *rproc, void *rsc);
int handle_dev_mem_rsc(struct remote_proc *rproc, void *rsc);
int handle_vdev_rsc(struct remote_proc *rproc, void *rsc);
+int handle_rproc_mem_rsc(struct remote_proc *rproc, void *rsc);
int handle_mmu_rsc(struct remote_proc *rproc, void *rsc);
#endif /* RSC_TABLE_PARSER_H */
index 9acbe3627282c0d2b964638f4993257cf8677669..30534c63ae78df86f8636a040bf5732b675c82f0 100644 (file)
handle_dev_mem_rsc,
handle_trace_rsc,
handle_vdev_rsc,
+ handle_rproc_mem_rsc,
handle_mmu_rsc
};
return RPROC_SUCCESS;
}
+/**
+ * handle_rproc_mem_rsc
+ *
+ * This function parses rproc_mem resource.
+ * This is the resource for the remote processor
+ * to tell the host the memory can be used as
+ * shared memory.
+ *
+ * @param rproc - pointer to remote remote_proc
+ * @param rsc - pointer to mmu resource
+ *
+ * @returns - execution status
+ *
+ */
+int handle_rproc_mem_rsc(struct remote_proc *rproc, void *rsc)
+{
+ (void)rproc;
+ (void)rsc;
+
+ /* TODO: the firmware side should handle this resource properly
+ * when it is the master or when it is the remote. */
+ return RPROC_SUCCESS;
+}
+
/**
* handle_mmu_rsc
*