* [PATCH v2 0/2] Fix constant if statement issue @ 2018-11-22 3:51 Chasel, Chiu 2018-11-22 3:51 ` [PATCH v2 1/2] IntelFsp2WrapperPkg: Fix line ending format issue Chasel, Chiu ` (2 more replies) 0 siblings, 3 replies; 6+ messages in thread From: Chasel, Chiu @ 2018-11-22 3:51 UTC (permalink / raw) To: edk2-devel; +Cc: Jiewen Yao, Desimone Nathaniel L, Wu Hao A Internal code quality scanning found 2 constant if statements related to FixedPcdGet8 () usage. Since the PCD can be PatchableInModule too, it should be changed to PcdGet8 () to fix this issue. Also fixed the line ending format issue from previous patch. Patch1 fixed line ending format issue on some files Patch2 fixed constant if statement issue. Cc: Jiewen Yao <Jiewen.yao@intel.com> Cc: Desimone Nathaniel L <nathaniel.l.desimone@intel.com> Cc: Wu Hao A <hao.a.wu@intel.com> Chasel, Chiu (2): IntelFsp2WrapperPkg: Fix line ending format issue IntelFsp2WrapperPkg: Fix constant if statements issue IntelFsp2WrapperPkg/FspmWrapperPeim/FspmWrapperPeim.c | 32 ++++++++++++++++---------------- IntelFsp2WrapperPkg/FspsWrapperPeim/FspsWrapperPeim.c | 24 ++++++++++++------------ IntelFsp2WrapperPkg/FspmWrapperPeim/FspmWrapperPeim.inf | 4 ++-- IntelFsp2WrapperPkg/FspsWrapperPeim/FspsWrapperPeim.inf | 4 ++-- IntelFsp2WrapperPkg/IntelFsp2WrapperPkg.dec | 22 +++++++++++----------- 5 files changed, 43 insertions(+), 43 deletions(-) -- 2.13.3.windows.1 ^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH v2 1/2] IntelFsp2WrapperPkg: Fix line ending format issue 2018-11-22 3:51 [PATCH v2 0/2] Fix constant if statement issue Chasel, Chiu @ 2018-11-22 3:51 ` Chasel, Chiu 2018-11-22 5:00 ` Wu, Hao A 2018-11-22 3:51 ` [PATCH v2 2/2] IntelFsp2WrapperPkg: Fix constant if statements issue Chasel, Chiu 2018-11-22 5:04 ` [PATCH v2 0/2] Fix constant if statement issue Zeng, Star 2 siblings, 1 reply; 6+ messages in thread From: Chasel, Chiu @ 2018-11-22 3:51 UTC (permalink / raw) To: edk2-devel; +Cc: Jiewen Yao, Desimone Nathaniel L, Wu Hao A, Chasel Chiu REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1352 Fixed line ending format wrong issues on some files. Test: Verified building successfully. Cc: Jiewen Yao <Jiewen.yao@intel.com> Cc: Desimone Nathaniel L <nathaniel.l.desimone@intel.com> Cc: Wu Hao A <hao.a.wu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Chasel Chiu <chasel.chiu@intel.com> --- IntelFsp2WrapperPkg/FspmWrapperPeim/FspmWrapperPeim.c | 32 ++++++++++++++++---------------- IntelFsp2WrapperPkg/FspsWrapperPeim/FspsWrapperPeim.c | 24 ++++++++++++------------ IntelFsp2WrapperPkg/FspmWrapperPeim/FspmWrapperPeim.inf | 4 ++-- IntelFsp2WrapperPkg/FspsWrapperPeim/FspsWrapperPeim.inf | 4 ++-- IntelFsp2WrapperPkg/IntelFsp2WrapperPkg.dec | 22 +++++++++++----------- 5 files changed, 43 insertions(+), 43 deletions(-) diff --git a/IntelFsp2WrapperPkg/FspmWrapperPeim/FspmWrapperPeim.c b/IntelFsp2WrapperPkg/FspmWrapperPeim/FspmWrapperPeim.c index e25854c080..fa0441ce6c 100644 --- a/IntelFsp2WrapperPkg/FspmWrapperPeim/FspmWrapperPeim.c +++ b/IntelFsp2WrapperPkg/FspmWrapperPeim/FspmWrapperPeim.c @@ -3,7 +3,7 @@ register TemporaryRamDonePpi to call TempRamExit API, and register MemoryDiscoveredPpi notify to call FspSiliconInit API. - Copyright (c) 2014 - 2018, Intel Corporation. All rights reserved.<BR> + Copyright (c) 2014 - 2018, Intel Corporation. All rights reserved.<BR> This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -65,7 +65,7 @@ PeiFspMemoryInit ( FspHobListPtr = NULL; FspmUpdDataPtr = NULL; - FspmHeaderPtr = (FSP_INFO_HEADER *) FspFindFspHeader (PcdGet32 (PcdFspmBaseAddress)); + FspmHeaderPtr = (FSP_INFO_HEADER *) FspFindFspHeader (PcdGet32 (PcdFspmBaseAddress)); DEBUG ((DEBUG_INFO, "FspmHeaderPtr - 0x%x\n", FspmHeaderPtr)); if (FspmHeaderPtr == NULL) { return EFI_DEVICE_ERROR; @@ -155,20 +155,20 @@ FspmWrapperInit ( { EFI_STATUS Status; - Status = EFI_SUCCESS; - - if (FixedPcdGet8 (PcdFspModeSelection) == 1) { - Status = PeiFspMemoryInit (); - ASSERT_EFI_ERROR (Status); - } else { - PeiServicesInstallFvInfoPpi ( - NULL, - (VOID *)(UINTN) PcdGet32 (PcdFspmBaseAddress), - (UINT32)((EFI_FIRMWARE_VOLUME_HEADER *) (UINTN) PcdGet32 (PcdFspmBaseAddress))->FvLength, - NULL, - NULL - ); - } + Status = EFI_SUCCESS; + + if (FixedPcdGet8 (PcdFspModeSelection) == 1) { + Status = PeiFspMemoryInit (); + ASSERT_EFI_ERROR (Status); + } else { + PeiServicesInstallFvInfoPpi ( + NULL, + (VOID *)(UINTN) PcdGet32 (PcdFspmBaseAddress), + (UINT32)((EFI_FIRMWARE_VOLUME_HEADER *) (UINTN) PcdGet32 (PcdFspmBaseAddress))->FvLength, + NULL, + NULL + ); + } return Status; } diff --git a/IntelFsp2WrapperPkg/FspsWrapperPeim/FspsWrapperPeim.c b/IntelFsp2WrapperPkg/FspsWrapperPeim/FspsWrapperPeim.c index 69cf568380..87dd61e5c5 100644 --- a/IntelFsp2WrapperPkg/FspsWrapperPeim/FspsWrapperPeim.c +++ b/IntelFsp2WrapperPkg/FspsWrapperPeim/FspsWrapperPeim.c @@ -3,7 +3,7 @@ register TemporaryRamDonePpi to call TempRamExit API, and register MemoryDiscoveredPpi notify to call FspSiliconInit API. - Copyright (c) 2014 - 2018, Intel Corporation. All rights reserved.<BR> + Copyright (c) 2014 - 2018, Intel Corporation. All rights reserved.<BR> This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -349,17 +349,17 @@ FspsWrapperPeimEntryPoint ( { DEBUG ((DEBUG_INFO, "FspsWrapperPeimEntryPoint\n")); - if (FixedPcdGet8 (PcdFspModeSelection) == 1) { - FspsWrapperInit (); - } else { - PeiServicesInstallFvInfoPpi ( - NULL, - (VOID *)(UINTN) PcdGet32 (PcdFspsBaseAddress), - (UINT32)((EFI_FIRMWARE_VOLUME_HEADER *) (UINTN) PcdGet32 (PcdFspsBaseAddress))->FvLength, - NULL, - NULL - ); - } + if (FixedPcdGet8 (PcdFspModeSelection) == 1) { + FspsWrapperInit (); + } else { + PeiServicesInstallFvInfoPpi ( + NULL, + (VOID *)(UINTN) PcdGet32 (PcdFspsBaseAddress), + (UINT32)((EFI_FIRMWARE_VOLUME_HEADER *) (UINTN) PcdGet32 (PcdFspsBaseAddress))->FvLength, + NULL, + NULL + ); + } return EFI_SUCCESS; } diff --git a/IntelFsp2WrapperPkg/FspmWrapperPeim/FspmWrapperPeim.inf b/IntelFsp2WrapperPkg/FspmWrapperPeim/FspmWrapperPeim.inf index f4b7ef8db6..b3776a80f3 100644 --- a/IntelFsp2WrapperPkg/FspmWrapperPeim/FspmWrapperPeim.inf +++ b/IntelFsp2WrapperPkg/FspmWrapperPeim/FspmWrapperPeim.inf @@ -6,7 +6,7 @@ # register TemporaryRamDonePpi to call TempRamExit API, and register MemoryDiscoveredPpi # notify to call FspSiliconInit API. # -# Copyright (c) 2014 - 2018, Intel Corporation. All rights reserved.<BR> +# Copyright (c) 2014 - 2018, Intel Corporation. All rights reserved.<BR> # # This program and the accompanying materials # are licensed and made available under the terms and conditions of the BSD License @@ -61,7 +61,7 @@ [Pcd] gIntelFsp2WrapperTokenSpaceGuid.PcdFspmBaseAddress ## CONSUMES gIntelFsp2WrapperTokenSpaceGuid.PcdFspmUpdDataAddress ## CONSUMES - gIntelFsp2WrapperTokenSpaceGuid.PcdFspModeSelection ## CONSUMES + gIntelFsp2WrapperTokenSpaceGuid.PcdFspModeSelection ## CONSUMES [Sources] FspmWrapperPeim.c diff --git a/IntelFsp2WrapperPkg/FspsWrapperPeim/FspsWrapperPeim.inf b/IntelFsp2WrapperPkg/FspsWrapperPeim/FspsWrapperPeim.inf index 1e63f407cb..910286982b 100644 --- a/IntelFsp2WrapperPkg/FspsWrapperPeim/FspsWrapperPeim.inf +++ b/IntelFsp2WrapperPkg/FspsWrapperPeim/FspsWrapperPeim.inf @@ -6,7 +6,7 @@ # register TemporaryRamDonePpi to call TempRamExit API, and register MemoryDiscoveredPpi # notify to call FspSiliconInit API. # -# Copyright (c) 2014 - 2018, Intel Corporation. All rights reserved.<BR> +# Copyright (c) 2014 - 2018, Intel Corporation. All rights reserved.<BR> # # This program and the accompanying materials # are licensed and made available under the terms and conditions of the BSD License @@ -68,7 +68,7 @@ [Pcd] gIntelFsp2WrapperTokenSpaceGuid.PcdFspsBaseAddress ## CONSUMES gIntelFsp2WrapperTokenSpaceGuid.PcdFspsUpdDataAddress ## CONSUMES - gIntelFsp2WrapperTokenSpaceGuid.PcdFspModeSelection ## CONSUMES + gIntelFsp2WrapperTokenSpaceGuid.PcdFspModeSelection ## CONSUMES [Guids] gFspHobGuid ## CONSUMES ## HOB diff --git a/IntelFsp2WrapperPkg/IntelFsp2WrapperPkg.dec b/IntelFsp2WrapperPkg/IntelFsp2WrapperPkg.dec index b901562bb3..96f2858fb4 100644 --- a/IntelFsp2WrapperPkg/IntelFsp2WrapperPkg.dec +++ b/IntelFsp2WrapperPkg/IntelFsp2WrapperPkg.dec @@ -71,7 +71,7 @@ ## Indicate the PEI memory size platform want to report gIntelFsp2WrapperTokenSpaceGuid.PcdPeiRecoveryMinMemSize|0x3000000|UINT32|0x40000005 - ## This is the base address of FSP-T + ## This is the base address of FSP-T gIntelFsp2WrapperTokenSpaceGuid.PcdFsptBaseAddress|0x00000000|UINT32|0x00000300 ## This PCD indicates if FSP APIs are skipped from FSP wrapper.<BR><BR> @@ -92,17 +92,17 @@ # @Prompt Skip FSP API from FSP wrapper. gIntelFsp2WrapperTokenSpaceGuid.PcdSkipFspApi|0x00000000|UINT32|0x40000009 - ## This PCD decides how Wrapper code utilizes FSP - # 0: DISPATCH mode (FSP Wrapper will load PeiCore from FSP without calling FSP API) - # 1: API mode (FSP Wrapper will call FSP API) - # - gIntelFsp2WrapperTokenSpaceGuid.PcdFspModeSelection|0x00000001|UINT8|0x4000000A - + ## This PCD decides how Wrapper code utilizes FSP + # 0: DISPATCH mode (FSP Wrapper will load PeiCore from FSP without calling FSP API) + # 1: API mode (FSP Wrapper will call FSP API) + # + gIntelFsp2WrapperTokenSpaceGuid.PcdFspModeSelection|0x00000001|UINT8|0x4000000A + [PcdsFixedAtBuild, PcdsPatchableInModule,PcdsDynamic,PcdsDynamicEx] - # - ## These are the base address of FSP-M/S - # - gIntelFsp2WrapperTokenSpaceGuid.PcdFspmBaseAddress|0x00000000|UINT32|0x00001000 + # + ## These are the base address of FSP-M/S + # + gIntelFsp2WrapperTokenSpaceGuid.PcdFspmBaseAddress|0x00000000|UINT32|0x00001000 gIntelFsp2WrapperTokenSpaceGuid.PcdFspsBaseAddress|0x00000000|UINT32|0x00001001 # # To provide flexibility for platform to pre-allocate FSP UPD buffer -- 2.13.3.windows.1 ^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH v2 1/2] IntelFsp2WrapperPkg: Fix line ending format issue 2018-11-22 3:51 ` [PATCH v2 1/2] IntelFsp2WrapperPkg: Fix line ending format issue Chasel, Chiu @ 2018-11-22 5:00 ` Wu, Hao A 0 siblings, 0 replies; 6+ messages in thread From: Wu, Hao A @ 2018-11-22 5:00 UTC (permalink / raw) To: Chiu, Chasel, edk2-devel@lists.01.org; +Cc: Yao, Jiewen > -----Original Message----- > From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of > Chasel, Chiu > Sent: Thursday, November 22, 2018 11:51 AM > To: edk2-devel@lists.01.org > Cc: Wu, Hao A; Yao, Jiewen > Subject: [edk2] [PATCH v2 1/2] IntelFsp2WrapperPkg: Fix line ending format > issue > > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1352 > > Fixed line ending format wrong issues on some files. > > Test: Verified building successfully. Reviewed-by: Hao Wu <hao.a.wu@intel.com> Best Regards, Hao Wu > > Cc: Jiewen Yao <Jiewen.yao@intel.com> > Cc: Desimone Nathaniel L <nathaniel.l.desimone@intel.com> > Cc: Wu Hao A <hao.a.wu@intel.com> > Contributed-under: TianoCore Contribution Agreement 1.1 > Signed-off-by: Chasel Chiu <chasel.chiu@intel.com> > --- > IntelFsp2WrapperPkg/FspmWrapperPeim/FspmWrapperPeim.c | 32 > ++++++++++++++++---------------- > IntelFsp2WrapperPkg/FspsWrapperPeim/FspsWrapperPeim.c | 24 > ++++++++++++------------ > IntelFsp2WrapperPkg/FspmWrapperPeim/FspmWrapperPeim.inf | 4 ++-- > IntelFsp2WrapperPkg/FspsWrapperPeim/FspsWrapperPeim.inf | 4 ++-- > IntelFsp2WrapperPkg/IntelFsp2WrapperPkg.dec | 22 +++++++++++--- > -------- > 5 files changed, 43 insertions(+), 43 deletions(-) > > diff --git a/IntelFsp2WrapperPkg/FspmWrapperPeim/FspmWrapperPeim.c > b/IntelFsp2WrapperPkg/FspmWrapperPeim/FspmWrapperPeim.c > index e25854c080..fa0441ce6c 100644 > --- a/IntelFsp2WrapperPkg/FspmWrapperPeim/FspmWrapperPeim.c > +++ b/IntelFsp2WrapperPkg/FspmWrapperPeim/FspmWrapperPeim.c > @@ -3,7 +3,7 @@ > register TemporaryRamDonePpi to call TempRamExit API, and register > MemoryDiscoveredPpi > notify to call FspSiliconInit API. > > - Copyright (c) 2014 - 2018, Intel Corporation. All rights reserved.<BR> > + Copyright (c) 2014 - 2018, Intel Corporation. All rights reserved.<BR> > This program and the accompanying materials > are licensed and made available under the terms and conditions of the BSD > License > which accompanies this distribution. The full text of the license may be > found at > @@ -65,7 +65,7 @@ PeiFspMemoryInit ( > FspHobListPtr = NULL; > FspmUpdDataPtr = NULL; > > - FspmHeaderPtr = (FSP_INFO_HEADER *) FspFindFspHeader (PcdGet32 > (PcdFspmBaseAddress)); > + FspmHeaderPtr = (FSP_INFO_HEADER *) FspFindFspHeader (PcdGet32 > (PcdFspmBaseAddress)); > DEBUG ((DEBUG_INFO, "FspmHeaderPtr - 0x%x\n", FspmHeaderPtr)); > if (FspmHeaderPtr == NULL) { > return EFI_DEVICE_ERROR; > @@ -155,20 +155,20 @@ FspmWrapperInit ( > { > EFI_STATUS Status; > > - Status = EFI_SUCCESS; > - > - if (FixedPcdGet8 (PcdFspModeSelection) == 1) { > - Status = PeiFspMemoryInit (); > - ASSERT_EFI_ERROR (Status); > - } else { > - PeiServicesInstallFvInfoPpi ( > - NULL, > - (VOID *)(UINTN) PcdGet32 (PcdFspmBaseAddress), > - (UINT32)((EFI_FIRMWARE_VOLUME_HEADER *) (UINTN) PcdGet32 > (PcdFspmBaseAddress))->FvLength, > - NULL, > - NULL > - ); > - } > + Status = EFI_SUCCESS; > + > + if (FixedPcdGet8 (PcdFspModeSelection) == 1) { > + Status = PeiFspMemoryInit (); > + ASSERT_EFI_ERROR (Status); > + } else { > + PeiServicesInstallFvInfoPpi ( > + NULL, > + (VOID *)(UINTN) PcdGet32 (PcdFspmBaseAddress), > + (UINT32)((EFI_FIRMWARE_VOLUME_HEADER *) (UINTN) PcdGet32 > (PcdFspmBaseAddress))->FvLength, > + NULL, > + NULL > + ); > + } > > return Status; > } > diff --git a/IntelFsp2WrapperPkg/FspsWrapperPeim/FspsWrapperPeim.c > b/IntelFsp2WrapperPkg/FspsWrapperPeim/FspsWrapperPeim.c > index 69cf568380..87dd61e5c5 100644 > --- a/IntelFsp2WrapperPkg/FspsWrapperPeim/FspsWrapperPeim.c > +++ b/IntelFsp2WrapperPkg/FspsWrapperPeim/FspsWrapperPeim.c > @@ -3,7 +3,7 @@ > register TemporaryRamDonePpi to call TempRamExit API, and register > MemoryDiscoveredPpi > notify to call FspSiliconInit API. > > - Copyright (c) 2014 - 2018, Intel Corporation. All rights reserved.<BR> > + Copyright (c) 2014 - 2018, Intel Corporation. All rights reserved.<BR> > This program and the accompanying materials > are licensed and made available under the terms and conditions of the BSD > License > which accompanies this distribution. The full text of the license may be > found at > @@ -349,17 +349,17 @@ FspsWrapperPeimEntryPoint ( > { > DEBUG ((DEBUG_INFO, "FspsWrapperPeimEntryPoint\n")); > > - if (FixedPcdGet8 (PcdFspModeSelection) == 1) { > - FspsWrapperInit (); > - } else { > - PeiServicesInstallFvInfoPpi ( > - NULL, > - (VOID *)(UINTN) PcdGet32 (PcdFspsBaseAddress), > - (UINT32)((EFI_FIRMWARE_VOLUME_HEADER *) (UINTN) PcdGet32 > (PcdFspsBaseAddress))->FvLength, > - NULL, > - NULL > - ); > - } > + if (FixedPcdGet8 (PcdFspModeSelection) == 1) { > + FspsWrapperInit (); > + } else { > + PeiServicesInstallFvInfoPpi ( > + NULL, > + (VOID *)(UINTN) PcdGet32 (PcdFspsBaseAddress), > + (UINT32)((EFI_FIRMWARE_VOLUME_HEADER *) (UINTN) PcdGet32 > (PcdFspsBaseAddress))->FvLength, > + NULL, > + NULL > + ); > + } > > return EFI_SUCCESS; > } > diff --git a/IntelFsp2WrapperPkg/FspmWrapperPeim/FspmWrapperPeim.inf > b/IntelFsp2WrapperPkg/FspmWrapperPeim/FspmWrapperPeim.inf > index f4b7ef8db6..b3776a80f3 100644 > --- a/IntelFsp2WrapperPkg/FspmWrapperPeim/FspmWrapperPeim.inf > +++ b/IntelFsp2WrapperPkg/FspmWrapperPeim/FspmWrapperPeim.inf > @@ -6,7 +6,7 @@ > # register TemporaryRamDonePpi to call TempRamExit API, and register > MemoryDiscoveredPpi > # notify to call FspSiliconInit API. > # > -# Copyright (c) 2014 - 2018, Intel Corporation. All rights reserved.<BR> > +# Copyright (c) 2014 - 2018, Intel Corporation. All rights reserved.<BR> > # > # This program and the accompanying materials > # are licensed and made available under the terms and conditions of the > BSD License > @@ -61,7 +61,7 @@ > [Pcd] > gIntelFsp2WrapperTokenSpaceGuid.PcdFspmBaseAddress ## > CONSUMES > gIntelFsp2WrapperTokenSpaceGuid.PcdFspmUpdDataAddress ## > CONSUMES > - gIntelFsp2WrapperTokenSpaceGuid.PcdFspModeSelection ## > CONSUMES > + gIntelFsp2WrapperTokenSpaceGuid.PcdFspModeSelection ## > CONSUMES > > [Sources] > FspmWrapperPeim.c > diff --git a/IntelFsp2WrapperPkg/FspsWrapperPeim/FspsWrapperPeim.inf > b/IntelFsp2WrapperPkg/FspsWrapperPeim/FspsWrapperPeim.inf > index 1e63f407cb..910286982b 100644 > --- a/IntelFsp2WrapperPkg/FspsWrapperPeim/FspsWrapperPeim.inf > +++ b/IntelFsp2WrapperPkg/FspsWrapperPeim/FspsWrapperPeim.inf > @@ -6,7 +6,7 @@ > # register TemporaryRamDonePpi to call TempRamExit API, and register > MemoryDiscoveredPpi > # notify to call FspSiliconInit API. > # > -# Copyright (c) 2014 - 2018, Intel Corporation. All rights reserved.<BR> > +# Copyright (c) 2014 - 2018, Intel Corporation. All rights reserved.<BR> > # > # This program and the accompanying materials > # are licensed and made available under the terms and conditions of the > BSD License > @@ -68,7 +68,7 @@ > [Pcd] > gIntelFsp2WrapperTokenSpaceGuid.PcdFspsBaseAddress ## CONSUMES > gIntelFsp2WrapperTokenSpaceGuid.PcdFspsUpdDataAddress ## > CONSUMES > - gIntelFsp2WrapperTokenSpaceGuid.PcdFspModeSelection ## > CONSUMES > + gIntelFsp2WrapperTokenSpaceGuid.PcdFspModeSelection ## > CONSUMES > > [Guids] > gFspHobGuid ## CONSUMES ## HOB > diff --git a/IntelFsp2WrapperPkg/IntelFsp2WrapperPkg.dec > b/IntelFsp2WrapperPkg/IntelFsp2WrapperPkg.dec > index b901562bb3..96f2858fb4 100644 > --- a/IntelFsp2WrapperPkg/IntelFsp2WrapperPkg.dec > +++ b/IntelFsp2WrapperPkg/IntelFsp2WrapperPkg.dec > @@ -71,7 +71,7 @@ > ## Indicate the PEI memory size platform want to report > > gIntelFsp2WrapperTokenSpaceGuid.PcdPeiRecoveryMinMemSize|0x300000 > 0|UINT32|0x40000005 > > - ## This is the base address of FSP-T > + ## This is the base address of FSP-T > > gIntelFsp2WrapperTokenSpaceGuid.PcdFsptBaseAddress|0x00000000|UINT > 32|0x00000300 > > ## This PCD indicates if FSP APIs are skipped from FSP wrapper.<BR><BR> > @@ -92,17 +92,17 @@ > # @Prompt Skip FSP API from FSP wrapper. > > gIntelFsp2WrapperTokenSpaceGuid.PcdSkipFspApi|0x00000000|UINT32|0x4 > 0000009 > > - ## This PCD decides how Wrapper code utilizes FSP > - # 0: DISPATCH mode (FSP Wrapper will load PeiCore from FSP without > calling FSP API) > - # 1: API mode (FSP Wrapper will call FSP API) > - # > - > gIntelFsp2WrapperTokenSpaceGuid.PcdFspModeSelection|0x00000001|UIN > T8|0x4000000A > - > + ## This PCD decides how Wrapper code utilizes FSP > + # 0: DISPATCH mode (FSP Wrapper will load PeiCore from FSP without > calling FSP API) > + # 1: API mode (FSP Wrapper will call FSP API) > + # > + > gIntelFsp2WrapperTokenSpaceGuid.PcdFspModeSelection|0x00000001|UIN > T8|0x4000000A > + > [PcdsFixedAtBuild, PcdsPatchableInModule,PcdsDynamic,PcdsDynamicEx] > - # > - ## These are the base address of FSP-M/S > - # > - > gIntelFsp2WrapperTokenSpaceGuid.PcdFspmBaseAddress|0x00000000|UIN > T32|0x00001000 > + # > + ## These are the base address of FSP-M/S > + # > + > gIntelFsp2WrapperTokenSpaceGuid.PcdFspmBaseAddress|0x00000000|UIN > T32|0x00001000 > > gIntelFsp2WrapperTokenSpaceGuid.PcdFspsBaseAddress|0x00000000|UINT > 32|0x00001001 > # > # To provide flexibility for platform to pre-allocate FSP UPD buffer > -- > 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] 6+ messages in thread
* [PATCH v2 2/2] IntelFsp2WrapperPkg: Fix constant if statements issue 2018-11-22 3:51 [PATCH v2 0/2] Fix constant if statement issue Chasel, Chiu 2018-11-22 3:51 ` [PATCH v2 1/2] IntelFsp2WrapperPkg: Fix line ending format issue Chasel, Chiu @ 2018-11-22 3:51 ` Chasel, Chiu 2018-11-22 5:01 ` Wu, Hao A 2018-11-22 5:04 ` [PATCH v2 0/2] Fix constant if statement issue Zeng, Star 2 siblings, 1 reply; 6+ messages in thread From: Chasel, Chiu @ 2018-11-22 3:51 UTC (permalink / raw) To: edk2-devel; +Cc: Jiewen Yao, Desimone Nathaniel L, Wu Hao A, Chasel Chiu REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1351 Internal code quality scanning found 2 constant if statements related to FixedPcdGet8 () usage. Since the PCD can be PatchableInModule too, it should be changed to PcdGet8 () to fix this issue. Test: Verified on internal platform and booted successfully. Cc: Jiewen Yao <Jiewen.yao@intel.com> Cc: Desimone Nathaniel L <nathaniel.l.desimone@intel.com> Cc: Wu Hao A <hao.a.wu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Chasel Chiu <chasel.chiu@intel.com> --- IntelFsp2WrapperPkg/FspmWrapperPeim/FspmWrapperPeim.c | 2 +- IntelFsp2WrapperPkg/FspsWrapperPeim/FspsWrapperPeim.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/IntelFsp2WrapperPkg/FspmWrapperPeim/FspmWrapperPeim.c b/IntelFsp2WrapperPkg/FspmWrapperPeim/FspmWrapperPeim.c index fa0441ce6c..18f04b541a 100644 --- a/IntelFsp2WrapperPkg/FspmWrapperPeim/FspmWrapperPeim.c +++ b/IntelFsp2WrapperPkg/FspmWrapperPeim/FspmWrapperPeim.c @@ -157,7 +157,7 @@ FspmWrapperInit ( Status = EFI_SUCCESS; - if (FixedPcdGet8 (PcdFspModeSelection) == 1) { + if (PcdGet8 (PcdFspModeSelection) == 1) { Status = PeiFspMemoryInit (); ASSERT_EFI_ERROR (Status); } else { diff --git a/IntelFsp2WrapperPkg/FspsWrapperPeim/FspsWrapperPeim.c b/IntelFsp2WrapperPkg/FspsWrapperPeim/FspsWrapperPeim.c index 87dd61e5c5..d748b21f7c 100644 --- a/IntelFsp2WrapperPkg/FspsWrapperPeim/FspsWrapperPeim.c +++ b/IntelFsp2WrapperPkg/FspsWrapperPeim/FspsWrapperPeim.c @@ -349,7 +349,7 @@ FspsWrapperPeimEntryPoint ( { DEBUG ((DEBUG_INFO, "FspsWrapperPeimEntryPoint\n")); - if (FixedPcdGet8 (PcdFspModeSelection) == 1) { + if (PcdGet8 (PcdFspModeSelection) == 1) { FspsWrapperInit (); } else { PeiServicesInstallFvInfoPpi ( -- 2.13.3.windows.1 ^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH v2 2/2] IntelFsp2WrapperPkg: Fix constant if statements issue 2018-11-22 3:51 ` [PATCH v2 2/2] IntelFsp2WrapperPkg: Fix constant if statements issue Chasel, Chiu @ 2018-11-22 5:01 ` Wu, Hao A 0 siblings, 0 replies; 6+ messages in thread From: Wu, Hao A @ 2018-11-22 5:01 UTC (permalink / raw) To: Chiu, Chasel, edk2-devel@lists.01.org; +Cc: Yao, Jiewen, Desimone, Nathaniel L > -----Original Message----- > From: Chiu, Chasel > Sent: Thursday, November 22, 2018 11:51 AM > To: edk2-devel@lists.01.org > Cc: Yao, Jiewen; Desimone, Nathaniel L; Wu, Hao A; Chiu, Chasel > Subject: [PATCH v2 2/2] IntelFsp2WrapperPkg: Fix constant if statements > issue > > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1351 > > Internal code quality scanning found 2 constant if > statements related to FixedPcdGet8 () usage. > Since the PCD can be PatchableInModule too, it should be > changed to PcdGet8 () to fix this issue. > > Test: Verified on internal platform and booted successfully. Reviewed-by: Hao Wu <hao.a.wu@intel.com> Best Regards, Hao Wu > > Cc: Jiewen Yao <Jiewen.yao@intel.com> > Cc: Desimone Nathaniel L <nathaniel.l.desimone@intel.com> > Cc: Wu Hao A <hao.a.wu@intel.com> > Contributed-under: TianoCore Contribution Agreement 1.1 > Signed-off-by: Chasel Chiu <chasel.chiu@intel.com> > --- > IntelFsp2WrapperPkg/FspmWrapperPeim/FspmWrapperPeim.c | 2 +- > IntelFsp2WrapperPkg/FspsWrapperPeim/FspsWrapperPeim.c | 2 +- > 2 files changed, 2 insertions(+), 2 deletions(-) > > diff --git a/IntelFsp2WrapperPkg/FspmWrapperPeim/FspmWrapperPeim.c > b/IntelFsp2WrapperPkg/FspmWrapperPeim/FspmWrapperPeim.c > index fa0441ce6c..18f04b541a 100644 > --- a/IntelFsp2WrapperPkg/FspmWrapperPeim/FspmWrapperPeim.c > +++ b/IntelFsp2WrapperPkg/FspmWrapperPeim/FspmWrapperPeim.c > @@ -157,7 +157,7 @@ FspmWrapperInit ( > > Status = EFI_SUCCESS; > > - if (FixedPcdGet8 (PcdFspModeSelection) == 1) { > + if (PcdGet8 (PcdFspModeSelection) == 1) { > Status = PeiFspMemoryInit (); > ASSERT_EFI_ERROR (Status); > } else { > diff --git a/IntelFsp2WrapperPkg/FspsWrapperPeim/FspsWrapperPeim.c > b/IntelFsp2WrapperPkg/FspsWrapperPeim/FspsWrapperPeim.c > index 87dd61e5c5..d748b21f7c 100644 > --- a/IntelFsp2WrapperPkg/FspsWrapperPeim/FspsWrapperPeim.c > +++ b/IntelFsp2WrapperPkg/FspsWrapperPeim/FspsWrapperPeim.c > @@ -349,7 +349,7 @@ FspsWrapperPeimEntryPoint ( > { > DEBUG ((DEBUG_INFO, "FspsWrapperPeimEntryPoint\n")); > > - if (FixedPcdGet8 (PcdFspModeSelection) == 1) { > + if (PcdGet8 (PcdFspModeSelection) == 1) { > FspsWrapperInit (); > } else { > PeiServicesInstallFvInfoPpi ( > -- > 2.13.3.windows.1 ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v2 0/2] Fix constant if statement issue 2018-11-22 3:51 [PATCH v2 0/2] Fix constant if statement issue Chasel, Chiu 2018-11-22 3:51 ` [PATCH v2 1/2] IntelFsp2WrapperPkg: Fix line ending format issue Chasel, Chiu 2018-11-22 3:51 ` [PATCH v2 2/2] IntelFsp2WrapperPkg: Fix constant if statements issue Chasel, Chiu @ 2018-11-22 5:04 ` Zeng, Star 2 siblings, 0 replies; 6+ messages in thread From: Zeng, Star @ 2018-11-22 5:04 UTC (permalink / raw) To: Chiu, Chasel, edk2-devel@lists.01.org; +Cc: Wu, Hao A, Yao, Jiewen, Zeng, Star Reviewed-by: Star Zeng <star.zeng@intel.com> -----Original Message----- From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Chasel, Chiu Sent: Thursday, November 22, 2018 11:51 AM To: edk2-devel@lists.01.org Cc: Wu, Hao A <hao.a.wu@intel.com>; Yao, Jiewen <jiewen.yao@intel.com> Subject: [edk2] [PATCH v2 0/2] Fix constant if statement issue Internal code quality scanning found 2 constant if statements related to FixedPcdGet8 () usage. Since the PCD can be PatchableInModule too, it should be changed to PcdGet8 () to fix this issue. Also fixed the line ending format issue from previous patch. Patch1 fixed line ending format issue on some files Patch2 fixed constant if statement issue. Cc: Jiewen Yao <Jiewen.yao@intel.com> Cc: Desimone Nathaniel L <nathaniel.l.desimone@intel.com> Cc: Wu Hao A <hao.a.wu@intel.com> Chasel, Chiu (2): IntelFsp2WrapperPkg: Fix line ending format issue IntelFsp2WrapperPkg: Fix constant if statements issue IntelFsp2WrapperPkg/FspmWrapperPeim/FspmWrapperPeim.c | 32 ++++++++++++++++---------------- IntelFsp2WrapperPkg/FspsWrapperPeim/FspsWrapperPeim.c | 24 ++++++++++++------------ IntelFsp2WrapperPkg/FspmWrapperPeim/FspmWrapperPeim.inf | 4 ++-- IntelFsp2WrapperPkg/FspsWrapperPeim/FspsWrapperPeim.inf | 4 ++-- IntelFsp2WrapperPkg/IntelFsp2WrapperPkg.dec | 22 +++++++++++----------- 5 files changed, 43 insertions(+), 43 deletions(-) -- 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] 6+ messages in thread
end of thread, other threads:[~2018-11-22 9:02 UTC | newest] Thread overview: 6+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2018-11-22 3:51 [PATCH v2 0/2] Fix constant if statement issue Chasel, Chiu 2018-11-22 3:51 ` [PATCH v2 1/2] IntelFsp2WrapperPkg: Fix line ending format issue Chasel, Chiu 2018-11-22 5:00 ` Wu, Hao A 2018-11-22 3:51 ` [PATCH v2 2/2] IntelFsp2WrapperPkg: Fix constant if statements issue Chasel, Chiu 2018-11-22 5:01 ` Wu, Hao A 2018-11-22 5:04 ` [PATCH v2 0/2] Fix constant if statement issue Zeng, Star
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox