Re: [edk2] [PATCH 0/4] Add ARM64 support for VS2017

2018-03-19 Thread Gao, Liming
Pete:
  I push your patches into edk2 trunk. Please check them. 

>-Original Message-
>From: Pete Batard [mailto:p...@akeo.ie]
>Sent: Saturday, March 17, 2018 12:36 AM
>To: Gao, Liming <liming@intel.com>; edk2-devel@lists.01.org
>Cc: Ard Biesheuvel <ard.biesheu...@linaro.org>
>Subject: Re: [edk2] [PATCH 0/4] Add ARM64 support for VS2017
>
>Thanks Liming, much appreciated!
>
>I'll send the comment harmonization patch as soon as I see the
>VS2017/ARM64 changes in edk2 mainline.
>
>Regards,
>
>/Pete
>
>On 2018.03.16 16:31, Gao, Liming wrote:
>> Yes. This is a minor issue. So, I think the effort is small. If it is a big 
>> task to you,
>you can separate it into another patch.
>>
>> And, I don't expect this minor issue break your patches. I give my Reviewed-
>by: Liming Gao <liming@intel.com>
>>
>> Thanks
>> Liming
>>> -Original Message-
>>> From: Pete Batard [mailto:p...@akeo.ie]
>>> Sent: Saturday, March 17, 2018 12:12 AM
>>> To: edk2-devel@lists.01.org; Gao, Liming <liming@intel.com>
>>> Cc: Ard Biesheuvel <ard.biesheu...@linaro.org>
>>> Subject: Re: [edk2] [PATCH 0/4] Add ARM64 support for VS2017
>>>
>>> I understand where you're coming from, but that means I have to recreate
>>> this patch set, and then create a new patch for the .S (because it makes
>>> zero sense to require the same comment style on the .asm and not
>request
>>> a follow through for the .S).
>>>
>>> My time being limited, I'd rather only have to produce one new patch,
>>> that will harmonize the comments for both .S and .asm at the same time.
>>>
>>> The end result will be exactly the same, so I'm going to have to insist
>>> that we split the comment harmonization (which is a very minor issue and
>>> should hardly be seen as a showstopper for the patch series in the first
>>> place) into a subsequent patch.
>>>
>>> Thank you,
>>>
>>> /Pete
>>>
>>> On 2018.03.16 15:56, Gao, Liming wrote:
>>>> Pete:
>>>> I understand the existing .S file has the inconsistent comment style. I
>also know new added ASM files are converted from .S files.
>>> But, my comment is for this patch that adds new ASM files. I expect new
>added ASM files have the same style. If you check ARM arch
>>> ASM files, you will find they all have the same style.
>>>>
>>>> Thanks
>>>> Liming
>>>>> -Original Message-
>>>>> From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf
>Of Pete Batard
>>>>> Sent: Friday, March 16, 2018 7:04 PM
>>>>> To: edk2-devel@lists.01.org
>>>>> Cc: Gao, Liming <liming@intel.com>; Ard Biesheuvel
><ard.biesheu...@linaro.org>
>>>>> Subject: Re: [edk2] [PATCH 0/4] Add ARM64 support for VS2017
>>>>>
>>>>> On 2018.03.16 08:24, Gao, Liming wrote:
>>>>>> Pete:
>>>>>>   .S for GCC assembly, .asm for MSFT assembly. They can have the
>different comment style.
>>>>>
>>>>> Yes, but as I explained, the actual original issue is that our current
>>>>> .S files do *not* have the same comment styles in the first place.
>>>>>
>>>>> If you look at MdePkg/Library/BaseLib/AArch64/SwitchStack.S, you'll
>see
>>>>> that is uses '//' for comments, whereas other .S files, such as
>>>>> MdePkg/Library/BaseLib/AArch64/SetJumpLongJump.S, use '#'.
>>>>>
>>>>> So that is our actual issue here: Regardless of VS2017, the GCC assembly
>>>>> files for AARCH64 we currently have do not use the same comment style.
>>>>>
>>>>> Thus, the only reason why the .asm don't have the same comment style
>in
>>>>> our proposal is because the .S, which we derived the .asm from, don't.
>>>>> This means that either we should fix the .S too, or we shouldn't fix
>>>>> anything at all.
>>>>>
>>>>>>  Here, my comment is to make sure .asm files have the same
>comment style. I don't request to change .S file.
>>>>>
>>>>> And what I am saying is that it makes little sense to harmonize the
>>>>> comment style for the .asm files, if we're not going to do the same for
>>>>> the .S files as well. It just doesn't seem fair in my book to have the
>>>>> VS2017 assembly files held to a higher standard than t

Re: [edk2] [PATCH 0/4] Add ARM64 support for VS2017

2018-03-16 Thread Pete Batard

Thanks Liming, much appreciated!

I'll send the comment harmonization patch as soon as I see the 
VS2017/ARM64 changes in edk2 mainline.


Regards,

/Pete

On 2018.03.16 16:31, Gao, Liming wrote:

Yes. This is a minor issue. So, I think the effort is small. If it is a big 
task to you, you can separate it into another patch.

And, I don't expect this minor issue break your patches. I give my Reviewed-by: 
Liming Gao <liming@intel.com>

Thanks
Liming

-Original Message-
From: Pete Batard [mailto:p...@akeo.ie]
Sent: Saturday, March 17, 2018 12:12 AM
To: edk2-devel@lists.01.org; Gao, Liming <liming@intel.com>
Cc: Ard Biesheuvel <ard.biesheu...@linaro.org>
Subject: Re: [edk2] [PATCH 0/4] Add ARM64 support for VS2017

I understand where you're coming from, but that means I have to recreate
this patch set, and then create a new patch for the .S (because it makes
zero sense to require the same comment style on the .asm and not request
a follow through for the .S).

My time being limited, I'd rather only have to produce one new patch,
that will harmonize the comments for both .S and .asm at the same time.

The end result will be exactly the same, so I'm going to have to insist
that we split the comment harmonization (which is a very minor issue and
should hardly be seen as a showstopper for the patch series in the first
place) into a subsequent patch.

Thank you,

/Pete

On 2018.03.16 15:56, Gao, Liming wrote:

Pete:
I understand the existing .S file has the inconsistent comment style. I 
also know new added ASM files are converted from .S files.

But, my comment is for this patch that adds new ASM files. I expect new added 
ASM files have the same style. If you check ARM arch
ASM files, you will find they all have the same style.


Thanks
Liming

-Original Message-
From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of Pete 
Batard
Sent: Friday, March 16, 2018 7:04 PM
To: edk2-devel@lists.01.org
Cc: Gao, Liming <liming@intel.com>; Ard Biesheuvel 
<ard.biesheu...@linaro.org>
Subject: Re: [edk2] [PATCH 0/4] Add ARM64 support for VS2017

On 2018.03.16 08:24, Gao, Liming wrote:

Pete:
  .S for GCC assembly, .asm for MSFT assembly. They can have the different 
comment style.


Yes, but as I explained, the actual original issue is that our current
.S files do *not* have the same comment styles in the first place.

If you look at MdePkg/Library/BaseLib/AArch64/SwitchStack.S, you'll see
that is uses '//' for comments, whereas other .S files, such as
MdePkg/Library/BaseLib/AArch64/SetJumpLongJump.S, use '#'.

So that is our actual issue here: Regardless of VS2017, the GCC assembly
files for AARCH64 we currently have do not use the same comment style.

Thus, the only reason why the .asm don't have the same comment style in
our proposal is because the .S, which we derived the .asm from, don't.
This means that either we should fix the .S too, or we shouldn't fix
anything at all.


 Here, my comment is to make sure .asm files have the same comment style. I 
don't request to change .S file.


And what I am saying is that it makes little sense to harmonize the
comment style for the .asm files, if we're not going to do the same for
the .S files as well. It just doesn't seem fair in my book to have the
VS2017 assembly files held to a higher standard than the GCC ones. So
either we need to fix both, or we fix none at all.

But as I indicated in my last e-mail, I am planning to send an
additional patch that does comment harmonization, for both .S and .asm,
*after* this VS2017 series has been applied to mainline. So the change
you request will happen. Just not as part of this patch series.

And the reason I have insist on splitting these changes is because, if
we have to alter the .S files to be consistent, then this comment
harmonization request should logically be handled separately from the
VS2017 effort.

Please let me know if you still think having a future separate patch,
that will do .S and .asm comment harmonization, does not make sense.

Regards,

/Pete




-Original Message-
From: Pete Batard [mailto:p...@akeo.ie]
Sent: Thursday, March 15, 2018 5:28 PM
To: Gao, Liming <liming@intel.com>; edk2-devel@lists.01.org
Cc: ard.biesheu...@linaro.org
Subject: Re: [PATCH 0/4] Add ARM64 support for VS2017

Hi Liming,

Thanks for reviewing the patches.

On 2018.03.15 06:15, Gao, Liming wrote:

Pete:
  For new added ASM file in BaseLib, could you use the same comment style
for them? ASM use ; for the comment. Most of new files uses ; as the
comment, but switchstack is not.


This is because SwitchStack.asm is simply SwitchStack.S, with the GCC
assembler specifics removed, and MSVC assembler specifics added.

I did not change the comment style from the original files, so the real
issue here is that our GCC assembly files for AARCH64 do not use the
same comment style.

I'm fine with trying to harmonize the comment styles, but seei

Re: [edk2] [PATCH 0/4] Add ARM64 support for VS2017

2018-03-16 Thread Pete Batard
I understand where you're coming from, but that means I have to recreate 
this patch set, and then create a new patch for the .S (because it makes 
zero sense to require the same comment style on the .asm and not request 
a follow through for the .S).


My time being limited, I'd rather only have to produce one new patch, 
that will harmonize the comments for both .S and .asm at the same time.


The end result will be exactly the same, so I'm going to have to insist 
that we split the comment harmonization (which is a very minor issue and 
should hardly be seen as a showstopper for the patch series in the first 
place) into a subsequent patch.


Thank you,

/Pete

On 2018.03.16 15:56, Gao, Liming wrote:

Pete:
   I understand the existing .S file has the inconsistent comment style. I also 
know new added ASM files are converted from .S files. But, my comment is for 
this patch that adds new ASM files. I expect new added ASM files have the same 
style. If you check ARM arch ASM files, you will find they all have the same 
style.

Thanks
Liming

-Original Message-
From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of Pete 
Batard
Sent: Friday, March 16, 2018 7:04 PM
To: edk2-devel@lists.01.org
Cc: Gao, Liming <liming@intel.com>; Ard Biesheuvel 
<ard.biesheu...@linaro.org>
Subject: Re: [edk2] [PATCH 0/4] Add ARM64 support for VS2017

On 2018.03.16 08:24, Gao, Liming wrote:

Pete:
 .S for GCC assembly, .asm for MSFT assembly. They can have the different 
comment style.


Yes, but as I explained, the actual original issue is that our current
.S files do *not* have the same comment styles in the first place.

If you look at MdePkg/Library/BaseLib/AArch64/SwitchStack.S, you'll see
that is uses '//' for comments, whereas other .S files, such as
MdePkg/Library/BaseLib/AArch64/SetJumpLongJump.S, use '#'.

So that is our actual issue here: Regardless of VS2017, the GCC assembly
files for AARCH64 we currently have do not use the same comment style.

Thus, the only reason why the .asm don't have the same comment style in
our proposal is because the .S, which we derived the .asm from, don't.
This means that either we should fix the .S too, or we shouldn't fix
anything at all.


Here, my comment is to make sure .asm files have the same comment style. I 
don't request to change .S file.


And what I am saying is that it makes little sense to harmonize the
comment style for the .asm files, if we're not going to do the same for
the .S files as well. It just doesn't seem fair in my book to have the
VS2017 assembly files held to a higher standard than the GCC ones. So
either we need to fix both, or we fix none at all.

But as I indicated in my last e-mail, I am planning to send an
additional patch that does comment harmonization, for both .S and .asm,
*after* this VS2017 series has been applied to mainline. So the change
you request will happen. Just not as part of this patch series.

And the reason I have insist on splitting these changes is because, if
we have to alter the .S files to be consistent, then this comment
harmonization request should logically be handled separately from the
VS2017 effort.

Please let me know if you still think having a future separate patch,
that will do .S and .asm comment harmonization, does not make sense.

Regards,

/Pete




-Original Message-
From: Pete Batard [mailto:p...@akeo.ie]
Sent: Thursday, March 15, 2018 5:28 PM
To: Gao, Liming <liming@intel.com>; edk2-devel@lists.01.org
Cc: ard.biesheu...@linaro.org
Subject: Re: [PATCH 0/4] Add ARM64 support for VS2017

Hi Liming,

Thanks for reviewing the patches.

On 2018.03.15 06:15, Gao, Liming wrote:

Pete:
 For new added ASM file in BaseLib, could you use the same comment style
for them? ASM use ; for the comment. Most of new files uses ; as the
comment, but switchstack is not.


This is because SwitchStack.asm is simply SwitchStack.S, with the GCC
assembler specifics removed, and MSVC assembler specifics added.

I did not change the comment style from the original files, so the real
issue here is that our GCC assembly files for AARCH64 do not use the
same comment style.

I'm fine with trying to harmonize the comment styles, but seeing as this
needs to be done for both the .S and .asm, I'd rather send a patch to do
that *after* these VS2017 changes have been applied, as I don't consider
this correction to in scope of this patch series (because logically, the
introduction of VS2017 should not alter any of the .S files, unless we
reuse them, which we don't).

If you agree to apply this series, I'll make sure to send a non
VS2017-specific additional patch, that does what you request for both
the .S and .asm.


Besides, compared to Arm arch assembly
file, I don't find CpuPause.asm. Is it required?


That file doesn't exist for GCC (as you will see there is no
MdePkg/Library/BaseLib/AArch64/CpuPause.S), so we don't have one for
VS2017 either

Re: [edk2] [PATCH 0/4] Add ARM64 support for VS2017

2018-03-16 Thread Gao, Liming
Pete:
  I understand the existing .S file has the inconsistent comment style. I also 
know new added ASM files are converted from .S files. But, my comment is for 
this patch that adds new ASM files. I expect new added ASM files have the same 
style. If you check ARM arch ASM files, you will find they all have the same 
style. 

Thanks
Liming
> -Original Message-
> From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of Pete 
> Batard
> Sent: Friday, March 16, 2018 7:04 PM
> To: edk2-devel@lists.01.org
> Cc: Gao, Liming <liming@intel.com>; Ard Biesheuvel 
> <ard.biesheu...@linaro.org>
> Subject: Re: [edk2] [PATCH 0/4] Add ARM64 support for VS2017
> 
> On 2018.03.16 08:24, Gao, Liming wrote:
> > Pete:
> > .S for GCC assembly, .asm for MSFT assembly. They can have the 
> > different comment style.
> 
> Yes, but as I explained, the actual original issue is that our current
> .S files do *not* have the same comment styles in the first place.
> 
> If you look at MdePkg/Library/BaseLib/AArch64/SwitchStack.S, you'll see
> that is uses '//' for comments, whereas other .S files, such as
> MdePkg/Library/BaseLib/AArch64/SetJumpLongJump.S, use '#'.
> 
> So that is our actual issue here: Regardless of VS2017, the GCC assembly
> files for AARCH64 we currently have do not use the same comment style.
> 
> Thus, the only reason why the .asm don't have the same comment style in
> our proposal is because the .S, which we derived the .asm from, don't.
> This means that either we should fix the .S too, or we shouldn't fix
> anything at all.
> 
> >Here, my comment is to make sure .asm files have the same comment style. 
> > I don't request to change .S file.
> 
> And what I am saying is that it makes little sense to harmonize the
> comment style for the .asm files, if we're not going to do the same for
> the .S files as well. It just doesn't seem fair in my book to have the
> VS2017 assembly files held to a higher standard than the GCC ones. So
> either we need to fix both, or we fix none at all.
> 
> But as I indicated in my last e-mail, I am planning to send an
> additional patch that does comment harmonization, for both .S and .asm,
> *after* this VS2017 series has been applied to mainline. So the change
> you request will happen. Just not as part of this patch series.
> 
> And the reason I have insist on splitting these changes is because, if
> we have to alter the .S files to be consistent, then this comment
> harmonization request should logically be handled separately from the
> VS2017 effort.
> 
> Please let me know if you still think having a future separate patch,
> that will do .S and .asm comment harmonization, does not make sense.
> 
> Regards,
> 
> /Pete
> 
> >
> >> -Original Message-
> >> From: Pete Batard [mailto:p...@akeo.ie]
> >> Sent: Thursday, March 15, 2018 5:28 PM
> >> To: Gao, Liming <liming@intel.com>; edk2-devel@lists.01.org
> >> Cc: ard.biesheu...@linaro.org
> >> Subject: Re: [PATCH 0/4] Add ARM64 support for VS2017
> >>
> >> Hi Liming,
> >>
> >> Thanks for reviewing the patches.
> >>
> >> On 2018.03.15 06:15, Gao, Liming wrote:
> >>> Pete:
> >>> For new added ASM file in BaseLib, could you use the same comment 
> >>> style
> >>> for them? ASM use ; for the comment. Most of new files uses ; as the
> >>> comment, but switchstack is not.
> >>
> >> This is because SwitchStack.asm is simply SwitchStack.S, with the GCC
> >> assembler specifics removed, and MSVC assembler specifics added.
> >>
> >> I did not change the comment style from the original files, so the real
> >> issue here is that our GCC assembly files for AARCH64 do not use the
> >> same comment style.
> >>
> >> I'm fine with trying to harmonize the comment styles, but seeing as this
> >> needs to be done for both the .S and .asm, I'd rather send a patch to do
> >> that *after* these VS2017 changes have been applied, as I don't consider
> >> this correction to in scope of this patch series (because logically, the
> >> introduction of VS2017 should not alter any of the .S files, unless we
> >> reuse them, which we don't).
> >>
> >> If you agree to apply this series, I'll make sure to send a non
> >> VS2017-specific additional patch, that does what you request for both
> >> the .S and .asm.
> >>
> >>> Besides, compared to Arm arch assembly
> >>> file, I don't find CpuPause.asm. Is it required?
> >>
> >> That file doesn't exist for GCC (as you will see there is no
> >> MdePkg/Library/BaseLib/AArch64/CpuPause.S), so we don't have one for
> >> VS2017 either.
> >>
> >> Regards,
> >>
> >> /Pete
> 
> ___
> edk2-devel mailing list
> edk2-devel@lists.01.org
> https://lists.01.org/mailman/listinfo/edk2-devel
___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


Re: [edk2] [PATCH 0/4] Add ARM64 support for VS2017

2018-03-16 Thread Pete Batard

On 2018.03.16 08:24, Gao, Liming wrote:

Pete:
.S for GCC assembly, .asm for MSFT assembly. They can have the different 
comment style.


Yes, but as I explained, the actual original issue is that our current 
.S files do *not* have the same comment styles in the first place.


If you look at MdePkg/Library/BaseLib/AArch64/SwitchStack.S, you'll see 
that is uses '//' for comments, whereas other .S files, such as 
MdePkg/Library/BaseLib/AArch64/SetJumpLongJump.S, use '#'.


So that is our actual issue here: Regardless of VS2017, the GCC assembly 
files for AARCH64 we currently have do not use the same comment style.


Thus, the only reason why the .asm don't have the same comment style in 
our proposal is because the .S, which we derived the .asm from, don't. 
This means that either we should fix the .S too, or we shouldn't fix 
anything at all.



   Here, my comment is to make sure .asm files have the same comment style. I 
don't request to change .S file.


And what I am saying is that it makes little sense to harmonize the 
comment style for the .asm files, if we're not going to do the same for 
the .S files as well. It just doesn't seem fair in my book to have the 
VS2017 assembly files held to a higher standard than the GCC ones. So 
either we need to fix both, or we fix none at all.


But as I indicated in my last e-mail, I am planning to send an 
additional patch that does comment harmonization, for both .S and .asm, 
*after* this VS2017 series has been applied to mainline. So the change 
you request will happen. Just not as part of this patch series.


And the reason I have insist on splitting these changes is because, if 
we have to alter the .S files to be consistent, then this comment 
harmonization request should logically be handled separately from the 
VS2017 effort.


Please let me know if you still think having a future separate patch, 
that will do .S and .asm comment harmonization, does not make sense.


Regards,

/Pete




-Original Message-
From: Pete Batard [mailto:p...@akeo.ie]
Sent: Thursday, March 15, 2018 5:28 PM
To: Gao, Liming ; edk2-devel@lists.01.org
Cc: ard.biesheu...@linaro.org
Subject: Re: [PATCH 0/4] Add ARM64 support for VS2017

Hi Liming,

Thanks for reviewing the patches.

On 2018.03.15 06:15, Gao, Liming wrote:

Pete:
For new added ASM file in BaseLib, could you use the same comment style
for them? ASM use ; for the comment. Most of new files uses ; as the
comment, but switchstack is not.


This is because SwitchStack.asm is simply SwitchStack.S, with the GCC
assembler specifics removed, and MSVC assembler specifics added.

I did not change the comment style from the original files, so the real
issue here is that our GCC assembly files for AARCH64 do not use the
same comment style.

I'm fine with trying to harmonize the comment styles, but seeing as this
needs to be done for both the .S and .asm, I'd rather send a patch to do
that *after* these VS2017 changes have been applied, as I don't consider
this correction to in scope of this patch series (because logically, the
introduction of VS2017 should not alter any of the .S files, unless we
reuse them, which we don't).

If you agree to apply this series, I'll make sure to send a non
VS2017-specific additional patch, that does what you request for both
the .S and .asm.


Besides, compared to Arm arch assembly
file, I don't find CpuPause.asm. Is it required?


That file doesn't exist for GCC (as you will see there is no
MdePkg/Library/BaseLib/AArch64/CpuPause.S), so we don't have one for
VS2017 either.

Regards,

/Pete


