From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34091) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c2cFn-0003tg-8p for qemu-devel@nongnu.org; Fri, 04 Nov 2016 07:01:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c2cFh-0000Ea-ON for qemu-devel@nongnu.org; Fri, 04 Nov 2016 07:01:47 -0400 Received: from mail-wm0-x231.google.com ([2a00:1450:400c:c09::231]:34185) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1c2cFh-0000Dx-HG for qemu-devel@nongnu.org; Fri, 04 Nov 2016 07:01:41 -0400 Received: by mail-wm0-x231.google.com with SMTP id u144so10326476wmu.1 for ; Fri, 04 Nov 2016 04:01:41 -0700 (PDT) Sender: Paolo Bonzini References: <1478194258-75276-1-git-send-email-julian@codesourcery.com> <1478194258-75276-2-git-send-email-julian@codesourcery.com> <20161103233419.26f4b7c7@squid.athome> <20161104102516.301c8bbe@squid.athome> From: Paolo Bonzini Message-ID: <0cb70293-1e95-03fc-b7a9-1fac2371d8d1@redhat.com> Date: Fri, 4 Nov 2016 12:01:37 +0100 MIME-Version: 1.0 In-Reply-To: <20161104102516.301c8bbe@squid.athome> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit Subject: Re: [Qemu-devel] [PATCH 1/5] ARM BE8/BE32 semihosting and gdbstub support. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Julian Brown Cc: Peter Maydell , QEMU Developers On 04/11/2016 11:25, Julian Brown wrote: > > The change to arm_cpu_memory_rw_debug for BE32 is also interesting. > > gdb documentation says > > > > The stub need not use any particular size or alignment when > > gathering data from memory for the response; even if ADDR is > > word-aligned and LENGTH is a multiple of the word size, the stub > > is free to use byte accesses, or not. > > > > while your change means that gdb actually wants you to do byte > > accesses. > > The splitting-into-bytes is just an implementation convenience -- the > simplest way I could see of handling the low-order address bit reversal > without breaking abstractions more or shuffling lots of code around. > I'm not sure if GDB was actually requesting sub-word access sizes. Right, the question is what GDB actually wants. I don't really understand how BE32 is compatible with "the stub need not use any particular size or alignment", unless GDB takes care of tweaking the address on its end (and possibly taking care of always reading full words when len>4?!?). Also, it would not depend on SCTLR.B, but rather on the CFGEND property and on CFGEND being tied to SCTLR.B. Thanks, Paolo