From: Alexei Fedorov <Alexei.Fedorov@arm.com>
To: Ard Biesheuvel <ard.biesheuvel@linaro.org>
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 17:06:43 +0000 [thread overview]
Message-ID: <HE1PR0802MB22990E33D6F2E6AA3A88B8E39AAC0@HE1PR0802MB2299.eurprd08.prod.outlook.com> (raw)
In-Reply-To: <CAKv+Gu8qN+SWnZPLB7N7nsEjKY9f576c0BkNnoSJR7E04ytuZQ@mail.gmail.com>
-mgeneral-regs-only is already there:
See the top of generated .S file:
.arch armv8-a
.file "<artificial>"
// GNU GIMPLE (Linaro GCC 7.1-2017.05) version 7.1.1 20170510 (aarch64-elf)
// compiled by GNU C version 4.8.2, GMP version 6.1.2, MPFR version 3.1.5, MPC version 1.0.3, isl version none
// GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
// options passed: -mlittle-endian -mcmodel=tiny -march=armv8-a -mabi=lp64
// -mstrict-align -mgeneral-regs-only -mlittle-endian -mcmodel=tiny
// -march=armv8-a -mabi=lp64
// -auxbase-strip ArmVeNorFlashDxe.dll.ltrans0.ltrans.o -g -g -O3 -O3 -Os
// -Os -O3 -Wno-lto-type-mismatch -Wno-array-bounds
________________________________
From: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Sent: 13 July 2017 18:00:43
To: Alexei Fedorov
Cc: Leif Lindholm; edk2-devel@lists.01.org; liming.gao@intel.com; yonghong.zhu@intel.com; Evan Lloyd
Subject: Re: [PATCH 2/2] BaseTools/tools_def AARCH64: avoid SIMD register in XIP code
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?
IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.
next prev parent reply other threads:[~2017-07-13 17:05 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
2017-07-13 17:06 ` Alexei Fedorov [this message]
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=HE1PR0802MB22990E33D6F2E6AA3A88B8E39AAC0@HE1PR0802MB2299.eurprd08.prod.outlook.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