[edk2] [PATCH v2] IntelSiliconPkg/MicrocodeUpdateDxe: Error message enhancement

2019-02-18 Thread Shenglei Zhang
The error message of ExtendedTableCount is not clear. Add the count number into the debug message. https://bugzilla.tianocore.org/show_bug.cgi?id=1500 v2: Change the judgment condition to return error message when ExtendedTableCount is not equal to target value. Cc: Ray Ni Cc: Rangasai V Cha

[edk2] [PATCH] UefiCpuPkg/SecCore: Wrong Debug Information for SecCore

2019-02-18 Thread Chasel, Chiu
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1533 When SecCore and PeiCore in different FV, current implementation still assuming SecCore and PeiCore are in the same FV. To fix this issue 2 FVs will be input parameters for FindAndReportEntryPoints () and SecCore and PeiCore will be found in

[edk2] [PATCH] UefiCpuPkg/Microcode: Fix incorrect checksum issue for extended table

2019-02-18 Thread Chen A Chen
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1020 The following Microcode payload format is define in SDM spec. Payload: |MicrocodeHeader|MicrocodeBinary|ExtendedHeader|ExtendedTable|. When we verify the CheckSum32 with ExtendedTable, we should use the fields of ExtendedTable to replace cor

Re: [edk2] [PATCH] UefiCpuPkg/MtrrLib: Fix a bug that may wrongly set memory <1MB to UC

2019-02-18 Thread Dong, Eric
Hi Ray, Sorry for later response. Reviewed-by: Eric Dong Thanks, Eric > -Original Message- > From: Ni, Ray > Sent: Monday, January 21, 2019 11:17 PM > To: edk2-devel@lists.01.org > Cc: Ni, Ray ; Dong, Eric ; Chiu, > Chasel > Subject: [PATCH] UefiCpuPkg/MtrrLib: Fix a bug that may wro

Re: [edk2] [patch V4] MdeModulePkg/ReportStatusCodeLib: Avoid using AllocatePool if possible

2019-02-18 Thread Gao, Liming
Reviewed-by: Liming Gao > -Original Message- > From: Zeng, Star > Sent: Monday, February 18, 2019 10:22 PM > To: Bi, Dandan ; edk2-devel@lists.01.org > Cc: Max Knutsen ; Wang, Jian J > ; Wu, Hao A ; Michael Turner > ; Gao, Liming ; Zeng, > Star > Subject: RE: [patch V4] MdeModulePkg/Re

Re: [edk2] [PATCH] BaseTools:Fix a ECC issue

2019-02-18 Thread Feng, Bob C
Reviewed-by: Bob Feng -Original Message- From: Fan, ZhijuX Sent: Monday, February 18, 2019 2:24 PM To: edk2-devel@lists.01.org Cc: Gao, Liming ; Feng, Bob C Subject: [edk2][PATCH] BaseTools:Fix a ECC issue BZ:https://bugzilla.tianocore.org/show_bug.cgi?id=1522 A property error occurre

Re: [edk2] [PATCH] MdeModulePkg/PropertiesTableAttributesDxe: Remove this driver

2019-02-18 Thread Ni, Ray
Reviewed-by: Ray Ni > -Original Message- > From: Zeng, Star > Sent: Monday, February 18, 2019 10:22 PM > To: Wang, Jian J ; Zhang, Shenglei > ; edk2-devel@lists.01.org > Cc: Wu, Hao A ; Ni, Ray > Subject: RE: [PATCH] MdeModulePkg/PropertiesTableAttributesDxe: > Remove this driver > > R

Re: [edk2] [PATCH 00/10] Fix PEI Core issue during TemporaryRamMigration

2019-02-18 Thread Ni, Ray
Jordan, I find many real platforms do not implement the temporary ram migration PPI and rely on the PeiCore migration logic. So perhaps TemporaryRamMigration PPI was added to help platform to destroy the temporary RAM (CAR in x86 platform). But with the introduction of TemporaryRamDone PPI, maybe

Re: [edk2] [PATCH] UefiCpuPkg/Microcode: Fix incorrect checksum issue for extended table

2019-02-18 Thread Ni, Ray
I agree with Chao's comments. Please add more code comments to: 1. describe the uCode format 2. explain all the 3 code blocks that checks the checksum. > -Original Message- > From: edk2-devel On Behalf Of Zhang, > Chao B > Sent: Tuesday, February 19, 2019 9:06 AM > To: Chen, Chen A ; edk2

Re: [edk2] [PATCH] UefiCpuPkg/Microcode: Fix incorrect checksum issue for extended table

2019-02-18 Thread Zhang, Chao B
Chen Chen: I think you can add uCode format info into comments. Also please highlight in comment Which part is header checksum calculation, which part is for extended header -Original Message- From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of Chen A Chen Sent: Mon