___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


Re: [edk2] [PATCH 0/4] Add ARM64 support for VS2017

2018-03-16 Thread Gao, Liming
Pete:
   .S for GCC assembly, .asm for MSFT assembly. They can have the different 
comment style. 

  Here, my comment is to make sure .asm files have the same comment style. I 
don't request to change .S file. 

>-Original Message-
>From: Pete Batard [mailto:p...@akeo.ie]
>Sent: Thursday, March 15, 2018 5:28 PM
>To: Gao, Liming ; edk2-devel@lists.01.org
>Cc: ard.biesheu...@linaro.org
>Subject: Re: [PATCH 0/4] Add ARM64 support for VS2017
>
>Hi Liming,
>
>Thanks for reviewing the patches.
>
>On 2018.03.15 06:15, Gao, Liming wrote:
>> Pete:
>>For new added ASM file in BaseLib, could you use the same comment style
>> for them? ASM use ; for the comment. Most of new files uses ; as the
>> comment, but switchstack is not.
>
>This is because SwitchStack.asm is simply SwitchStack.S, with the GCC
>assembler specifics removed, and MSVC assembler specifics added.
>
>I did not change the comment style from the original files, so the real
>issue here is that our GCC assembly files for AARCH64 do not use the
>same comment style.
>
>I'm fine with trying to harmonize the comment styles, but seeing as this
>needs to be done for both the .S and .asm, I'd rather send a patch to do
>that *after* these VS2017 changes have been applied, as I don't consider
>this correction to in scope of this patch series (because logically, the
>introduction of VS2017 should not alter any of the .S files, unless we
>reuse them, which we don't).
>
>If you agree to apply this series, I'll make sure to send a non
>VS2017-specific additional patch, that does what you request for both
>the .S and .asm.
>
>> Besides, compared to Arm arch assembly
>> file, I don't find CpuPause.asm. Is it required?
>
>That file doesn't exist for GCC (as you will see there is no
>MdePkg/Library/BaseLib/AArch64/CpuPause.S), so we don't have one for
>VS2017 either.
>
>Regards,
>
>/Pete
___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


Re: [edk2] [PATCH 0/4] Add ARM64 support for VS2017

2018-03-15 Thread Pete Batard

Hi Liming,

Thanks for reviewing the patches.

On 2018.03.15 06:15, Gao, Liming wrote:

Pete:
   For new added ASM file in BaseLib, could you use the same comment style
for them? ASM use ; for the comment. Most of new files uses ; as the 
comment, but switchstack is not.


This is because SwitchStack.asm is simply SwitchStack.S, with the GCC 
assembler specifics removed, and MSVC assembler specifics added.


I did not change the comment style from the original files, so the real 
issue here is that our GCC assembly files for AARCH64 do not use the 
same comment style.


I'm fine with trying to harmonize the comment styles, but seeing as this 
needs to be done for both the .S and .asm, I'd rather send a patch to do 
that *after* these VS2017 changes have been applied, as I don't consider 
this correction to in scope of this patch series (because logically, the 
introduction of VS2017 should not alter any of the .S files, unless we 
reuse them, which we don't).


If you agree to apply this series, I'll make sure to send a non 
VS2017-specific additional patch, that does what you request for both 
the .S and .asm.



Besides, compared to Arm arch assembly
file, I don't find CpuPause.asm. Is it required?


That file doesn't exist for GCC (as you will see there is no 
MdePkg/Library/BaseLib/AArch64/CpuPause.S), so we don't have one for 
VS2017 either.


Regards,

/Pete
___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


Re: [edk2] [PATCH 0/4] Add ARM64 support for VS2017

2018-03-15 Thread Gao, Liming
Pete:
  For new added ASM file in BaseLib, could you use the same comment style for 
them? ASM use ; for the comment. Most of new files uses ; as the comment, but 
switchstack is not. Besides, compared to Arm arch assembly file, I don't find 
CpuPause.asm. Is it required?

Thanks
Liming
>-Original Message-
>From: Pete Batard [mailto:p...@akeo.ie]
>Sent: Friday, February 23, 2018 5:50 PM
>To: edk2-devel@lists.01.org
>Cc: Gao, Liming ; ard.biesheu...@linaro.org
>Subject: [PATCH 0/4] Add ARM64 support for VS2017
>
>This is v2, which just removes a redundant #if defined(_MSC_EXTENSIONS) in
>1/4.
>
>This series completes VS2017 support by enabling AARCH64 compilation.
>* PATCH 1 targets the disabling of VS Level 4 warnings. The disabled
>  warnings for ARM64 are the same as the ones for IA32, X64 and ARM.
>* PATCH 2 adds assembly source in MdePkg/Library/BaseLib for various low
>  level required functions. These new assembly files were converted from
>  their GCC version, with minor changes applied to make them palatable
>  to the MSFT assembler.
>* PATCH 3 adds variable argument handlers for print output. This is
>  achieved without relying on any external toolchain headers. However
>  a call to the __va_start() compiler intrinsic function is now being
>  used for the VA_START macros, which we apply for ARM as well.
>* PATCH 4 enables the selection of ARM64 in the conf templates.
>  One item of note is that the build options for ARM64 are the same as
>  for ARM, except for /BASE:0 which was removed to avoid error:
>  'invalid base address 0x0; ARM64 image cannot have base address below
>4GB'
>
>With these patches, VS2017 toolchain users should be able to compile
>regular UEFI ARM64 applications using EDK2.
>
>Note however that ARM64 support requires the use of Visual Studio 2017
>Update 4 or later (a.k.a. v15.4), as native ARM64 compilation was not
>included in any version of Visual Studio prior to that.
>
>Additional notes:
>
>We tested compiling and running the full UEFI Shell with this series, as
>well as a small set of applications and drivers, and saw no issues.
>Since we also modified the VA_START() macro for ARM, we also re-ran
>similar tests for ARM, to confirm that there was no regression there.
>
>Finally, we did not test the generation of a complete QEMU ARM64 firmware
>as it requires porting a handful of assembly sources, that don't exist
>yet, and our focus is with the generation of working AARCH64 drivers or
>applications. Hopefully, this can be tackled as VS2017/ARM64 sees more
>usage...
>
>Regards,
>
>/Pete
>
>Pete Batard (4):
>  MdePkg: Disable some Level 4 warnings for VS2017/ARM64
>  MdePkg/Library/BaseLib: Enable VS2017/ARM64 builds
>  MdePkg/Include: Add VA list support for VS2017/ARM64
>  BaseTools/Conf: Add VS2017/ARM64 support
>
> BaseTools/Conf/build_rule.template|   2 +-
> BaseTools/Conf/tools_def.template |  32 ++-
> MdePkg/Include/AArch64/ProcessorBind.h|  53 +-
> MdePkg/Include/Base.h |   7 +-
> MdePkg/Library/BaseLib/AArch64/CpuBreakpoint.asm  |  39 
> MdePkg/Library/BaseLib/AArch64/DisableInterrupts.asm  |  37 +++
> MdePkg/Library/BaseLib/AArch64/EnableInterrupts.asm   |  37 +++
> MdePkg/Library/BaseLib/AArch64/GetInterruptsState.asm |  49 ++
> MdePkg/Library/BaseLib/AArch64/MemoryFence.asm|  38 
> MdePkg/Library/BaseLib/AArch64/SetJumpLongJump.asm| 101
>
> MdePkg/Library/BaseLib/AArch64/SwitchStack.asm|  69 +
> MdePkg/Library/BaseLib/BaseLib.inf|   8 ++
> 12 files changed, 463 insertions(+), 9 deletions(-)
> create mode 100644 MdePkg/Library/BaseLib/AArch64/CpuBreakpoint.asm
> create mode 100644
>MdePkg/Library/BaseLib/AArch64/DisableInterrupts.asm
> create mode 100644 MdePkg/Library/BaseLib/AArch64/EnableInterrupts.asm
> create mode 100644
>MdePkg/Library/BaseLib/AArch64/GetInterruptsState.asm
> create mode 100644 MdePkg/Library/BaseLib/AArch64/MemoryFence.asm
> create mode 100644
>MdePkg/Library/BaseLib/AArch64/SetJumpLongJump.asm
> create mode 100644 MdePkg/Library/BaseLib/AArch64/SwitchStack.asm
>
>--
>2.9.3.windows.2

___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


Re: [edk2] [PATCH 0/4] Add ARM64 support for VS2017

2018-02-23 Thread Pete Batard

On 2018.02.23 11:55, Ard Biesheuvel wrote:

* PATCH 4 enables the selection of ARM64 in the conf templates.
   One item of note is that the build options for ARM64 are the same as
   for ARM, except for /BASE:0 which was removed to avoid error:
   'invalid base address 0x0; ARM64 image cannot have base address below 4GB'



This series looks fine to me, with the exception of the error
mentioned here, which seems strange to me. It does appear to be a
toolchain issue rather than anything else, so if you can build working
binaries with these patches, it's all fine by me.


Thanks Ard.

The thing about /BASE:0 producing a LNK1355 error above is that it only 
seems to occur with applications (you will see it if you try to build 
the Shell or MdeModulePkg\Application\HelloWorld for instance) and not 
drivers.


I too suspect that this may have to do with the public-facing 
VS2017/ARM64 toolchain being brand new, since it was only introduced 
with the last major VS update, and maybe still needing some ironing out 
when it comes to the generation of non Windows applications.


So far I have not seen any ill effects from the removal of /BASE:0.

Once this series has been integrated (so that it's easier for the VS dev 
team to test), I'll try to report this issue to 
https://developercommunity.visualstudio.com, to find out what they have 
to say about it.


Regards,

/Pete
___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


Re: [edk2] [PATCH 0/4] Add ARM64 support for VS2017

2018-02-23 Thread Ard Biesheuvel
On 23 February 2018 at 09:49, Pete Batard  wrote:
> This is v2, which just removes a redundant #if defined(_MSC_EXTENSIONS) in 
> 1/4.
>
> This series completes VS2017 support by enabling AARCH64 compilation.
> * PATCH 1 targets the disabling of VS Level 4 warnings. The disabled
>   warnings for ARM64 are the same as the ones for IA32, X64 and ARM.
> * PATCH 2 adds assembly source in MdePkg/Library/BaseLib for various low
>   level required functions. These new assembly files were converted from
>   their GCC version, with minor changes applied to make them palatable
>   to the MSFT assembler.
> * PATCH 3 adds variable argument handlers for print output. This is
>   achieved without relying on any external toolchain headers. However
>   a call to the __va_start() compiler intrinsic function is now being
>   used for the VA_START macros, which we apply for ARM as well.
> * PATCH 4 enables the selection of ARM64 in the conf templates.
>   One item of note is that the build options for ARM64 are the same as
>   for ARM, except for /BASE:0 which was removed to avoid error:
>   'invalid base address 0x0; ARM64 image cannot have base address below 4GB'
>

This series looks fine to me, with the exception of the error
mentioned here, which seems strange to me. It does appear to be a
toolchain issue rather than anything else, so if you can build working
binaries with these patches, it's all fine by me.

