On 8 January 2016 at 08:33, Gao, Liming <[email protected]> wrote:
> Ard:
>   OK. If only for AARCH64, how about add the specific Build Rule for it?
>
> +[C-Code-File.BASE,C-Code-File.SEC,C-Code-File.PEI_CORE,C-Code-File.PEIM]
> ==>
> +[C-Code-File.BASE.AARCH64,C-Code-File.SEC.AARCH64,C-Code-File.PEI_CORE.AARCH64,C-Code-File.PEIM.AARCH64]
>

Yes, that is also fine.

> -----Original Message-----
> From: Ard Biesheuvel [mailto:[email protected]]
> Sent: Friday, January 08, 2016 3:14 PM
> To: Gao, Liming
> Cc: [email protected]; [email protected]; [email protected]; Zhu, 
> Yonghong
> Subject: Re: [edk2] [PATCH 0/2] BaseTools AARCH64: build XIP modules with 
> strict alignment
>
> On 8 January 2016 at 07:13, Gao, Liming <[email protected]> wrote:
>> Ard:
>>   Could we add this option in AARCH64_CC_FLAGS if it has no impact to DXE 
>> driver? If yes, you only need to change tools_def.template, no change is 
>> required to build_rule.template.
>>
>
> It does have impact. It results in a 2% increase in the compressed footprint 
> of the firmware image. That is exactly why I needed to make these changes as 
> I did.
>
> Thanks,
> Ard.
>
>
>> -----Original Message-----
>> From: edk2-devel [mailto:[email protected]] On Behalf Of
>> Ard Biesheuvel
>> Sent: Monday, January 04, 2016 5:53 PM
>> To: [email protected]; Gao, Liming; [email protected];
>> [email protected]; Zhu, Yonghong
>> Cc: Ard Biesheuvel
>> Subject: [edk2] [PATCH 0/2] BaseTools AARCH64: build XIP modules with
>> strict alignment
>>
>> On AARCH64, before we turn on the MMU, unaligned accesses are not allowed.
>> Since the idiom recognition employed by GCC may turn allowable sequences 
>> into sequences that result in such unaligned accesses (i.e., a sequence of 
>> byte wide loads in reverse order may be turned into a wider load and a rev 
>> instruction of the compiler thinks unaligned accesses are allowed), we have 
>> to make sure that any code that may execute before the MMU is enabled is 
>> built with -mstrict-align.
>>
>> Since this aligns with the notion of XIP we have in EDK2, let's add a build 
>> rule that allows XIP specific CC option overrides to be set, and use it to 
>> set the -mstrict-align CC flag for BASE, SEC, PEI_CORE and PEIM modules.
>>
>> (XIPFLAGS has been suggest by Andrew Fish a couple of months ago, when
>> a similar issue came up)
>>
>> Ard Biesheuvel (2):
>>   BaseTools: add separate build rule for modules that may execute in
>>     place
>>   BaseTools AARCH64: build XIP modules with strict alignment
>>
>>  BaseTools/Conf/build_rule.template | 26 ++++++++++++++++++++
>> BaseTools/Conf/tools_def.template  |  9 ++++++-
>>  2 files changed, 34 insertions(+), 1 deletion(-)
>>
>> --
>> 2.5.0
>>
>> _______________________________________________
>> edk2-devel mailing list
>> [email protected]
>> https://lists.01.org/mailman/listinfo/edk2-devel
_______________________________________________
edk2-devel mailing list
[email protected]
https://lists.01.org/mailman/listinfo/edk2-devel

Reply via email to