Re: [edk2-devel] [PATCH 16/22] [hash] CryptoPkg/openssl: add OpensslLibHash.inf

2023-03-14 Thread Gerd Hoffmann
On Mon, Mar 13, 2023 at 03:46:25PM +, Li, Yi1 wrote: > A bit confused here, why we need this inf, just to make it clear? > As you mentioned, it doesn't help with binary file size. As the commit message says it helps to figure where the bloat comes because you get error messages for missing sym

Re: [edk2-devel] [PATCH 19/22] CryptoPkg/openssl: update *.inf, add generated files

2023-03-14 Thread Gerd Hoffmann
On Mon, Mar 13, 2023 at 03:26:41PM +, Li, Yi1 wrote: > >+ DEFINE OPENSSL_FLAGS_NOASM = -DSTATIC_LEGACY > > > > Why we need this macro, EDK2 does not seem to use the algorithm in the legacy > provider. Oh, that slipped into the wrong patch. The openssl Configure script adds that, and

Re: [edk2-devel] [PATCH 01/22] CryptoPkg/openssl: update submodule to openssl-3.0.8

2023-03-14 Thread Gerd Hoffmann
On Mon, Mar 13, 2023 at 03:13:28PM +, Li, Yi wrote: > Hi Gerd, > > I also have some work on Openssl3, mainly to research how to reduce the > binary size increase after the upgrade: > > https://github.com/tianocore/edk2-staging/blob/OpenSSL11_EOL/CryptoPkg/Readme-OpenSSL3.0.md > > > > I re

Re: [edk2-devel] [PATCH v2] UefiPayloadPkg: Correct MAX_LOGICAL_PROCESSORS value

2023-03-14 Thread Lu, James
Reviewed-by: James Lu Thanks, James -Original Message- From: Zhang, Xiaoqiang Sent: Monday, March 13, 2023 12:53 PM To: devel@edk2.groups.io Cc: Zhang, Xiaoqiang ; Dong, Guo ; Ni, Ray ; Lu, James Subject: [PATCH v2] UefiPayloadPkg: Correct MAX_LOGICAL_PROCESSORS value REF: https://

Re: [edk2-devel] [PATCH 01/22] CryptoPkg/openssl: update submodule to openssl-3.0.8

2023-03-14 Thread Ard Biesheuvel
On Tue, 14 Mar 2023 at 09:16, kra...@redhat.com wrote: > > On Mon, Mar 13, 2023 at 03:13:28PM +, Li, Yi wrote: > > Hi Gerd, > > > > I also have some work on Openssl3, mainly to research how to reduce the > > binary size increase after the upgrade: > > > > https://github.com/tianocore/edk2-sta

Re: [edk2-devel] [PATCH 01/22] CryptoPkg/openssl: update submodule to openssl-3.0.8

2023-03-14 Thread Gerd Hoffmann
Hi, > Yeah the SIGILL trapping is a bit nasty, but that is only used if no > implementation of getauxval() exists. > > So perhaps the cleanest way to approach this is to provide a dummy > implementation of getauxval() which only supports AT_HWCAP, and > returns the correct hwcap mask for what t

Re: [edk2-devel] [PATCH 1/1] ArmPkg/SmbiosMiscDxe: Adjust the priority of getting firmware version

2023-03-14 Thread Leif Lindholm
Hi Tinh, +Rebecca On Mon, Mar 13, 2023 at 23:52:41 +0700, Tinh Nguyen via groups.io wrote: > On 3/13/2023 10:03 PM, Leif Lindholm wrote: > > On Mon, Mar 13, 2023 at 13:43:21 +0700, Tinh Nguyen wrote: > > > The BIOS Firmware Version in the SMBIOS Type 0 can be fetched from > > > the fixed PcdFirmwa

Re: [edk2-devel] [edk2-platforms][PATCH 1/2] Ampere: PCIe: Add support for Ampere Altra Max

2023-03-14 Thread Leif Lindholm
Urgh, I think I forgot to reply to this - apologies. On Fri, Feb 24, 2023 at 10:26:42 +0700, Nhi Pham wrote: > Hi Leif, > > Thanks for your reviewing. Most of your feedback is valid. I will fix them. > There is a comment that need your more explanation. > > Please see the inline reply for more d

[edk2-devel] [RESEND v1 1/1] CI: Use Fedora-37 (gcc12) image for Linux jobs

2023-03-14 Thread Oliver Steffen
Switch to the new Fedora-37 CI docker image, and with it to gcc12, for Linux jobs. Signed-off-by: Oliver Steffen Reviewed-by: Sunil V L Reviewed-by: Michael Kubacki --- .azurepipelines/templates/defaults.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.azurepipelines/te

[edk2-devel] [RESEND v1 0/1] CI: Use Fedora 37 / GCC 12 for Linux jobs

2023-03-14 Thread Oliver Steffen
Switch the CI (Linux) to use GCC 12 providied by a new Fedora 37 based container image. New container image: https://github.com/tianocore/containers/pull/60 Test PR: https://github.com/tianocore/edk2/pull/4108 Oliver Steffen (1): CI: Use Fedora-37 (gcc12) image for Linux jobs .azurepipelines

Re: [edk2-devel] [PATCH 0/3] BaseTools: allow users to override CC and CXX on the make command line

2023-03-14 Thread Rebecca Cran
This is a patch series that I'd really like to get committed. It'll allow us to drop the dependency on gcc for building edk2 on FreeBSD. The Github branch is https://github.com/bcran/edk2/tree/mdepkg-c11 and there's a PR at https://github.com/tianocore/edk2/pull/4142. -- Rebecca Cran On

Re: [edk2-devel] [PATCH] Update edksetup.bat etc. to support building BaseTools with VS2008 and VS2010

2023-03-14 Thread Rebecca Cran
> I am glad that you add this support. But, I want to confirm whether someone > still uses VS2008 or VS2010. Given that it's now 2023 and this message is from 2019, I guess we can assume that nobody is still using VS2008 or VS2010. Given that Microsoft has dropped documentation for anything old

Re: [edk2-devel] [PATCH v5 02/38] ArmPkg/ArmMmuLib ARM: Split off XN page descriptor bit from type field

2023-03-14 Thread Leif Lindholm
On Mon, Mar 13, 2023 at 18:16:38 +0100, Ard Biesheuvel wrote: > With large page support out of the picture, we can treat bits 1 and 0 of > the page descriptor as individual valid and XN bits, instead of treating > XN as a page type. Doing so aligns the handling of the attribute with > the section d

Re: [edk2-devel] [PATCH v5 04/38] ArmPkg/ArmMmuLib ARM: Isolate the access flag from AP mask

2023-03-14 Thread Leif Lindholm
On Mon, Mar 13, 2023 at 18:16:40 +0100, Ard Biesheuvel wrote: > Split the ARM permission fields in the short descriptors into an access > flag and AP[2:1] as per the recommendation in the ARM ARM. This makes > the access flag available separately, which allows us to implement > EFI_MEMORY_RP memory

Re: [edk2-devel] [PATCH 1/1] ArmPkg/SmbiosMiscDxe: Adjust the priority of getting firmware version

2023-03-14 Thread Rebecca Cran
On 3/14/23 6:48 AM, Leif Lindholm wrote: No objection to that. But can we do it like this?: Change GetBiosVersion to SetBiosVersion and in MiscBiosVendor, only call SetBiosVersion (); and move the selection logic fully into SetBiosVersion? Rebecca, thoughts? Arguably, once an OemMiscLib d

Re: [edk2-devel] 回复: [PATCH 1/1] MdePkg: Add new JedecJep106Lib to fetch JEDEC JEP106 manufacturer