Acked-by: Ard Biesheuvel 


> With these patches, VS2017 toolchain users should be able to compile
> regular UEFI ARM64 applications using EDK2.
>
> Note however that ARM64 support requires the use of Visual Studio 2017
> Update 4 or later (a.k.a. v15.4), as native ARM64 compilation was not
> included in any version of Visual Studio prior to that.
>
> Additional notes:
>
> We tested compiling and running the full UEFI Shell with this series, as
> well as a small set of applications and drivers, and saw no issues.
> Since we also modified the VA_START() macro for ARM, we also re-ran
> similar tests for ARM, to confirm that there was no regression there.
>
> Finally, we did not test the generation of a complete QEMU ARM64 firmware
> as it requires porting a handful of assembly sources, that don't exist
> yet, and our focus is with the generation of working AARCH64 drivers or
> applications. Hopefully, this can be tackled as VS2017/ARM64 sees more
> usage...
>
> Regards,
>
> /Pete
>
> Pete Batard (4):
>   MdePkg: Disable some Level 4 warnings for VS2017/ARM64
>   MdePkg/Library/BaseLib: Enable VS2017/ARM64 builds
>   MdePkg/Include: Add VA list support for VS2017/ARM64
>   BaseTools/Conf: Add VS2017/ARM64 support
>
>  BaseTools/Conf/build_rule.template|   2 +-
>  BaseTools/Conf/tools_def.template |  32 ++-
>  MdePkg/Include/AArch64/ProcessorBind.h|  53 +-
>  MdePkg/Include/Base.h |   7 +-
>  MdePkg/Library/BaseLib/AArch64/CpuBreakpoint.asm  |  39 
>  MdePkg/Library/BaseLib/AArch64/DisableInterrupts.asm  |  37 +++
>  MdePkg/Library/BaseLib/AArch64/EnableInterrupts.asm   |  37 +++
>  MdePkg/Library/BaseLib/AArch64/GetInterruptsState.asm |  49 ++
>  MdePkg/Library/BaseLib/AArch64/MemoryFence.asm|  38 
>  MdePkg/Library/BaseLib/AArch64/SetJumpLongJump.asm| 101 
> 
>  MdePkg/Library/BaseLib/AArch64/SwitchStack.asm|  69 +
>  MdePkg/Library/BaseLib/BaseLib.inf|   8 ++
>  12 files changed, 463 insertions(+), 9 deletions(-)
>  create mode 100644 MdePkg/Library/BaseLib/AArch64/CpuBreakpoint.asm
>  create mode 100644 MdePkg/Library/BaseLib/AArch64/DisableInterrupts.asm
>  create mode 100644 MdePkg/Library/BaseLib/AArch64/EnableInterrupts.asm
>  create mode 100644 MdePkg/Library/BaseLib/AArch64/GetInterruptsState.asm
>  create mode 100644 MdePkg/Library/BaseLib/AArch64/MemoryFence.asm
>  create mode 100644 MdePkg/Library/BaseLib/AArch64/SetJumpLongJump.asm
>  create mode 100644 MdePkg/Library/BaseLib/AArch64/SwitchStack.asm
>
> --
> 2.9.3.windows.2
>
___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


[edk2] [PATCH 0/4] Add ARM64 support for VS2017

2018-02-23 Thread Pete Batard
This is v2, which just removes a redundant #if defined(_MSC_EXTENSIONS) in 1/4.

This series completes VS2017 support by enabling AARCH64 compilation.
* PATCH 1 targets the disabling of VS Level 4 warnings. The disabled
  warnings for ARM64 are the same as the ones for IA32, X64 and ARM.
* PATCH 2 adds assembly source in MdePkg/Library/BaseLib for various low
  level required functions. These new assembly files were converted from
  their GCC version, with minor changes applied to make them palatable
  to the MSFT assembler.
* PATCH 3 adds variable argument handlers for print output. This is
  achieved without relying on any external toolchain headers. However
  a call to the __va_start() compiler intrinsic function is now being
  used for the VA_START macros, which we apply for ARM as well.
* PATCH 4 enables the selection of ARM64 in the conf templates.
  One item of note is that the build options for ARM64 are the same as
  for ARM, except for /BASE:0 which was removed to avoid error:
  'invalid base address 0x0; ARM64 image cannot have base address below 4GB'

With these patches, VS2017 toolchain users should be able to compile
regular UEFI ARM64 applications using EDK2.

Note however that ARM64 support requires the use of Visual Studio 2017
Update 4 or later (a.k.a. v15.4), as native ARM64 compilation was not
included in any version of Visual Studio prior to that.

Additional notes:

We tested compiling and running the full UEFI Shell with this series, as
well as a small set of applications and drivers, and saw no issues.
Since we also modified the VA_START() macro for ARM, we also re-ran
similar tests for ARM, to confirm that there was no regression there.

Finally, we did not test the generation of a complete QEMU ARM64 firmware
as it requires porting a handful of assembly sources, that don't exist
yet, and our focus is with the generation of working AARCH64 drivers or
applications. Hopefully, this can be tackled as VS2017/ARM64 sees more
usage...

Regards,

/Pete

Pete Batard (4):
  MdePkg: Disable some Level 4 warnings for VS2017/ARM64
  MdePkg/Library/BaseLib: Enable VS2017/ARM64 builds
  MdePkg/Include: Add VA list support for VS2017/ARM64
  BaseTools/Conf: Add VS2017/ARM64 support

 BaseTools/Conf/build_rule.template|   2 +-
 BaseTools/Conf/tools_def.template |  32 ++-
 MdePkg/Include/AArch64/ProcessorBind.h|  53 +-
 MdePkg/Include/Base.h |   7 +-
 MdePkg/Library/BaseLib/AArch64/CpuBreakpoint.asm  |  39 
 MdePkg/Library/BaseLib/AArch64/DisableInterrupts.asm  |  37 +++
 MdePkg/Library/BaseLib/AArch64/EnableInterrupts.asm   |  37 +++
 MdePkg/Library/BaseLib/AArch64/GetInterruptsState.asm |  49 ++
 MdePkg/Library/BaseLib/AArch64/MemoryFence.asm|  38 
 MdePkg/Library/BaseLib/AArch64/SetJumpLongJump.asm| 101 

 MdePkg/Library/BaseLib/AArch64/SwitchStack.asm|  69 +
 MdePkg/Library/BaseLib/BaseLib.inf|   8 ++
 12 files changed, 463 insertions(+), 9 deletions(-)
 create mode 100644 MdePkg/Library/BaseLib/AArch64/CpuBreakpoint.asm
 create mode 100644 MdePkg/Library/BaseLib/AArch64/DisableInterrupts.asm
 create mode 100644 MdePkg/Library/BaseLib/AArch64/EnableInterrupts.asm
 create mode 100644 MdePkg/Library/BaseLib/AArch64/GetInterruptsState.asm
 create mode 100644 MdePkg/Library/BaseLib/AArch64/MemoryFence.asm
 create mode 100644 MdePkg/Library/BaseLib/AArch64/SetJumpLongJump.asm
 create mode 100644 MdePkg/Library/BaseLib/AArch64/SwitchStack.asm

-- 
2.9.3.windows.2

___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


[edk2] [PATCH 0/4] Add ARM64 support for VS2017

2018-02-14 Thread Pete Batard
This series completes VS2017 support by enabling AARCH64 compilation.
* PATCH 1 targets the disabling of VS Level 4 warnings. The disabled
  warnings for ARM64 are the same as the ones for IA32, X64 and ARM.
* PATCH 2 adds assembly source in MdePkg/Library/BaseLib for various low
  level required functions. These new assembly files were converted from
  their GCC version, with minor changes applied to make them palatable
  to the MSFT assembler.
* PATCH 3 adds variable argument handlers for print output. This is
  achieved without relying on any external toolchain headers. However
  a call to the __va_start() compiler intrinsic function is now being
  used for the VA_START macros, which we apply for ARM as well.
* PATCH 4 enables the selection of ARM64 in the conf templates.
  One item of note is that the build options for ARM64 are the same as
  for ARM, except for /BASE:0 which was removed to avoid error:
  'invalid base address 0x0; ARM64 image cannot have base address below 4GB'

With these patches, VS2017 toolchain users should be able to compile
regular UEFI ARM64 applications using EDK2.

Note however that ARM64 support requires the use of Visual Studio 2017
Update 4 or later (a.k.a. v15.4), as native ARM64 compilation was not
included in any version of Visual Studio prior to that.

Additional notes:

We tested compiling and running the full UEFI Shell with this series, as
well as a small set of applications and drivers, and saw no issues.
Since we also modified the VA_START() macro for ARM, we also re-ran
similar tests for ARM, to confirm that there was no regression there.

Finally, we did not test the generation of a complete QEMU ARM64 firmware
as it requires porting a handful of assembly sources, that don't exist
yet, and our focus is with the generation of working AARCH64 drivers or
applications. Hopefully, this can be tackled as VS2017/ARM64 sees more
usage...

Regards,

/Pete


Pete Batard (4):
  MdePkg: Disable some Level 4 warnings for VS2017/ARM64
  MdePkg/Library/BaseLib: Enable VS2017/ARM64 builds
  MdePkg/Include: Add VA list support for VS2017/ARM64
  BaseTools/Conf: Add VS2017/ARM64 support

 BaseTools/Conf/build_rule.template|   2 +-
 BaseTools/Conf/tools_def.template |  32 ++-
 MdePkg/Include/AArch64/ProcessorBind.h|  53 +-
 MdePkg/Include/Base.h |   7 +-
 MdePkg/Library/BaseLib/AArch64/CpuBreakpoint.asm  |  39 
 MdePkg/Library/BaseLib/AArch64/DisableInterrupts.asm  |  37 +++
 MdePkg/Library/BaseLib/AArch64/EnableInterrupts.asm   |  37 +++
 MdePkg/Library/BaseLib/AArch64/GetInterruptsState.asm |  49 ++
 MdePkg/Library/BaseLib/AArch64/MemoryFence.asm|  38 
 MdePkg/Library/BaseLib/AArch64/SetJumpLongJump.asm| 101 

 MdePkg/Library/BaseLib/AArch64/SwitchStack.asm|  69 +
 MdePkg/Library/BaseLib/BaseLib.inf|   8 ++
 12 files changed, 463 insertions(+), 9 deletions(-)
 create mode 100644 MdePkg/Library/BaseLib/AArch64/CpuBreakpoint.asm
 create mode 100644 MdePkg/Library/BaseLib/AArch64/DisableInterrupts.asm
 create mode 100644 MdePkg/Library/BaseLib/AArch64/EnableInterrupts.asm
 create mode 100644 MdePkg/Library/BaseLib/AArch64/GetInterruptsState.asm
 create mode 100644 MdePkg/Library/BaseLib/AArch64/MemoryFence.asm
 create mode 100644 MdePkg/Library/BaseLib/AArch64/SetJumpLongJump.asm
 create mode 100644 MdePkg/Library/BaseLib/AArch64/SwitchStack.asm

-- 
2.9.3.windows.2

___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel