Hi Liming,

I see. Thanks for your explanation. Will fix it in the patch v2.

Thanks,
Cinnamon Shia


-----Original Message-----
From: Gao, Liming [mailto:liming....@intel.com] 
Sent: Monday, March 7, 2016 10:49 AM
To: Shia, Cinnamon; Kinney, Michael D; edk2-devel@lists.01.org
Cc: Gao, Liming
Subject: RE: [edk2] [PATCH] MdeModulePkg: Change the type of 
PcdMaxPeiPerformanceLogEntries to UINT16

Cinnamon:
  You can see PCD gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableBase 
and gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableBase64. 
  In source code edk2\MdeModulePkg\Universal\Variable\Pei\Variable.c line 546, 
the consumer code is like below. 
        NvStorageBase = (EFI_PHYSICAL_ADDRESS) (PcdGet64 
(PcdFlashNvStorageVariableBase64) != 0 ?
                                                PcdGet64 
(PcdFlashNvStorageVariableBase64) :
                                                PcdGet32 
(PcdFlashNvStorageVariableBase)
                                               );

Thanks
Liming
> -----Original Message-----
> From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of 
> Shia, Cinnamon
> Sent: Monday, March 07, 2016 10:40 AM
> To: Kinney, Michael D; edk2-devel@lists.01.org
> Subject: Re: [edk2] [PATCH] MdeModulePkg: Change the type of 
> PcdMaxPeiPerformanceLogEntries to UINT16
> 
> Hi Mike,
> 
> Thanks for your feedback.
> 
> For solving the backward compatible problem, could you share to me 
> what the problem is?
> The PCD is accessed in override c files?
> 
> Regarding to introduce a new PCD, does it mean using the new PCD in c 
> files and leaving the existing one as it is?
> 
> Thanks,
> Cinnamon Shia
> 
> -----Original Message-----
> From: Kinney, Michael D [mailto:michael.d.kin...@intel.com]
> Sent: Sunday, March 6, 2016 12:47 AM
> To: Shia, Cinnamon; edk2-devel@lists.01.org; Kinney, Michael D
> Subject: RE: [edk2] [PATCH] MdeModulePkg: Change the type of 
> PcdMaxPeiPerformanceLogEntries to UINT16
> 
> Cinnamon,
> 
> Changing the size of a PCD is a not backwards compatible change.
> 
> In the past when we have run into similar issues, we had to introduce 
> a new PCD.
> 
> Mike
> 
> > -----Original Message-----
> > From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf 
> > Of Cinnamon Shia
> > Sent: Saturday, March 5, 2016 5:19 AM
> > To: edk2-devel@lists.01.org
> > Subject: [edk2] [PATCH] MdeModulePkg: Change the type of 
> > PcdMaxPeiPerformanceLogEntries to UINT16
> >
> > Change the type of PcdMaxPeiPerformanceLogEntries from UINT8 to
> UINT16
> > to log more than 255 performance entries in PEI.
> >
> > Contributed-under: TianoCore Contribution Agreement 1.0
> > Signed-off-by: Cinnamon Shia <cinnamon.s...@hpe.com>
> > ---
> >  .../Library/DxeCorePerformanceLib/DxeCorePerformanceLib.c         | 3 ++-
> >  MdeModulePkg/Library/PeiPerformanceLib/PeiPerformanceLib.c        | 8
> ++++----
> >  MdeModulePkg/MdeModulePkg.dec                                     | 3 ++-
> >  3 files changed, 8 insertions(+), 6 deletions(-)
> >
> > diff --git
> >
> a/MdeModulePkg/Library/DxeCorePerformanceLib/DxeCorePerformanceLi
> b.c
> >
> b/MdeModulePkg/Library/DxeCorePerformanceLib/DxeCorePerformanceLi
> b.c
> > index 0eb8e57..61491e6 100644
> > ---
> >
> a/MdeModulePkg/Library/DxeCorePerformanceLib/DxeCorePerformanceLi
> b.c
> > +++
> b/MdeModulePkg/Library/DxeCorePerformanceLib/DxeCorePerformanceLi
> b
> > +++ .c
> > @@ -11,6 +11,7 @@
> >    Performance Protocol is installed at the very beginning of DXE phase.
> >
> >  Copyright (c) 2006 - 2015, Intel Corporation. All rights 
> > reserved.<BR>
> > +(C) Copyright 2016 Hewlett Packard Enterprise Development LP<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 @@ -522,7 +523,7 @@ DxeCorePerformanceLibConstructor (
> >                    );
> >    ASSERT_EFI_ERROR (Status);
> >
> > -  mMaxGaugeRecords = INIT_DXE_GAUGE_DATA_ENTRIES + PcdGet8 
> > (PcdMaxPeiPerformanceLogEntries);
> > +  mMaxGaugeRecords = INIT_DXE_GAUGE_DATA_ENTRIES + PcdGet16
> > (PcdMaxPeiPerformanceLogEntries);
> >
> >    mGaugeData = AllocateZeroPool (sizeof (GAUGE_DATA_HEADER) +
> (sizeof
> > (GAUGE_DATA_ENTRY_EX) * mMaxGaugeRecords));
> >    ASSERT (mGaugeData != NULL);
> > diff --git
> > a/MdeModulePkg/Library/PeiPerformanceLib/PeiPerformanceLib.c
> > b/MdeModulePkg/Library/PeiPerformanceLib/PeiPerformanceLib.c
> > index 9674bbc..74e6300 100644
> > --- a/MdeModulePkg/Library/PeiPerformanceLib/PeiPerformanceLib.c
> > +++ b/MdeModulePkg/Library/PeiPerformanceLib/PeiPerformanceLib.c
> > @@ -7,7 +7,7 @@
> >    number of performance logging entry is specified by
> PcdMaxPeiPerformanceLogEntries.
> >
> >  Copyright (c) 2006 - 2015, Intel Corporation. All rights 
> > reserved.<BR>
> > -(C) Copyright 2015 Hewlett Packard Enterprise Development LP<BR>
> > +(C) Copyright 2015-2016 Hewlett Packard Enterprise Development 
> > +LP<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 @@ -71,11 +71,11 @@ InternalGetPerformanceHobLog (
> >      // PEI Performance HOB was not found, then build one.
> >      //
> >      PeiPerformanceSize     = sizeof (PEI_PERFORMANCE_LOG_HEADER) +
> > -                             sizeof (PEI_PERFORMANCE_LOG_ENTRY) * PcdGet8
> > (PcdMaxPeiPerformanceLogEntries);
> > +                             sizeof (PEI_PERFORMANCE_LOG_ENTRY) *
> > + PcdGet16
> > (PcdMaxPeiPerformanceLogEntries);
> >      *PeiPerformanceLog     = BuildGuidHob (&gPerformanceProtocolGuid,
> > PeiPerformanceSize);
> >      *PeiPerformanceLog     = ZeroMem (*PeiPerformanceLog,
> PeiPerformanceSize);
> >
> > -    PeiPerformanceSize     = sizeof (UINT32) * PcdGet8
> > (PcdMaxPeiPerformanceLogEntries);
> > +    PeiPerformanceSize     = sizeof (UINT32) * PcdGet16
> > (PcdMaxPeiPerformanceLogEntries);
> >      *PeiPerformanceIdArray = BuildGuidHob 
> > (&gPerformanceExProtocolGuid, PeiPerformanceSize);
> >      *PeiPerformanceIdArray = ZeroMem (*PeiPerformanceIdArray,
> PeiPerformanceSize);
> >    }
> > @@ -183,7 +183,7 @@ StartPerformanceMeasurementEx (
> >
> >    InternalGetPerformanceHobLog (&PeiPerformanceLog, 
> > &PeiPerformanceIdArray);
> >
> > -  if (PeiPerformanceLog->NumberOfEntries >= PcdGet8
> > (PcdMaxPeiPerformanceLogEntries)) {
> > +  if (PeiPerformanceLog->NumberOfEntries >= PcdGet16
> > + (PcdMaxPeiPerformanceLogEntries))
> > {
> >      DEBUG ((DEBUG_ERROR, "PEI performance log array out of
> resources\n"));
> >      return RETURN_OUT_OF_RESOURCES;
> >    }
> > diff --git a/MdeModulePkg/MdeModulePkg.dec 
> > b/MdeModulePkg/MdeModulePkg.dec index efd870b..038f020 100644
> > --- a/MdeModulePkg/MdeModulePkg.dec
> > +++ b/MdeModulePkg/MdeModulePkg.dec
> > @@ -5,6 +5,7 @@
> >  #
> >  # Copyright (c) 2007 - 2016, Intel Corporation. All rights 
> > reserved.<BR>  # Copyright (c) 2016, Linaro Ltd. All rights 
> > reserved.<BR>
> > +# (C) Copyright 2016 Hewlett Packard Enterprise Development LP<BR>
> >  # This program and the accompanying materials are licensed and made 
> > available under  # the terms and conditions of the BSD License that
> accompanies this distribution.
> >  # The full text of the license may be found at @@ -870,7 +871,7 @@
> >
> >    ## Maximum number of performance log entries during PEI phase.
> >    # @Prompt Maximum number of PEI performance log entries.
> > -
> >
> gEfiMdeModulePkgTokenSpaceGuid.PcdMaxPeiPerformanceLogEntries|40|
> UINT8
> > |0x0001002f
> > +
> > +
> gEfiMdeModulePkgTokenSpaceGuid.PcdMaxPeiPerformanceLogEntries|40|
> UIN
> > + T16|0x0001002f
> >
> >    ## RTC Update Timeout Value(microsecond).
> >    # @Prompt RTC Update Timeout Value.
> > --
> > 2.7.0.windows.2
> >
> > _______________________________________________
> > edk2-devel mailing list
> > edk2-devel@lists.01.org
> > https://lists.01.org/mailman/listinfo/edk2-devel
> _______________________________________________
> edk2-devel mailing list
> edk2-devel@lists.01.org
> https://lists.01.org/mailman/listinfo/edk2-devel
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel

Reply via email to