2023-03-14 Thread Rebecca Cran
On 3/9/23 7:53 PM, gaoliming via groups.io wrote: +/** + Looks up the JEP-106 manufacturer. + + @param Code Last non-zero byte of the manufacturer's ID code. + @param ContinuationBytes Number of continuation bytes indicated in JEP-106. + + @return The manufacturer string, or NULL

Re: [edk2-devel] [PATCH v5 08/38] ArmPkg/ArmMmuLib: Avoid splitting block entries if possible

2023-03-14 Thread Leif Lindholm
On Mon, Mar 13, 2023 at 18:16:44 +0100, Ard Biesheuvel wrote: > Currently, the ARM MMU page table logic will break down any block entry > that overlaps with the region being mapped, even if the block entry in > question is using the same attributes as the new region. > > This means that creating a

Re: [edk2-devel] [PATCH v5 08/38] ArmPkg/ArmMmuLib: Avoid splitting block entries if possible

2023-03-14 Thread Ard Biesheuvel
On Tue, 14 Mar 2023 at 19:13, Leif Lindholm wrote: > > On Mon, Mar 13, 2023 at 18:16:44 +0100, Ard Biesheuvel wrote: > > Currently, the ARM MMU page table logic will break down any block entry > > that overlaps with the region being mapped, even if the block entry in > > question is using the same

Re: [edk2-devel] [RESEND v1 1/1] CI: Use Fedora-37 (gcc12) image for Linux jobs

2023-03-14 Thread Rebecca Cran
Reviewed-by: Rebecca Cran On 3/14/23 9:21 AM, Oliver Steffen wrote: Switch to the new Fedora-37 CI docker image, and with it to gcc12, for Linux jobs. Signed-off-by: Oliver Steffen Reviewed-by: Sunil V L Reviewed-by: Michael Kubacki --- .azurepipelines/templates/defaults.yml | 2 +- 1 f

[edk2-devel] [PATCH tianocore-docs 0/2] Fix links to specifications, guides etc.

2023-03-14 Thread Rebecca Cran
We stopped using Gitbook for publishing documentation a while ago, and now only use the Gitbook markdown _format_ and publish pages to Github Pages at tianocore-docs.github.io. Fix the links to the draft documentation pages, and update the text to point users to the mailing list since they can no

[edk2-devel] [PATCH tianocore-docs 1/2] Readme.md: convert links from Gitbook to Github Pages

2023-03-14 Thread Rebecca Cran
We no longer publish documentation to gitbook.com, instead using tianocore-docs.github.io. Update the links to point to the correct locations. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Rebecca Cran --- Readme.md | 117 +--- 1 file changed, 52 insertio

[edk2-devel] [PATCH tianocore-docs 2/2] Readme.md: Update the Gitbook documentation section

2023-03-14 Thread Rebecca Cran
We no longer use Gitbook for publishing the documentation. Update the section to direct users to use the mailing list to send feedback, and fix the Gitbook URL to point to the documentation which includes how to format the documents. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-o

Re: [edk2-devel] [PATCH tianocore-docs 2/2] Readme.md: Update the Gitbook documentation section

2023-03-14 Thread Michael D Kinney
> -Original Message- > From: Rebecca Cran > Sent: Tuesday, March 14, 2023 1:05 PM > To: devel@edk2.groups.io; Ard Biesheuvel ; Feng, > Bob C ; Abner > Chang ; Justen, Jordan L ; > Gao, Liming ; > Leif Lindholm ; Michael Kubacki > ; Kinney, Michael D > ; Demeter, Miki ; Ni, Ray > ; Zi

Re: [edk2-devel] [PATCH tianocore-docs 1/2] Readme.md: convert links from Gitbook to Github Pages

2023-03-14 Thread Michael D Kinney
Reviewed-by: Michael D Kinney > -Original Message- > From: Rebecca Cran > Sent: Tuesday, March 14, 2023 1:05 PM > To: devel@edk2.groups.io; Ard Biesheuvel ; Feng, > Bob C ; Abner > Chang ; Justen, Jordan L ; > Gao, Liming ; > Leif Lindholm ; Michael Kubacki > ; Kinney, Michael D > ;

Re: [edk2-devel] [PATCH 2/2] MdePkg: Update code to be more C11 compliant by using __func__

2023-03-14 Thread Michael D Kinney
Reviewed-by: Michael D Kinney > -Original Message- > From: devel@edk2.groups.io On Behalf Of Rebecca Cran > Sent: Monday, March 13, 2023 7:20 PM > To: devel@edk2.groups.io; Kinney, Michael D ; > Gao, Liming ; > Liu, Zhiguang > Subject: Re: [edk2-devel] [PATCH 2/2] MdePkg: Update code

Re: [edk2-devel][PATCH V1 1/1] BaseTools: Generate compile information in build report

2023-03-14 Thread Ni, Ray
I saw the code was merged to edk2-basetools repo 5 days ago. When will the change be in edk2 repo? I am really interested in using the json files😊 Thanks, Ray > -Original Message- > From: Palomino Sosa, Guillermo A > Sent: Monday, March 6, 2023 11:41 PM > To: Kinney, Michael D ; Feng, B

[edk2-devel] Event: TianoCore Bug Triage - APAC / NAMO - Tuesday, March 14, 2023 #cal-reminder

2023-03-14 Thread Group Notification
*Reminder: TianoCore Bug Triage - APAC / NAMO* *When:* Tuesday, March 14, 2023 6:30pm to 7:30pm (UTC-07:00) America/Los Angeles *Where:* https://teams.microsoft.com/l/meetup-join/19%3ameeting_OTk1YzJhN2UtOGQwNi00NjY4LWEwMTktY2JiODRlYTY1NmY0%40thread.v2/0?context=%7b%22Tid%22%3a%2246c98d88-e344-4e

Re: [edk2-devel] [Patch V2 01/14] UefiCpuPkg/CpuPageTableLib: Remove unneeded 'if' condition

2023-03-14 Thread Ni, Ray
Dun, The copyright year needs to change to 2023. Code logic change is good to me. Thanks, Ray > -Original Message- > From: Tan, Dun > Sent: Wednesday, March 8, 2023 6:08 PM > To: devel@edk2.groups.io > Cc: Dong, Eric ; Ni, Ray ; Kumar, > Rahul R ; Gerd Hoffmann > Subject: [Patch V2 01/1

Re: [edk2-devel] [Patch V2 02/14] UefiCpuPkg/CpuPageTableLib: Add check for input Length

2023-03-14 Thread Ni, Ray
The function header comments in lib header and C file should be updated as well to document a new condition when success is returned. > -Original Message- > From: Tan, Dun > Sent: Wednesday, March 8, 2023 6:08 PM > To: devel@edk2.groups.io > Cc: Dong, Eric ; Ni, Ray ; Kumar, > Rahul R ; G

Re: [edk2-devel] [Patch V2 01/14] UefiCpuPkg/CpuPageTableLib: Remove unneeded 'if' condition

2023-03-14 Thread Ni, Ray
You can carry my Reviewed-by in next version if you add the copy right year change. > -Original Message- > From: Tan, Dun > Sent: Wednesday, March 8, 2023 6:08 PM > To: devel@edk2.groups.io > Cc: Dong, Eric ; Ni, Ray ; Kumar, > Rahul R ; Gerd Hoffmann > Subject: [Patch V2 01/14] UefiCpu

Re: [edk2-devel] [Patch V2 03/14] UefiCpuPkg/CpuPageTableLib: Fix the non-1:1 mapping issue

2023-03-14 Thread Ni, Ray
Dun, Can you split this patch to 2 patches? One to move some local variable initialization to the beginning of the function. The other to fix the bug. So the bug fix changes look smaller. Thanks, Ray > -Original Message- > From: Tan, Dun > Sent: Wednesday, March 8, 2023 6:08 PM > To: dev

Re: [edk2-devel] [Patch V2 03/14] UefiCpuPkg/CpuPageTableLib: Fix the non-1:1 mapping issue

2023-03-14 Thread duntan
Okay, I'll split this patch into 2 patches in next version Thanks, Dun -Original Message- From: Ni, Ray Sent: Wednesday, March 15, 2023 9:28 AM To: Tan, Dun ; devel@edk2.groups.io Cc: Dong, Eric ; Kumar, Rahul R ; Gerd Hoffmann Subject: RE: [Patch V2 03/14] UefiCpuPkg/CpuPageTableLib:

Re: [edk2-devel] [Patch V2 01/14] UefiCpuPkg/CpuPageTableLib: Remove unneeded 'if' condition

2023-03-14 Thread duntan
Thanks Ray. Will update the copy right year in next version patch. Thanks, Dun -Original Message- From: Ni, Ray Sent: Wednesday, March 15, 2023 9:24 AM To: Tan, Dun ; devel@edk2.groups.io Cc: Dong, Eric ; Kumar, Rahul R ; Gerd Hoffmann Subject: RE: [Patch V2 01/14] UefiCpuPkg/CpuPageT

Re: [edk2-devel] [Patch V2 02/14] UefiCpuPkg/CpuPageTableLib: Add check for input Length

2023-03-14 Thread duntan
Thanks Ray. Will update the corresponding function header comments in next version. Thanks, Dun -Original Message- From: Ni, Ray Sent: Wednesday, March 15, 2023 9:25 AM To: Tan, Dun ; devel@edk2.groups.io Cc: Dong, Eric ; Kumar, Rahul R ; Gerd Hoffmann Subject: RE: [Patch V2 02/14] U

Re: [edk2-devel] [Patch V2 04/14] UefiCpuPkg/CpuPageTableLib: Fix issue when splitting leaf entry

2023-03-14 Thread Ni, Ray
> + > + ParentPagingEntry->Uintn = (UINTN)(VOID *)PagingEntry; Only address field is set but attributes are cleared to zeros. Then following code sets the attributes. Still a hole at this point, right? > >// >// Set NOP attributes > @@ -363,12 +370,6 @@ PageTableLibMapInLeve

Re: [edk2-devel] [PATCH v2] MdePkg/BaseCacheMaintenanceLib: RISC-V: Fix instruction cache not been invalidated

2023-03-14 Thread Sunil V L
On Fri, Mar 10, 2023 at 01:50:19PM -0800, Tuan Phan wrote: > When the range instruction cache invalidating not supported, the whole > instruction cache should be invalidated instead. > > Signed-off-by: Tuan Phan > --- > V2: > - Format with uncrustify. > Reviewed-by: Sunil V L -=-=-=-=-=-

Re: [edk2-devel] [Patch V2 05/14] UefiCpuPkg/CpuPageTebleLib: Check Mask and Attr in PageTableMap

2023-03-14 Thread Ni, Ray
> +**/ > +RETURN_STATUS > +CheckMaskAndAttrForNotPresentEntry ( > + IN IA32_MAP_ATTRIBUTE *Attribute, > + IN IA32_MAP_ATTRIBUTE *Mask > + ) > +{ > + if ((Attribute->Bits.Present == 0) || (Mask->Bits.Present == 0) || (Mask- > >Bits.ReadWrite == 0) || 1. I think we can allow caller to

Re: [edk2-devel] [Patch V2 06/14] UefiCpuPkg/CpuPageTableLib: Add manual test to check Mask and Attr

2023-03-14 Thread Ni, Ray
Please update test case to not expect failure when setting a non-present range as non-present . > -Original Message- > From: Tan, Dun > Sent: Wednesday, March 8, 2023 6:08 PM > To: devel@edk2.groups.io > Cc: Dong, Eric ; Ni, Ray ; Kumar, > Rahul R ; Gerd Hoffmann > Subject: [Patch V2 06

Re: [edk2-devel] [Patch V2 08/14] UefiCpuPkg/CpuPageTableLib: Enable non-1:1 mapping in random test

2023-03-14 Thread Ni, Ray
Reviewed-by: Ray Ni > -Original Message- > From: Tan, Dun > Sent: Wednesday, March 8, 2023 6:08 PM > To: devel@edk2.groups.io > Cc: Dong, Eric ; Ni, Ray ; Kumar, > Rahul R ; Gerd Hoffmann > Subject: [Patch V2 08/14] UefiCpuPkg/CpuPageTableLib: Enable non-1:1 > mapping in random test >

Re: [edk2-devel] [Patch V2 07/14] UefiCpuPkg/CpuPageTableLib:Modify RandomTest to check Mask/Attr

2023-03-14 Thread Ni, Ray
> > -/** > - Return a random boolean. > - > - @return boolean > -**/ > -BOOLEAN > -RandomBoolean ( > - VOID > - ) > -{ > - BOOLEAN Value; > - > - LocalRandomBytes ((UINT8 *)&Value, sizeof (BOOLEAN)); > - return Value%2; > -} > - > /** >Return a 32bit random number. > > @@ -139,6 +123

Re: [edk2-devel] [Patch V2 09/14] UefiCpuPkg/CpuPageTableLib: Add OUTPUT IsModified parameter.

2023-03-14 Thread Ni, Ray
> + IA32_PAGING_ENTRY ParentPagingEntryContent; 1. how about "OriginalParentPagingEntry"? > + IA32_PAGING_ENTRY PrevLeafPagingEntryContent; 2. how about "OriginalCurrentPagingEntry"? > > + // > + // Check if ParentPagingEntry entry is modified. > + // 3. Can you add more comments to exp

Re: [edk2-devel] [Patch V2 10/14] UefiCpuPkg/CpuPageTableLib: Modify RandomTest to check IsModified

2023-03-14 Thread Ni, Ray
> >GenerateSingleRandomMapEntry (MaxAddress, MapEntrys); >Status = PageTableParse (*PageTable, PagingMode, NULL, &MapCount); > > + if (MapCount != 0) { > +// > +// Allocate memory for Map > +// Note the memory is only used in this one Single MapEntry Test > +// > +UT_

Re: [edk2-devel] [Patch V2 11/14] UefiCpuPkg/CpuPageTableLib: Enable PAE paging

2023-03-14 Thread Ni, Ray
> +if (PagingMode == PagingPae) { > + // > + // These fields of PAE paging PDPTE should be 0 according to SDM. > + // 1. can you update comments to explain such as: "These fields are treated as ReadWrite, by the common map logic. So they might be set to 1." > + TopPa

Re: [edk2-devel] [Patch V2 12/14] UefiCpuPkg/CpuPageTableLib: Add RandomTest for PAE paging

2023-03-14 Thread Ni, Ray
Can you please check that the reserved fields in 4 PDPTE entries are set to 0 in the test? > -Original Message- > From: Tan, Dun > Sent: Wednesday, March 8, 2023 6:08 PM > To: devel@edk2.groups.io > Cc: Dong, Eric ; Ni, Ray ; Kumar, > Rahul R ; Gerd Hoffmann > Subject: [Patch V2 12/14]

Re: [edk2-devel] [Patch V2 13/14] UefiCpuPkg: Fix IA32 build failure in CpuPageTableLib.inf

2023-03-14 Thread Ni, Ray
> +UINT32PageTableBaseAddressLow : 19; // Page Table Base Address > High 1. Comments say "High". Should be "Low". > + > > - MapMask.Bits.PageTableBaseAddress = 1; > - MapMask.Bits.Present = 1; > - MapMask.Bits.ReadWrite= 1; > + MapMask.Bits.PageTableBaseAddr

Re: [edk2-devel] [Patch V2 14/14] UefiCpuPkg: Modify UnitTest code since tested API is changed

2023-03-14 Thread Ni, Ray
> @@ -413,8 +422,9 @@ CompareEntrysforOnePoint ( >// >for (Index = 0; Index < MapCount; Index++) { > if ((Address >= Map[Index].LinearAddress) && (Address < > (Map[Index].LinearAddress + Map[Index].Length))) { > - AttributeInMap.Uint64= > (Map[Index].Attribute