summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: e5b4093)
raw | patch | inline | side by side (parent: e5b4093)
author | G Anthony <a0783926@ti.com> | |
Thu, 25 Jul 2013 23:38:29 +0000 (16:38 -0700) | ||
committer | Ramsey Harris <ramsey@ti.com> | |
Tue, 6 Aug 2013 17:50:59 +0000 (10:50 -0700) |
The Linux host will write a VIRTIO_CONFIG_* status into the remote processor
resource table upon completion of VDEV creation.
As this corresponds to priming of vring buffers for RPMSG type VDEVs, this is
a useful status for the slave to poll before it sends it's first RPMSG
to the host.
Other non-Linux HLOS must implement a similar status update mechanism.
Signed-off-by: G Anthony <a0783926@ti.com>
resource table upon completion of VDEV creation.
As this corresponds to priming of vring buffers for RPMSG type VDEVs, this is
a useful status for the slave to poll before it sends it's first RPMSG
to the host.
Other non-Linux HLOS must implement a similar status update mechanism.
Signed-off-by: G Anthony <a0783926@ti.com>
packages/ti/ipc/remoteproc/Resource.c | patch | blob | history | |
packages/ti/ipc/remoteproc/Resource.xdc | patch | blob | history |
index 3f23a52ee57f70683c6906e99205af41ddfc09e5..34603fc1d7f333afbb60ab4028908d39ab04c675 100644 (file)
#include <xdc/runtime/System.h>
#include <xdc/runtime/Startup.h>
+#include <ti/sysbios/hal/Cache.h>
#include "rsc_types.h"
#include "package/internal/Resource.xdc.h"
return (NULL);
}
+/*
+ * ======== getVdevStatus ========
+ */
+Char Resource_getVdevStatus(UInt32 id)
+{
+ UInt32 i;
+ UInt32 offset;
+ UInt32 type;
+ Char status = 0;
+ struct fw_rsc_vdev *vdev= NULL;
+ Resource_RscTable *table = (Resource_RscTable *)
+ (Resource_module->pTable);
+
+ for (i = 0; i < module->pTable->num; i++) {
+ offset = (UInt32)((Char *)table + table->offset[i]);
+ type = *(UInt32 *)offset;
+ if (type == TYPE_VDEV) {
+ vdev = (struct fw_rsc_vdev *)offset;
+ if (vdev->id == id) {
+ /* invalidate memory as host will update the status field */
+ Cache_inv(vdev, sizeof(*vdev), Cache_Type_ALL, TRUE);
+ status = vdev->status;
+ break;
+ }
+ }
+ }
+
+ return (status);
+}
+
/*
* ======== Resource_getVringDA ========
*/
index 1ef430461544a69f009052324034a3bd980067ef..8051cfc29bcb5cebb506536e4d5da2eeb90a2a42 100644 (file)
@DirectCall
Ptr getTraceBufPtr();
+ /*!
+ * @brief Get the status field of the VDEV, given the fw_rsc_vdev id.
+ *
+ * @return status value which is set by Virtio device on HLOS.
+ */
+ @DirectCall
+ Char getVdevStatus(UInt32 id);
+
/*!
* @brief Get the nth (vqId) vring address from the VDEV struct.
*