public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [PATCH edk2-platforms v1] Platform/ARM: Add PeiReportStatusCodeLib
@ 2018-05-03  9:24 Alexei Fedorov
  2018-05-03 11:44 ` Ard Biesheuvel
  2018-05-09 16:24 ` Leif Lindholm
  0 siblings, 2 replies; 8+ messages in thread
From: Alexei Fedorov @ 2018-05-03  9:24 UTC (permalink / raw)
  To: edk2-devel
  Cc: Arvind Chauhan, Daniil Egranov, Thomas Panakamattam Abraham,
	Ard.Biesheuvel, Leif.Lindholm, Matteo.Carlini,
	Stephanie.Hughes-Fitt, nd, Thomas.Abraham, Evan.Lloyd,
	Sami.Mujawar

From: Alexei Fedorov <Alexei.Fedorov@arm.com>

UEFI build fails for ArmVExpress-FVP-AArch64 when using
"-D ARM_FVP_RUN_NORFLASH" build option, which prevents
EDK2_SKIP_PEICORE macro from being defined in
ArmVExpress-FVP-AArch64.dsc:

!ifndef ARM_FVP_RUN_NORFLASH
  DEFINE EDK2_SKIP_PEICORE=1
!endif

When EDK2_SKIP_PEICORE macro is not defined, build fails with
errors 1001:
Module type [PEI_CORE] is not supported by library instance
[MdeModulePkg\Library\DxeReportStatusCodeLib\DxeReportStatusCodeLib.inf]
consumed by [n:\edk2\MdeModulePkg\Core\Pei\PeiMain.inf]
and
Module type [PEIM] is not supported by library instance
[MdeModulePkg\Library\DxeReportStatusCodeLib\DxeReportStatusCodeLib.inf]
consumed by [n:\edk2\MdeModulePkg\Core\DxeIplPeim\DxeIpl.inf]

This patch fixes the above build errors by adding
MdeModulePkg/Library/PeiReportStatusCodeLib/PeiReportStatusCodeLib.inf
in [LibraryClasses.common.PEI_CORE] and [LibraryClasses.common.PEIM]
sections of ArmVExpress.dsc.inc.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Alexei Fedorov <Alexei.Fedorov@arm.com>
Reviewed-by:   Evan Lloyd <Evan.Lloyd@arm.com>
---
All the changes can be reviewed at:
https://github.com/AlexeiFedorov/edk2-platforms/tree/237_add_peireportstatuscodelib_v1

Notes:
    v1:
    - Add PeiReportStatusCodeLib in PEI_CORE and PEIM sections   [Alexei]

 Platform/ARM/VExpressPkg/ArmVExpress.dsc.inc | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/Platform/ARM/VExpressPkg/ArmVExpress.dsc.inc b/Platform/ARM/VExpressPkg/ArmVExpress.dsc.inc
index de201b0c81d020e1e06ee320cf0f14f186723657..bb899b91c525ee821b9506cca75224f4bc41e3ae 100644
--- a/Platform/ARM/VExpressPkg/ArmVExpress.dsc.inc
+++ b/Platform/ARM/VExpressPkg/ArmVExpress.dsc.inc
@@ -166,6 +166,7 @@ [LibraryClasses.common.PEI_CORE]
   MemoryAllocationLib|MdePkg/Library/PeiMemoryAllocationLib/PeiMemoryAllocationLib.inf
   PeiCoreEntryPoint|MdePkg/Library/PeiCoreEntryPoint/PeiCoreEntryPoint.inf
   PerformanceLib|MdeModulePkg/Library/PeiPerformanceLib/PeiPerformanceLib.inf
+  ReportStatusCodeLib|MdeModulePkg/Library/PeiReportStatusCodeLib/PeiReportStatusCodeLib.inf
   OemHookStatusCodeLib|MdeModulePkg/Library/OemHookStatusCodeLibNull/OemHookStatusCodeLibNull.inf
   PeCoffGetEntryPointLib|MdePkg/Library/BasePeCoffGetEntryPointLib/BasePeCoffGetEntryPointLib.inf
   ExtractGuidedSectionLib|MdePkg/Library/PeiExtractGuidedSectionLib/PeiExtractGuidedSectionLib.inf
@@ -179,6 +180,7 @@ [LibraryClasses.common.PEIM]
   MemoryAllocationLib|MdePkg/Library/PeiMemoryAllocationLib/PeiMemoryAllocationLib.inf
   PeimEntryPoint|MdePkg/Library/PeimEntryPoint/PeimEntryPoint.inf
   PerformanceLib|MdeModulePkg/Library/PeiPerformanceLib/PeiPerformanceLib.inf
+  ReportStatusCodeLib|MdeModulePkg/Library/PeiReportStatusCodeLib/PeiReportStatusCodeLib.inf
   OemHookStatusCodeLib|MdeModulePkg/Library/OemHookStatusCodeLibNull/OemHookStatusCodeLibNull.inf
   PeCoffGetEntryPointLib|MdePkg/Library/BasePeCoffGetEntryPointLib/BasePeCoffGetEntryPointLib.inf
   PeiResourcePublicationLib|MdePkg/Library/PeiResourcePublicationLib/PeiResourcePublicationLib.inf
-- 
'Guid(CE165669-3EF3-493F-B85D-6190EE5B9759)'




^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH edk2-platforms v1] Platform/ARM: Add PeiReportStatusCodeLib
  2018-05-03  9:24 [PATCH edk2-platforms v1] Platform/ARM: Add PeiReportStatusCodeLib Alexei Fedorov
@ 2018-05-03 11:44 ` Ard Biesheuvel
  2018-05-03 12:07   ` Alan Ott
  2018-05-03 12:28   ` Laszlo Ersek
  2018-05-09 16:24 ` Leif Lindholm
  1 sibling, 2 replies; 8+ messages in thread
From: Ard Biesheuvel @ 2018-05-03 11:44 UTC (permalink / raw)
  To: Alexei Fedorov
  Cc: edk2-devel@lists.01.org, Arvind Chauhan, Daniil Egranov,
	Thomas Panakamattam Abraham, Leif Lindholm, Matteo Carlini,
	Stephanie Hughes-Fitt, nd, Evan Lloyd, Sami Mujawar,
	Jeremy Linton, Alan Ott, Laszlo Ersek

(add some potentially interested parties to cc)

On 3 May 2018 at 11:24, Alexei Fedorov <alexei.fedorov@arm.com> wrote:
> From: Alexei Fedorov <Alexei.Fedorov@arm.com>
>
> UEFI build fails for ArmVExpress-FVP-AArch64 when using
> "-D ARM_FVP_RUN_NORFLASH" build option, which prevents
> EDK2_SKIP_PEICORE macro from being defined in
> ArmVExpress-FVP-AArch64.dsc:
>
> !ifndef ARM_FVP_RUN_NORFLASH
>   DEFINE EDK2_SKIP_PEICORE=1
> !endif
>
> When EDK2_SKIP_PEICORE macro is not defined, build fails with
> errors 1001:
> Module type [PEI_CORE] is not supported by library instance
> [MdeModulePkg\Library\DxeReportStatusCodeLib\DxeReportStatusCodeLib.inf]
> consumed by [n:\edk2\MdeModulePkg\Core\Pei\PeiMain.inf]
> and
> Module type [PEIM] is not supported by library instance
> [MdeModulePkg\Library\DxeReportStatusCodeLib\DxeReportStatusCodeLib.inf]
> consumed by [n:\edk2\MdeModulePkg\Core\DxeIplPeim\DxeIpl.inf]
>
> This patch fixes the above build errors by adding
> MdeModulePkg/Library/PeiReportStatusCodeLib/PeiReportStatusCodeLib.inf
> in [LibraryClasses.common.PEI_CORE] and [LibraryClasses.common.PEIM]
> sections of ArmVExpress.dsc.inc.
>
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Alexei Fedorov <Alexei.Fedorov@arm.com>
> Reviewed-by:   Evan Lloyd <Evan.Lloyd@arm.com>
> ---
> All the changes can be reviewed at:
> https://github.com/AlexeiFedorov/edk2-platforms/tree/237_add_peireportstatuscodelib_v1
>
> Notes:
>     v1:
>     - Add PeiReportStatusCodeLib in PEI_CORE and PEIM sections   [Alexei]
>
>  Platform/ARM/VExpressPkg/ArmVExpress.dsc.inc | 2 ++
>  1 file changed, 2 insertions(+)
>

