From: Ard Biesheuvel <ard.biesheuvel@linaro.org>
To: Alexei Fedorov <Alexei.Fedorov@arm.com>
Cc: Leif Lindholm <leif.lindholm@linaro.org>,
"edk2-devel@lists.01.org" <edk2-devel@lists.01.org>,
"liming.gao@intel.com" <liming.gao@intel.com>,
"yonghong.zhu@intel.com" <yonghong.zhu@intel.com>,
Evan Lloyd <Evan.Lloyd@arm.com>
Subject: Re: [PATCH 2/2] BaseTools/tools_def AARCH64: avoid SIMD register in XIP code
Date: Thu, 13 Jul 2017 18:00:43 +0100 [thread overview]
Message-ID: <CAKv+Gu8qN+SWnZPLB7N7nsEjKY9f576c0BkNnoSJR7E04ytuZQ@mail.gmail.com> (raw)
In-Reply-To: <HE1PR0802MB2299B668C33778EC20CE6DDA9AAC0@HE1PR0802MB2299.eurprd08.prod.outlook.com>
On 13 July 2017 at 17:56, Alexei Fedorov <Alexei.Fedorov@arm.com> wrote:
> I'm getting
>
>
> UEFI firmware (version built at 16:34:57 on Jul 13 2017)
> Synchronous Exception at 0x00000000F5451338
> :
>
> EL2:0x00000000F5451338 : LDR q0,[x9,x0]
> EL2:0x00000000F545133C : ADD x1,x1,#1
> EL2:0x00000000F5451340 : CMP x7,x1
> EL2:0x00000000F5451344 : STR q0,[x2,x0]
> EL2:0x00000000F5451348 : ADD x0,x0,#0x10
> EL2:0x00000000F545134C : B.HI {pc}-0x14 ; 0xf5451338
> ...
>
> with X0=0 & X9 = 0x000000000BFD0008 (Flash memory) in AlignedCopyMem()
> function
>
> (edk2\ArmPlatformPkg\Drivers\NorFlashDxe\NorFlashDxe.c):
>
>
> // r:\edk2\ArmPlatformPkg\Drivers\NorFlashDxe\NorFlashDxe.c:784:
> *Destination64++ = *Source64++;
> .loc 10 784 0
> ldr q0, [x9, x0] // MEM[base: vectp.229_593, index:
> ivtmp.349_1117, offset: 0B], MEM[base: vectp.229_593, index: ivtmp.349_1117,
> offset: 0B]
> add x1, x1, 1 // ivtmp_603, ivtmp_603,
> cmp x7, x1 // bnd.223, ivtmp_603
> str q0, [x2, x0] // MEM[base: vectp.229_593, index:
> ivtmp.349_1117, offset: 0B], MEM[base: vectp_Buffer.232_598, index:
> ivtmp.349_1117, offset: 0B]
> add x0, x0, 16 // ivtmp.349, ivtmp.349,
> bhi .L200 //,
>
>
> Despite compiler option -mgeneral-regs-only:
>
> // -mfix-cortex-a53-835769 -mfix-cortex-a53-843419 -mgeneral-regs-only
> // -mlittle-endian -mpc-relative-literal-loads -mstrict-align
> (see attached assembly generated file)
>
That is the same compiler bug at work, I think. So we need to add
-mgeneral-regs-only for this module as well.
Perhaps we should simply set it globally? Leif?
next prev parent reply other threads:[~2017-07-13 16:58 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-13 12:48 [PATCH 1/2] BaseTools/tools_def AARCH64: mark register x18 as reserved Ard Biesheuvel
2017-07-13 12:48 ` [PATCH 2/2] BaseTools/tools_def AARCH64: avoid SIMD register in XIP code Ard Biesheuvel
2017-07-13 14:11 ` Leif Lindholm
2017-07-13 16:15 ` Alexei Fedorov
2017-07-13 16:17 ` Ard Biesheuvel
[not found] ` <HE1PR0802MB2299B668C33778EC20CE6DDA9AAC0@HE1PR0802MB2299.eurprd08.prod.outlook.com>
2017-07-13 17:00 ` Ard Biesheuvel [this message]
2017-07-13 17:06 ` Alexei Fedorov
2017-07-13 17:31 ` Leif Lindholm
2017-07-13 20:09 ` Laszlo Ersek
2017-07-13 14:11 ` [PATCH 1/2] BaseTools/tools_def AARCH64: mark register x18 as reserved Leif Lindholm
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAKv+Gu8qN+SWnZPLB7N7nsEjKY9f576c0BkNnoSJR7E04ytuZQ@mail.gmail.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox