* [PATCH 0/2] Implement BuildFv3Hob for PrePiHobLib and ArmVirtDxeHobLib @ 2017-10-05 6:33 Star Zeng 2017-10-05 6:33 ` [PATCH 1/2] EmbeddedPkg PrePiHobLib: Implement BuildFv3Hob Star Zeng ` (2 more replies) 0 siblings, 3 replies; 9+ messages in thread From: Star Zeng @ 2017-10-05 6:33 UTC (permalink / raw) To: edk2-devel Cc: Star Zeng, Leif Lindholm, Ard Biesheuvel, Laszlo Ersek, Liming Gao This patch series is supplement of https://lists.01.org/pipermail/edk2-devel/2017-October/015589.html. Cc: Leif Lindholm <leif.lindholm@linaro.org> Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org> Cc: Laszlo Ersek <lersek@redhat.com> Cc: Liming Gao <liming.gao@intel.com> Star Zeng (2): EmbeddedPkg PrePiHobLib: Implement BuildFv3Hob ArmVirtPkg ArmVirtDxeHobLib: Implement BuildFv3Hob ArmVirtPkg/Library/ArmVirtDxeHobLib/HobLib.c | 34 +++++++++++++++++++++- EmbeddedPkg/Library/PrePiHobLib/Hob.c | 43 +++++++++++++++++++++++++++- 2 files changed, 75 insertions(+), 2 deletions(-) -- 2.13.3.windows.1 ^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH 1/2] EmbeddedPkg PrePiHobLib: Implement BuildFv3Hob 2017-10-05 6:33 [PATCH 0/2] Implement BuildFv3Hob for PrePiHobLib and ArmVirtDxeHobLib Star Zeng @ 2017-10-05 6:33 ` Star Zeng 2017-10-05 7:55 ` Ard Biesheuvel 2017-10-05 6:33 ` [PATCH 2/2] ArmVirtPkg ArmVirtDxeHobLib: " Star Zeng 2017-10-05 7:57 ` [PATCH 0/2] Implement BuildFv3Hob for PrePiHobLib and ArmVirtDxeHobLib Ard Biesheuvel 2 siblings, 1 reply; 9+ messages in thread From: Star Zeng @ 2017-10-05 6:33 UTC (permalink / raw) To: edk2-devel Cc: Star Zeng, Leif Lindholm, Ard Biesheuvel, Laszlo Ersek, Liming Gao Cc: Leif Lindholm <leif.lindholm@linaro.org> Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org> Cc: Laszlo Ersek <lersek@redhat.com> Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Star Zeng <star.zeng@intel.com> --- EmbeddedPkg/Library/PrePiHobLib/Hob.c | 43 ++++++++++++++++++++++++++++++++++- 1 file changed, 42 insertions(+), 1 deletion(-) diff --git a/EmbeddedPkg/Library/PrePiHobLib/Hob.c b/EmbeddedPkg/Library/PrePiHobLib/Hob.c index aff532259ef4..a681587d3ee0 100644 --- a/EmbeddedPkg/Library/PrePiHobLib/Hob.c +++ b/EmbeddedPkg/Library/PrePiHobLib/Hob.c @@ -1,6 +1,6 @@ /** @file - Copyright (c) 2010, Apple Inc. All rights reserved.<BR> + Copyright (c) 2010 - 2017, Apple Inc. All rights reserved.<BR> This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License @@ -601,7 +601,48 @@ BuildFv2Hob ( CopyGuid (&Hob->FileName, FileName); } +/** + Builds a EFI_HOB_TYPE_FV3 HOB. + + This function builds a EFI_HOB_TYPE_FV3 HOB. + It can only be invoked during PEI phase; + for DXE phase, it will ASSERT() since PEI HOB is read-only for DXE phase. + + If there is no additional space for HOB creation, then ASSERT(). + + @param BaseAddress The base address of the Firmware Volume. + @param Length The size of the Firmware Volume in bytes. + @param AuthenticationStatus The authentication status. + @param ExtractedFv TRUE if the FV was extracted as a file within another firmware volume. + FALSE otherwise. + @param FvName The name of the Firmware Volume. Valid only if IsExtractedFv is TRUE + @param FileName The name of the file. Valid only if IsExtractedFv is TRUE + +**/ +VOID +EFIAPI +BuildFv3Hob ( + IN EFI_PHYSICAL_ADDRESS BaseAddress, + IN UINT64 Length, + IN UINT32 AuthenticationStatus, + IN BOOLEAN ExtractedFv, + IN CONST EFI_GUID *FvName, OPTIONAL + IN CONST EFI_GUID *FileName OPTIONAL + ) +{ + EFI_HOB_FIRMWARE_VOLUME3 *Hob; + + Hob = CreateHob (EFI_HOB_TYPE_FV3, (UINT16) sizeof (EFI_HOB_FIRMWARE_VOLUME3)); + Hob->BaseAddress = BaseAddress; + Hob->Length = Length; + Hob->AuthenticationStatus = AuthenticationStatus; + Hob->ExtractedFv = ExtractedFv; + if (ExtractedFv) { + CopyGuid (&Hob->FvName, FvName); + CopyGuid (&Hob->FileName, FileName); + } +} /** Builds a Capsule Volume HOB. -- 2.13.3.windows.1 ^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH 1/2] EmbeddedPkg PrePiHobLib: Implement BuildFv3Hob 2017-10-05 6:33 ` [PATCH 1/2] EmbeddedPkg PrePiHobLib: Implement BuildFv3Hob Star Zeng @ 2017-10-05 7:55 ` Ard Biesheuvel 2017-10-05 8:02 ` Zeng, Star 0 siblings, 1 reply; 9+ messages in thread From: Ard Biesheuvel @ 2017-10-05 7:55 UTC (permalink / raw) To: Star Zeng Cc: edk2-devel@lists.01.org, Leif Lindholm, Laszlo Ersek, Liming Gao On 5 October 2017 at 07:33, Star Zeng <star.zeng@intel.com> wrote: > Cc: Leif Lindholm <leif.lindholm@linaro.org> > Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org> > Cc: Laszlo Ersek <lersek@redhat.com> > Cc: Liming Gao <liming.gao@intel.com> > Contributed-under: TianoCore Contribution Agreement 1.1 > Signed-off-by: Star Zeng <star.zeng@intel.com> > --- > EmbeddedPkg/Library/PrePiHobLib/Hob.c | 43 ++++++++++++++++++++++++++++++++++- > 1 file changed, 42 insertions(+), 1 deletion(-) > > diff --git a/EmbeddedPkg/Library/PrePiHobLib/Hob.c b/EmbeddedPkg/Library/PrePiHobLib/Hob.c > index aff532259ef4..a681587d3ee0 100644 > --- a/EmbeddedPkg/Library/PrePiHobLib/Hob.c > +++ b/EmbeddedPkg/Library/PrePiHobLib/Hob.c > @@ -1,6 +1,6 @@ > /** @file > > - Copyright (c) 2010, Apple Inc. All rights reserved.<BR> > + Copyright (c) 2010 - 2017, Apple Inc. All rights reserved.<BR> > You may want to change this :-) > This program and the accompanying materials > are licensed and made available under the terms and conditions of the BSD License > @@ -601,7 +601,48 @@ BuildFv2Hob ( > CopyGuid (&Hob->FileName, FileName); > } > > +/** > + Builds a EFI_HOB_TYPE_FV3 HOB. > + > + This function builds a EFI_HOB_TYPE_FV3 HOB. > + It can only be invoked during PEI phase; > + for DXE phase, it will ASSERT() since PEI HOB is read-only for DXE phase. > + > + If there is no additional space for HOB creation, then ASSERT(). > + > + @param BaseAddress The base address of the Firmware Volume. > + @param Length The size of the Firmware Volume in bytes. > + @param AuthenticationStatus The authentication status. > + @param ExtractedFv TRUE if the FV was extracted as a file within another firmware volume. > + FALSE otherwise. > + @param FvName The name of the Firmware Volume. Valid only if IsExtractedFv is TRUE > + @param FileName The name of the file. Valid only if IsExtractedFv is TRUE > + > +**/ > +VOID > +EFIAPI > +BuildFv3Hob ( > + IN EFI_PHYSICAL_ADDRESS BaseAddress, > + IN UINT64 Length, > + IN UINT32 AuthenticationStatus, > + IN BOOLEAN ExtractedFv, > + IN CONST EFI_GUID *FvName, OPTIONAL > + IN CONST EFI_GUID *FileName OPTIONAL > + ) > +{ > + EFI_HOB_FIRMWARE_VOLUME3 *Hob; > + > + Hob = CreateHob (EFI_HOB_TYPE_FV3, (UINT16) sizeof (EFI_HOB_FIRMWARE_VOLUME3)); > > + Hob->BaseAddress = BaseAddress; > + Hob->Length = Length; > + Hob->AuthenticationStatus = AuthenticationStatus; > + Hob->ExtractedFv = ExtractedFv; > + if (ExtractedFv) { > + CopyGuid (&Hob->FvName, FvName); > + CopyGuid (&Hob->FileName, FileName); > + } > +} > > /** > Builds a Capsule Volume HOB. > -- > 2.13.3.windows.1 > ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 1/2] EmbeddedPkg PrePiHobLib: Implement BuildFv3Hob 2017-10-05 7:55 ` Ard Biesheuvel @ 2017-10-05 8:02 ` Zeng, Star 0 siblings, 0 replies; 9+ messages in thread From: Zeng, Star @ 2017-10-05 8:02 UTC (permalink / raw) To: Ard Biesheuvel Cc: edk2-devel@lists.01.org, Laszlo Ersek, Gao, Liming, Leif Lindholm, Zeng, Star Oh, my mistake. :( Just used to update the copyright date. :) Will fix it in V2 patch series. Thanks, Star -----Original Message----- From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Ard Biesheuvel Sent: Thursday, October 5, 2017 3:55 PM To: Zeng, Star <star.zeng@intel.com> Cc: edk2-devel@lists.01.org; Laszlo Ersek <lersek@redhat.com>; Gao, Liming <liming.gao@intel.com>; Leif Lindholm <leif.lindholm@linaro.org> Subject: Re: [edk2] [PATCH 1/2] EmbeddedPkg PrePiHobLib: Implement BuildFv3Hob On 5 October 2017 at 07:33, Star Zeng <star.zeng@intel.com> wrote: > Cc: Leif Lindholm <leif.lindholm@linaro.org> > Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org> > Cc: Laszlo Ersek <lersek@redhat.com> > Cc: Liming Gao <liming.gao@intel.com> > Contributed-under: TianoCore Contribution Agreement 1.1 > Signed-off-by: Star Zeng <star.zeng@intel.com> > --- > EmbeddedPkg/Library/PrePiHobLib/Hob.c | 43 > ++++++++++++++++++++++++++++++++++- > 1 file changed, 42 insertions(+), 1 deletion(-) > > diff --git a/EmbeddedPkg/Library/PrePiHobLib/Hob.c > b/EmbeddedPkg/Library/PrePiHobLib/Hob.c > index aff532259ef4..a681587d3ee0 100644 > --- a/EmbeddedPkg/Library/PrePiHobLib/Hob.c > +++ b/EmbeddedPkg/Library/PrePiHobLib/Hob.c > @@ -1,6 +1,6 @@ > /** @file > > - Copyright (c) 2010, Apple Inc. All rights reserved.<BR> > + Copyright (c) 2010 - 2017, Apple Inc. All rights reserved.<BR> > You may want to change this :-) > This program and the accompanying materials > are licensed and made available under the terms and conditions of > the BSD License @@ -601,7 +601,48 @@ BuildFv2Hob ( > CopyGuid (&Hob->FileName, FileName); } > > +/** > + Builds a EFI_HOB_TYPE_FV3 HOB. > + > + This function builds a EFI_HOB_TYPE_FV3 HOB. > + It can only be invoked during PEI phase; for DXE phase, it will > + ASSERT() since PEI HOB is read-only for DXE phase. > + > + If there is no additional space for HOB creation, then ASSERT(). > + > + @param BaseAddress The base address of the Firmware Volume. > + @param Length The size of the Firmware Volume in bytes. > + @param AuthenticationStatus The authentication status. > + @param ExtractedFv TRUE if the FV was extracted as a file within another firmware volume. > + FALSE otherwise. > + @param FvName The name of the Firmware Volume. Valid only if IsExtractedFv is TRUE > + @param FileName The name of the file. Valid only if IsExtractedFv is TRUE > + > +**/ > +VOID > +EFIAPI > +BuildFv3Hob ( > + IN EFI_PHYSICAL_ADDRESS BaseAddress, > + IN UINT64 Length, > + IN UINT32 AuthenticationStatus, > + IN BOOLEAN ExtractedFv, > + IN CONST EFI_GUID *FvName, OPTIONAL > + IN CONST EFI_GUID *FileName OPTIONAL > + ) > +{ > + EFI_HOB_FIRMWARE_VOLUME3 *Hob; > + > + Hob = CreateHob (EFI_HOB_TYPE_FV3, (UINT16) sizeof > + (EFI_HOB_FIRMWARE_VOLUME3)); > > + Hob->BaseAddress = BaseAddress; > + Hob->Length = Length; > + Hob->AuthenticationStatus = AuthenticationStatus; > + Hob->ExtractedFv = ExtractedFv; > + if (ExtractedFv) { > + CopyGuid (&Hob->FvName, FvName); > + CopyGuid (&Hob->FileName, FileName); > + } > +} > > /** > Builds a Capsule Volume HOB. > -- > 2.13.3.windows.1 > _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel ^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH 2/2] ArmVirtPkg ArmVirtDxeHobLib: Implement BuildFv3Hob 2017-10-05 6:33 [PATCH 0/2] Implement BuildFv3Hob for PrePiHobLib and ArmVirtDxeHobLib Star Zeng 2017-10-05 6:33 ` [PATCH 1/2] EmbeddedPkg PrePiHobLib: Implement BuildFv3Hob Star Zeng @ 2017-10-05 6:33 ` Star Zeng 2017-10-05 7:56 ` Ard Biesheuvel 2017-10-05 7:57 ` [PATCH 0/2] Implement BuildFv3Hob for PrePiHobLib and ArmVirtDxeHobLib Ard Biesheuvel 2 siblings, 1 reply; 9+ messages in thread From: Star Zeng @ 2017-10-05 6:33 UTC (permalink / raw) To: edk2-devel; +Cc: Star Zeng, Ard Biesheuvel, Laszlo Ersek, Liming Gao Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org> Cc: Laszlo Ersek <lersek@redhat.com> Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Star Zeng <star.zeng@intel.com> --- ArmVirtPkg/Library/ArmVirtDxeHobLib/HobLib.c | 34 +++++++++++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-) diff --git a/ArmVirtPkg/Library/ArmVirtDxeHobLib/HobLib.c b/ArmVirtPkg/Library/ArmVirtDxeHobLib/HobLib.c index 9e617b8e6991..dc84dd32d24a 100644 --- a/ArmVirtPkg/Library/ArmVirtDxeHobLib/HobLib.c +++ b/ArmVirtPkg/Library/ArmVirtDxeHobLib/HobLib.c @@ -1,7 +1,7 @@ /** @file HOB Library implemenation for Dxe Phase with DebugLib dependency removed -Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.<BR> +Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.<BR> Copyright (c) 2014, Linaro Ltd. All rights reserved.<BR> This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License @@ -442,6 +442,38 @@ BuildFv2Hob ( ASSERT (FALSE); } +/** + Builds a EFI_HOB_TYPE_FV3 HOB. + + This function builds a EFI_HOB_TYPE_FV3 HOB. + It can only be invoked during PEI phase; + for DXE phase, it will ASSERT() since PEI HOB is read-only for DXE phase. + + If there is no additional space for HOB creation, then ASSERT(). + If the FvImage buffer is not at its required alignment, then ASSERT(). + + @param BaseAddress The base address of the Firmware Volume. + @param Length The size of the Firmware Volume in bytes. + @param AuthenticationStatus The authentication status. + @param ExtractedFv TRUE if the FV was extracted as a file within another firmware volume. + FALSE otherwise. + @param FvName The name of the Firmware Volume. Valid only if IsExtractedFv is TRUE + @param FileName The name of the file. Valid only if IsExtractedFv is TRUE + +**/ +VOID +EFIAPI +BuildFv3Hob ( + IN EFI_PHYSICAL_ADDRESS BaseAddress, + IN UINT64 Length, + IN UINT32 AuthenticationStatus, + IN BOOLEAN ExtractedFv, + IN CONST EFI_GUID *FvName, OPTIONAL + IN CONST EFI_GUID *FileName OPTIONAL + ) +{ + ASSERT (FALSE); +} /** Builds a Capsule Volume HOB. -- 2.13.3.windows.1 ^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH 2/2] ArmVirtPkg ArmVirtDxeHobLib: Implement BuildFv3Hob 2017-10-05 6:33 ` [PATCH 2/2] ArmVirtPkg ArmVirtDxeHobLib: " Star Zeng @ 2017-10-05 7:56 ` Ard Biesheuvel 2017-10-05 8:05 ` Laszlo Ersek 0 siblings, 1 reply; 9+ messages in thread From: Ard Biesheuvel @ 2017-10-05 7:56 UTC (permalink / raw) To: Star Zeng; +Cc: edk2-devel@lists.01.org, Laszlo Ersek, Liming Gao On 5 October 2017 at 07:33, Star Zeng <star.zeng@intel.com> wrote: > Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org> > Cc: Laszlo Ersek <lersek@redhat.com> > Cc: Liming Gao <liming.gao@intel.com> > Contributed-under: TianoCore Contribution Agreement 1.1 > Signed-off-by: Star Zeng <star.zeng@intel.com> > --- > ArmVirtPkg/Library/ArmVirtDxeHobLib/HobLib.c | 34 +++++++++++++++++++++++++++- > 1 file changed, 33 insertions(+), 1 deletion(-) > > diff --git a/ArmVirtPkg/Library/ArmVirtDxeHobLib/HobLib.c b/ArmVirtPkg/Library/ArmVirtDxeHobLib/HobLib.c > index 9e617b8e6991..dc84dd32d24a 100644 > --- a/ArmVirtPkg/Library/ArmVirtDxeHobLib/HobLib.c > +++ b/ArmVirtPkg/Library/ArmVirtDxeHobLib/HobLib.c > @@ -1,7 +1,7 @@ > /** @file > HOB Library implemenation for Dxe Phase with DebugLib dependency removed > > -Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.<BR> > +Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.<BR> > Copyright (c) 2014, Linaro Ltd. All rights reserved.<BR> > This program and the accompanying materials > are licensed and made available under the terms and conditions of the BSD License > @@ -442,6 +442,38 @@ BuildFv2Hob ( > ASSERT (FALSE); > } > > +/** > + Builds a EFI_HOB_TYPE_FV3 HOB. > + > + This function builds a EFI_HOB_TYPE_FV3 HOB. > + It can only be invoked during PEI phase; > + for DXE phase, it will ASSERT() since PEI HOB is read-only for DXE phase. > + > + If there is no additional space for HOB creation, then ASSERT(). > + If the FvImage buffer is not at its required alignment, then ASSERT(). > + > + @param BaseAddress The base address of the Firmware Volume. > + @param Length The size of the Firmware Volume in bytes. > + @param AuthenticationStatus The authentication status. > + @param ExtractedFv TRUE if the FV was extracted as a file within another firmware volume. > + FALSE otherwise. > + @param FvName The name of the Firmware Volume. Valid only if IsExtractedFv is TRUE > + @param FileName The name of the file. Valid only if IsExtractedFv is TRUE > + Could we keep line lengths below 80 columns please? Same for the previous patch. > +**/ > +VOID > +EFIAPI > +BuildFv3Hob ( > + IN EFI_PHYSICAL_ADDRESS BaseAddress, > + IN UINT64 Length, > + IN UINT32 AuthenticationStatus, > + IN BOOLEAN ExtractedFv, > + IN CONST EFI_GUID *FvName, OPTIONAL > + IN CONST EFI_GUID *FileName OPTIONAL > + ) > +{ > + ASSERT (FALSE); > +} > > /** > Builds a Capsule Volume HOB. > -- > 2.13.3.windows.1 > ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 2/2] ArmVirtPkg ArmVirtDxeHobLib: Implement BuildFv3Hob 2017-10-05 7:56 ` Ard Biesheuvel @ 2017-10-05 8:05 ` Laszlo Ersek 2017-10-05 8:22 ` Zeng, Star 0 siblings, 1 reply; 9+ messages in thread From: Laszlo Ersek @ 2017-10-05 8:05 UTC (permalink / raw) To: Ard Biesheuvel, Star Zeng; +Cc: edk2-devel@lists.01.org, Liming Gao Hi Star, On 10/05/17 09:56, Ard Biesheuvel wrote: > On 5 October 2017 at 07:33, Star Zeng <star.zeng@intel.com> wrote: >> Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org> >> Cc: Laszlo Ersek <lersek@redhat.com> >> Cc: Liming Gao <liming.gao@intel.com> >> Contributed-under: TianoCore Contribution Agreement 1.1 >> Signed-off-by: Star Zeng <star.zeng@intel.com> >> --- >> ArmVirtPkg/Library/ArmVirtDxeHobLib/HobLib.c | 34 +++++++++++++++++++++++++++- >> 1 file changed, 33 insertions(+), 1 deletion(-) >> >> diff --git a/ArmVirtPkg/Library/ArmVirtDxeHobLib/HobLib.c b/ArmVirtPkg/Library/ArmVirtDxeHobLib/HobLib.c >> index 9e617b8e6991..dc84dd32d24a 100644 >> --- a/ArmVirtPkg/Library/ArmVirtDxeHobLib/HobLib.c >> +++ b/ArmVirtPkg/Library/ArmVirtDxeHobLib/HobLib.c >> @@ -1,7 +1,7 @@ >> /** @file >> HOB Library implemenation for Dxe Phase with DebugLib dependency removed >> >> -Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.<BR> >> +Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.<BR> >> Copyright (c) 2014, Linaro Ltd. All rights reserved.<BR> >> This program and the accompanying materials >> are licensed and made available under the terms and conditions of the BSD License >> @@ -442,6 +442,38 @@ BuildFv2Hob ( >> ASSERT (FALSE); >> } >> >> +/** >> + Builds a EFI_HOB_TYPE_FV3 HOB. >> + >> + This function builds a EFI_HOB_TYPE_FV3 HOB. >> + It can only be invoked during PEI phase; >> + for DXE phase, it will ASSERT() since PEI HOB is read-only for DXE phase. >> + >> + If there is no additional space for HOB creation, then ASSERT(). >> + If the FvImage buffer is not at its required alignment, then ASSERT(). >> + >> + @param BaseAddress The base address of the Firmware Volume. >> + @param Length The size of the Firmware Volume in bytes. >> + @param AuthenticationStatus The authentication status. >> + @param ExtractedFv TRUE if the FV was extracted as a file within another firmware volume. >> + FALSE otherwise. >> + @param FvName The name of the Firmware Volume. Valid only if IsExtractedFv is TRUE >> + @param FileName The name of the file. Valid only if IsExtractedFv is TRUE >> + > > Could we keep line lengths below 80 columns please? Same for the previous patch. I agree; please rewrap the comment block like that. >> +**/ >> +VOID >> +EFIAPI >> +BuildFv3Hob ( >> + IN EFI_PHYSICAL_ADDRESS BaseAddress, >> + IN UINT64 Length, >> + IN UINT32 AuthenticationStatus, >> + IN BOOLEAN ExtractedFv, >> + IN CONST EFI_GUID *FvName, OPTIONAL >> + IN CONST EFI_GUID *FileName OPTIONAL >> + ) >> +{ >> + ASSERT (FALSE); >> +} The implementation looks good, this library instance is restricted to "DXE and later" modules, and HOB production finishes with the PEI phase -- DXE and later are not allowed to produce HOBs. So this follows the rest of the HOB-building functions in this library instance. With the line lengths adjusted, for this patch: Reviewed-by: Laszlo Ersek <lersek@redhat.com> Thanks for the quick followup! Laszlo >> >> /** >> Builds a Capsule Volume HOB. >> -- >> 2.13.3.windows.1 >> ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 2/2] ArmVirtPkg ArmVirtDxeHobLib: Implement BuildFv3Hob 2017-10-05 8:05 ` Laszlo Ersek @ 2017-10-05 8:22 ` Zeng, Star 0 siblings, 0 replies; 9+ messages in thread From: Zeng, Star @ 2017-10-05 8:22 UTC (permalink / raw) To: Laszlo Ersek, Ard Biesheuvel Cc: edk2-devel@lists.01.org, Gao, Liming, Zeng, Star Agree and thanks for Laslzo's RB (added in V2 patch series). Please help check the V2 patch series at https://lists.01.org/pipermail/edk2-devel/2017-October/015628.html. Thanks, Star -----Original Message----- From: Laszlo Ersek [mailto:lersek@redhat.com] Sent: Thursday, October 5, 2017 4:06 PM To: Ard Biesheuvel <ard.biesheuvel@linaro.org>; Zeng, Star <star.zeng@intel.com> Cc: edk2-devel@lists.01.org; Gao, Liming <liming.gao@intel.com> Subject: Re: [PATCH 2/2] ArmVirtPkg ArmVirtDxeHobLib: Implement BuildFv3Hob Hi Star, On 10/05/17 09:56, Ard Biesheuvel wrote: > On 5 October 2017 at 07:33, Star Zeng <star.zeng@intel.com> wrote: >> Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org> >> Cc: Laszlo Ersek <lersek@redhat.com> >> Cc: Liming Gao <liming.gao@intel.com> >> Contributed-under: TianoCore Contribution Agreement 1.1 >> Signed-off-by: Star Zeng <star.zeng@intel.com> >> --- >> ArmVirtPkg/Library/ArmVirtDxeHobLib/HobLib.c | 34 >> +++++++++++++++++++++++++++- >> 1 file changed, 33 insertions(+), 1 deletion(-) >> >> diff --git a/ArmVirtPkg/Library/ArmVirtDxeHobLib/HobLib.c >> b/ArmVirtPkg/Library/ArmVirtDxeHobLib/HobLib.c >> index 9e617b8e6991..dc84dd32d24a 100644 >> --- a/ArmVirtPkg/Library/ArmVirtDxeHobLib/HobLib.c >> +++ b/ArmVirtPkg/Library/ArmVirtDxeHobLib/HobLib.c >> @@ -1,7 +1,7 @@ >> /** @file >> HOB Library implemenation for Dxe Phase with DebugLib dependency >> removed >> >> -Copyright (c) 2006 - 2016, Intel Corporation. All rights >> reserved.<BR> >> +Copyright (c) 2006 - 2017, Intel Corporation. All rights >> +reserved.<BR> >> Copyright (c) 2014, Linaro Ltd. All rights reserved.<BR> This >> program and the accompanying materials are licensed and made >> available under the terms and conditions of the BSD License @@ -442,6 >> +442,38 @@ BuildFv2Hob ( >> ASSERT (FALSE); >> } >> >> +/** >> + Builds a EFI_HOB_TYPE_FV3 HOB. >> + >> + This function builds a EFI_HOB_TYPE_FV3 HOB. >> + It can only be invoked during PEI phase; for DXE phase, it will >> + ASSERT() since PEI HOB is read-only for DXE phase. >> + >> + If there is no additional space for HOB creation, then ASSERT(). >> + If the FvImage buffer is not at its required alignment, then ASSERT(). >> + >> + @param BaseAddress The base address of the Firmware Volume. >> + @param Length The size of the Firmware Volume in bytes. >> + @param AuthenticationStatus The authentication status. >> + @param ExtractedFv TRUE if the FV was extracted as a file within another firmware volume. >> + FALSE otherwise. >> + @param FvName The name of the Firmware Volume. Valid only if IsExtractedFv is TRUE >> + @param FileName The name of the file. Valid only if IsExtractedFv is TRUE >> + > > Could we keep line lengths below 80 columns please? Same for the previous patch. I agree; please rewrap the comment block like that. >> +**/ >> +VOID >> +EFIAPI >> +BuildFv3Hob ( >> + IN EFI_PHYSICAL_ADDRESS BaseAddress, >> + IN UINT64 Length, >> + IN UINT32 AuthenticationStatus, >> + IN BOOLEAN ExtractedFv, >> + IN CONST EFI_GUID *FvName, OPTIONAL >> + IN CONST EFI_GUID *FileName OPTIONAL >> + ) >> +{ >> + ASSERT (FALSE); >> +} The implementation looks good, this library instance is restricted to "DXE and later" modules, and HOB production finishes with the PEI phase -- DXE and later are not allowed to produce HOBs. So this follows the rest of the HOB-building functions in this library instance. With the line lengths adjusted, for this patch: Reviewed-by: Laszlo Ersek <lersek@redhat.com> Thanks for the quick followup! Laszlo >> >> /** >> Builds a Capsule Volume HOB. >> -- >> 2.13.3.windows.1 >> ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 0/2] Implement BuildFv3Hob for PrePiHobLib and ArmVirtDxeHobLib 2017-10-05 6:33 [PATCH 0/2] Implement BuildFv3Hob for PrePiHobLib and ArmVirtDxeHobLib Star Zeng 2017-10-05 6:33 ` [PATCH 1/2] EmbeddedPkg PrePiHobLib: Implement BuildFv3Hob Star Zeng 2017-10-05 6:33 ` [PATCH 2/2] ArmVirtPkg ArmVirtDxeHobLib: " Star Zeng @ 2017-10-05 7:57 ` Ard Biesheuvel 2 siblings, 0 replies; 9+ messages in thread From: Ard Biesheuvel @ 2017-10-05 7:57 UTC (permalink / raw) To: Star Zeng Cc: edk2-devel@lists.01.org, Leif Lindholm, Laszlo Ersek, Liming Gao On 5 October 2017 at 07:33, Star Zeng <star.zeng@intel.com> wrote: > This patch series is supplement of > https://lists.01.org/pipermail/edk2-devel/2017-October/015589.html. > > Cc: Leif Lindholm <leif.lindholm@linaro.org> > Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org> > Cc: Laszlo Ersek <lersek@redhat.com> > Cc: Liming Gao <liming.gao@intel.com> > > Star Zeng (2): > EmbeddedPkg PrePiHobLib: Implement BuildFv3Hob > ArmVirtPkg ArmVirtDxeHobLib: Implement BuildFv3Hob > > ArmVirtPkg/Library/ArmVirtDxeHobLib/HobLib.c | 34 +++++++++++++++++++++- > EmbeddedPkg/Library/PrePiHobLib/Hob.c | 43 +++++++++++++++++++++++++++- > 2 files changed, 75 insertions(+), 2 deletions(-) > Thanks for putting this together. I replied to each patch with some comments. ^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2017-10-05 8:19 UTC | newest] Thread overview: 9+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2017-10-05 6:33 [PATCH 0/2] Implement BuildFv3Hob for PrePiHobLib and ArmVirtDxeHobLib Star Zeng 2017-10-05 6:33 ` [PATCH 1/2] EmbeddedPkg PrePiHobLib: Implement BuildFv3Hob Star Zeng 2017-10-05 7:55 ` Ard Biesheuvel 2017-10-05 8:02 ` Zeng, Star 2017-10-05 6:33 ` [PATCH 2/2] ArmVirtPkg ArmVirtDxeHobLib: " Star Zeng 2017-10-05 7:56 ` Ard Biesheuvel 2017-10-05 8:05 ` Laszlo Ersek 2017-10-05 8:22 ` Zeng, Star 2017-10-05 7:57 ` [PATCH 0/2] Implement BuildFv3Hob for PrePiHobLib and ArmVirtDxeHobLib Ard Biesheuvel
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox