Re: [edk2-devel] Uncrustify configuration file and file/function templates

2021-11-16 Thread Pedro Falcato
If you're curious, you can look at my Ext4Pkg ( https://github.com/tianocore/edk2-platforms/tree/master/Features/Ext4Pkg/Ext4Dxe) to look at the effects of align_func_params_gap and align_func_params_span = 2. Things look okay and similar to other edk2-styled code. Best regards, Pedro On Tue, Nov

Re: [edk2-devel] Uncrustify configuration file and file/function templates

2021-11-16 Thread Michael D Kinney
Hi Michael, I have created a PR based on your poc_5 branch work using the latest edk2/master and have started an EDK II CI pass. https://github.com/tianocore/edk2/pull/2208 This PR can also be used to easily review the changes that uncrustify has made to the source style of all edk2 package

Re: [edk2-devel] [PATCH V3 04/29] OvmfPkg: Extend VmgExitLib to handle #VE exception

2021-11-16 Thread Erdem Aktas via groups.io
Hi Min, On Mon, Nov 1, 2021 at 6:16 AM Min Xu wrote: > > +VmTdExitHandleVe ( > + IN OUT EFI_EXCEPTION_TYPE *ExceptionType, > + IN OUT EFI_SYSTEM_CONTEXT SystemContext > + ) > +{ > + UINT64Status; > + TD_RETURN_DATAReturnData; > + EFI_SYSTEM_CONTEXT_X64

Re: [edk2-devel] Uncrustify configuration file and file/function templates

2021-11-16 Thread Michael Kubacki
The poc_5 branch config file is based on the file I'm pushing to the Uncrustify fork soon: https://dev.azure.com/projectmu/Uncrustify/_git/Uncrustify/pullrequest/24?_a=files&path=/etc/edk2.cfg So they're already being used and the file in the poc_5 branch was of course used to generate the res

Re: [edk2-devel] Uncrustify configuration file and file/function templates

2021-11-16 Thread Pedro Falcato
Yes, I do. Essentially, my changes make it so the function parameters are aligned and there are always two spaces between the parameter's type and name; it also adds spaces between control statements, as you mentioned. "force" instead of "add" for sp_before_sparen is a good idea though. I assume t

Re: [edk2-devel] Uncrustify configuration file and file/function templates

2021-11-16 Thread Michael Kubacki
Hi Pedro, By "new config", do you mean the config file in the latest branch https://github.com/makubacki/edk2/blob/uncrustify_poc_5/uncrustify.cfg)? The main difference I see from the diff in that gist and poc_5 is that "align_func_params_gap" and "align_func_params_span" are two instead of

Re: [edk2-devel] Uncrustify configuration file and file/function templates

2021-11-16 Thread Pedro Falcato
Hi, RE: Uncrustify's configuration I had made a few changes to the config file, when trying out Uncrustify, a few months ago, on Mike Kinney's suggestion. In my experience, the new config file reflects the edk2 coding style better. In particular, it adds spaces between things like 'if' and the p

Re: [edk2-devel] Uncrustify configuration file and file/function templates

2021-11-16 Thread Michael Kubacki
I think that makes sense. I will look into it further and let you know if there's any downsides found. On 11/16/2021 2:18 PM, Kinney, Michael D wrote: Could we add this feature to the Uncrustify CI Plugin? Mike -Original Message- From: Michael Kubacki Sent: Tuesday, November 16, 202

Re: [edk2-devel] Uncrustify configuration file and file/function templates

2021-11-16 Thread Michael D Kinney
Could we add this feature to the Uncrustify CI Plugin? Mike > -Original Message- > From: Michael Kubacki > Sent: Tuesday, November 16, 2021 10:54 AM > To: devel@edk2.groups.io; Kinney, Michael D > Subject: Re: [edk2-devel] Uncrustify configuration file and file/function > templates >

Re: [edk2-devel] Uncrustify configuration file and file/function templates

2021-11-16 Thread Michael Kubacki
I would prefer to have a single version of the file if possible to reduce synchronization issues across the two copies. It seems that a CI plugin to read the contents of the template files and search incoming code for that text wouldn't be too difficult to add as a new plugin. Thanks, Michae

Re: [edk2-devel] Uncrustify configuration file and file/function templates

2021-11-16 Thread Michael D Kinney
Hi Michael, Should we have 2 versions of the config file? One used by automation tools such as CI and git hooks that do not use the templates. And another one that a developer can optionally use that will add the templates for missing file/function headers that the developer then needs to fill o

Re: [edk2-devel] Uncrustify configuration file and file/function templates

2021-11-16 Thread Michael Kubacki
Hi Mike, Those were just disabled because I typically run a separate invocation of Uncrustify with them enabled to isolate code which is missing file/function headers. My thought was the templates are helpful but we would need to individually identify where they are placed to file TCBZs for m

Re: [edk2-devel] [edk2-platforms][PATCH v1 1/2] Platform/RaspberryPi: Add support for PWM1 in ACPI

2021-11-16 Thread Mario Bălănică
Hi Jeremy, > On 11/5/21 15:34, Mario Bălănică via groups.io wrote: >> >> Also fix PWM0 on the Raspberry Pi 4, but we can't expose both yet. > > Why is that? The rpi4 needs both PWM devices to output stereo right? So > with this patch is still mono? Each PWM controller has two channels, so only o

[edk2-devel] Uncrustify configuration file and file/function templates

2021-11-16 Thread Michael D Kinney
Hi Michael, In your POC branch (https://github.com/makubacki/edk2/tree/uncrustify_poc_5), I see the uncrustify.cfg configuration file in the root. https://github.com/makubacki/edk2/blob/uncrustify_poc_5/uncrustify.cfg However, in your Wiki, you provide examples where this configuration fil

Re: [edk2-devel] [PATCH v3] UefiPayloadPkg/UefiPayloadPkg.fdf: Update DXE Apriori list

2021-11-16 Thread Guo Dong
Reviewed-by: Guo Dong -Original Message- From: Cheng, Gao Sent: Sunday, November 14, 2021 11:15 PM To: devel@edk2.groups.io Cc: Cheng, Gao ; Dong, Guo ; Ni, Ray ; Ma, Maurice ; You, Benjamin Subject: [PATCH v3] UefiPayloadPkg/UefiPayloadPkg.fdf: Update DXE Apriori list REF: https:

Re: [edk2-devel][PATCH] BaseTools: Increase the DevicePath length for support more PCD value.

2021-11-16 Thread Bob Feng
This patch is good to me. Reviewed-by: Bob Feng -Original Message- From: Jiang, Xiaolu Sent: Tuesday, November 16, 2021 9:42 AM To: devel@edk2.groups.io Cc: Jiang, Xiaolu ; Feng, Bob C ; Liming Gao ; Chen, Christine Subject: [edk2-devel][PATCH] BaseTools: Increase the DevicePath len

Re: [edk2-devel] [PATCH V3 15/29] OvmfPkg: Update SecEntry.nasm to support Tdx

2021-11-16 Thread Min Xu
On November 3, 2021 2:31 PM, Gerd Hoffmann wrote: > Hi, > > > - AcceptPages: > >To mitigate the performance impact of accepting pages in SEC phase on > >BSP, BSP will parse memory resources and assign each AP the task of > >accepting a subset of pages. This command may be called se

[edk2-devel] [PATCH v2 8/8] ArmVirtPkg: Kvmtool: Add RNG support using FW-TRNG interface

2021-11-16 Thread Sami Mujawar
Bugzilla: 3668 (https://bugzilla.tianocore.org/show_bug.cgi?id=3668) The EFI_RNG_PROTOCOL published by RngDxe has been updated to implement the EFI_RNG_ALGORITHM_RAW using the Arm FW-TRNG interface to provide access to entropy. Therefore, enable EFI_RNG_PROTOCOL for the Kvmtool guest/virtual firm

[edk2-devel] [PATCH v2 2/8] ArmPkg: PCD to select conduit for monitor calls

2021-11-16 Thread Sami Mujawar
Bugzilla: 3668 (https://bugzilla.tianocore.org/show_bug.cgi?id=3668) Define a PCD 'PcdMonitorConduitHvc' to select the conduit to use for monitor calls. PcdMonitorConduitHvc is defined as FALSE by default, meaning the SMC conduit is enabled as default. Adding PcdMonitorConduitHvc allows selection

[edk2-devel] [PATCH v2 6/8] SecurityPkg: Restructure checks in RngGetInfo

2021-11-16 Thread Sami Mujawar
Bugzilla: 3668 (https://bugzilla.tianocore.org/show_bug.cgi?id=3668) Move the check to see if the RNGAlgorithmList pointer is NULL to ArchGetSupportedRngAlgorithms(). This allows the caller to obtain the buffer size required to store the Algorithm List by passing RNGAlgorithmListSize as zero and R

[edk2-devel] [PATCH v2 5/8] SecurityPkg: Rename RdRandGenerateEntropy to common name

2021-11-16 Thread Sami Mujawar
Bugzilla: 3668 (https://bugzilla.tianocore.org/show_bug.cgi?id=3668) Rename RdRandGenerateEntropy() to GenerateEntropy() to provide a common interface to generate entropy on other architectures. Also move the definition to RngDxeInternals.h Signed-off-by: Sami Mujawar --- Notes: v2: -

[edk2-devel] [PATCH v2 1/8] MdePkg: Definition for TRNG library class interface

2021-11-16 Thread Sami Mujawar
Bugzilla: 3668 (https://bugzilla.tianocore.org/show_bug.cgi?id=3668) The NIST Special Publications 800-90A, 800-90B and 800-90C provide recommendations for random number generation. The NIST 800-90C, Recommendation for Random Bit Generator (RBG) Constructions, defines the GetEntropy() interface th

[edk2-devel] [PATCH v2 7/8] SecurityPkg: Add RawAlgorithm support using TRNG library

2021-11-16 Thread Sami Mujawar
Bugzilla: 3668 (https://bugzilla.tianocore.org/show_bug.cgi?id=3668) RawAlgorithm is used to provide access to entropy that is suitable for cryptographic applications. Therefore, add RawAlgorithm support that provides access to entropy using the TRNG library interface. Signed-off-by: Sami Mujawar

[edk2-devel] [PATCH v2 4/8] MdePkg: Add NULL instance of TRNG Library

2021-11-16 Thread Sami Mujawar
Bugzilla: 3668 (https://bugzilla.tianocore.org/show_bug.cgi?id=3668) The True Random Number Generator (TRNG) library defines an interface to access the entropy source on a platform. On platforms that do not have access to an entropy source, a NULL instance of the TRNG library may be useful to sati

[edk2-devel] [PATCH v2 3/8] ArmPkg: Add Arm Firmware TRNG library

2021-11-16 Thread Sami Mujawar
Bugzilla: 3668 (https://bugzilla.tianocore.org/show_bug.cgi?id=3668) The Arm True Random Number Generator Firmware, Interface 1.0, Platform Design Document (https://developer.arm.com/documentation/den0098/latest/) defines an interface between an Operating System (OS) executing at EL1 and Firmware

[edk2-devel] [PATCH v2 0/8] Add Raw algorithm support using Arm FW-TRNG interface

2021-11-16 Thread Sami Mujawar
Bugzilla: Bug 3668 (https://bugzilla.tianocore.org/show_bug.cgi?id=3668) The Arm True Random Number Generator Firmware, Interface 1.0, specification defines an interface between an Operating System (OS) executing at EL1 and Firmware (FW) exposing a conditioned entropy source that is provided by a

[edk2-devel] [PATCH 2/3] Silicon/ARM/NeoverseN1Soc: Port PCI Segment Library

2021-11-16 Thread Khasim Mohammed
The BasePCISegment Library in MdePkg doesn't allow configuring multiple segments required for PCIe and CCIX root port enumeration. Therefore, a custom PCI Segment library is adapted from SynQuacerPciSegmentLib and ported for N1Sdp. Change-Id: I0a124b0ea2fb7a8ee652de2d66b977d848c509b4 Signed-off-by

[edk2-devel] [PATCH 3/3] Silicon/ARM/NeoverseN1Soc: Add CCIX root complex support

2021-11-16 Thread Khasim Mohammed
This patch enables CCIX root complex support by updating the root complex node info in PciHostBridge library and enabling PciSegment library for N1Sdp. Change-Id: I0510b1023aec16365b614d4eaf81858851d9fa28 Signed-off-by: Khasim Syed Mohammed --- .../ConfigurationManagerDxe.inf | 3

[edk2-devel] [PATCH 1/3] Silicon/ARM/NeoverseN1Soc: Update PciExpressLib to enable CCIX port

2021-11-16 Thread Khasim Mohammed
Update the PciExpressLib to enable CCIX port as PCIe root host by validating the PCIe addresses and introducing corresponding PCD entries. Change-Id: I0d1167b86e53a3781f59c4d68a3b2e61add4317e Signed-off-by: Deepak Pandey Signed-off-by: Khasim Syed Mohammed --- .../PciExpressLib.c

[edk2-devel] [PATCH 0/3] Enable CCIX port as PCIe root host on N1SDP

2021-11-16 Thread Khasim Mohammed
The patch series enables CCIX port as PCIe root on N1SDP. In order to achieve this: - The PciExpressLib is updated to validate the PCIe addresses and introducing corresponding PCD entries. - A custom PCI Segment library is adapted from SynQuacerPciSegmentLib and ported for N1Sdp. - The root c