Re: [OpenOCD-devel] OpenOCD Aarch64 support

2016-09-08 Thread Matthias Welwarsky
On Wednesday 07 September 2016 21:13:43 you wrote: > sure > > if you require a more general discussion it might be best to cc > openocd-devel, since I see quite a few people are interested on 64bit > support. Some is just into details of the implementation, some is about broader topics, so I'll

Re: [OpenOCD-devel] OpenOCD Aarch64 support

2016-09-08 Thread David Ung
When I first started adding 64bit support, I created corresponding 64bit variants of read/write functions while still maintaining the old 32bit interfaces. It was done that way to minimise breakage to old 32bit targets. you can see some comments in http://openocd.zylin.com/#/c/2523/ Andreas F

Re: [OpenOCD-devel] OpenOCD Aarch64 support

2016-09-10 Thread Matthias Welwarsky
On Thursday 08 September 2016 21:08:07 you wrote: > I went ahead and reworked http://openocd.zylin.com/1200 and converted all my > code ontop of that. So that's a very brief history why it was done this > way. I, too, think that was the correct approach. > > Now the question of Aarch32 and Aarch

Re: [OpenOCD-devel] OpenOCD Aarch64 support

2016-09-11 Thread Andreas Färber
Am 08.09.2016 um 23:08 schrieb David Ung: > Andreas Fritiofson mentions there was already a patch in Gerrit that changes > the target addresses throughout OpenOCD to a 64-bit type. > http://openocd.zylin.com/1200 > > This patch was a much bigger change which affects all targets but arguably > w

Re: [OpenOCD-devel] OpenOCD Aarch64 support

2016-09-11 Thread Matthias Welwarsky
On Sunday 11 September 2016 14:55:39 Andreas Färber wrote: > Am 08.09.2016 um 23:08 schrieb David Ung: > > Andreas Fritiofson mentions there was already a patch in Gerrit that > > changes the target addresses throughout OpenOCD to a 64-bit type. > > http://openocd.zylin.com/1200 > > > > This patch

Re: [OpenOCD-devel] OpenOCD Aarch64 support

2016-09-11 Thread Matthias Welwarsky
On Saturday 10 September 2016 23:27:15 Duane Ellis wrote: > > Do you know if there's a method to read registers that is usable in > > AArch32 > > and -64 execution states? > > NO - the basic technique is the same Insert an opcode - and use the DCC to > transfer data, but the opcodes are totally di

Re: [OpenOCD-devel] OpenOCD Aarch64 support

2016-09-12 Thread Matthias Welwarsky
On Sunday 11 September 2016 21:47:09 Matthias Welwarsky wrote: > On Saturday 10 September 2016 23:27:15 Duane Ellis wrote: > > > Do you know if there's a method to read registers that is usable in > > > AArch32 > > > and -64 execution states? > > > > NO - the basic technique is the same Insert an

Re: [OpenOCD-devel] OpenOCD Aarch64 support

2016-09-12 Thread David Ung
stack and read variables. David From: Matthias Welwarsky Sent: Monday, September 12, 2016 12:39 AM To: Duane Ellis Cc: David Ung; openocd-devel@lists.sourceforge.net Subject: Re: [OpenOCD-devel] OpenOCD Aarch64 support On Sunday 11 September 2016 21:

Re: [OpenOCD-devel] OpenOCD Aarch64 support

2016-09-12 Thread Matthias Welwarsky
sky > Sent: Monday, September 12, 2016 12:39 AM > To: Duane Ellis > Cc: David Ung; openocd-devel@lists.sourceforge.net > Subject: Re: [OpenOCD-devel] OpenOCD Aarch64 support > > On Sunday 11 September 2016 21:47:09 Matthias Welwarsky wrote: > > On Saturday 10 September 2016 23:

Re: [OpenOCD-devel] OpenOCD Aarch64 support

2016-09-12 Thread Matthias Welwarsky
s > > Cc: David Ung; openocd-devel@lists.sourceforge.net > > Subject: Re: [OpenOCD-devel] OpenOCD Aarch64 support > > > > On Sunday 11 September 2016 21:47:09 Matthias Welwarsky wrote: > > > On Saturday 10 September 2016 23:27:15 Duane Ellis wrote: > > > >

Re: [OpenOCD-devel] OpenOCD Aarch64 support

2016-09-13 Thread Matthias Welwarsky
SCR.EL works. BR, Matthias > > BR, > Matthias > > > > David > > > > > > > > > From: Matthias Welwarsky > > > Sent: Monday, September 12, 2016 12:39 AM > > > To: Duane Ellis > > > Cc: David Ung; openocd-devel@lists.sourceforge.

Re: [OpenOCD-devel] OpenOCD Aarch64 support

2016-09-13 Thread Jiri Kastner
o get tx1 kernel to 'friendship' with openocd ;) i know it is not exactly what you wanted, but only speculations where to look for such code :) > > > > > David > > > > > > From: Matthias Welwarsky > &

Re: [OpenOCD-devel] OpenOCD AArch64 support

2016-09-13 Thread Andreas Färber
Am 13.09.2016 um 11:44 schrieb Jiri Kastner: > On Tue, Sep 13, 2016 at 07:30:38AM +0200, Matthias Welwarsky wrote: >> [...] can anyone share some code to switch a PE to Aarch32 mode? >> I'm on Rpi3, using a custom little program that does nothing but set up the >> GPIOs and then execute an endles

Re: [OpenOCD-devel] OpenOCD AArch64 support

