Re: [edk2-devel] [PATCH v5 07/19] MdeModulePkg: Add new Variable functionality

2022-11-13 Thread Wang, Jian J
One more comment:

For all header files, no need to remove the opening '_' of include guard macro.
Protected variable code are now in different folder than original variable 
driver.
They won't reference code from each other. Please add the opening '_' for those
macros to confirm to edk2 coding convention.

Regards,
Jian

> -Original Message-
> From: devel@edk2.groups.io  On Behalf Of Wang, Jian
> J
> Sent: Monday, November 14, 2022 11:43 AM
> To: Vang, Judah ; devel@edk2.groups.io
> Cc: Gao, Liming ; Wu, Hao A
> ; Mistry, Nishant C 
> Subject: Re: [edk2-devel] [PATCH v5 07/19] MdeModulePkg: Add new Variable
> functionality
> 
> Hi Judah,
> 
> See my comments (starting with [JianJW]) inline below.
> 
> 
> > -Original Message-
> > From: Vang, Judah 
> > Sent: Sunday, November 06, 2022 3:35 PM
> > To: devel@edk2.groups.io
> > Cc: Wang, Jian J ; Gao, Liming
> > ; Wu, Hao A ; Mistry,
> > Nishant C 
> > Subject: [PATCH v5 07/19] MdeModulePkg: Add new Variable functionality
> >
> > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2594
> >
> > V5: Add PEI Variable Protection into a new directory and leave the
> > existing PEI Variable unchanged.
> >
> > V3: Update GetNvVariableStore() to call GetVariableFlashNvStorageInfo()
> > and SafeUint64ToUint32().
> >
> > V1: Provide new APIs for retrieving variable information.
> > Add new function stubs for retrieving Protected
> > variable information.
> >
> > Cc: Jian J Wang 
> > Cc: Liming Gao 
> > Cc: Hao A Wu 
> > Cc: Nishant C Mistry 
> > Signed-off-by: Jian J Wang 
> > Signed-off-by: Nishant C Mistry 
> > Signed-off-by: Judah Vang 
> > Acked-by: Hao A Wu 
> > ---
> >  MdeModulePkg/Universal/Variable/Protected/Pei/VariablePei.inf  |  79 ++
> >  MdeModulePkg/Universal/Variable/Protected/Pei/Variable.h   | 225
> +
> >  MdeModulePkg/Universal/Variable/Protected/Pei/VariableParsing.h| 309
> > +++
> >  MdeModulePkg/Universal/Variable/Protected/Pei/VariableStore.h  | 116
> +++
> >  MdeModulePkg/Universal/Variable/Protected/Pei/Variable.c   | 628
> > +
> >  MdeModulePkg/Universal/Variable/Protected/Pei/VariableParsing.c| 941
> > 
> >  MdeModulePkg/Universal/Variable/Protected/Pei/VariableStore.c  | 307
> > +++
> >  MdeModulePkg/Universal/Variable/Protected/Pei/PeiVariable.uni  |  16 +
> >  MdeModulePkg/Universal/Variable/Protected/Pei/PeiVariableExtra.uni |  14 +
> >  9 files changed, 2635 insertions(+)
> >
> > diff --git a/MdeModulePkg/Universal/Variable/Protected/Pei/VariablePei.inf
> > b/MdeModulePkg/Universal/Variable/Protected/Pei/VariablePei.inf
> > new file mode 100644
> > index ..953a7c6b884f
> > --- /dev/null
> > +++ b/MdeModulePkg/Universal/Variable/Protected/Pei/VariablePei.inf
> > @@ -0,0 +1,79 @@
> > +## @file
> > +#  Implements ReadOnly Variable Services required by PEIM and installs PEI
> > ReadOnly Varaiable2 PPI.
> 
> [JianJW] typo: "Varaiable2" -> "Variable2"
> 
> > +#
> > +#  This module implements ReadOnly Variable Services required by PEIM and
> > installs PEI ReadOnly Varaiable2 PPI.
> 
> [JianJW] typo: "Varaiable2" -> "Variable2"
> 
> > +#
> > +#  Copyright (c) 2006 - 2022, Intel Corporation. All rights reserved.
> > +#  SPDX-License-Identifier: BSD-2-Clause-Patent
> > +#
> > +##
> > +
> > +[Defines]
> > +  INF_VERSION= 0x00010005
> > +  BASE_NAME  = PeiVariable
> > +  MODULE_UNI_FILE= PeiVariable.uni
> > +  FILE_GUID  = 8D104D19-593B-4DDF-81CF-8168A9EDE9C7
> > +  MODULE_TYPE= PEIM
> > +  VERSION_STRING = 1.0
> > +  ENTRY_POINT= PeimInitializeVariableServices
> > +
> > +#
> > +# The following information is for reference only and not required by the
> build
> > tools.
> > +#
> > +#  VALID_ARCHITECTURES   = IA32 X64 EBC
> > +#
> > +
> > +[Sources]
> > +  Variable.c
> > +  Variable.h
> > +  VariableStore.c
> > +  VariableStore.h
> > +  VariableParsing.c
> > +  VariableParsing.h
> > +
> > +[Packages]
> > +  MdePkg/MdePkg.dec
> > +  MdeModulePkg/MdeModulePkg.dec
> > +
> > +[LibraryClasses]
> > +  BaseMemoryLib
> > +  PcdLib
> > +  HobLib
> > +  PeimEntryPoint
> > +  DebugLib
> > +  PeiServicesTablePointerLib
> > +  PeiServicesLib
> > +  SafeIntLib
> > +  VariableFlashInfoLib
> > +  ProtectedVariableLib
> > +
> > +[Guids]
> > +  ## CONSUMES ## GUID # Variable store header
> > +  ## SOMETIMES_CONSUMES   ## HOB
> > +  gEfiAuthenticatedVariableGuid
> > +  ## SOMETIMES_CONSUMES   ## GUID # Variable store header
> > +  ## SOMETIMES_CONSUMES   ## HOB
> > +  gEfiVariableGuid
> > +  ## SOMETIMES_PRODUCES   ## HOB
> > +  ## SOMETIMES_CONSUMES   ## HOB
> > +  gEfiVariableIndexTableGuid
> > +  gEfiSystemNvDataFvGuid## SOMETIMES_CONSUMES   ## GUID
> > +  ## SOMETIMES_CONSUMES   ## HOB
> > +  ## CONSUMES ## GUID # Dependence
> > +  gEdkiiFaultTolerantWriteGuid
> > +
> > +[Ppis]
> > 

回复: [edk2-devel] [edk2-stable202211] [PATCH V6 0/3] Rename VmgExitLib to CcExitLib

2022-11-13 Thread gaoliming via groups.io
Jiewen:
  This patch set has passed code review before soft feature freeze phase.
And, there is no code change recently. So, I agree to merge this patch set
for the stable tag. 

  I will help merge it. 

