summaryrefslogtreecommitdiff
path: root/hw/yagl/yagl_transport.h
diff options
context:
space:
mode:
authorSooyoung Ha <yoosah.ha@samsung.com>2016-06-16 14:49:54 +0900
committerSeokYeon Hwang <syeon.hwang@samsung.com>2016-06-16 16:24:16 +0900
commitcc7e70649aa9d7b972674dc7ee9185d8db23d8a2 (patch)
tree13fe7ae2b56301be618f4d4a5ad5b35bae99f15e /hw/yagl/yagl_transport.h
parent00b7f2169caa54deb7f2e9d64908e7c6d2ff9d8e (diff)
downloadqemu-cc7e70649aa9d7b972674dc7ee9185d8db23d8a2.tar.gz
qemu-cc7e70649aa9d7b972674dc7ee9185d8db23d8a2.tar.bz2
qemu-cc7e70649aa9d7b972674dc7ee9185d8db23d8a2.zip
yagl: introduce yagl protocol version
Now yagl device receives the protocol version from emulator run option and put it into emulator kernel to notice to user. Change-Id: Id3baacf035a2e723a0ebad4e1cfe22b26af72d03 Signed-off-by: Sooyoung Ha <yoosah.ha@samsung.com>
Diffstat (limited to 'hw/yagl/yagl_transport.h')
-rw-r--r--hw/yagl/yagl_transport.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/hw/yagl/yagl_transport.h b/hw/yagl/yagl_transport.h
index f59a1c2ad4..a91453f37b 100644
--- a/hw/yagl/yagl_transport.h
+++ b/hw/yagl/yagl_transport.h
@@ -32,6 +32,7 @@
#include "yagl_types.h"
#include "yagl_vector.h"
+#include "yagl_version.h"
#include "qemu/queue.h"
#define YAGL_TRANSPORT_MAX_IN 8
@@ -153,6 +154,18 @@ static __inline uint32_t yagl_transport_get_out_uint32_t(struct yagl_transport *
return tmp;
}
+static __inline uint64_t yagl_transport_get_out_uint64_t(struct yagl_transport *t)
+{
+ uint64_t tmp;
+ if (yagl_protocol_version < 24) {
+ tmp = *(uint32_t*)t->ptr;
+ } else {
+ tmp = *(uint64_t*)t->ptr;
+ }
+ t->ptr += 8;
+ return tmp;
+}
+
static __inline uintptr_t yagl_transport_get_out_uintptr_t(struct yagl_transport *t)
{
uintptr_t tmp = *(uintptr_t*)t->ptr;