xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] fix LDRB Thumb2 decoding
@ 2016-12-13 19:08 Stefano Stabellini
  2016-12-13 19:15 ` Julien Grall
  0 siblings, 1 reply; 2+ messages in thread
From: Stefano Stabellini @ 2016-12-13 19:08 UTC (permalink / raw)
  To: xen-devel; +Cc: julien.grall, sstabellini

Rt is four bit at offset 12, not three. See see encoding T2 for LDRB
A8.8.70 in ARM DDI 0406C.c

Suggested-by: Julien Grall <julien.grall@arm.com>
Signed-off-by: Stefano Stabellini <sstabellini@kernel.org>

diff --git a/xen/arch/arm/decode.c b/xen/arch/arm/decode.c
index c6f49a5..514b7a2 100644
--- a/xen/arch/arm/decode.c
+++ b/xen/arch/arm/decode.c
@@ -41,7 +41,7 @@ static int decode_thumb2(register_t pc, struct hsr_dabt *dabt, uint16_t hw1)
     if ( raw_copy_from_guest(&hw2, (void *__user)(pc + 2), sizeof (hw2)) )
         return -EFAULT;
 
-    rt = (hw2 >> 12) & 0x7;
+    rt = (hw2 >> 12) & 0xf;
 
     switch ( (hw1 >> 9) & 0xf )
     {

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-12-13 19:15 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-12-13 19:08 [PATCH] fix LDRB Thumb2 decoding Stefano Stabellini
2016-12-13 19:15 ` Julien Grall

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).