Thanks
Liming
> -邮件原件-
> 发件人: devel@edk2.groups.io  代表 Yao, Jiewen
> 发送时间: 2022年11月12日 10:50
> 收件人: Xu, Min M ; devel@edk2.groups.io
> 抄送: Dong, Eric ; Ni, Ray ;
Brijesh
> Singh ; Aktas, Erdem ;
> Gerd Hoffmann ; James Bottomley
> ; Tom Lendacky ; Dong,
> Guo ; Rhodes, Sean ; Lu,
> James ; Guo, Gua ; Kinney,
> Michael D ; Gao, Liming
> 
> 主题: [edk2-devel] [edk2-stable202211] [PATCH V6 0/3] Rename VmgExitLib
> to CcExitLib
> 
> Reviewed by: Jiewen Yao 
> 
> Hi Mike/Liming
> I suggest this be in edk2-stable202211.
> 
> Thank you
> Yao, Jiewen
> 
> > -Original Message-
> > From: Xu, Min M 
> > Sent: Friday, November 11, 2022 3:17 PM
> > To: devel@edk2.groups.io
> > Cc: Xu, Min M ; Dong, Eric ;
> > Ni, Ray ; Brijesh Singh ;
Aktas,
> > Erdem ; Gerd Hoffmann ;
> > James Bottomley ; Yao, Jiewen
> > ; Tom Lendacky ;
> > Dong, Guo ; Rhodes, Sean ;
> > Lu, James ; Guo, Gua ; Kinney,
> > Michael D ; Gao, Liming
> > 
> > Subject: [PATCH V6 0/3] Rename VmgExitLib to CcExitLib
> >
> > BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=4123
> >
> > VmgExitLib once was designed to provide interfaces to support #VC
handler
> > and issue VMGEXIT instruction. After TDVF (enable TDX feature in OVMF)
is
> > introduced, this library is updated to support #VE as well. Now the name
> > of VmgExitLib cannot reflect what the lib does.
> >
> > This patch-set renames VmgExitLib to CcExitLib (Cc means Confidential
> > Computing). This is simple renaming and there is no logic changes. Then
> > APIs defined in CcExitLib.h are added with a CcExit prefix. This is to
> > make the name more meaningful.
> >
> > Please to be noted, changing the name of VmgExitLib to CcExitLib is a
> > non-backwards compatible change from a platform DSC file perspective for
> > downstream consumers. So for downstream platform below changes
> > should
> > be applied:
> > 1. For DSC files:
> > - VmgExitLib|OvmfPkg/Library/VmgExitLib/SecVmgExitLib.inf =>
> >   CcExitLib|OvmfPkg/Library/CcExitLib/SecCcExitLib.inf
> >
> > - VmgExitLib|UefiCpuPkg/Library/VmgExitLibNull/VmgExitLibNull.inf =>
> >   CcExitLib|UefiCpuPkg/Library/CcExitLibNull/CcExitLibNull.inf
> >
> > - VmgExitLib|OvmfPkg/Library/VmgExitLib/VmgExitLib.inf =>
> >   CcExitLib|OvmfPkg/Library/CcExitLib/CcExitLib.inf
> >
> > 2. For INF files:
> > - VmgExitLib => CcExitLib
> >
> > 3. For Header files
> > - #include  => #include 
> >
> > 4. For C files
> > - Replace the APIs defined in the VmgExitLib.h with the ones defined in
> >   CcExitLib.h. The old name is renamed by adding a prefix (CcExit).
> >   For example VmgInit is renamed as CcExitVmgInit.
> >
> > Code: https://github.com/mxu9/edk2/tree/CcExitLib.v5
> >
> > v6 changes:
> >  - Fix a typo in patch0@v5.
> >  - No other changes from v5. So the code is same as v5.
> >
> > v5 changes:
> >  - Rebased the code base to c17c3c24d8.
> >  - Add instructions in patch#0 on what updates to a downstream
> >platform DSC.
> >
> > v4 changes:
> >  - The previous versions of the patch-set are to first duplicate a new
> >CcExitLib then delete the old VmgExitLib. According to this comments
> >https://edk2.groups.io/g/devel/message/96019 it suggests renaming in
> >a single patch is better.
> >  - Lib APIs are added with CcExit prefix, not CcExitLib prefix.
> >
> > v3 changes:
> >  - Rename CcExitHandleVc / CcExitHandleVe to
> >CcExitLibHandleVc / CcExitLibHandleVe to make the nameing
> consistent.
> >  - Update the CcExitLib to merge the patch eff44c008d99
> >   (OvmfPkg/VmgExitLig: HALT on #VE when access to private memory).
> >
> > v2 changes:
> >  - Patch #3 is added to import CcExitLib in OvmfPkg's *.dsc. This is to
> >prevent the building from being broken in the following patches.
> >
> > Cc: Eric Dong 
> > Cc: Ray Ni 
> > Cc: Brijesh Singh 
> > Cc: Erdem Aktas 
> > Cc: Gerd Hoffmann 
> > Cc: James Bottomley 
> > Cc: Jiewen Yao 
> > Cc: Tom Lendacky 
> > Cc: Guo Dong 
> > Cc: Sean Rhodes 
> > Cc: James Lu 
> > Cc: Gua Guo 
> > Cc: Michael D Kinney 
> > Cc: Liming Gao 
> > Signed-off-by: Min Xu 
> >
> > Min M Xu (3):
> >   OvmfPkg/UefiCpuPkg/UefiPayloadPkg: Rename VmgExitLib to CcExitLib
> >   OvmfPkg/UefiCpuPkg: Add CcExit prefix to the APIs of CcExitLib
> >   Maintainers: Update the VmgExitLib to CcExitLib
> >
> >  Maintainers.txt   |   2 +-
> >  OvmfPkg/AmdSev/AmdSevX64.dsc  |   4 +-
> >  OvmfPkg/Bhyve/BhyveX64.dsc|   2 +-
> >  OvmfPkg/CloudHv/CloudHvX64.dsc|   6 +-
> >  OvmfPkg/IntelTdx/IntelTdxX64.dsc  |   4 +-
> >  .../DxeMemEncryptSevLib.inf   |   2 +-
> >  .../PeiMemEncryptSevLib.inf   |   2 +-
> >  .../SecMemEncryptSevLib.inf   |   2 +-
> >  .../X64/SnpPageStateChangeInternal.c 

Re: [edk2-devel] [edk2-platforms][PATCH V5 00/15] Platform: Add Loongson support.

2022-11-13 Thread maobibo
Ping for reviewing, Any comments is welcome.

>From edk2 mailing list, Soft Feature Freeze start on 2022-11-07 for 
>edk2-stable202211,
is edk2-platform is affected also?

And there are series of submition for Riscv ovmf supports recently, we will 
adopt
the new multi-arch schemes on Loongarch virt machine also after both Riscv virt 
machine
and Loongarch virt machine code are merged. Is that ok?


regards
bibo, mao

在 2022/11/11 17:12, xianglai li 写道:
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4054
> 
> The uploaded code generates firmware to support Linux launching on the 
> LoongArch platform under qemu,
> So it will run in a virtual machine.
> 
> LoongArch is the general processor architecture of Loongson.
> You can get the latest LoongArch documents or LoongArch tools at 
> https://github.com/loongson/.
> 
> You can also view the code through the Loongson community.
> The edk2 code in Loongson community:
> https://github.com/loongson/edk2/tree/LoongArch
> The edk2-platform code in Loonson community:
> https://github.com/loongson/edk2-platforms
> The qemu code in Loongson community:
> https://gitlab.com/qemu-project/qemu.git
> The LoongArch Documentation in Loongson community:
> https://github.com/loongson/LoongArch-Documentation/tree/main/docs
> The all patches at:
> https://github.com/loongson/edk2-platforms/tree/devel-LoongArch-patch
> 
> v2 changes:
>  - Remove the inline assembly from StableTimerLib.
>  - troubleshoot TAB strings, convert TAB characters to spaces.
>  - remove smm related code, loongarch has no smm mode.
> 
> v3 changes:
>  - delete ExtractHandler related code.
>  - Boot UEFI with low 256M memory.
>  - Modify common interrupt handling.
> 
> v4 changes:
>  - Remove qemu flash related code.
>  - Modify fdt base address.
> 
> v5 changes:
>  - Add Udf driver support.
>  - Split readme file into a separate patch.
>  - Modify the code style
>- delete extra blank lines
>- use the assembly function definition macros in MdePkg
>- sort out the PCD variable Token value.
> 
> Cc: Bibo Mao 
> Cc: Chao Li 
> Cc: Leif Lindholm 
> Cc: Liming Gao 
> Cc: Michael D Kinney 
> 
> xianglai li (15):
>   Platform/Loongson: Add Serial Port library
>   Platform/Loongson: Support SEC
>   Platform/Loongson: Add PeiServicesTablePointerLib.
>   Platform/Loongson: Add QemuFwCfgLib.
>   Platform/Loongson: Add MmuLib.
>   Platform/Loongson: Add StableTimerLib.
>   Platform/Loongson: Support PEI phase.
>   Platform/Loongson: Add CPU DXE driver.
>   Platform/Loongson: Add PciCpuIoDxe driver.
>   Platform/Loongson:  Add timer Dxe driver.
>   Platform/Loongson: Add RealTime Clock lib.
>   Platform/Loongson: Add Platform Boot Manager Lib.
>   Platform/Loongson: Add Reset System Lib.
>   Platform/Loongson: Support Dxe
>   Platform/Loongson: Add Readme.
> 
>  .../LoongArchQemuPkg/Drivers/CpuDxe/CpuDxe.c  | 367 
>  .../LoongArchQemuPkg/Drivers/CpuDxe/CpuDxe.h  | 199 +
>  .../Drivers/CpuDxe/CpuDxe.inf |  59 ++
>  .../Drivers/CpuDxe/LoongArch64/Exception.c| 335 +++
>  .../Drivers/CpuDxe/LoongArch64/Fpu.S  |  97 ++
>  .../Drivers/CpuDxe/LoongArch64/LoongArch.S| 321 +++
>  .../Drivers/PciCpuIo2Dxe/PciCpuIo2Dxe.c   | 538 
>  .../Drivers/PciCpuIo2Dxe/PciCpuIo2Dxe.h   | 207 +
>  .../Drivers/PciCpuIo2Dxe/PciCpuIo2Dxe.inf |  44 +
>  .../Drivers/StableTimerDxe/Timer.c| 388 
>  .../Drivers/StableTimerDxe/Timer.h| 172 
>  .../Drivers/StableTimerDxe/TimerConfig.S  |  38 +
>  .../Drivers/StableTimerDxe/TimerDxe.inf   |  44 +
>  .../LoongArchQemuPkg/Include/Library/Cpu.h| 237 +
>  .../LoongArchQemuPkg/Include/Library/MmuLib.h |  85 ++
>  .../Include/Library/QemuFwCfgLib.h| 174 
>  .../Include/Library/StableTimer.h |  59 ++
>  .../Include/LoongArchQemuPlatform.h   |  95 ++
>  .../LsRealTimeClockLib/LsRealTimeClock.h  |  40 +
>  .../LsRealTimeClockLib/LsRealTimeClockLib.c   | 335 +++
>  .../LsRealTimeClockLib/LsRealTimeClockLib.inf |  44 +
>  .../LoongArchQemuPkg/Library/MmuLib/Mmu.S | 155 
>  .../Library/MmuLib/MmuBaseLib.inf |  40 +
>  .../Library/MmuLib/MmuBaseLibPei.inf  |  47 +
>  .../Library/MmuLib/MmuLibCore.c   | 831 ++
>  .../Library/MmuLib/MmuLibCore.h   |  40 +
>  .../Library/MmuLib/MmuLibCorePei.c| 231 +
>  .../LoongArchQemuPkg/Library/MmuLib/mmu.h | 190 
>  .../LoongArchQemuPkg/Library/MmuLib/page.h| 280 ++
>  .../LoongArchQemuPkg/Library/MmuLib/pte.h |  57 ++
>  .../PeiServicesTablePointer.c |  79 ++
>  .../PeiServicesTablePointer.h |  39 +
>  .../PeiServicesTablePointerLib.S  |  40 +
>  .../PeiServicesTablePointerLib.inf|  32 +
>  .../PlatformBootManagerLib/PlatformBm.c   | 742 
>  .../PlatformBootManagerLib/PlatformBm.h   | 112 +++
>  .../Platform

Re: [edk2-devel] [PATCH v5 07/19] MdeModulePkg: Add new Variable functionality

2022-11-13 Thread Wang, Jian J
Hi Judah,

See my comments (starting with [JianJW]) inline below.


> -Original Message-
> From: Vang, Judah 
> Sent: Sunday, November 06, 2022 3:35 PM
> To: devel@edk2.groups.io
> Cc: Wang, Jian J ; Gao, Liming
> ; Wu, Hao A ; Mistry,
> Nishant C 
> Subject: [PATCH v5 07/19] MdeModulePkg: Add new Variable functionality
> 
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2594
> 
> V5: Add PEI Variable Protection into a new directory and leave the
> existing PEI Variable unchanged.
> 
> V3: Update GetNvVariableStore() to call GetVariableFlashNvStorageInfo()
> and SafeUint64ToUint32().
> 
> V1: Provide new APIs for retrieving variable information.
> Add new function stubs for retrieving Protected
> variable information.
> 
> Cc: Jian J Wang 
> Cc: Liming Gao 
> Cc: Hao A Wu 
> Cc: Nishant C Mistry 
> Signed-off-by: Jian J Wang 
> Signed-off-by: Nishant C Mistry 
> Signed-off-by: Judah Vang 
> Acked-by: Hao A Wu 
> ---
>  MdeModulePkg/Universal/Variable/Protected/Pei/VariablePei.inf  |  79 ++
>  MdeModulePkg/Universal/Variable/Protected/Pei/Variable.h   | 225 
> +
>  MdeModulePkg/Universal/Variable/Protected/Pei/VariableParsing.h| 309
> +++
>  MdeModulePkg/Universal/Variable/Protected/Pei/VariableStore.h  | 116 +++
>  MdeModulePkg/Universal/Variable/Protected/Pei/Variable.c   | 628
> +
>  MdeModulePkg/Universal/Variable/Protected/Pei/VariableParsing.c| 941
> 
>  MdeModulePkg/Universal/Variable/Protected/Pei/VariableStore.c  | 307
> +++
>  MdeModulePkg/Universal/Variable/Protected/Pei/PeiVariable.uni  |  16 +
>  MdeModulePkg/Universal/Variable/Protected/Pei/PeiVariableExtra.uni |  14 +
>  9 files changed, 2635 insertions(+)
> 
> diff --git a/MdeModulePkg/Universal/Variable/Protected/Pei/VariablePei.inf
> b/MdeModulePkg/Universal/Variable/Protected/Pei/VariablePei.inf
> new file mode 100644
> index ..953a7c6b884f
> --- /dev/null
> +++ b/MdeModulePkg/Universal/Variable/Protected/Pei/VariablePei.inf
> @@ -0,0 +1,79 @@
> +## @file
> +#  Implements ReadOnly Variable Services required by PEIM and installs PEI
> ReadOnly Varaiable2 PPI.

[JianJW] typo: "Varaiable2" -> "Variable2"

> +#
> +#  This module implements ReadOnly Variable Services required by PEIM and
> installs PEI ReadOnly Varaiable2 PPI.

[JianJW] typo: "Varaiable2" -> "Variable2"

> +#
> +#  Copyright (c) 2006 - 2022, Intel Corporation. All rights reserved.
> +#  SPDX-License-Identifier: BSD-2-Clause-Patent
> +#
> +##
> +
> +[Defines]
> +  INF_VERSION= 0x00010005
> +  BASE_NAME  = PeiVariable
> +  MODULE_UNI_FILE= PeiVariable.uni
> +  FILE_GUID  = 8D104D19-593B-4DDF-81CF-8168A9EDE9C7
> +  MODULE_TYPE= PEIM
> +  VERSION_STRING = 1.0
> +  ENTRY_POINT= PeimInitializeVariableServices
> +
> +#
> +# The following information is for reference only and not required by the 
> build
> tools.
> +#
> +#  VALID_ARCHITECTURES   = IA32 X64 EBC
> +#
> +
> +[Sources]
> +  Variable.c
> +  Variable.h
> +  VariableStore.c
> +  VariableStore.h
> +  VariableParsing.c
> +  VariableParsing.h
> +
> +[Packages]
> +  MdePkg/MdePkg.dec
> +  MdeModulePkg/MdeModulePkg.dec
> +
> +[LibraryClasses]
> +  BaseMemoryLib
> +  PcdLib
> +  HobLib
> +  PeimEntryPoint
> +  DebugLib
> +  PeiServicesTablePointerLib
> +  PeiServicesLib
> +  SafeIntLib
> +  VariableFlashInfoLib
> +  ProtectedVariableLib
> +
> +[Guids]
> +  ## CONSUMES ## GUID # Variable store header
> +  ## SOMETIMES_CONSUMES   ## HOB
> +  gEfiAuthenticatedVariableGuid
> +  ## SOMETIMES_CONSUMES   ## GUID # Variable store header
> +  ## SOMETIMES_CONSUMES   ## HOB
> +  gEfiVariableGuid
> +  ## SOMETIMES_PRODUCES   ## HOB
> +  ## SOMETIMES_CONSUMES   ## HOB
> +  gEfiVariableIndexTableGuid
> +  gEfiSystemNvDataFvGuid## SOMETIMES_CONSUMES   ## GUID
> +  ## SOMETIMES_CONSUMES   ## HOB
> +  ## CONSUMES ## GUID # Dependence
> +  gEdkiiFaultTolerantWriteGuid
> +
> +[Ppis]
> +  gEfiPeiReadOnlyVariable2PpiGuid## PRODUCES
> +  gEfiPeiVariableStoreDiscoveredPpiGuid  ## CONSUMES
> +
> +[Pcd]
> +  gEfiMdeModulePkgTokenSpaceGuid.PcdEmuVariableNvModeEnable ##
> SOMETIMES_CONSUMES
> +
> +[Depex]
> +  gEdkiiFaultTolerantWriteGuid
> +
> +# [BootMode]
> +# RECOVERY_FULL ## SOMETIMES_CONSUMES
> +
> +[UserExtensions.TianoCore."ExtraFiles"]
> +  PeiVariableExtra.uni
> diff --git a/MdeModulePkg/Universal/Variable/Protected/Pei/Variable.h
> b/MdeModulePkg/Universal/Variable/Protected/Pei/Variable.h
> new file mode 100644
> index ..1bdbdd2b807b
> --- /dev/null
> +++ b/MdeModulePkg/Universal/Variable/Protected/Pei/Variable.h
> @@ -0,0 +1,225 @@
> +/** @file
> +  The internal header file includes the common header files, defines
> +  internal structure and functions used by PeiVariable module.
> +
> +Copyright (c) 2006 - 2022, Intel Corpo

Re: [edk2-devel] [PATCH v4 07/28] MdeModulePkg: Add new Variable functionality

2022-11-13 Thread Wang, Jian J
Sorry, please ignore this one. I should reply the one from v5.

Regards,
Jian

> -Original Message-
> From: devel@edk2.groups.io  On Behalf Of Wang, Jian
> J
> Sent: Monday, November 14, 2022 1:39 AM
> To: Vang, Judah ; devel@edk2.groups.io
> Cc: Gao, Liming ; Wu, Hao A
> ; Mistry, Nishant C 
> Subject: Re: [edk2-devel] [PATCH v4 07/28] MdeModulePkg: Add new Variable
> functionality
> 
> Hi Judah,
> 
> See my comments (starting with [JianJW]) inline below.
> 
> Regards,
> Jian
> 
> > -Original Message-
> > From: Vang, Judah 
> > Sent: Thursday, August 11, 2022 2:53 PM
> > To: devel@edk2.groups.io
> > Cc: Wang, Jian J ; Gao, Liming
> > ; Wu, Hao A ; Mistry,
> > Nishant C 
> > Subject: [PATCH v4 07/28] MdeModulePkg: Add new Variable functionality
> >
> > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2594
> >
> > V3: Update GetNvVariableStore() to call GetVariableFlashNvStorageInfo()
> > and SafeUint64ToUint32().
> >
> > V1: Provide new APIs for retrieving variable information.
> > Add new function stubs for retrieving Protected
> > variable information.
> >
> > Cc: Jian J Wang 
> > Cc: Liming Gao 
> > Cc: Hao A Wu 
> > Cc: Nishant C Mistry 
> > Signed-off-by: Jian J Wang 
> > Signed-off-by: Nishant C Mistry 
> > Signed-off-by: Judah Vang 
> > Acked-by: Hao A Wu 
> > ---
> >  MdeModulePkg/Universal/Variable/Pei/VariablePei.inf   |  10 +-
> >  MdeModulePkg/Universal/Variable/Pei/Variable.h|  80 +-
> >  MdeModulePkg/Universal/Variable/Pei/VariableParsing.h | 309 +++
> >  MdeModulePkg/Universal/Variable/Pei/VariableStore.h   | 116 +++
> >  MdeModulePkg/Universal/Variable/Pei/Variable.c| 890 
> > +++---
> >  MdeModulePkg/Universal/Variable/Pei/VariableParsing.c | 941
> > 
> >  MdeModulePkg/Universal/Variable/Pei/VariableStore.c   | 307 +++
> >  7 files changed, 1893 insertions(+), 760 deletions(-)
> >
> > diff --git a/MdeModulePkg/Universal/Variable/Pei/VariablePei.inf
> > b/MdeModulePkg/Universal/Variable/Pei/VariablePei.inf
> > index 7264a24bdf71..0945b4dec435 100644
> > --- a/MdeModulePkg/Universal/Variable/Pei/VariablePei.inf
> > +++ b/MdeModulePkg/Universal/Variable/Pei/VariablePei.inf
> > @@ -3,7 +3,7 @@
> >  #
> >  #  This module implements ReadOnly Variable Services required by PEIM and
> > installs PEI ReadOnly Varaiable2 PPI.
> >  #
> > -#  Copyright (c) 2006 - 2019, Intel Corporation. All rights reserved.
> > +#  Copyright (c) 2006 - 2022, Intel Corporation. All rights reserved.
> >  #  SPDX-License-Identifier: BSD-2-Clause-Patent
> >  #
> >  ##
> > @@ -26,6 +26,10 @@ [Defines]
> >  [Sources]
> >Variable.c
> >Variable.h
> > +  VariableStore.c
> > +  VariableStore.h
> > +  VariableParsing.c
> > +  VariableParsing.h
> >
> >  [Packages]
> >MdePkg/MdePkg.dec
> > @@ -41,6 +45,7 @@ [LibraryClasses]
> >PeiServicesLib
> >SafeIntLib
> >VariableFlashInfoLib
> > +  ProtectedVariableLib
> >
> >  [Guids]
> >## CONSUMES ## GUID # Variable store header
> > @@ -58,7 +63,8 @@ [Guids]
> >gEdkiiFaultTolerantWriteGuid
> >
> >  [Ppis]
> > -  gEfiPeiReadOnlyVariable2PpiGuid   ## PRODUCES
> > +  gEfiPeiReadOnlyVariable2PpiGuid## PRODUCES
> > +  gEfiPeiVariableStoreDiscoveredPpiGuid  ## CONSUMES
> >
> >  [Pcd]
> >gEfiMdeModulePkgTokenSpaceGuid.PcdEmuVariableNvModeEnable ##
> > SOMETIMES_CONSUMES
> > diff --git a/MdeModulePkg/Universal/Variable/Pei/Variable.h
> > b/MdeModulePkg/Universal/Variable/Pei/Variable.h
> > index 51effbf79987..8c79ff850b38 100644
> > --- a/MdeModulePkg/Universal/Variable/Pei/Variable.h
> > +++ b/MdeModulePkg/Universal/Variable/Pei/Variable.h
> > @@ -2,7 +2,7 @@
> >The internal header file includes the common header files, defines
> >internal structure and functions used by PeiVariable module.
> >
> > -Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.
> > +Copyright (c) 2006 - 2022, Intel Corporation. All rights reserved.
> >  SPDX-License-Identifier: BSD-2-Clause-Patent
> >
> >  **/
> > @@ -22,11 +22,13 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
> >  #include 
> >  #include 
> >  #include 
> > +#include 
> >
> >  #include 
> >  #include 
> >  #include 
> >  #include 
> > +#include 
> >
> >  typedef enum {
> >VariableStoreTypeHob,
> > @@ -144,4 +146,80 @@ PeiGetNextVariableName (
> >IN OUT EFI_GUID*VariableGuid
> >);
> >
> > +/**
> > +  This service retrieves a variable's value using its name and GUID.
> > +
> > +  Read the specified variable from the UEFI variable store. If the Data
> > +  buffer is too small to hold the contents of the variable, the error
> > +  EFI_BUFFER_TOO_SMALL is returned and DataSize is set to the required
> buffer
> > +  size to obtain the data.
> > +
> > +  @param  This  A pointer to this instance of the
> > EFI_PEI_READ_ONLY_VARIABLE2_PPI.
> > +  @param  VariableName  A pointer to a null-terminated string that 
> > is the
> > variable's name.

Re: [edk2-devel] [edk2-CCodingStandardsSpecification PATCH 2/2] Source Files / Spacing / Multi-line func. calls: allow condensed arguments

2022-11-13 Thread Chang, Abner via groups.io
[AMD Official Use Only - General]

For this case, we don't have to take another global reformatting. These two 
formats can coexisting without the conflict.  We just allow the condense argus 
format in CSS. Also, update Uncrustify to not forcing each argument at its own 
line.
The current Uncrustify behavior seems to me match the CCS spec. But this patch 
was sent to allow the multiple argus at the same line, which was not proposed 
to fix the issue in current Uncrustify. You sure we just close this issue?
Abner


From: devel@edk2.groups.io  On Behalf Of Michael D Kinney 
via groups.io
Sent: Monday, November 14, 2022 1:36 AM
To: devel@edk2.groups.io; Chang, Abner ; Laszlo Ersek 
; Kubacki, Michael ; Kinney, 
Michael D 
Subject: Re: [edk2-devel] [edk2-CCodingStandardsSpecification PATCH 2/2] Source 
Files / Spacing / Multi-line func. calls: allow condensed arguments

Caution: This message originated from an External Source. Use proper caution 
when opening attachments, clicking links, or responding.

We do not want another global format change because that make git blame 
difficult to use.

Are any clarifications required to describe the current Uncrustify behavior?  
Or is the description correct?

If the current description matches Uncristify behavior, then I recommend we 
close this issue as will not fix.

Mike

From: devel@edk2.groups.io 
mailto:devel@edk2.groups.io>> On Behalf Of Chang, Abner 
via groups.io
Sent: Sunday, November 13, 2022 12:45 AM
To: Kinney, Michael D 
mailto:michael.d.kin...@intel.com>>; 
devel@edk2.groups.io; Laszlo Ersek 
mailto:ler...@redhat.com>>; Kubacki, Michael 
mailto:michael.kuba...@microsoft.com>>
Subject: Re: [edk2-devel] [edk2-CCodingStandardsSpecification PATCH 2/2] Source 
Files / Spacing / Multi-line func. calls: allow condensed arguments


[AMD Official Use Only - General]

Uncrustify can fix the first argument that is not at the indent with two space. 
It also can fix the first argument that is not at the new line.
But it also makes each argument a new line if multiple args are condensed in 
one line. That is what we have to update Uncrustify if we have this patch 
merged to CCS.

+Michael Kubacki in loop.

Abner

From: Kinney, Michael D 
mailto:michael.d.kin...@intel.com>>
Sent: Sunday, November 13, 2022 9:58 AM
To: devel@edk2.groups.io; Chang, Abner 
mailto:abner.ch...@amd.com>>; Laszlo Ersek 
mailto:ler...@redhat.com>>; Kinney, Michael D 
mailto:michael.d.kin...@intel.com>>
Subject: RE: [edk2-devel] [edk2-CCodingStandardsSpecification PATCH 2/2] Source 
Files / Spacing / Multi-line func. calls: allow condensed arguments

Caution: This message originated from an External Source. Use proper caution 
when opening attachments, clicking links, or responding.

Is this exactly what Uncrustify does now?

Mike

From: devel@edk2.groups.io 
mailto:devel@edk2.groups.io>> On Behalf Of Chang, Abner 
via groups.io
Sent: Saturday, November 12, 2022 5:36 PM
To: Laszlo Ersek mailto:ler...@redhat.com>>; 
devel@edk2.groups.io
Subject: Re: [edk2-devel] [edk2-CCodingStandardsSpecification PATCH 2/2] Source 
Files / Spacing / Multi-line func. calls: allow condensed arguments

Hi all,
As we are going to release CCS 2.3, we would like to address some pending 
issues of CCS. For this, I think we can,
- Still keep the one line per argument style in CCS although the 
multi-arguments in the one line style can cover this. This avoids confusion 
from readers and questions about if they can do the one-line per argument style.
- If the arguments are in different lines, the first argument must be indented 
with two spaces from the start of the function name or the member function name.
How is this?

Abner



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#96336): https://edk2.groups.io/g/devel/message/96336
Mute This Topic: https://groups.io/mt/30907266/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-




[edk2-devel] Event: Tools, CI, Code base construction meeting series - Monday, November 14, 2022 #cal-reminder

2022-11-13 Thread Group Notification
*Reminder: Tools, CI, Code base construction meeting series*

*When:*
Monday, November 14, 2022
4:30pm to 5:30pm
(UTC-08:00) America/Los Angeles

*Where:*
https://github.com/tianocore/edk2/discussions/2614

View Event ( https://edk2.groups.io/g/devel/viewevent?eventid=1623294 )

*Description:*

TianoCore community,

Microsoft and Intel will be hosting a series of open meetings to discuss build, 
CI, tools, and other related topics. If you are interested, have ideas/opinions 
please join us. These meetings will be Monday 4:30pm Pacific Time on Microsoft 
Teams.

MS Teams Link in following discussion: * 
https://github.com/tianocore/edk2/discussions/2614

Anyone is welcome to join.

* tianocore/edk2: EDK II (github.com)
* tianocore/edk2-basetools: EDK II BaseTools Python tools as a PIP module 
(github.com) https://github.com/tianocore/edk2-basetools
* tianocore/edk2-pytool-extensions: Extensions to the edk2 build system 
allowing for a more robust and plugin based build system and tool execution 
environment (github.com) https://github.com/tianocore/edk2-pytool-extensions
* tianocore/edk2-pytool-library: Python library package that supports UEFI 
development (github.com) https://github.com/tianocore/edk2-pytool-library

MS Teams Browser Clients * 
https://docs.microsoft.com/en-us/microsoftteams/get-clients?tabs=Windows#browser-client


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#96335): https://edk2.groups.io/g/devel/message/96335
Mute This Topic: https://groups.io/mt/95009688/21656
Mute #cal-reminder:https://edk2.groups.io/g/devel/mutehashtag/cal-reminder
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-




Re: [edk2-devel] [PATCH v4 07/28] MdeModulePkg: Add new Variable functionality

2022-11-13 Thread Wang, Jian J
Hi Judah,

See my comments (starting with [JianJW]) inline below.

Regards,
Jian

> -Original Message-
> From: Vang, Judah 
> Sent: Thursday, August 11, 2022 2:53 PM
> To: devel@edk2.groups.io
> Cc: Wang, Jian J ; Gao, Liming
> ; Wu, Hao A ; Mistry,
> Nishant C 
> Subject: [PATCH v4 07/28] MdeModulePkg: Add new Variable functionality
> 
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2594
> 
> V3: Update GetNvVariableStore() to call GetVariableFlashNvStorageInfo()
> and SafeUint64ToUint32().
> 
> V1: Provide new APIs for retrieving variable information.
> Add new function stubs for retrieving Protected
> variable information.
> 
> Cc: Jian J Wang 
> Cc: Liming Gao 
> Cc: Hao A Wu 
> Cc: Nishant C Mistry 
> Signed-off-by: Jian J Wang 
> Signed-off-by: Nishant C Mistry 
> Signed-off-by: Judah Vang 
> Acked-by: Hao A Wu 
> ---
>  MdeModulePkg/Universal/Variable/Pei/VariablePei.inf   |  10 +-
>  MdeModulePkg/Universal/Variable/Pei/Variable.h|  80 +-
>  MdeModulePkg/Universal/Variable/Pei/VariableParsing.h | 309 +++
>  MdeModulePkg/Universal/Variable/Pei/VariableStore.h   | 116 +++
>  MdeModulePkg/Universal/Variable/Pei/Variable.c| 890 
> +++---
>  MdeModulePkg/Universal/Variable/Pei/VariableParsing.c | 941
> 
>  MdeModulePkg/Universal/Variable/Pei/VariableStore.c   | 307 +++
>  7 files changed, 1893 insertions(+), 760 deletions(-)
> 
> diff --git a/MdeModulePkg/Universal/Variable/Pei/VariablePei.inf
> b/MdeModulePkg/Universal/Variable/Pei/VariablePei.inf
> index 7264a24bdf71..0945b4dec435 100644
> --- a/MdeModulePkg/Universal/Variable/Pei/VariablePei.inf
> +++ b/MdeModulePkg/Universal/Variable/Pei/VariablePei.inf
> @@ -3,7 +3,7 @@
>  #
>  #  This module implements ReadOnly Variable Services required by PEIM and
> installs PEI ReadOnly Varaiable2 PPI.
>  #
> -#  Copyright (c) 2006 - 2019, Intel Corporation. All rights reserved.
> +#  Copyright (c) 2006 - 2022, Intel Corporation. All rights reserved.
>  #  SPDX-License-Identifier: BSD-2-Clause-Patent
>  #
>  ##
> @@ -26,6 +26,10 @@ [Defines]
>  [Sources]
>Variable.c
>Variable.h
> +  VariableStore.c
> +  VariableStore.h
> +  VariableParsing.c
> +  VariableParsing.h
> 
>  [Packages]
>MdePkg/MdePkg.dec
> @@ -41,6 +45,7 @@ [LibraryClasses]
>PeiServicesLib
>SafeIntLib
>VariableFlashInfoLib
> +  ProtectedVariableLib
> 
>  [Guids]
>## CONSUMES ## GUID # Variable store header
> @@ -58,7 +63,8 @@ [Guids]
>gEdkiiFaultTolerantWriteGuid
> 
>  [Ppis]
> -  gEfiPeiReadOnlyVariable2PpiGuid   ## PRODUCES
> +  gEfiPeiReadOnlyVariable2PpiGuid## PRODUCES
> +  gEfiPeiVariableStoreDiscoveredPpiGuid  ## CONSUMES
> 
>  [Pcd]
>gEfiMdeModulePkgTokenSpaceGuid.PcdEmuVariableNvModeEnable ##
> SOMETIMES_CONSUMES
> diff --git a/MdeModulePkg/Universal/Variable/Pei/Variable.h
> b/MdeModulePkg/Universal/Variable/Pei/Variable.h
> index 51effbf79987..8c79ff850b38 100644
> --- a/MdeModulePkg/Universal/Variable/Pei/Variable.h
> +++ b/MdeModulePkg/Universal/Variable/Pei/Variable.h
> @@ -2,7 +2,7 @@
>The internal header file includes the common header files, defines
>internal structure and functions used by PeiVariable module.
> 
> -Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.
> +Copyright (c) 2006 - 2022, Intel Corporation. All rights reserved.
>  SPDX-License-Identifier: BSD-2-Clause-Patent
> 
>  **/
> @@ -22,11 +22,13 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
>  #include 
>  #include 
>  #include 
> +#include 
> 
>  #include 
>  #include 
>  #include 
>  #include 
> +#include 
> 
>  typedef enum {
>VariableStoreTypeHob,
> @@ -144,4 +146,80 @@ PeiGetNextVariableName (
>IN OUT EFI_GUID*VariableGuid
>);
> 
> +/**
> +  This service retrieves a variable's value using its name and GUID.
> +
> +  Read the specified variable from the UEFI variable store. If the Data
> +  buffer is too small to hold the contents of the variable, the error
> +  EFI_BUFFER_TOO_SMALL is returned and DataSize is set to the required buffer
> +  size to obtain the data.
> +
> +  @param  This  A pointer to this instance of the
> EFI_PEI_READ_ONLY_VARIABLE2_PPI.
> +  @param  VariableName  A pointer to a null-terminated string that 
> is the
> variable's name.
> +  @param  VariableGuid  A pointer to an EFI_GUID that is the 
> variable's
> GUID. The combination of
> +VariableGuid and VariableName must be unique.
> +  @param  AttributesIf non-NULL, on return, points to the 
> variable's
> attributes.
> +  @param  DataSize  On entry, points to the size in bytes of the 
> Data
> buffer.
> +On return, points to the size of the data 
> returned in Data.
> +  @param  Data  Points to the buffer which will hold the 
> returned
> variable value.
> +May be NULL with a zero

Re: [edk2-devel] [edk2-CCodingStandardsSpecification PATCH 2/2] Source Files / Spacing / Multi-line func. calls: allow condensed arguments

2022-11-13 Thread Michael D Kinney
We do not want another global format change because that make git blame 
difficult to use.

Are any clarifications required to describe the current Uncrustify behavior?  
Or is the description correct?

If the current description matches Uncristify behavior, then I recommend we 
close this issue as will not fix.

Mike

From: devel@edk2.groups.io  On Behalf Of Chang, Abner via 
groups.io
Sent: Sunday, November 13, 2022 12:45 AM
To: Kinney, Michael D ; devel@edk2.groups.io; 
Laszlo Ersek ; Kubacki, Michael 

Subject: Re: [edk2-devel] [edk2-CCodingStandardsSpecification PATCH 2/2] Source 
Files / Spacing / Multi-line func. calls: allow condensed arguments


[AMD Official Use Only - General]

Uncrustify can fix the first argument that is not at the indent with two space. 
It also can fix the first argument that is not at the new line.
But it also makes each argument a new line if multiple args are condensed in 
one line. That is what we have to update Uncrustify if we have this patch 
merged to CCS.

+Michael Kubacki in loop.

Abner

From: Kinney, Michael D 
mailto:michael.d.kin...@intel.com>>
Sent: Sunday, November 13, 2022 9:58 AM
To: devel@edk2.groups.io; Chang, Abner 
mailto:abner.ch...@amd.com>>; Laszlo Ersek 
mailto:ler...@redhat.com>>; Kinney, Michael D 
mailto:michael.d.kin...@intel.com>>
Subject: RE: [edk2-devel] [edk2-CCodingStandardsSpecification PATCH 2/2] Source 
Files / Spacing / Multi-line func. calls: allow condensed arguments

Caution: This message originated from an External Source. Use proper caution 
when opening attachments, clicking links, or responding.

Is this exactly what Uncrustify does now?

Mike

From: devel@edk2.groups.io 
mailto:devel@edk2.groups.io>> On Behalf Of Chang, Abner 
via groups.io
Sent: Saturday, November 12, 2022 5:36 PM
To: Laszlo Ersek mailto:ler...@redhat.com>>; 
devel@edk2.groups.io
Subject: Re: [edk2-devel] [edk2-CCodingStandardsSpecification PATCH 2/2] Source 
Files / Spacing / Multi-line func. calls: allow condensed arguments

Hi all,
As we are going to release CCS 2.3, we would like to address some pending 
issues of CCS. For this, I think we can,
- Still keep the one line per argument style in CCS although the 
multi-arguments in the one line style can cover this. This avoids confusion 
from readers and questions about if they can do the one-line per argument style.
- If the arguments are in different lines, the first argument must be indented 
with two spaces from the start of the function name or the member function name.
How is this?

Abner



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#96333): https://edk2.groups.io/g/devel/message/96333
Mute This Topic: https://groups.io/mt/30907266/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-




Re: [edk2-devel] [edk2-CCodingStandardsSpecification] Create release/2.30 branch

2022-11-13 Thread Michael D Kinney
Abner,

I recommend we do not make this change for CCS v2.3 and either defer or close 
as will not fix.

Please add notes that Uncrustify is not configured to use 80 columns and we do 
not want to make another global change to format.

These global format changes make it difficult to use git blame and we want to 
minimize the number of events of this type in git history.

Mike

> -Original Message-
> From: Chang, Abner 
> Sent: Sunday, November 13, 2022 12:54 AM
> To: Kinney, Michael D ; devel@edk2.groups.io; 
> Michael Kubacki 
> Cc: Wee, Sing ; Rebecca Cran ; 
> ler...@redhat.com; heyi@linaro.org
> Subject: RE: [edk2-devel] [edk2-CCodingStandardsSpecification] Create 
> release/2.30 branch
> 
> [AMD Official Use Only - General]
> 
> 
> > -Original Message-
> > From: Kinney, Michael D 
> > Sent: Sunday, November 13, 2022 10:01 AM
> > To: Chang, Abner ; devel@edk2.groups.io; Michael
> > Kubacki ; Kinney, Michael D
> > 
> > Cc: Wee, Sing ; Rebecca Cran
> > ; ler...@redhat.com; heyi@linaro.org
> > Subject: RE: [edk2-devel] [edk2-CCodingStandardsSpecification] Create
> > release/2.30 branch
> >
> > Caution: This message originated from an External Source. Use proper caution
> > when opening attachments, clicking links, or responding.
> >
> >
> > We do not want to do another global reformat for column width change.
> Then we will have two formats in edk2.
> >
> > What does Uncristify do now?  We need to make sure spec matches current
> > behavior.
> The code is not corrected to < 80 column by Uncrustify ATM. We can merge this 
> patch to CCS v2.3 pre-release and publish it when
> the tool is updated.
> Abner
> 
> >
> > I added Michael Kubacki to this thread earlier so he can provide the 
> > details.
> >
> >
> > Mike
> >
> > > -Original Message-
> > > From: Chang, Abner 
> > > Sent: Saturday, November 12, 2022 5:37 PM
> > > To: devel@edk2.groups.io; Kinney, Michael D
> > > ; Michael Kubacki
> > > 
> > > Cc: Wee, Sing ; Rebecca Cran
> > > ; ler...@redhat.com; heyi@linaro.org
> > > Subject: RE: [edk2-devel] [edk2-CCodingStandardsSpecification] Create
> > > release/2.30 branch
> > >
> > > [AMD Official Use Only - General]
> > >
> > > Yes Mike, we can merge the patch 1/2 for the line in 80 columns topic.
> > > Not sure if Uncrustify is smart enough to correct the existing code
> > > that have the line with column > 80, especially for the postfix comment 
> > > that
> > makes the line has  > 80 columns. Or we just leave the code there.
> > >
> > > But for the patch 2/2: The multi line function
> > >
> > (https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fedk2.gr
> > oups.io%2Fg%2Fdevel%2Ftopic%2F30907266%2313206&data=05%7C01%7
> > CAbner.Chang%40amd.com%7C506359e24b5d4b01b96708dac51af1f0%7C3dd8
> > 961fe4884e608e11a82d994e183d%7C0%7C0%7C638039016763599434%7CUnk
> > nown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1h
> > aWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=V6oGitSmRBs0o%2B
> > vxPGmlj%2FxKChlsYAVL7QFXP8SdcRA%3D&reserved=0), there is no
> > conclusion yet however I think we can fix it in CCS v2.3.
> > > My reply is here:
> > > https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fedk2
> > > .groups.io%2Fg%2Fdevel%2Fmessage%2F96324&data=05%7C01%7CAbn
> > er.Chan
> > >
> > g%40amd.com%7C506359e24b5d4b01b96708dac51af1f0%7C3dd8961fe4884e6
> > 08e11a
> > >
> > 82d994e183d%7C0%7C0%7C638039016763599434%7CUnknown%7CTWFpbGZs
> > b3d8eyJWI
> > >
> > joiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C300
> > 0%7
> > >
> > C%7C%7C&sdata=WnR6F81HyKoAfkfYsYUszraIZESLzu8zdQH07MN1AJ8%3
> > D&r
> > > eserved=0
> > >
> > > Thanks
> > > Abner
> > >
> > > > -Original Message-
> > > > From: devel@edk2.groups.io  On Behalf Of
> > > > Michael D Kinney via groups.io
> > > > Sent: Tuesday, November 8, 2022 1:07 AM
> > > > To: Chang, Abner ; devel@edk2.groups.io;
> > > > Michael Kubacki ; Kinney, Michael D
> > > > 
> > > > Cc: Wee, Sing ; Rebecca Cran
> > > > ; ler...@redhat.com; heyi@linaro.org
> > > > Subject: Re: [edk2-devel] [edk2-CCodingStandardsSpecification]
> > > > Create
> > > > release/2.30 branch
> > > >
> > > > Caution: This message originated from an External Source. Use proper
> > > > caution when opening attachments, clicking links, or responding.
> > > >
> > > >
> > > > Hi Abner,
> > > >
> > > > Thanks for the review.  I agree we should try to get a few more of
> > > > these resolved for Version 2.3.
> > > >
> > > > +Michael Kubacki for Uncrustify configuration settings discussion on
> > > > +the column width
> > > > and args per line in function call topics. We need to know what the
> > > > current Uncrustify configuration settings for these 2 topics. It
> > > > would be better of the spec and the Uncrustify settings were aligned
> > > > and for any changes going forward they are made to the spec and 
> > > > Uncrustify
> > settings at the same time.
> > > >
> > > > Details of these 2 topics are as follows:
> > > >
> >

Re: [edk2-devel] [edk2-CCodingStandardsSpecification] Create release/2.30 branch

2022-11-13 Thread Chang, Abner via groups.io
[AMD Official Use Only - General]


> -Original Message-
> From: Kinney, Michael D 
> Sent: Sunday, November 13, 2022 10:01 AM
> To: Chang, Abner ; devel@edk2.groups.io; Michael
> Kubacki ; Kinney, Michael D
> 
> Cc: Wee, Sing ; Rebecca Cran
> ; ler...@redhat.com; heyi@linaro.org
> Subject: RE: [edk2-devel] [edk2-CCodingStandardsSpecification] Create
> release/2.30 branch
> 
> Caution: This message originated from an External Source. Use proper caution
> when opening attachments, clicking links, or responding.
> 
> 
> We do not want to do another global reformat for column width change.
Then we will have two formats in edk2.
> 
> What does Uncristify do now?  We need to make sure spec matches current
> behavior.
The code is not corrected to < 80 column by Uncrustify ATM. We can merge this 
patch to CCS v2.3 pre-release and publish it when the tool is updated.
Abner  

> 
> I added Michael Kubacki to this thread earlier so he can provide the details.
> 
> 
> Mike
> 
> > -Original Message-
> > From: Chang, Abner 
> > Sent: Saturday, November 12, 2022 5:37 PM
> > To: devel@edk2.groups.io; Kinney, Michael D
> > ; Michael Kubacki
> > 
> > Cc: Wee, Sing ; Rebecca Cran
> > ; ler...@redhat.com; heyi@linaro.org
> > Subject: RE: [edk2-devel] [edk2-CCodingStandardsSpecification] Create
> > release/2.30 branch
> >
> > [AMD Official Use Only - General]
> >
> > Yes Mike, we can merge the patch 1/2 for the line in 80 columns topic.
> > Not sure if Uncrustify is smart enough to correct the existing code
> > that have the line with column > 80, especially for the postfix comment that
> makes the line has  > 80 columns. Or we just leave the code there.
> >
> > But for the patch 2/2: The multi line function
> >
> (https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fedk2.gr
> oups.io%2Fg%2Fdevel%2Ftopic%2F30907266%2313206&data=05%7C01%7
> CAbner.Chang%40amd.com%7C506359e24b5d4b01b96708dac51af1f0%7C3dd8
> 961fe4884e608e11a82d994e183d%7C0%7C0%7C638039016763599434%7CUnk
> nown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1h
> aWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=V6oGitSmRBs0o%2B
> vxPGmlj%2FxKChlsYAVL7QFXP8SdcRA%3D&reserved=0), there is no
> conclusion yet however I think we can fix it in CCS v2.3.
> > My reply is here:
> > https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fedk2
> > .groups.io%2Fg%2Fdevel%2Fmessage%2F96324&data=05%7C01%7CAbn
> er.Chan
> >
> g%40amd.com%7C506359e24b5d4b01b96708dac51af1f0%7C3dd8961fe4884e6
> 08e11a
> >
> 82d994e183d%7C0%7C0%7C638039016763599434%7CUnknown%7CTWFpbGZs
> b3d8eyJWI
> >
> joiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C300
> 0%7
> >
> C%7C%7C&sdata=WnR6F81HyKoAfkfYsYUszraIZESLzu8zdQH07MN1AJ8%3
> D&r
> > eserved=0
> >
> > Thanks
> > Abner
> >
> > > -Original Message-
> > > From: devel@edk2.groups.io  On Behalf Of
> > > Michael D Kinney via groups.io
> > > Sent: Tuesday, November 8, 2022 1:07 AM
> > > To: Chang, Abner ; devel@edk2.groups.io;
> > > Michael Kubacki ; Kinney, Michael D
> > > 
> > > Cc: Wee, Sing ; Rebecca Cran
> > > ; ler...@redhat.com; heyi@linaro.org
> > > Subject: Re: [edk2-devel] [edk2-CCodingStandardsSpecification]
> > > Create
> > > release/2.30 branch
> > >
> > > Caution: This message originated from an External Source. Use proper
> > > caution when opening attachments, clicking links, or responding.
> > >
> > >
> > > Hi Abner,
> > >
> > > Thanks for the review.  I agree we should try to get a few more of
> > > these resolved for Version 2.3.
> > >
> > > +Michael Kubacki for Uncrustify configuration settings discussion on
> > > +the column width
> > > and args per line in function call topics. We need to know what the
> > > current Uncrustify configuration settings for these 2 topics. It
> > > would be better of the spec and the Uncrustify settings were aligned
> > > and for any changes going forward they are made to the spec and Uncrustify
> settings at the same time.
> > >
> > > Details of these 2 topics are as follows:
> > >
> > > * TianoCore BZ links:
> > >
> > > https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fbu
> > > gz
> > >
> illa.tianocore.org%2Fshow_bug.cgi%3Fid%3D713&data=05%7C01%7Cab
> > >
> ner.chang%40amd.com%7Cc3101043683346dc8bac08dac0e28499%7C3dd8961
> > >
> fe4884e608e11a82d994e183d%7C0%7C0%7C638034376370079115%7CUnkno
> > > wn%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1
> > >
> haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=D69iyxD8b723VL
> > > 9I2okQHPr%2FTILymNgLR1%2BC9zdeKXE%3D&reserved=0 - Update
> EDK II
> > > C Coding standard to state a stronger preference for 80 column line
> > > widths
> > >
> > > https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fbu
> > > gz
> > >
> illa.tianocore.org%2Fshow_bug.cgi%3Fid%3D714&data=05%7C01%7Cab
> > >
> ner.chang%40amd.com%7Cc3101043683346dc8bac08dac0e28499%7C3dd8961
> > >
> fe4884e608e11a82d994e183d%7C0%7C0%7C638034376370079115%7CUnkno
> > > wn%7CTWFpbGZsb3d8eyJW

Re: [edk2-devel] [edk2-CCodingStandardsSpecification PATCH 1/2] Source Files / General Rules: limit line lengths to 80 columns

2022-11-13 Thread Chang, Abner via groups.io
[AMD Official Use Only - General]

No, I don't think so. Need to update Uncrstify/PatchCheck tool if we have this 
patch merged to CCS.
Abner

From: Kinney, Michael D 
Sent: Sunday, November 13, 2022 9:59 AM
To: devel@edk2.groups.io; Chang, Abner ; Laszlo Ersek 
; Kinney, Michael D 
Subject: RE: [edk2-devel] [edk2-CCodingStandardsSpecification PATCH 1/2] Source 
Files / General Rules: limit line lengths to 80 columns

Caution: This message originated from an External Source. Use proper caution 
when opening attachments, clicking links, or responding.

Which change is that?  Does it match Uncrustify behavior?

Mike

From: devel@edk2.groups.io 
mailto:devel@edk2.groups.io>> On Behalf Of Chang, Abner 
via groups.io
Sent: Saturday, November 12, 2022 5:25 PM
To: Laszlo Ersek mailto:ler...@redhat.com>>; 
devel@edk2.groups.io
Subject: Re: [edk2-devel] [edk2-CCodingStandardsSpecification PATCH 1/2] Source 
Files / General Rules: limit line lengths to 80 columns

This change (1/2) will be merged to the CCS v2.3 release.

Abner



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#96330): https://edk2.groups.io/g/devel/message/96330
Mute This Topic: https://groups.io/mt/30907265/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-




Re: [edk2-devel] [edk2-CCodingStandardsSpecification PATCH 2/2] Source Files / Spacing / Multi-line func. calls: allow condensed arguments

2022-11-13 Thread Chang, Abner via groups.io
[AMD Official Use Only - General]

Uncrustify can fix the first argument that is not at the indent with two space. 
It also can fix the first argument that is not at the new line.
But it also makes each argument a new line if multiple args are condensed in 
one line. That is what we have to update Uncrustify if we have this patch 
merged to CCS.

+Michael Kubacki in loop.

Abner

From: Kinney, Michael D 
Sent: Sunday, November 13, 2022 9:58 AM
To: devel@edk2.groups.io; Chang, Abner ; Laszlo Ersek 
; Kinney, Michael D 
Subject: RE: [edk2-devel] [edk2-CCodingStandardsSpecification PATCH 2/2] Source 
Files / Spacing / Multi-line func. calls: allow condensed arguments

Caution: This message originated from an External Source. Use proper caution 
when opening attachments, clicking links, or responding.

Is this exactly what Uncrustify does now?

Mike

From: devel@edk2.groups.io 
mailto:devel@edk2.groups.io>> On Behalf Of Chang, Abner 
via groups.io
Sent: Saturday, November 12, 2022 5:36 PM
To: Laszlo Ersek mailto:ler...@redhat.com>>; 
devel@edk2.groups.io
Subject: Re: [edk2-devel] [edk2-CCodingStandardsSpecification PATCH 2/2] Source 
Files / Spacing / Multi-line func. calls: allow condensed arguments

Hi all,
As we are going to release CCS 2.3, we would like to address some pending 
issues of CCS. For this, I think we can,
- Still keep the one line per argument style in CCS although the 
multi-arguments in the one line style can cover this. This avoids confusion 
from readers and questions about if they can do the one-line per argument style.
- If the arguments are in different lines, the first argument must be indented 
with two spaces from the start of the function name or the member function name.
How is this?

Abner



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#96329): https://edk2.groups.io/g/devel/message/96329
Mute This Topic: https://groups.io/mt/30907266/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-