diff options
author | Sooyoung Ha <yoosah.ha@samsung.com> | 2016-06-16 14:49:54 +0900 |
---|---|---|
committer | SeokYeon Hwang <syeon.hwang@samsung.com> | 2016-06-16 16:24:16 +0900 |
commit | cc7e70649aa9d7b972674dc7ee9185d8db23d8a2 (patch) | |
tree | 13fe7ae2b56301be618f4d4a5ad5b35bae99f15e /hw/yagl/yagl_transport.h | |
parent | 00b7f2169caa54deb7f2e9d64908e7c6d2ff9d8e (diff) | |
download | qemu-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.h | 13 |
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; |