Just for my understanding: is anyone using these status codes on ARM,
and if so, how exactly?


> diff --git a/Platform/ARM/VExpressPkg/ArmVExpress.dsc.inc b/Platform/ARM/VExpressPkg/ArmVExpress.dsc.inc
> index de201b0c81d020e1e06ee320cf0f14f186723657..bb899b91c525ee821b9506cca75224f4bc41e3ae 100644
> --- a/Platform/ARM/VExpressPkg/ArmVExpress.dsc.inc
> +++ b/Platform/ARM/VExpressPkg/ArmVExpress.dsc.inc
> @@ -166,6 +166,7 @@ [LibraryClasses.common.PEI_CORE]
>    MemoryAllocationLib|MdePkg/Library/PeiMemoryAllocationLib/PeiMemoryAllocationLib.inf
>    PeiCoreEntryPoint|MdePkg/Library/PeiCoreEntryPoint/PeiCoreEntryPoint.inf
>    PerformanceLib|MdeModulePkg/Library/PeiPerformanceLib/PeiPerformanceLib.inf
> +  ReportStatusCodeLib|MdeModulePkg/Library/PeiReportStatusCodeLib/PeiReportStatusCodeLib.inf
>    OemHookStatusCodeLib|MdeModulePkg/Library/OemHookStatusCodeLibNull/OemHookStatusCodeLibNull.inf
>    PeCoffGetEntryPointLib|MdePkg/Library/BasePeCoffGetEntryPointLib/BasePeCoffGetEntryPointLib.inf
>    ExtractGuidedSectionLib|MdePkg/Library/PeiExtractGuidedSectionLib/PeiExtractGuidedSectionLib.inf
> @@ -179,6 +180,7 @@ [LibraryClasses.common.PEIM]
>    MemoryAllocationLib|MdePkg/Library/PeiMemoryAllocationLib/PeiMemoryAllocationLib.inf
>    PeimEntryPoint|MdePkg/Library/PeimEntryPoint/PeimEntryPoint.inf
>    PerformanceLib|MdeModulePkg/Library/PeiPerformanceLib/PeiPerformanceLib.inf
> +  ReportStatusCodeLib|MdeModulePkg/Library/PeiReportStatusCodeLib/PeiReportStatusCodeLib.inf
>    OemHookStatusCodeLib|MdeModulePkg/Library/OemHookStatusCodeLibNull/OemHookStatusCodeLibNull.inf
>    PeCoffGetEntryPointLib|MdePkg/Library/BasePeCoffGetEntryPointLib/BasePeCoffGetEntryPointLib.inf
>    PeiResourcePublicationLib|MdePkg/Library/PeiResourcePublicationLib/PeiResourcePublicationLib.inf
> --
> 'Guid(CE165669-3EF3-493F-B85D-6190EE5B9759)'
>
>


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH edk2-platforms v1] Platform/ARM: Add PeiReportStatusCodeLib
  2018-05-03 11:44 ` Ard Biesheuvel
@ 2018-05-03 12:07   ` Alan Ott
  2018-05-03 12:28   ` Laszlo Ersek
  1 sibling, 0 replies; 8+ messages in thread
From: Alan Ott @ 2018-05-03 12:07 UTC (permalink / raw)
  To: Ard Biesheuvel, Alexei Fedorov
  Cc: edk2-devel@lists.01.org, Arvind Chauhan, Daniil Egranov,
	Thomas Panakamattam Abraham, Leif Lindholm, Matteo Carlini,
	Stephanie Hughes-Fitt, nd, Evan Lloyd, Sami Mujawar,
	Jeremy Linton, Laszlo Ersek

On 05/03/2018 07:44 AM, Ard Biesheuvel wrote:
> (add some potentially interested parties to cc)
>
> On 3 May 2018 at 11:24, Alexei Fedorov <alexei.fedorov@arm.com> wrote:
>> From: Alexei Fedorov <Alexei.Fedorov@arm.com>
>>
>> UEFI build fails for ArmVExpress-FVP-AArch64 when using
>> "-D ARM_FVP_RUN_NORFLASH" build option, which prevents
>> EDK2_SKIP_PEICORE macro from being defined in
>> ArmVExpress-FVP-AArch64.dsc:
>>
>> !ifndef ARM_FVP_RUN_NORFLASH
>>    DEFINE EDK2_SKIP_PEICORE=1
>> !endif
>>
>> When EDK2_SKIP_PEICORE macro is not defined, build fails with
>> errors 1001:
>> Module type [PEI_CORE] is not supported by library instance
>> [MdeModulePkg\Library\DxeReportStatusCodeLib\DxeReportStatusCodeLib.inf]
>> consumed by [n:\edk2\MdeModulePkg\Core\Pei\PeiMain.inf]
>> and
>> Module type [PEIM] is not supported by library instance
>> [MdeModulePkg\Library\DxeReportStatusCodeLib\DxeReportStatusCodeLib.inf]
>> consumed by [n:\edk2\MdeModulePkg\Core\DxeIplPeim\DxeIpl.inf]
>>
>> This patch fixes the above build errors by adding
>> MdeModulePkg/Library/PeiReportStatusCodeLib/PeiReportStatusCodeLib.inf
>> in [LibraryClasses.common.PEI_CORE] and [LibraryClasses.common.PEIM]
>> sections of ArmVExpress.dsc.inc.
>>
>> Contributed-under: TianoCore Contribution Agreement 1.1
>> Signed-off-by: Alexei Fedorov <Alexei.Fedorov@arm.com>
>> Reviewed-by:   Evan Lloyd <Evan.Lloyd@arm.com>
>> ---
>> All the changes can be reviewed at:
>> https://github.com/AlexeiFedorov/edk2-platforms/tree/237_add_peireportstatuscodelib_v1
>>
>> Notes:
>>      v1:
>>      - Add PeiReportStatusCodeLib in PEI_CORE and PEIM sections   [Alexei]
>>
>>   Platform/ARM/VExpressPkg/ArmVExpress.dsc.inc | 2 ++
>>   1 file changed, 2 insertions(+)
>>
> Just for my understanding: is anyone using these status codes on ARM,
> and if so, how exactly?

Not using status codes on ARM was the assumption here:

https://github.com/tianocore/edk2-platforms/commit/a3877da646af4ce50d1b6be65969dd405383a3cf

>> diff --git a/Platform/ARM/VExpressPkg/ArmVExpress.dsc.inc b/Platform/ARM/VExpressPkg/ArmVExpress.dsc.inc
>> index de201b0c81d020e1e06ee320cf0f14f186723657..bb899b91c525ee821b9506cca75224f4bc41e3ae 100644
>> --- a/Platform/ARM/VExpressPkg/ArmVExpress.dsc.inc
>> +++ b/Platform/ARM/VExpressPkg/ArmVExpress.dsc.inc
>> @@ -166,6 +166,7 @@ [LibraryClasses.common.PEI_CORE]
>>     MemoryAllocationLib|MdePkg/Library/PeiMemoryAllocationLib/PeiMemoryAllocationLib.inf
>>     PeiCoreEntryPoint|MdePkg/Library/PeiCoreEntryPoint/PeiCoreEntryPoint.inf
>>     PerformanceLib|MdeModulePkg/Library/PeiPerformanceLib/PeiPerformanceLib.inf
>> +  ReportStatusCodeLib|MdeModulePkg/Library/PeiReportStatusCodeLib/PeiReportStatusCodeLib.inf
>>     OemHookStatusCodeLib|MdeModulePkg/Library/OemHookStatusCodeLibNull/OemHookStatusCodeLibNull.inf
>>     PeCoffGetEntryPointLib|MdePkg/Library/BasePeCoffGetEntryPointLib/BasePeCoffGetEntryPointLib.inf
>>     ExtractGuidedSectionLib|MdePkg/Library/PeiExtractGuidedSectionLib/PeiExtractGuidedSectionLib.inf
>> @@ -179,6 +180,7 @@ [LibraryClasses.common.PEIM]
>>     MemoryAllocationLib|MdePkg/Library/PeiMemoryAllocationLib/PeiMemoryAllocationLib.inf
>>     PeimEntryPoint|MdePkg/Library/PeimEntryPoint/PeimEntryPoint.inf
>>     PerformanceLib|MdeModulePkg/Library/PeiPerformanceLib/PeiPerformanceLib.inf
>> +  ReportStatusCodeLib|MdeModulePkg/Library/PeiReportStatusCodeLib/PeiReportStatusCodeLib.inf
>>     OemHookStatusCodeLib|MdeModulePkg/Library/OemHookStatusCodeLibNull/OemHookStatusCodeLibNull.inf
>>     PeCoffGetEntryPointLib|MdePkg/Library/BasePeCoffGetEntryPointLib/BasePeCoffGetEntryPointLib.inf
>>     PeiResourcePublicationLib|MdePkg/Library/PeiResourcePublicationLib/PeiResourcePublicationLib.inf
>> --
>> 'Guid(CE165669-3EF3-493F-B85D-6190EE5B9759)'
>>
>>



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH edk2-platforms v1] Platform/ARM: Add PeiReportStatusCodeLib
  2018-05-03 11:44 ` Ard Biesheuvel
  2018-05-03 12:07   ` Alan Ott
@ 2018-05-03 12:28   ` Laszlo Ersek
  1 sibling, 0 replies; 8+ messages in thread