Re: [edk2] [Patch] BaseTools: Correct the value assignment for StructurePcd

2019-02-18 Thread Feng, Bob C
Hi Felix, Good point. I'll update the patch. Thanks, Bob -Original Message- From: Felix Polyudov [mailto:fel...@ami.com] Sent: Tuesday, February 19, 2019 12:57 AM To: Feng, Bob C ; edk2-devel@lists.01.org Cc: Gao, Liming Subject: RE: [edk2] [Patch] BaseTools: Correct the value assignme

Re: [edk2] [PATCH] IntelSiliconPkg/MicrocodeUpdateDxe: Error message enhancement

2019-02-18 Thread Chaganty, Rangasai V
Reviewed-by: Chaganty, Rangasai V -Original Message- From: Zhang, Shenglei Sent: Sunday, February 17, 2019 11:19 PM To: edk2-devel@lists.01.org Cc: Ni, Ray ; Chaganty, Rangasai V Subject: [PATCH] IntelSiliconPkg/MicrocodeUpdateDxe: Error message enhancement The error message of Exten

Re: [edk2] [Patch] BaseTools: Correct the value assignment for StructurePcd

2019-02-18 Thread Felix Polyudov
Bob, I think silent trimming of input data is not a good idea. The build tool should either report an error (my preference) or a warning that DSC or DEC input value is too long. -Original Message- From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of Feng, Bob C Sent: S

Re: [edk2] [PATCH] MdeModulePkg/PropertiesTableAttributesDxe: Remove this driver

2019-02-18 Thread Zeng, Star
Reviewed-by: Star Zeng -Original Message- From: Wang, Jian J Sent: Monday, February 18, 2019 10:16 PM To: Zhang, Shenglei ; edk2-devel@lists.01.org Cc: Wu, Hao A ; Ni, Ray ; Zeng, Star Subject: RE: [PATCH] MdeModulePkg/PropertiesTableAttributesDxe: Remove this driver Reviewed-by: Ji

Re: [edk2] [patch V4] MdeModulePkg/ReportStatusCodeLib: Avoid using AllocatePool if possible

2019-02-18 Thread Zeng, Star
Reviewed-by: Star Zeng . -Original Message- From: Bi, Dandan Sent: Monday, February 18, 2019 9:37 PM To: edk2-devel@lists.01.org Cc: Max Knutsen ; Zeng, Star ; Wang, Jian J ; Wu, Hao A ; Michael Turner ; Gao, Liming Subject: [patch V4] MdeModulePkg/ReportStatusCodeLib: Avoid using Allo

Re: [edk2] [PATCH] MdeModulePkg/PropertiesTableAttributesDxe: Remove this driver

2019-02-18 Thread Wang, Jian J
Reviewed-by: Jian J Wang > -Original Message- > From: Zhang, Shenglei > Sent: Monday, February 18, 2019 4:53 PM > To: edk2-devel@lists.01.org > Cc: Wang, Jian J ; Wu, Hao A ; > Ni, Ray ; Zeng, Star > Subject: [PATCH] MdeModulePkg/PropertiesTableAttributesDxe: Remove this > driver > >

[edk2] [patch V4] MdeModulePkg/ReportStatusCodeLib: Avoid using AllocatePool if possible

