From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christoffer Dall Date: Tue, 30 Jul 2013 07:31:41 -0700 Subject: [U-Boot] [PATCH v3 6/7] ARM: extend non-secure switch to also go into HYP mode In-Reply-To: <51F7AAA1.3030409@linaro.org> References: <1373414059-22779-1-git-send-email-andre.przywara@linaro.org> <1373414059-22779-7-git-send-email-andre.przywara@linaro.org> <20130729220246.GD26768@cbox> <51F7AAA1.3030409@linaro.org> Message-ID: <20130730143141.GC6722@cbox> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Tue, Jul 30, 2013 at 01:59:29PM +0200, Andre Przywara wrote: > On 07/30/2013 12:02 AM, Christoffer Dall wrote: > >On Wed, Jul 10, 2013 at 01:54:18AM +0200, Andre Przywara wrote: [...] > >> > >>+_hyp_trap: > >>+ mrs lr, elr_hyp @ for older asm: .byte 0x00, 0xe3, 0x0e, 0xe1 > > > >this comment just confuses: either make it intelligent to support an > >older compiler or just get rid of these byte encodings. You can always > >disassemble the file and lookup the byte code with a modern compiler to > >get back to the byte encoding. > > Well, I used a Debian 6 cross compiler before, which didn't support > these instructions. After your remark I updated the system to Debian > 7, but found it not appropriate to ask any user to do the same just > to use a fixed, non-parametrized assembly instruction. I have the > feeling that there are quite some users out there who cannot and > don't want to easily update their compiler. > So I decided to leave the workaround in the comment to give a hint > to a quick fix. ok, so if Debian's built-in cross compilers are indeed that old and we want to support those (that's ok with me), then let's fix it properly. > > By "making it intelligent" you mean a macro which does some version > checking and inserts the .byte sequence if needed? Are there any > archetypes of such code? > Yes, see arch/arm/include/asm/opcodes-*.h -Christoffer