From: Laszlo Ersek @ 2018-05-03 12:28 UTC (permalink / raw)
  To: Ard Biesheuvel, Alexei Fedorov
  Cc: edk2-devel@lists.01.org, Arvind Chauhan, Daniil Egranov,
	Thomas Panakamattam Abraham, Leif Lindholm, Matteo Carlini,
	Stephanie Hughes-Fitt, nd, Evan Lloyd, Sami Mujawar,
	Jeremy Linton, Alan Ott

On 05/03/18 13:44, Ard Biesheuvel wrote:
> (add some potentially interested parties to cc)
> 
> On 3 May 2018 at 11:24, Alexei Fedorov <alexei.fedorov@arm.com> wrote:
>> From: Alexei Fedorov <Alexei.Fedorov@arm.com>
>>
>> UEFI build fails for ArmVExpress-FVP-AArch64 when using
>> "-D ARM_FVP_RUN_NORFLASH" build option, which prevents
>> EDK2_SKIP_PEICORE macro from being defined in
>> ArmVExpress-FVP-AArch64.dsc:
>>
>> !ifndef ARM_FVP_RUN_NORFLASH
>>   DEFINE EDK2_SKIP_PEICORE=1
>> !endif
>>
>> When EDK2_SKIP_PEICORE macro is not defined, build fails with
>> errors 1001:
>> Module type [PEI_CORE] is not supported by library instance
>> [MdeModulePkg\Library\DxeReportStatusCodeLib\DxeReportStatusCodeLib.inf]
>> consumed by [n:\edk2\MdeModulePkg\Core\Pei\PeiMain.inf]
>> and
>> Module type [PEIM] is not supported by library instance
>> [MdeModulePkg\Library\DxeReportStatusCodeLib\DxeReportStatusCodeLib.inf]
>> consumed by [n:\edk2\MdeModulePkg\Core\DxeIplPeim\DxeIpl.inf]
>>
>> This patch fixes the above build errors by adding
>> MdeModulePkg/Library/PeiReportStatusCodeLib/PeiReportStatusCodeLib.inf
>> in [LibraryClasses.common.PEI_CORE] and [LibraryClasses.common.PEIM]
>> sections of ArmVExpress.dsc.inc.
>>
>> Contributed-under: TianoCore Contribution Agreement 1.1
>> Signed-off-by: Alexei Fedorov <Alexei.Fedorov@arm.com>
>> Reviewed-by:   Evan Lloyd <Evan.Lloyd@arm.com>
>> ---
>> All the changes can be reviewed at:
>> https://github.com/AlexeiFedorov/edk2-platforms/tree/237_add_peireportstatuscodelib_v1
>>
>> Notes:
>>     v1:
>>     - Add PeiReportStatusCodeLib in PEI_CORE and PEIM sections   [Alexei]
>>
>>  Platform/ARM/VExpressPkg/ArmVExpress.dsc.inc | 2 ++
>>  1 file changed, 2 insertions(+)
>>
> 
> Just for my understanding: is anyone using these status codes on ARM,
> and if so, how exactly?

(on a wild tangent)

Earlier I tried to use status codes (in VMs) for the following purpose:
the UEFI boot manager emits status codes about gBS->LoadImage() and
gBS->StartImage(), but I didn't find them detailed enough. So I
attempted to extend them, with the intent to catch *and print* them in
BdsDxe / PlatformBootManagerLib, to the console. This would have
provided the end-user with some insight into the boot option processing.

Alas, the status codes weren't possible to extend in edk2 without UEFI
spec development. I did start on that, but clearly we couldn't wait for
it to complete, so we solved our issue differently.

Now back to the question whether status codes are helpful in practice on
ARM. The vendor-provided firmware on my Mustang uses them, in that the
status codes are printed to the serial port. They tell me exactly
nothing. :)

For a while I had built the firmware for the Mustang myself. I'd always
enable full logs (DEBUG_VERBOSE). Now that serial log was helpful.

I guess status codes can be useful if there are other machines that read
them and act upon them -- but that likely occurs through a different
representation and/or hardware interface, not through hex codes printed
to the serial port.

Thanks
Laszlo