2019-02-18 Thread Dandan Bi
From: Max Knutsen REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1114 V2: simplify the code logic. update if (!mHaveExitedBootServices && (StatusCodeData != (EFI_STATUS_CODE_DATA *) StatusCodeBuffer)) { gBS->FreePool (StatusCodeData); } to if (StatusCodeData != (EFI_STATUS_CODE_DATA *)

Re: [edk2] [PATCH] OvmfPkg/Sec: Clear the Cache Disable flag in the CR0 register

2019-02-18 Thread Laszlo Ersek
generic comment (applies to all NASM usage I guess): On 02/18/19 11:10, Jordan Justen wrote: > +mov eax, cr0 > +and eax, ~(1 << 30) > +mov cr0, eax > +mov rax, cr0 > +and eax, ~(1 << 30) > +mov cr0, rax I've read up on the << and ~ operators in th

Re: [edk2] [PATCH 10/10] OvmfPkg/Sec: Fill Temp Ram after TemporaryRamMigration

2019-02-18 Thread Laszlo Ersek
On 02/18/19 05:11, Jordan Justen wrote: > On some platforms, the TemporaryRamMigration PPI may cause Temporary > RAM to become inaccessible after the RAM is migrated. To emulate this > in OVMF, we should initialize memory to a bad state to make sure it > isn't accidentally being used after Temporar

Re: [edk2] [PATCH 06/10] OvmfPkg/Sec: Disable optimizations for TemporaryRamMigration

2019-02-18 Thread Laszlo Ersek
On 02/18/19 10:32, Ard Biesheuvel wrote: > On Mon, 18 Feb 2019 at 10:08, Jordan Justen wrote: >> >> On 2019-02-17 23:53:01, Ard Biesheuvel wrote: >>> On Mon, 18 Feb 2019 at 05:12, Jordan Justen >>> wrote: >>> >>> This needs an explanation why optimization needs to be disabled. >> >> I'm not

Re: [edk2] [PATCH 05/10] OvmfPkg/Sec: Swap TemporaryRam Stack and Heap locations

2019-02-18 Thread Laszlo Ersek
On 02/18/19 05:11, Jordan Justen wrote: > Apparently something depends on the heap being above the stack after > TemporaryRamMigration. > > This is the opposite order that OVMF has always used for TempRam > before migration to permanent ram. In 42a83e80f37c (svn r10770), Mike > changed OVMF's Temp

Re: [edk2] [PATCH] OvmfPkg/Sec: Clear the Cache Disable flag in the CR0 register

2019-02-18 Thread Laszlo Ersek
On 02/18/19 11:10, Jordan Justen wrote: > Clear the CD (Cache Disable) flag in the CR0 register. When the VM > implements the CD flag, this can substantially decrease the time it > takes to decompress the firmware volumes. > > Contributed-under: TianoCore Contribution Agreement 1.1 > Signed-off-by

Re: [edk2] [PATCH] OvmfPkg/build.sh: Enable flash for qemu 3 or later

2019-02-18 Thread Laszlo Ersek
On 02/16/19 09:18, Jordan Justen wrote: > The check for 1.[1-9][0-9].* was removed since qemu jumped to 2.0 > after 1.7. > > Changed 2.*.* to [2-9].*.* to match major releases 3 - 9. > > Added [1-9][0-9]*.*.* to match major releses >= 10. > > Contributed-under: TianoCore Contribution Agreement 1

[edk2] [PATCHv2 1/1] MdeModulePkg/SdMmcPciHcDxe Fix eMMC HS400 switch sequence

2019-02-18 Thread Albecki, Mateusz
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1140 In eMMC HS400 switch sequence flow eMMC driver attempted to execute SEND_STATUS just after switching bus timing to high speed and before downgrading clock frequency to 52MHz. Since link was at that time in incorrect state SEND_STATUS was fai

[edk2] [PATCH 2/4] MdeModulePkg: Add a new API ResetSystem for DXE ResetSystemLib

2019-02-18 Thread Zhichao Gao
BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1460 Add a new API ResetSystem for DXE ResetSystemLib. So the consumer of ResetSystemLib can use this API to reset system with additional reset data. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Zhichao Gao Cc: Ray Ni

[edk2] [PATCH 0/4] Add a new API ResetSystem for ResetSystemLib

2019-02-18 Thread Zhichao Gao
BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1460 Add a new API ResetSystem for ResetSystemLib so that the consumer can use this interface to reset system with additional reset data. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Zhichao Gao Cc: Ray Ni Cc: Liming G

[edk2] [PATCH 3/4] MdeModulePkg: Add a new API ResetSystem for PEI ResetSystemLib

2019-02-18 Thread Zhichao Gao
BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1460 Add a new API ResetSystem for PEI ResetSystemLib to be in accord with DXE instance. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Zhichao Gao Cc: Ray Ni Cc: Liming Gao --- .../Library/PeiResetSystemLib/PeiResetSy

[edk2] [PATCH 4/4] MdeModulePkg: Add the new API ResetSystem in the head file

2019-02-18 Thread Zhichao Gao
BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1460 Add the new API ResetSystem in the related head file so that the consumer can use it through the combination of library instance and head file. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Zhichao Gao Cc: Ray Ni C

[edk2] [PATCH 1/4] MdeModulePkg: change the function name ResetSystem

2019-02-18 Thread Zhichao Gao
BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1460 Change the function name form ResetSystem to EfiRuntimeResetSystem. Because ResetSystem and EfiResetSystem would be used in ResetSystemLib and RuntimeLib. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Zhichao Gao Cc

[edk2] [PATCH] OvmfPkg/Sec: Clear the Cache Disable flag in the CR0 register

2019-02-18 Thread Jordan Justen
Clear the CD (Cache Disable) flag in the CR0 register. When the VM implements the CD flag, this can substantially decrease the time it takes to decompress the firmware volumes. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jordan Justen Tested-by: Peter Fang Cc: Peter Fa

[edk2] [PATCH] BaseTools:PCD value error in structure pcd sku case.

2019-02-18 Thread Fan, ZhijuX
Defined 2 PCDs(Test4 & Test401) and 2 SKUs(DEFAULT & _), then set "SKUID_Defines" to ALL, for FixedAtBuild gEfiStructuredPcdPkgTokenSpaceGuid. Test401 in this case, its value should get from "Default" SKU, not from "_" SKU, but we does not set value in SKU "_" in dsc, so Test401 should only display

Re: [edk2] [patch V3] MdeModulePkg/ReportStatusCodeLib: Avoid using AllocatePool if possible

2019-02-18 Thread Zeng, Star
Hi Dandan, /DxeReportStatusCodeLib/ReportStatusCodeLib.c: The " Retrieve the current TPL " code block is not needed also when using stack buffer, so it can be also moved to else condition. And the code block below is redundant, so it can be removed. if (StatusCodeData == NULL) { // //

[edk2] [Patch] BaseTools: Fixed a bug in Vpd handling

2019-02-18 Thread Feng, Bob C
If there are multiple sku used in a platform and gEfiMdeModulePkgTokenSpaceGuid.PcdNvStoreDefaultValueBuffer PCD is used, build will fail. This is a regression issue introduced by the commit: 5695877ec8f636bd4ad873ef50eceb9da7a0f382 which only update the Vpd offset for default SKU but not other SK

Re: [edk2] [PATCH 06/10] OvmfPkg/Sec: Disable optimizations for TemporaryRamMigration

2019-02-18 Thread Ard Biesheuvel
On Mon, 18 Feb 2019 at 10:08, Jordan Justen wrote: > > On 2019-02-17 23:53:01, Ard Biesheuvel wrote: > > On Mon, 18 Feb 2019 at 05:12, Jordan Justen > > wrote: > > > > > > > This needs an explanation why optimization needs to be disabled. > > I'm not sure this is required. The reason I added the

Re: [edk2] [PATCH 06/10] OvmfPkg/Sec: Disable optimizations for TemporaryRamMigration

2019-02-18 Thread Jordan Justen
On 2019-02-17 23:53:01, Ard Biesheuvel wrote: > On Mon, 18 Feb 2019 at 05:12, Jordan Justen wrote: > > > > This needs an explanation why optimization needs to be disabled. I'm not sure this is required. The reason I added these patches is to hopefully prevent the compiler from removing the frame

[edk2] [PATCH] MdeModulePkg/PropertiesTableAttributesDxe: Remove this driver

2019-02-18 Thread Shenglei Zhang
This functionality of this driver has been deprecated and no platform employs this driver. It can be removed completely. https://bugzilla.tianocore.org/show_bug.cgi?id=1475 Cc: Jian J Wang Cc: Hao Wu Cc: Ray Ni Cc: Star Zeng Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by

Re: [edk2] [PATCH 2/2] MdeModulePkg: Add a runtime library instance of ResetSystemLib

2019-02-18 Thread Gao, Liming
For new added RuntimeResetSystemLib.inf, please add it into MdeModulePkg.dsc and verify its build. >-Original Message- >From: Ni, Ray >Sent: Monday, February 18, 2019 4:37 PM >To: Gao, Zhichao ; edk2-devel@lists.01.org >Cc: Gao, Liming >Subject: RE: [PATCH 2/2] MdeModulePkg: Add a runti

Re: [edk2] [PATCH 1/2] MdeModulePkg: Add a new API ResetSystem

2019-02-18 Thread Ni, Ray
Zhichao, Please separate the single patch to multiple patches so that every patch just changes one component. > -Original Message- > From: Gao, Zhichao > Sent: Monday, February 18, 2019 3:33 PM > To: edk2-devel@lists.01.org > Cc: Ni, Ray ; Gao, Liming > Subject: [PATCH 1/2] MdeModulePkg:

Re: [edk2] [PATCH 2/2] MdeModulePkg: Add a runtime library instance of ResetSystemLib

2019-02-18 Thread Ni, Ray
Reviewed-by: Ray Ni > -Original Message- > From: Gao, Zhichao > Sent: Monday, February 18, 2019 3:33 PM > To: edk2-devel@lists.01.org > Cc: Ni, Ray ; Gao, Liming > Subject: [PATCH 2/2] MdeModulePkg: Add a runtime library instance of > ResetSystemLib > > BZ: https://bugzilla.tianocore.o

[edk2] [PATCH] ShellPkg: add array index check for shell delay option

2019-02-18 Thread Zhichao Gao
BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1528 Shell delay option without parameters do not check the index of shell parameter argv. Add index check to avoid invalid pointer references. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Zhichao Gao Cc: Liming Gao C

Re: [edk2] [PATCH] ShellPkg/Application/Shell: add array index check for shell delay option

2019-02-18 Thread Gao, Zhichao
Ignore this patch. The commit massage is not in compliance with https://github.com/tianocore/tianocore.github.io/wiki/Commit-Message-Format. > -Original Message- > From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of > Zhichao Gao > Sent: Thursday, February 14, 2019 10:5