2016-09-13 Thread Matthias Welwarsky
On Tuesday 13 September 2016 13:15:03 Andreas Färber wrote: > Am 13.09.2016 um 11:44 schrieb Jiri Kastner: > > On Tue, Sep 13, 2016 at 07:30:38AM +0200, Matthias Welwarsky wrote: > >> [...] can anyone share some code to switch a PE to Aarch32 mode? > >> I'm on Rpi3, using a custom little program th

Re: [OpenOCD-devel] OpenOCD AArch64 support

2016-09-13 Thread Andreas Färber
Am 13.09.2016 um 13:35 schrieb Matthias Welwarsky: > On Tuesday 13 September 2016 13:15:03 Andreas Färber wrote: >> Am 13.09.2016 um 11:44 schrieb Jiri Kastner: >>> hikey: >>> during boot, switches from aarch32 to aarch64. not sure, if it is part of >>> non-free bootloader (signed??) or hikey edk

Re: [OpenOCD-devel] OpenOCD AArch64 support

2016-09-13 Thread Jiri Kastner
On Tue, Sep 13, 2016 at 01:15:03PM +0200, Andreas Färber wrote: > Am 13.09.2016 um 11:44 schrieb Jiri Kastner: > > On Tue, Sep 13, 2016 at 07:30:38AM +0200, Matthias Welwarsky wrote: > >> [...] can anyone share some code to switch a PE to Aarch32 mode? > >> I'm on Rpi3, using a custom little progr

Re: [OpenOCD-devel] OpenOCD AArch64 support

2016-09-13 Thread Andreas Färber
Am 13.09.2016 um 15:53 schrieb Jiri Kastner: > On Tue, Sep 13, 2016 at 01:15:03PM +0200, Andreas Färber wrote: >> Am 13.09.2016 um 11:44 schrieb Jiri Kastner: >>> jetson tx1: >>> userspace part of linux4tegra for jetson tx1 releases are both, armv7hl >>> and aarch64, while kernel is compiled for

Re: [OpenOCD-devel] OpenOCD AArch64 support

2016-09-13 Thread David Ung
t: Re: [OpenOCD-devel] OpenOCD AArch64 support Am 13.09.2016 um 15:53 schrieb Jiri Kastner: > On Tue, Sep 13, 2016 at 01:15:03PM +0200, Andreas Färber wrote: >> Am 13.09.2016 um 11:44 schrieb Jiri Kastner: >>> jetson tx1: >>> userspace part of linux4tegra for jetso

Re: [OpenOCD-devel] OpenOCD AArch64 support

2016-09-13 Thread Matthias Welwarsky
ember 13, 2016 7:31 AM > To: Jiri Kastner > Cc: Duane Ellis; Alexander Graf; openocd-devel > Subject: Re: [OpenOCD-devel] OpenOCD AArch64 support > > Am 13.09.2016 um 15:53 schrieb Jiri Kastner: > > On Tue, Sep 13, 2016 at 01:15:03PM +0200, Andreas Färber wrote: > >>

Re: [OpenOCD-devel] OpenOCD AArch64 support

2016-09-14 Thread Matthias Welwarsky
On Tuesday 13 September 2016 22:23:11 Matthias Welwarsky wrote: > On Tuesday 13 September 2016 20:08:46 David Ung wrote: > > FWIW, on linux as long as CONFIG_COMPAT is enabled, you can run both > > AArch64/32 userspace programs. But the mode switching is done at an > > exception level, so you can'

Re: [OpenOCD-devel] OpenOCD AArch64 support

2016-09-14 Thread Duane Ellis
>> What might (should?) work in my particular case is, since I'm starting from >> EL2: >> >> - Modify SPSR_EL2, setting bit 4 = 1 and bits 3:0 to some valid aarch32 mode >> (0x3 - svc mode) >> - set ELR_EL2 to a memory location with valid ARM code >> - "ERET" > > OK it "somewhat" worked. I get t

Re: [OpenOCD-devel] OpenOCD AArch64 support

2016-09-14 Thread Matthias Welwarsky
On Wednesday 14 September 2016 08:12:01 Duane Ellis wrote: > >> What might (should?) work in my particular case is, since I'm starting > >> from > >> EL2: > >> > >> - Modify SPSR_EL2, setting bit 4 = 1 and bits 3:0 to some valid aarch32 > >> mode (0x3 - svc mode) > >> - set ELR_EL2 to a memory loc

Re: [OpenOCD-devel] OpenOCD AArch64 support

2016-09-15 Thread Matthias Welwarsky
For your general amusement, here's the current work-in-progress: https://github.com/sysgo-maw/openocd-aarch64 On Wednesday 14 September 2016 21:09:31 Matthias Welwarsky wrote: > On Wednesday 14 September 2016 08:12:01 Duane Ellis wrote: > > >> What might (should?) work in my particular case is, s

Re: [OpenOCD-devel] OpenOCD Aarch64 support

2016-10-25 Thread Matthias Welwarsky
On Thursday 08 September 2016 11:14:50 Matthias Welwarsky wrote: > Let me fill you in on my current state: So, the current current state can be found here: http://openocd.zylin.com/3832 (checkout to get the full branch) It's actually quite usable, but not yet fully functional. What I know to

Re: [OpenOCD-devel] OpenOCD Aarch64 support

2016-10-25 Thread Matthias Welwarsky
On Thursday 08 September 2016 11:14:50 Matthias Welwarsky wrote: > Let me fill you in on my current state: So, the current current state can be found here: http://openocd.zylin.com/3832 (checkout to get the full branch) It's actually quite usable, but not yet fully functional. What I know to