> 
> 
>> diff --git a/Platform/ARM/VExpressPkg/ArmVExpress.dsc.inc b/Platform/ARM/VExpressPkg/ArmVExpress.dsc.inc
>> index de201b0c81d020e1e06ee320cf0f14f186723657..bb899b91c525ee821b9506cca75224f4bc41e3ae 100644
>> --- a/Platform/ARM/VExpressPkg/ArmVExpress.dsc.inc
>> +++ b/Platform/ARM/VExpressPkg/ArmVExpress.dsc.inc
>> @@ -166,6 +166,7 @@ [LibraryClasses.common.PEI_CORE]
>>    MemoryAllocationLib|MdePkg/Library/PeiMemoryAllocationLib/PeiMemoryAllocationLib.inf
>>    PeiCoreEntryPoint|MdePkg/Library/PeiCoreEntryPoint/PeiCoreEntryPoint.inf
>>    PerformanceLib|MdeModulePkg/Library/PeiPerformanceLib/PeiPerformanceLib.inf
>> +  ReportStatusCodeLib|MdeModulePkg/Library/PeiReportStatusCodeLib/PeiReportStatusCodeLib.inf
>>    OemHookStatusCodeLib|MdeModulePkg/Library/OemHookStatusCodeLibNull/OemHookStatusCodeLibNull.inf
>>    PeCoffGetEntryPointLib|MdePkg/Library/BasePeCoffGetEntryPointLib/BasePeCoffGetEntryPointLib.inf
>>    ExtractGuidedSectionLib|MdePkg/Library/PeiExtractGuidedSectionLib/PeiExtractGuidedSectionLib.inf
>> @@ -179,6 +180,7 @@ [LibraryClasses.common.PEIM]
>>    MemoryAllocationLib|MdePkg/Library/PeiMemoryAllocationLib/PeiMemoryAllocationLib.inf
>>    PeimEntryPoint|MdePkg/Library/PeimEntryPoint/PeimEntryPoint.inf
>>    PerformanceLib|MdeModulePkg/Library/PeiPerformanceLib/PeiPerformanceLib.inf
>> +  ReportStatusCodeLib|MdeModulePkg/Library/PeiReportStatusCodeLib/PeiReportStatusCodeLib.inf
>>    OemHookStatusCodeLib|MdeModulePkg/Library/OemHookStatusCodeLibNull/OemHookStatusCodeLibNull.inf
>>    PeCoffGetEntryPointLib|MdePkg/Library/BasePeCoffGetEntryPointLib/BasePeCoffGetEntryPointLib.inf
>>    PeiResourcePublicationLib|MdePkg/Library/PeiResourcePublicationLib/PeiResourcePublicationLib.inf
>> --
>> 'Guid(CE165669-3EF3-493F-B85D-6190EE5B9759)'
>>
>>



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH edk2-platforms v1] Platform/ARM: Add PeiReportStatusCodeLib
  2018-05-03  9:24 [PATCH edk2-platforms v1] Platform/ARM: Add PeiReportStatusCodeLib Alexei Fedorov
  2018-05-03 11:44 ` Ard Biesheuvel
@ 2018-05-09 16:24 ` Leif Lindholm
  2018-05-09 16:58   ` Alexei Fedorov
  1 sibling, 1 reply; 8+ messages in thread
From: Leif Lindholm @ 2018-05-09 16:24 UTC (permalink / raw)
  To: Alexei Fedorov
  Cc: edk2-devel, Arvind Chauhan, Daniil Egranov,
	Thomas Panakamattam Abraham, Ard.Biesheuvel, Matteo.Carlini,
	Stephanie.Hughes-Fitt, nd, Evan.Lloyd, Sami.Mujawar

Hi Alexei,

On Thu, May 03, 2018 at 10:24:21AM +0100, Alexei Fedorov wrote:
> From: Alexei Fedorov <Alexei.Fedorov@arm.com>
> 
> UEFI build fails for ArmVExpress-FVP-AArch64 when using
> "-D ARM_FVP_RUN_NORFLASH" build option, which prevents
> EDK2_SKIP_PEICORE macro from being defined in
> ArmVExpress-FVP-AArch64.dsc:
> 
> !ifndef ARM_FVP_RUN_NORFLASH
>   DEFINE EDK2_SKIP_PEICORE=1
> !endif
> 
> When EDK2_SKIP_PEICORE macro is not defined, build fails with
> errors 1001:
> Module type [PEI_CORE] is not supported by library instance
> [MdeModulePkg\Library\DxeReportStatusCodeLib\DxeReportStatusCodeLib.inf]
> consumed by [n:\edk2\MdeModulePkg\Core\Pei\PeiMain.inf]
> and
> Module type [PEIM] is not supported by library instance
> [MdeModulePkg\Library\DxeReportStatusCodeLib\DxeReportStatusCodeLib.inf]
> consumed by [n:\edk2\MdeModulePkg\Core\DxeIplPeim\DxeIpl.inf]
> 
> This patch fixes the above build errors by adding
> MdeModulePkg/Library/PeiReportStatusCodeLib/PeiReportStatusCodeLib.inf
> in [LibraryClasses.common.PEI_CORE] and [LibraryClasses.common.PEIM]
> sections of ArmVExpress.dsc.inc.

Yes, this fixes a bug, however I am still unable to build FVP with
-D ARM_FVP_RUN_NORFLASH:
---
In file included from
/work/git/edk2-platforms/Platform/ARM/VExpressPkg/Library/ArmVExpressLibRTSM/RTSM.c:22:0:
/work/git/edk2-platforms/Platform/ARM/VExpressPkg/Include/Platform/RTSM/ArmPlatform.h:19:33:
fatal error: VExpressMotherBoard.h: No such file or directory
 #include <VExpressMotherBoard.h>
                                 ^
compilation terminated.
---

Presumably this has been broken since commit 8ad58788b5c did not carry across
-I$(WORKSPACE)/ArmPlatformPkg/ArmVExpressPkg/Include in
GCC:*_*_AARCH64_PLATFORM_FLAGS when migrating ArmVExpressPkg from edk2.

Can you confirm whether you can reproduce this?

If so, the following stanza resolves the issue for me:
diff --git
a/Platform/ARM/VExpressPkg/Library/ArmVExpressLibRTSM/ArmVExpressLibSec.inf
b/Platform/ARM/VExpressPkg/Library/ArmVExpressLibRTSM/ArmVExpressLibSec.inf
index 2287756cf8..ed9720e8ce 100644
--- a/Platform/ARM/VExpressPkg/Library/ArmVExpressLibRTSM/ArmVExpressLibSec.inf
+++ b/Platform/ARM/VExpressPkg/Library/ArmVExpressLibRTSM/ArmVExpressLibSec.inf
@@ -22,6 +22,7 @@ [Defines]
 [Packages]
   MdePkg/MdePkg.dec
   MdeModulePkg/MdeModulePkg.dec
+  Platform/ARM/VExpressPkg/ArmVExpressPkg.dec
   EmbeddedPkg/EmbeddedPkg.dec
   ArmPkg/ArmPkg.dec
   ArmPlatformPkg/ArmPlatformPkg.dec

Best Regards,

Leif

> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Alexei Fedorov <Alexei.Fedorov@arm.com>
> Reviewed-by:   Evan Lloyd <Evan.Lloyd@arm.com>
> ---
> All the changes can be reviewed at:
> https://github.com/AlexeiFedorov/edk2-platforms/tree/237_add_peireportstatuscodelib_v1
> 
> Notes:
>     v1:
>     - Add PeiReportStatusCodeLib in PEI_CORE and PEIM sections   [Alexei]
> 
>  Platform/ARM/VExpressPkg/ArmVExpress.dsc.inc | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/Platform/ARM/VExpressPkg/ArmVExpress.dsc.inc b/Platform/ARM/VExpressPkg/ArmVExpress.dsc.inc
> index de201b0c81d020e1e06ee320cf0f14f186723657..bb899b91c525ee821b9506cca75224f4bc41e3ae 100644
> --- a/Platform/ARM/VExpressPkg/ArmVExpress.dsc.inc
> +++ b/Platform/ARM/VExpressPkg/ArmVExpress.dsc.inc
> @@ -166,6 +166,7 @@ [LibraryClasses.common.PEI_CORE]
>    MemoryAllocationLib|MdePkg/Library/PeiMemoryAllocationLib/PeiMemoryAllocationLib.inf
>    PeiCoreEntryPoint|MdePkg/Library/PeiCoreEntryPoint/PeiCoreEntryPoint.inf
>    PerformanceLib|MdeModulePkg/Library/PeiPerformanceLib/PeiPerformanceLib.inf
> +  ReportStatusCodeLib|MdeModulePkg/Library/PeiReportStatusCodeLib/PeiReportStatusCodeLib.inf
>    OemHookStatusCodeLib|MdeModulePkg/Library/OemHookStatusCodeLibNull/OemHookStatusCodeLibNull.inf
>    PeCoffGetEntryPointLib|MdePkg/Library/BasePeCoffGetEntryPointLib/BasePeCoffGetEntryPointLib.inf
>    ExtractGuidedSectionLib|MdePkg/Library/PeiExtractGuidedSectionLib/PeiExtractGuidedSectionLib.inf
> @@ -179,6 +180,7 @@ [LibraryClasses.common.PEIM]
>    MemoryAllocationLib|MdePkg/Library/PeiMemoryAllocationLib/PeiMemoryAllocationLib.inf
>    PeimEntryPoint|MdePkg/Library/PeimEntryPoint/PeimEntryPoint.inf
>    PerformanceLib|MdeModulePkg/Library/PeiPerformanceLib/PeiPerformanceLib.inf
> +  ReportStatusCodeLib|MdeModulePkg/Library/PeiReportStatusCodeLib/PeiReportStatusCodeLib.inf
>    OemHookStatusCodeLib|MdeModulePkg/Library/OemHookStatusCodeLibNull/OemHookStatusCodeLibNull.inf
>    PeCoffGetEntryPointLib|MdePkg/Library/BasePeCoffGetEntryPointLib/BasePeCoffGetEntryPointLib.inf
>    PeiResourcePublicationLib|MdePkg/Library/PeiResourcePublicationLib/PeiResourcePublicationLib.inf
> -- 
> 'Guid(CE165669-3EF3-493F-B85D-6190EE5B9759)'
> 
> 


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH edk2-platforms v1] Platform/ARM: Add PeiReportStatusCodeLib
  2018-05-09 16:24 ` Leif Lindholm
@ 2018-05-09 16:58   ` Alexei Fedorov
  2018-05-09 21:13     ` Leif Lindholm
  0 siblings, 1 reply; 8+ messages in thread
From: Alexei Fedorov @ 2018-05-09 16:58 UTC (permalink / raw)
  To: Leif Lindholm
  Cc: edk2-devel@lists.01.org, Arvind Chauhan, Daniil Egranov,
	Thomas Abraham, Ard.Biesheuvel@linaro.org, Matteo Carlini,
	Stephanie Hughes-Fitt, nd, Evan Lloyd, Sami Mujawar

Hi Leif,


You wrote:

"Yes, this fixes a bug, however I am still unable to build FVP with
-D ARM_FVP_RUN_NORFLASH:
---
In file included from
/work/git/edk2-platforms/Platform/ARM/VExpressPkg/Library/ArmVExpressLibRTSM/RTSM.c:22:0:
/work/git/edk2-platforms/Platform/ARM/VExpressPkg/Include/Platform/RTSM/ArmPlatform.h:19:33:
fatal error: VExpressMotherBoard.h: No such file or directory
 #include <VExpressMotherBoard.h>
                                 ^
compilation terminated.
---

Presumably this has been broken since commit 8ad58788b5c did not carry across
-I$(WORKSPACE)/ArmPlatformPkg/ArmVExpressPkg/Include in
GCC:*_*_AARCH64_PLATFORM_FLAGS when migrating ArmVExpressPkg from edk2.

Can you confirm whether you can reproduce this?"


Yes, & it was fixed it by adding

-I$(WORKSPACE)/Platform/ARM/VExpressPkg/Include

in GCC:*_*_AARCH64_PLATFORM_FLAGS of ArmVExpress-FVP-AArch64.dsc:

GCC:*_*_AARCH64_PLATFORM_FLAGS == -I$(WORKSPACE)/Platform/ARM/VExpressPkg/Include -I$(WORKSPACE)/Platform/ARM/VExpressPkg/Include/Platform/RTSM


Regards.

Alexei

________________________________
From: Leif Lindholm <leif.lindholm@linaro.org>
Sent: 09 May 2018 17:24:23
To: Alexei Fedorov
Cc: edk2-devel@lists.01.org; Arvind Chauhan; Daniil Egranov; Thomas Abraham; Ard.Biesheuvel@linaro.org; Matteo Carlini; Stephanie Hughes-Fitt; nd; Evan Lloyd; Sami Mujawar
Subject: Re: [PATCH edk2-platforms v1] Platform/ARM: Add PeiReportStatusCodeLib

Hi Alexei,

On Thu, May 03, 2018 at 10:24:21AM +0100, Alexei Fedorov wrote:
> From: Alexei Fedorov <Alexei.Fedorov@arm.com>
>
> UEFI build fails for ArmVExpress-FVP-AArch64 when using
> "-D ARM_FVP_RUN_NORFLASH" build option, which prevents
> EDK2_SKIP_PEICORE macro from being defined in
> ArmVExpress-FVP-AArch64.dsc:
>
> !ifndef ARM_FVP_RUN_NORFLASH
>   DEFINE EDK2_SKIP_PEICORE=1
> !endif
>
> When EDK2_SKIP_PEICORE macro is not defined, build fails with
> errors 1001:
> Module type [PEI_CORE] is not supported by library instance
> [MdeModulePkg\Library\DxeReportStatusCodeLib\DxeReportStatusCodeLib.inf]
> consumed by [n:\edk2\MdeModulePkg\Core\Pei\PeiMain.inf]
> and
> Module type [PEIM] is not supported by library instance
> [MdeModulePkg\Library\DxeReportStatusCodeLib\DxeReportStatusCodeLib.inf]
> consumed by [n:\edk2\MdeModulePkg\Core\DxeIplPeim\DxeIpl.inf]
>
> This patch fixes the above build errors by adding
> MdeModulePkg/Library/PeiReportStatusCodeLib/PeiReportStatusCodeLib.inf
> in [LibraryClasses.common.PEI_CORE] and [LibraryClasses.common.PEIM]
> sections of ArmVExpress.dsc.inc.

Yes, this fixes a bug, however I am still unable to build FVP with
-D ARM_FVP_RUN_NORFLASH:
---
In file included from
/work/git/edk2-platforms/Platform/ARM/VExpressPkg/Library/ArmVExpressLibRTSM/RTSM.c:22:0:
/work/git/edk2-platforms/Platform/ARM/VExpressPkg/Include/Platform/RTSM/ArmPlatform.h:19:33:
fatal error: VExpressMotherBoard.h: No such file or directory
 #include <VExpressMotherBoard.h>
                                 ^
compilation terminated.
---

Presumably this has been broken since commit 8ad58788b5c did not carry across
-I$(WORKSPACE)/ArmPlatformPkg/ArmVExpressPkg/Include in
GCC:*_*_AARCH64_PLATFORM_FLAGS when migrating ArmVExpressPkg from edk2.

Can you confirm whether you can reproduce this?

If so, the following stanza resolves the issue for me:
diff --git
a/Platform/ARM/VExpressPkg/Library/ArmVExpressLibRTSM/ArmVExpressLibSec.inf
b/Platform/ARM/VExpressPkg/Library/ArmVExpressLibRTSM/ArmVExpressLibSec.inf
index 2287756cf8..ed9720e8ce 100644
--- a/Platform/ARM/VExpressPkg/Library/ArmVExpressLibRTSM/ArmVExpressLibSec.inf
+++ b/Platform/ARM/VExpressPkg/Library/ArmVExpressLibRTSM/ArmVExpressLibSec.inf
@@ -22,6 +22,7 @@ [Defines]
 [Packages]
   MdePkg/MdePkg.dec
   MdeModulePkg/MdeModulePkg.dec
+  Platform/ARM/VExpressPkg/ArmVExpressPkg.dec
   EmbeddedPkg/EmbeddedPkg.dec
   ArmPkg/ArmPkg.dec
   ArmPlatformPkg/ArmPlatformPkg.dec

Best Regards,

Leif

> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Alexei Fedorov <Alexei.Fedorov@arm.com>
> Reviewed-by:   Evan Lloyd <Evan.Lloyd@arm.com>
> ---
> All the changes can be reviewed at:
> https://github.com/AlexeiFedorov/edk2-platforms/tree/237_add_peireportstatuscodelib_v1
>
> Notes:
>     v1:
>     - Add PeiReportStatusCodeLib in PEI_CORE and PEIM sections   [Alexei]
>
>  Platform/ARM/VExpressPkg/ArmVExpress.dsc.inc | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/Platform/ARM/VExpressPkg/ArmVExpress.dsc.inc b/Platform/ARM/VExpressPkg/ArmVExpress.dsc.inc
> index de201b0c81d020e1e06ee320cf0f14f186723657..bb899b91c525ee821b9506cca75224f4bc41e3ae 100644
> --- a/Platform/ARM/VExpressPkg/ArmVExpress.dsc.inc
> +++ b/Platform/ARM/VExpressPkg/ArmVExpress.dsc.inc
> @@ -166,6 +166,7 @@ [LibraryClasses.common.PEI_CORE]
>    MemoryAllocationLib|MdePkg/Library/PeiMemoryAllocationLib/PeiMemoryAllocationLib.inf
>    PeiCoreEntryPoint|MdePkg/Library/PeiCoreEntryPoint/PeiCoreEntryPoint.inf
>    PerformanceLib|MdeModulePkg/Library/PeiPerformanceLib/PeiPerformanceLib.inf
> +  ReportStatusCodeLib|MdeModulePkg/Library/PeiReportStatusCodeLib/PeiReportStatusCodeLib.inf
>    OemHookStatusCodeLib|MdeModulePkg/Library/OemHookStatusCodeLibNull/OemHookStatusCodeLibNull.inf
>    PeCoffGetEntryPointLib|MdePkg/Library/BasePeCoffGetEntryPointLib/BasePeCoffGetEntryPointLib.inf
>    ExtractGuidedSectionLib|MdePkg/Library/PeiExtractGuidedSectionLib/PeiExtractGuidedSectionLib.inf
> @@ -179,6 +180,7 @@ [LibraryClasses.common.PEIM]
>    MemoryAllocationLib|MdePkg/Library/PeiMemoryAllocationLib/PeiMemoryAllocationLib.inf
>    PeimEntryPoint|MdePkg/Library/PeimEntryPoint/PeimEntryPoint.inf
>    PerformanceLib|MdeModulePkg/Library/PeiPerformanceLib/PeiPerformanceLib.inf
> +  ReportStatusCodeLib|MdeModulePkg/Library/PeiReportStatusCodeLib/PeiReportStatusCodeLib.inf
>    OemHookStatusCodeLib|MdeModulePkg/Library/OemHookStatusCodeLibNull/OemHookStatusCodeLibNull.inf
>    PeCoffGetEntryPointLib|MdePkg/Library/BasePeCoffGetEntryPointLib/BasePeCoffGetEntryPointLib.inf
>    PeiResourcePublicationLib|MdePkg/Library/PeiResourcePublicationLib/PeiResourcePublicationLib.inf
> --
> 'Guid(CE165669-3EF3-493F-B85D-6190EE5B9759)'
>
>


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH edk2-platforms v1] Platform/ARM: Add PeiReportStatusCodeLib
  2018-05-09 16:58   ` Alexei Fedorov
@ 2018-05-09 21:13     ` Leif Lindholm
  2018-05-10  9:56       ` Alexei Fedorov
  0 siblings, 1 reply; 8+ messages in thread
From: Leif Lindholm @ 2018-05-09 21:13 UTC (permalink / raw)
  To: Alexei Fedorov
  Cc: edk2-devel@lists.01.org, Arvind Chauhan, Daniil Egranov,
	Thomas Abraham, Ard.Biesheuvel@linaro.org, Matteo Carlini,
	Stephanie Hughes-Fitt, nd, Evan Lloyd, Sami Mujawar

On Wed, May 09, 2018 at 04:58:52PM +0000, Alexei Fedorov wrote:
> Hi Leif,
> 
> You wrote:
> > Yes, this fixes a bug, however I am still unable to build FVP with
> > -D ARM_FVP_RUN_NORFLASH:
> > ---
> > In file included from
> > /work/git/edk2-platforms/Platform/ARM/VExpressPkg/Library/ArmVExpressLibRTSM/RTSM.c:22:0:
> > /work/git/edk2-platforms/Platform/ARM/VExpressPkg/Include/Platform/RTSM/ArmPlatform.h:19:33:
> > fatal error: VExpressMotherBoard.h: No such file or directory
> >  #include <VExpressMotherBoard.h>
> >                                  ^
> > compilation terminated.
> > ---
> > 
> > Presumably this has been broken since commit 8ad58788b5c did not carry across
> > -I$(WORKSPACE)/ArmPlatformPkg/ArmVExpressPkg/Include in
> > GCC:*_*_AARCH64_PLATFORM_FLAGS when migrating ArmVExpressPkg from edk2.
> > 
> > Can you confirm whether you can reproduce this?"
> > 
> 
> Yes, & it was fixed it by adding
> 
> -I$(WORKSPACE)/Platform/ARM/VExpressPkg/Include
> 
> in GCC:*_*_AARCH64_PLATFORM_FLAGS of ArmVExpress-FVP-AArch64.dsc:
> 
> GCC:*_*_AARCH64_PLATFORM_FLAGS == -I$(WORKSPACE)/Platform/ARM/VExpressPkg/Include -I$(WORKSPACE)/Platform/ARM/VExpressPkg/Include/Platform/RTSM

I still prefer the .dec way over ading more explicit platform-specific
-I flags.

Could you fold that into the patch and update the subject line to
something like "fix FVP build with -D ARM_FVP_RUN_NORFLASH"?

Regards,

Leif

> 
> Regards.
> 
> Alexei
> 
> ________________________________
> From: Leif Lindholm <leif.lindholm@linaro.org>
> Sent: 09 May 2018 17:24:23
> To: Alexei Fedorov
> Cc: edk2-devel@lists.01.org; Arvind Chauhan; Daniil Egranov; Thomas Abraham; Ard.Biesheuvel@linaro.org; Matteo Carlini; Stephanie Hughes-Fitt; nd; Evan Lloyd; Sami Mujawar
> Subject: Re: [PATCH edk2-platforms v1] Platform/ARM: Add PeiReportStatusCodeLib
> 
> Hi Alexei,
> 
> On Thu, May 03, 2018 at 10:24:21AM +0100, Alexei Fedorov wrote:
> > From: Alexei Fedorov <Alexei.Fedorov@arm.com>
> >
> > UEFI build fails for ArmVExpress-FVP-AArch64 when using
> > "-D ARM_FVP_RUN_NORFLASH" build option, which prevents
> > EDK2_SKIP_PEICORE macro from being defined in
> > ArmVExpress-FVP-AArch64.dsc:
> >
> > !ifndef ARM_FVP_RUN_NORFLASH
> >   DEFINE EDK2_SKIP_PEICORE=1
> > !endif
> >
> > When EDK2_SKIP_PEICORE macro is not defined, build fails with
> > errors 1001:
> > Module type [PEI_CORE] is not supported by library instance
> > [MdeModulePkg\Library\DxeReportStatusCodeLib\DxeReportStatusCodeLib.inf]
> > consumed by [n:\edk2\MdeModulePkg\Core\Pei\PeiMain.inf]
> > and
> > Module type [PEIM] is not supported by library instance
> > [MdeModulePkg\Library\DxeReportStatusCodeLib\DxeReportStatusCodeLib.inf]
> > consumed by [n:\edk2\MdeModulePkg\Core\DxeIplPeim\DxeIpl.inf]
> >
> > This patch fixes the above build errors by adding
> > MdeModulePkg/Library/PeiReportStatusCodeLib/PeiReportStatusCodeLib.inf
> > in [LibraryClasses.common.PEI_CORE] and [LibraryClasses.common.PEIM]
> > sections of ArmVExpress.dsc.inc.
> 
> Yes, this fixes a bug, however I am still unable to build FVP with
> -D ARM_FVP_RUN_NORFLASH:
> ---
> In file included from
> /work/git/edk2-platforms/Platform/ARM/VExpressPkg/Library/ArmVExpressLibRTSM/RTSM.c:22:0:
> /work/git/edk2-platforms/Platform/ARM/VExpressPkg/Include/Platform/RTSM/ArmPlatform.h:19:33:
> fatal error: VExpressMotherBoard.h: No such file or directory
>  #include <VExpressMotherBoard.h>
>                                  ^
> compilation terminated.
> ---
> 
> Presumably this has been broken since commit 8ad58788b5c did not carry across
> -I$(WORKSPACE)/ArmPlatformPkg/ArmVExpressPkg/Include in
> GCC:*_*_AARCH64_PLATFORM_FLAGS when migrating ArmVExpressPkg from edk2.
> 
> Can you confirm whether you can reproduce this?
> 
> If so, the following stanza resolves the issue for me:
> diff --git
> a/Platform/ARM/VExpressPkg/Library/ArmVExpressLibRTSM/ArmVExpressLibSec.inf
> b/Platform/ARM/VExpressPkg/Library/ArmVExpressLibRTSM/ArmVExpressLibSec.inf
> index 2287756cf8..ed9720e8ce 100644
> --- a/Platform/ARM/VExpressPkg/Library/ArmVExpressLibRTSM/ArmVExpressLibSec.inf
> +++ b/Platform/ARM/VExpressPkg/Library/ArmVExpressLibRTSM/ArmVExpressLibSec.inf
> @@ -22,6 +22,7 @@ [Defines]
>  [Packages]
>    MdePkg/MdePkg.dec
>    MdeModulePkg/MdeModulePkg.dec
> +  Platform/ARM/VExpressPkg/ArmVExpressPkg.dec
>    EmbeddedPkg/EmbeddedPkg.dec
>    ArmPkg/ArmPkg.dec
>    ArmPlatformPkg/ArmPlatformPkg.dec
> 
> Best Regards,
> 
> Leif
> 
> > Contributed-under: TianoCore Contribution Agreement 1.1
> > Signed-off-by: Alexei Fedorov <Alexei.Fedorov@arm.com>
> > Reviewed-by:   Evan Lloyd <Evan.Lloyd@arm.com>
> > ---
> > All the changes can be reviewed at:
> > https://github.com/AlexeiFedorov/edk2-platforms/tree/237_add_peireportstatuscodelib_v1
> >
> > Notes:
> >     v1:
> >     - Add PeiReportStatusCodeLib in PEI_CORE and PEIM sections   [Alexei]
> >
> >  Platform/ARM/VExpressPkg/ArmVExpress.dsc.inc | 2 ++
> >  1 file changed, 2 insertions(+)
> >
> > diff --git a/Platform/ARM/VExpressPkg/ArmVExpress.dsc.inc b/Platform/ARM/VExpressPkg/ArmVExpress.dsc.inc
> > index de201b0c81d020e1e06ee320cf0f14f186723657..bb899b91c525ee821b9506cca75224f4bc41e3ae 100644
> > --- a/Platform/ARM/VExpressPkg/ArmVExpress.dsc.inc
> > +++ b/Platform/ARM/VExpressPkg/ArmVExpress.dsc.inc
> > @@ -166,6 +166,7 @@ [LibraryClasses.common.PEI_CORE]
> >    MemoryAllocationLib|MdePkg/Library/PeiMemoryAllocationLib/PeiMemoryAllocationLib.inf
> >    PeiCoreEntryPoint|MdePkg/Library/PeiCoreEntryPoint/PeiCoreEntryPoint.inf
> >    PerformanceLib|MdeModulePkg/Library/PeiPerformanceLib/PeiPerformanceLib.inf
> > +  ReportStatusCodeLib|MdeModulePkg/Library/PeiReportStatusCodeLib/PeiReportStatusCodeLib.inf
> >    OemHookStatusCodeLib|MdeModulePkg/Library/OemHookStatusCodeLibNull/OemHookStatusCodeLibNull.inf
> >    PeCoffGetEntryPointLib|MdePkg/Library/BasePeCoffGetEntryPointLib/BasePeCoffGetEntryPointLib.inf
> >    ExtractGuidedSectionLib|MdePkg/Library/PeiExtractGuidedSectionLib/PeiExtractGuidedSectionLib.inf
> > @@ -179,6 +180,7 @@ [LibraryClasses.common.PEIM]
> >    MemoryAllocationLib|MdePkg/Library/PeiMemoryAllocationLib/PeiMemoryAllocationLib.inf
> >    PeimEntryPoint|MdePkg/Library/PeimEntryPoint/PeimEntryPoint.inf
> >    PerformanceLib|MdeModulePkg/Library/PeiPerformanceLib/PeiPerformanceLib.inf
> > +  ReportStatusCodeLib|MdeModulePkg/Library/PeiReportStatusCodeLib/PeiReportStatusCodeLib.inf
> >    OemHookStatusCodeLib|MdeModulePkg/Library/OemHookStatusCodeLibNull/OemHookStatusCodeLibNull.inf
> >    PeCoffGetEntryPointLib|MdePkg/Library/BasePeCoffGetEntryPointLib/BasePeCoffGetEntryPointLib.inf
> >    PeiResourcePublicationLib|MdePkg/Library/PeiResourcePublicationLib/PeiResourcePublicationLib.inf
> > --
> > 'Guid(CE165669-3EF3-493F-B85D-6190EE5B9759)'
> >
> >


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH edk2-platforms v1] Platform/ARM: Add PeiReportStatusCodeLib
  2018-05-09 21:13     ` Leif Lindholm
@ 2018-05-10  9:56       ` Alexei Fedorov
  0 siblings, 0 replies; 8+ messages in thread
From: Alexei Fedorov @ 2018-05-10  9:56 UTC (permalink / raw)
  To: Leif Lindholm
  Cc: edk2-devel@lists.01.org, Arvind Chauhan, Daniil Egranov,
	Thomas Abraham, Ard.Biesheuvel@linaro.org, Matteo Carlini,
	Stephanie Hughes-Fitt, nd, Evan Lloyd, Sami Mujawar

Hi Leif,


>Could you fold that into the patch and update the subject line to
something like "fix FVP build with -D ARM_FVP_RUN_NORFLASH"?


Yes, I'll provide a new patch.


Alexei

________________________________
From: Leif Lindholm <leif.lindholm@linaro.org>
Sent: 09 May 2018 22:13:36
To: Alexei Fedorov
Cc: edk2-devel@lists.01.org; Arvind Chauhan; Daniil Egranov; Thomas Abraham; Ard.Biesheuvel@linaro.org; Matteo Carlini; Stephanie Hughes-Fitt; nd; Evan Lloyd; Sami Mujawar
Subject: Re: [PATCH edk2-platforms v1] Platform/ARM: Add PeiReportStatusCodeLib

On Wed, May 09, 2018 at 04:58:52PM +0000, Alexei Fedorov wrote:
> Hi Leif,
>
> You wrote:
> > Yes, this fixes a bug, however I am still unable to build FVP with
> > -D ARM_FVP_RUN_NORFLASH:
> > ---
> > In file included from
> > /work/git/edk2-platforms/Platform/ARM/VExpressPkg/Library/ArmVExpressLibRTSM/RTSM.c:22:0:
> > /work/git/edk2-platforms/Platform/ARM/VExpressPkg/Include/Platform/RTSM/ArmPlatform.h:19:33:
> > fatal error: VExpressMotherBoard.h: No such file or directory
> >  #include <VExpressMotherBoard.h>
> >                                  ^
> > compilation terminated.
> > ---
> >
> > Presumably this has been broken since commit 8ad58788b5c did not carry across
> > -I$(WORKSPACE)/ArmPlatformPkg/ArmVExpressPkg/Include in
> > GCC:*_*_AARCH64_PLATFORM_FLAGS when migrating ArmVExpressPkg from edk2.
> >
> > Can you confirm whether you can reproduce this?"
> >
>
> Yes, & it was fixed it by adding
>
> -I$(WORKSPACE)/Platform/ARM/VExpressPkg/Include
>
> in GCC:*_*_AARCH64_PLATFORM_FLAGS of ArmVExpress-FVP-AArch64.dsc:
>
> GCC:*_*_AARCH64_PLATFORM_FLAGS == -I$(WORKSPACE)/Platform/ARM/VExpressPkg/Include -I$(WORKSPACE)/Platform/ARM/VExpressPkg/Include/Platform/RTSM

I still prefer the .dec way over ading more explicit platform-specific
-I flags.

Could you fold that into the patch and update the subject line to
something like "fix FVP build with -D ARM_FVP_RUN_NORFLASH"?

Regards,

Leif

>
> Regards.
>
> Alexei
>
> ________________________________
> From: Leif Lindholm <leif.lindholm@linaro.org>
> Sent: 09 May 2018 17:24:23
> To: Alexei Fedorov
> Cc: edk2-devel@lists.01.org; Arvind Chauhan; Daniil Egranov; Thomas Abraham; Ard.Biesheuvel@linaro.org; Matteo Carlini; Stephanie Hughes-Fitt; nd; Evan Lloyd; Sami Mujawar
> Subject: Re: [PATCH edk2-platforms v1] Platform/ARM: Add PeiReportStatusCodeLib
>
> Hi Alexei,
>
> On Thu, May 03, 2018 at 10:24:21AM +0100, Alexei Fedorov wrote:
> > From: Alexei Fedorov <Alexei.Fedorov@arm.com>
> >
> > UEFI build fails for ArmVExpress-FVP-AArch64 when using
> > "-D ARM_FVP_RUN_NORFLASH" build option, which prevents
> > EDK2_SKIP_PEICORE macro from being defined in
> > ArmVExpress-FVP-AArch64.dsc:
> >
> > !ifndef ARM_FVP_RUN_NORFLASH
> >   DEFINE EDK2_SKIP_PEICORE=1
> > !endif
> >
> > When EDK2_SKIP_PEICORE macro is not defined, build fails with
> > errors 1001:
> > Module type [PEI_CORE] is not supported by library instance
> > [MdeModulePkg\Library\DxeReportStatusCodeLib\DxeReportStatusCodeLib.inf]
> > consumed by [n:\edk2\MdeModulePkg\Core\Pei\PeiMain.inf]
> > and
> > Module type [PEIM] is not supported by library instance
> > [MdeModulePkg\Library\DxeReportStatusCodeLib\DxeReportStatusCodeLib.inf]
> > consumed by [n:\edk2\MdeModulePkg\Core\DxeIplPeim\DxeIpl.inf]
> >
> > This patch fixes the above build errors by adding
> > MdeModulePkg/Library/PeiReportStatusCodeLib/PeiReportStatusCodeLib.inf
> > in [LibraryClasses.common.PEI_CORE] and [LibraryClasses.common.PEIM]
> > sections of ArmVExpress.dsc.inc.
>
> Yes, this fixes a bug, however I am still unable to build FVP with
> -D ARM_FVP_RUN_NORFLASH:
> ---
> In file included from
> /work/git/edk2-platforms/Platform/ARM/VExpressPkg/Library/ArmVExpressLibRTSM/RTSM.c:22:0:
> /work/git/edk2-platforms/Platform/ARM/VExpressPkg/Include/Platform/RTSM/ArmPlatform.h:19:33:
> fatal error: VExpressMotherBoard.h: No such file or directory
>  #include <VExpressMotherBoard.h>
>                                  ^
> compilation terminated.
> ---
>
> Presumably this has been broken since commit 8ad58788b5c did not carry across
> -I$(WORKSPACE)/ArmPlatformPkg/ArmVExpressPkg/Include in
> GCC:*_*_AARCH64_PLATFORM_FLAGS when migrating ArmVExpressPkg from edk2.
>
> Can you confirm whether you can reproduce this?
>
> If so, the following stanza resolves the issue for me:
> diff --git
> a/Platform/ARM/VExpressPkg/Library/ArmVExpressLibRTSM/ArmVExpressLibSec.inf
> b/Platform/ARM/VExpressPkg/Library/ArmVExpressLibRTSM/ArmVExpressLibSec.inf
> index 2287756cf8..ed9720e8ce 100644
> --- a/Platform/ARM/VExpressPkg/Library/ArmVExpressLibRTSM/ArmVExpressLibSec.inf
> +++ b/Platform/ARM/VExpressPkg/Library/ArmVExpressLibRTSM/ArmVExpressLibSec.inf
> @@ -22,6 +22,7 @@ [Defines]
>  [Packages]
>    MdePkg/MdePkg.dec
>    MdeModulePkg/MdeModulePkg.dec
> +  Platform/ARM/VExpressPkg/ArmVExpressPkg.dec
>    EmbeddedPkg/EmbeddedPkg.dec
>    ArmPkg/ArmPkg.dec
>    ArmPlatformPkg/ArmPlatformPkg.dec
>
> Best Regards,
>
> Leif
>
> > Contributed-under: TianoCore Contribution Agreement 1.1
> > Signed-off-by: Alexei Fedorov <Alexei.Fedorov@arm.com>
> > Reviewed-by:   Evan Lloyd <Evan.Lloyd@arm.com>
> > ---
> > All the changes can be reviewed at:
> > https://github.com/AlexeiFedorov/edk2-platforms/tree/237_add_peireportstatuscodelib_v1
> >
> > Notes:
> >     v1:
> >     - Add PeiReportStatusCodeLib in PEI_CORE and PEIM sections   [Alexei]
> >
> >  Platform/ARM/VExpressPkg/ArmVExpress.dsc.inc | 2 ++
> >  1 file changed, 2 insertions(+)
> >
> > diff --git a/Platform/ARM/VExpressPkg/ArmVExpress.dsc.inc b/Platform/ARM/VExpressPkg/ArmVExpress.dsc.inc
> > index de201b0c81d020e1e06ee320cf0f14f186723657..bb899b91c525ee821b9506cca75224f4bc41e3ae 100644
> > --- a/Platform/ARM/VExpressPkg/ArmVExpress.dsc.inc
> > +++ b/Platform/ARM/VExpressPkg/ArmVExpress.dsc.inc
> > @@ -166,6 +166,7 @@ [LibraryClasses.common.PEI_CORE]
> >    MemoryAllocationLib|MdePkg/Library/PeiMemoryAllocationLib/PeiMemoryAllocationLib.inf
> >    PeiCoreEntryPoint|MdePkg/Library/PeiCoreEntryPoint/PeiCoreEntryPoint.inf
> >    PerformanceLib|MdeModulePkg/Library/PeiPerformanceLib/PeiPerformanceLib.inf
> > +  ReportStatusCodeLib|MdeModulePkg/Library/PeiReportStatusCodeLib/PeiReportStatusCodeLib.inf
> >    OemHookStatusCodeLib|MdeModulePkg/Library/OemHookStatusCodeLibNull/OemHookStatusCodeLibNull.inf
> >    PeCoffGetEntryPointLib|MdePkg/Library/BasePeCoffGetEntryPointLib/BasePeCoffGetEntryPointLib.inf
> >    ExtractGuidedSectionLib|MdePkg/Library/PeiExtractGuidedSectionLib/PeiExtractGuidedSectionLib.inf
> > @@ -179,6 +180,7 @@ [LibraryClasses.common.PEIM]
> >    MemoryAllocationLib|MdePkg/Library/PeiMemoryAllocationLib/PeiMemoryAllocationLib.inf
> >    PeimEntryPoint|MdePkg/Library/PeimEntryPoint/PeimEntryPoint.inf
> >    PerformanceLib|MdeModulePkg/Library/PeiPerformanceLib/PeiPerformanceLib.inf
> > +  ReportStatusCodeLib|MdeModulePkg/Library/PeiReportStatusCodeLib/PeiReportStatusCodeLib.inf
> >    OemHookStatusCodeLib|MdeModulePkg/Library/OemHookStatusCodeLibNull/OemHookStatusCodeLibNull.inf
> >    PeCoffGetEntryPointLib|MdePkg/Library/BasePeCoffGetEntryPointLib/BasePeCoffGetEntryPointLib.inf
> >    PeiResourcePublicationLib|MdePkg/Library/PeiResourcePublicationLib/PeiResourcePublicationLib.inf
> > --
> > 'Guid(CE165669-3EF3-493F-B85D-6190EE5B9759)'
> >
> >


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2018-05-10  9:56 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-05-03  9:24 [PATCH edk2-platforms v1] Platform/ARM: Add PeiReportStatusCodeLib Alexei Fedorov
2018-05-03 11:44 ` Ard Biesheuvel
2018-05-03 12:07   ` Alan Ott
2018-05-03 12:28   ` Laszlo Ersek
2018-05-09 16:24 ` Leif Lindholm
2018-05-09 16:58   ` Alexei Fedorov
2018-05-09 21:13     ` Leif Lindholm
2018-05-10  9:56       ` Alexei Fedorov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox