[edk2] [PATCH] UefiCpuPkg/Microcode.c: Add verification before calculate CheckSum32

2019-03-04 Thread Chen A Chen
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1020 Should make sure the TotalSize of Microcode is aligned with 4 bytes before calling CalculateSum32 function. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Chen A Chen Cc: Ray Ni Cc: Eric Dong --- UefiCpuPkg

[edk2] [PATCH v2] UefiCpuPkg/Microcode: Add verification logic before parsing payload

2019-02-28 Thread Chen A Chen
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1020 The function MicrocodeDetect may receive untrusted input. Add verification logic to check Microcode Payload Header. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Chen A Chen Cc: Ray Ni Cc: Eric Dong

[edk2] [PATCH 2/2] UefiCpuPkg/Microcode: Add verification logic before parsing payload

2019-02-27 Thread Chen A Chen
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1020 The function MicrocodeDetect may receive untrusted input. Add verification logic to check Microcode Payload Header. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Chen A Chen Cc: Ray Ni Cc: Eric Dong

[edk2] [PATCH 1/2] UefiCpuPkg/Microcode: Fix InComplete CheckSum32 issue

2019-02-27 Thread Chen A Chen
-while loop to the inside. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Chen A Chen Cc: Ray Ni Cc: Eric Dong --- UefiCpuPkg/Library/MpInitLib/Microcode.c | 37 1 file changed, 19 insertions(+), 18 deletions(-) diff --git a/UefiCpuPkg

[edk2] [PATCH 0/2] Fix Microcode failure issue

2019-02-27 Thread Chen A Chen
The first patch is used to fix InComplete CheckSum32 issue. Add a verification logic to check Microcode header before parsing payload. Chen A Chen (2): UefiCpuPkg/Microcode: Fix InComplete CheckSum32 issue UefiCpuPkg/Microcode: Add verification logic before parsing payload UefiCpuPkg

[edk2] [PATCH] IntelSiliconPkg/MicrocodeUpdate: Fix incorrect checksum issue

2019-02-21 Thread Chen A Chen
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1020 The same issue has fixed in UefiCpuPkg/Microcode.c file. Please reference b6f67b4d58b81f12f63f5f8c94cf8af3600297ab to get more detail information. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Chen A Chen Cc: Ray

[edk2] [PATCH] MdeModulePkg: Rename confusion function name

2019-02-21 Thread Chen A Chen
-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Chen A Chen --- MdeModulePkg/Application/CapsuleApp/CapsuleOnDisk.c | 2 +- MdeModulePkg/Include/Library/UefiBootManagerLib.h | 3 ++- MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c| 3 ++- 3 files changed, 5 insertions(+), 3

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

2019-02-19 Thread Chen A Chen
corresponding fields in MicrocodeHeader, and then calculate the CheckSum32 with MicrocodeHeader+MicrocodeBinary. This patch already verified on ICL platform. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Chen A Chen Cc: Ray Ni Cc: Eric Dong Cc: Zhang Chao B

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

2019-02-18 Thread Chen A Chen
corresponding fields in MicrocodeHeader, and then calculate the CheckSum32 with MicrocodeHeader+MicrocodeBinary. This patch already verified on ICL platform. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Chen A Chen Cc: Ray Ni Cc: Eric Dong Cc: Zhang Chao B

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

2019-02-17 Thread Chen A Chen
corresponding fields in MicrocodeHeader, and then calculate the CheckSum32 with MicrocodeHeader+MicrocodeBinary. This patch already verified on ICL platform. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Chen A Chen Cc: Ray Ni Cc: Eric Dong --- UefiCpuPkg/Library

[edk2] [PATCH v3] MdeModulePkg/CapsuleApp: Fix memory leak issue.

2019-02-12 Thread Chen A Chen
Agreement 1.1 Signed-off-by: Chen A Chen --- MdeModulePkg/Application/CapsuleApp/CapsuleDump.c | 87 --- 1 file changed, 60 insertions(+), 27 deletions(-) diff --git a/MdeModulePkg/Application/CapsuleApp/CapsuleDump.c b/MdeModulePkg/Application/CapsuleApp/CapsuleDump.c index

[edk2] [PATCH v2] MdeModulePkg/CapsuleApp: Fix memory leak issue.

2019-02-11 Thread Chen A Chen
Agreement 1.1 Signed-off-by: Chen A Chen --- MdeModulePkg/Application/CapsuleApp/CapsuleDump.c | 83 --- 1 file changed, 58 insertions(+), 25 deletions(-) diff --git a/MdeModulePkg/Application/CapsuleApp/CapsuleDump.c b/MdeModulePkg/Application/CapsuleApp/CapsuleDump.c index

[edk2] [PATCH] MdeModulePkg/CapsuleApp: Fix memory leak issue.

2019-02-10 Thread Chen A Chen
Agreement 1.1 Signed-off-by: Chen A Chen --- MdeModulePkg/Application/CapsuleApp/CapsuleDump.c | 81 --- 1 file changed, 56 insertions(+), 25 deletions(-) diff --git a/MdeModulePkg/Application/CapsuleApp/CapsuleDump.c b/MdeModulePkg/Application/CapsuleApp/CapsuleDump.c index

[edk2] [PATCH] MdeModulePkg/CapsuleApp: Fix potential NULL pointer dereference issue

2019-02-10 Thread Chen A Chen
Signed-off-by: Chen A Chen --- MdeModulePkg/Application/CapsuleApp/CapsuleDump.c | 23 +- .../Application/CapsuleApp/CapsuleOnDisk.c | 5 - 2 files changed, 18 insertions(+), 10 deletions(-) diff --git a/MdeModulePkg/Application/CapsuleApp/CapsuleDump.c b

[edk2] [PATCH] FatPkg/FatPei/Gpt.c: Fix uninitialized variable issue

2019-01-31 Thread Chen A Chen
Uninitialized pointer variable may randomly point to a block of memory. In This case, FreePool function will free a block of memory that is not belongs to this function. Cc: Ruiyu Ni Cc: Hao Wu Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Chen A Chen --- FatPkg

[edk2] [PATCH] MdeModulePkg/CapsuleApp: Fix potential NULL pointer dereference issue

2019-01-31 Thread Chen A Chen
To avoid potential NULL pointer dereference issue. Initialize them at the beginning of the function. Cc: Jian J Wang Cc: Hao Wu Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Chen A Chen --- MdeModulePkg/Application/CapsuleApp/CapsuleApp.c| 5 +++-- MdeModulePkg

[edk2] [PATCH v4 1/4] MdePkg/UefiSpec.h: Add definition to support Capsule-on-Disk feature

2019-01-30 Thread Chen A Chen
BZ:https://bugzilla.tianocore.org/show_bug.cgi?id=1482 UEFI Spec define this definition to support Capsule-on-Disk. Cc: Michael D Kinney Cc: Liming Gao Cc: Zhang Chao B Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Chen A Chen --- MdePkg/Include/Uefi/UefiSpec.h | 5

[edk2] [PATCH v4 0/4] Introduce CapsuleApp patch v4

2019-01-30 Thread Chen A Chen
No functionality change. Fix ECC and code style issue. Already pass CR process. https://git-amr-7.devtools.intel.com/gerrit/#/c/39023/ Chen A Chen (4): MdePkg/UefiSpec.h: Add definition to support Capsule-on-Disk feature MdeModulePkg/CapsuleApp: Add a function used to get next DevicePath

[edk2] [PATCH v4 3/4] MdeModulePkg/CapsuleApp: Add functions to support Capsule-on-Disk

2019-01-30 Thread Chen A Chen
BZ:https://bugzilla.tianocore.org/show_bug.cgi?id=1482 This file provide some basic function to support Capsule-on-Disk. Cc: Jian J Wang Cc: Hao Wu Cc: Zhang Chao B Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Chen A Chen Reviewed-by: Jian J Wang

[edk2] [PATCH v4 2/4] MdeModulePkg/CapsuleApp: Add a function used to get next DevicePath

2019-01-30 Thread Chen A Chen
-by: Chen A Chen Reviewed-by: Jian J Wang --- MdeModulePkg/Include/Library/UefiBootManagerLib.h | 21 +++- MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c | 24 ++- 2 files changed, 43 insertions(+), 2 deletions(-) diff --git a/MdeModulePkg/Include/Library

[edk2] [PATCH v4 4/4] MdeModulePkg/CapsuleApp: Enhance CapsuleApp to support Capsule-on-Disk

2019-01-30 Thread Chen A Chen
this feature on Denlow platform, success to update capsule via hard disk with -OD option. Cc: Jian J Wang Cc: Hao Wu Cc: Zhang Chao B Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Chen A Chen Reviewed-by: Jian J Wang --- MdeModulePkg/Application/CapsuleApp/CapsuleApp.c

[edk2] [PATCH v3 4/4] MdeModulePkg/CapsuleApp: Enhance CapsuleApp to support Capsule-on-Disk

2019-01-28 Thread Chen A Chen
this feature on Denlow platform, success to update capsule via hard disk with -OD option. Cc: Jian J Wang Cc: Hao Wu Cc: Zhang Chao B Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Chen A Chen --- MdeModulePkg/Application/CapsuleApp/CapsuleApp.c | 155 +- MdeModulePkg

[edk2] [PATCH v3 0/4] Introduce CapsuleApp patch v3

2019-01-28 Thread Chen A Chen
Fix Typo and code style issue, no any function change. According to package owner's input, Split this patch to smaller granularity. Chen A Chen (4): MdePkg/UefiSpec.h: Add definition to support Capsule-on-Disk feature MdeModulePkg/CapsuleApp: Add a function used to get next DevicePath

[edk2] [PATCH v3 3/4] MdeModulePkg/CapsuleApp: Add functions to support Capsule-on-Disk

2019-01-28 Thread Chen A Chen
BZ:https://bugzilla.tianocore.org/show_bug.cgi?id=1482 This file provide some basic function to support Capsule-on-Disk. Cc: Jian J Wang Cc: Hao Wu Cc: Zhang Chao B Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Chen A Chen --- .../Application/CapsuleApp

[edk2] [PATCH v3 1/4] MdePkg/UefiSpec.h: Add definition to support Capsule-on-Disk feature

2019-01-28 Thread Chen A Chen
BZ:https://bugzilla.tianocore.org/show_bug.cgi?id=1482 UEFI Spec define this definition to support Capsule-on-Disk. Cc: Michael D Kinney Cc: Liming Gao Cc: Zhang Chao B Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Chen A Chen --- MdePkg/Include/Uefi/UefiSpec.h | 5

[edk2] [PATCH v3 2/4] MdeModulePkg/CapsuleApp: Add a function used to get next DevicePath

2019-01-28 Thread Chen A Chen
-by: Chen A Chen --- MdeModulePkg/Include/Library/UefiBootManagerLib.h | 21 +++- MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c | 24 ++- 2 files changed, 43 insertions(+), 2 deletions(-) diff --git a/MdeModulePkg/Include/Library/UefiBootManagerLib.h b

[edk2] [PATCH v3 3/3] FatPkg: Add GPT check in FatPei to support Capsule-on-Disk feature.

2019-01-28 Thread Chen A Chen
: TianoCore Contribution Agreement 1.1 Signed-off-by: Chen A Chen Reviewed-by: Hao Wu --- FatPkg/FatPei/FatLitePeim.h | 3 +- FatPkg/FatPei/FatPei.inf| 3 + FatPkg/FatPei/Gpt.c | 548 FatPkg/FatPei/Part.c| 36 ++- 4 files changed

[edk2] [PATCH v2 0/3] FatPkg/GPT: Introduce GPT patch v3

2019-01-28 Thread Chen A Chen
No function change, fix code style issue. Chen A Chen (3): FatPkg: Break down Part.c file. MdePkg/UefiGpt.h: Add new definition for enable GPT support FatPkg: Add GPT check in FatPei to support Capsule-on-Disk feature. FatPkg/FatPei/Eltorito.c | 239 ++ FatPkg/FatPei

[edk2] [PATCH v3 2/3] MdePkg/UefiGpt.h: Add new definition for enable GPT support

2019-01-28 Thread Chen A Chen
BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1470 This definition comes from UEFI Spec to support GPT in FatPei driver. Cc: Liming Gao Cc: Michael D Kinney Cc: Zhang Chao B Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Chen A Chen Reviewed-by: Liming Gao

[edk2] [PATCH v3 1/3] FatPkg: Break down Part.c file.

2019-01-28 Thread Chen A Chen
BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1470 Break down partition parsing logic to 2 parts, Eltorito and MBR. Cc: Ruiyu Ni Cc: Zhang Chao B Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Chen A Chen Reviewed-by: Hao Wu --- FatPkg/FatPei/Eltorito.c | 239

[edk2] [PATCH v2 0/2] CapsuleApp: Introduce Patch v2

2019-01-27 Thread Chen A Chen
Follow Gao,Liming and Yao,jiewen's comments, the MdeModulePkg should not depends on ShellPkg. Remove the first patch of v1 that was used to refine code with ShelLib, so the v2 has only 2 patch file. Chen A Chen (2): MdePkg/UefiSpec.h: Add definition to support Capsule-on-Disk feature

[edk2] [PATCH v2 0/3] FatPkg/GPT: Introduce GPT patch v2

2019-01-27 Thread Chen A Chen
*) For first patch, fix spelling error issue. *) For sencond pathc, add EFI_ prefix for GPT_PART_ENTRY_MIN_SIZE definition, Remove duplicated structure definition. *) Fix spelling error issue. Add calling FatFindGptPartitions logic in FatPei driver. Chen A Chen (3

[edk2] [PATCH v2 1/3] FatPkg: Break down Part.c file.

2019-01-27 Thread Chen A Chen
BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1470 Break down partition parsing logic to 2 parts, Eltorito and MBR. Cc: Ruiyu Ni Cc: Zhang Chao B Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Chen A Chen --- FatPkg/FatPei/Eltorito.c | 239

[edk2] [PATCH v2 2/3] MdePkg/UefiGpt.h: Add new definition for enable GPT support

2019-01-27 Thread Chen A Chen
BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1470 This definition comes from UEFI Spec and used to support GPT in FatPei driver. Cc: Liming Gao Cc: Michael D Kinney Cc: Zhang Chao B Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Chen A Chen --- MdePkg/Include

[edk2] [PATCH v2 3/3] FatPkg: Add GPT check in FatPei to support Capsule-on-Disk feature.

2019-01-27 Thread Chen A Chen
: TianoCore Contribution Agreement 1.1 Signed-off-by: Chen A Chen --- FatPkg/FatPei/FatLitePeim.h | 3 +- FatPkg/FatPei/FatPei.inf| 3 + FatPkg/FatPei/Gpt.c | 552 FatPkg/FatPei/Part.c| 16 +- 4 files changed, 570 insertions(+), 4

[edk2] [PATCH v2 2/2] MdeModulePkg/CapsuleApp: Enhance CapsuleApp to support Capsule-on-Disk.

2019-01-27 Thread Chen A Chen
-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Chen A Chen --- MdeModulePkg/Application/CapsuleApp/CapsuleApp.c | 153 +++- MdeModulePkg/Application/CapsuleApp/CapsuleApp.inf | 8 + MdeModulePkg/Application/CapsuleApp/CapsuleDump.c | 535 +- .../Application/CapsuleApp

[edk2] [PATCH v2 1/2] MdePkg/UefiSpec.h: Add definition to support Capsule-on-Disk feature.

2019-01-27 Thread Chen A Chen
BZ:https://bugzilla.tianocore.org/show_bug.cgi?id=1482 UEFI Spec define this definition to support Capsule-on-Disk. Cc: Michael D Kinney Cc: Liming Gao Cc: Zhang Chao B Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Chen A Chen --- MdePkg/Include/Uefi/UefiSpec.h | 5

[edk2] [PATCH 3/3] MdeModulePkg/CapsuleApp: Enhance CapsuleApp to support Capsule-on-Disk.

2019-01-24 Thread Chen A Chen
-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Chen A Chen --- MdeModulePkg/Application/CapsuleApp/CapsuleApp.c | 103 ++- MdeModulePkg/Application/CapsuleApp/CapsuleApp.inf | 8 + MdeModulePkg/Application/CapsuleApp/CapsuleDump.c | 535 +- .../Application/CapsuleApp

[edk2] [PATCH 2/3] MdePkg/UefiSpec.h: Add definition to support Capsule-on-Disk feature.

2019-01-24 Thread Chen A Chen
BZ:https://bugzilla.tianocore.org/show_bug.cgi?id=1482 UEFI Spec define this definition to support Capsule-on-Disk. Cc: Michael D Kinney Cc: Liming Gao Cc: Zhang Chao B Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Chen A Chen --- MdePkg/Include/Uefi/UefiSpec.h | 5

[edk2] [PATCH 1/3] MdeModulePkg/CapsuleApp: Refine code logic of parsing parameter.

2019-01-24 Thread Chen A Chen
BZ:https://bugzilla.tianocore.org/show_bug.cgi?id=1482 No change functionality, use ShellLib to parsing command line. Cc: Jian J Wang Cc: Hao Wu Cc: Zhang Chao B Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Chen A Chen --- MdeModulePkg/Application/CapsuleApp

[edk2] [PATCH 3/3] FatPkg: Add GPT check in FatPei to support Capsule-on-Disk feature.

2019-01-16 Thread Chen A Chen
: TianoCore Contribution Agreement 1.1 Signed-off-by: Chen A Chen --- FatPkg/FatPei/FatLitePeim.h | 1 + FatPkg/FatPei/FatPei.inf| 3 + FatPkg/FatPei/Gpt.c | 546 3 files changed, 550 insertions(+) create mode 100644 FatPkg/FatPei/Gpt.c

[edk2] [PATCH 2/2] MdePkg/UefiGpt.h: Add new definition for enable GPT support

2019-01-16 Thread Chen A Chen
BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1470 This two new definitions are defined for GPT in FatPei diver. Cc: Liming Gao Cc: Michael D Kinney Cc: Zhang Chao B Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Chen A Chen --- MdePkg/Include/Uefi/UefiGpt.h | 16

[edk2] [PATCH 1/2] FatPkg: Break down Part.c file.

2019-01-16 Thread Chen A Chen
BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1470 Break down partition parsing logic to 2 parts, Eltorito and MBR. Cc: Ruiyu Ni Cc: Zhang Chao B Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Chen A Chen --- FatPkg/FatPei/Eltorito.c | 239

[edk2] [PATCH] SecurityPkg: Remove dead code and inf redundant definitions.

2018-11-27 Thread Chen A Chen
Fix BZ1065, https://bugzilla.tianocore.org/show_bug.cgi?id=1065 Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Chen A Chen Cc: Zhang Chao B --- SecurityPkg/Tcg/MemoryOverwriteControl/TcgMor.inf | 1 - SecurityPkg/Tcg/Opal/OpalPassword/OpalAhciMode.c | 52

[edk2] [PATCH 3/3] SignedCapsulePkg: Remove the missing PalLib in DSC file.

2018-09-20 Thread Chen A Chen
The PalLib will remove in MdePkg, so remove this lib from DSC file. Cc: Jiewen Yao Cc: Michael D Kinney Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Chen A Chen --- SignedCapsulePkg/SignedCapsulePkg.dsc | 1 - 1 file changed, 1 deletion(-) diff --git

[edk2] [PATCH 2/3] MdeModulePkg: Remove the missing PalLib in DSC file.

2018-09-20 Thread Chen A Chen
The PalLib will remove in MdePkg, so remove this lib from DSC file. Cc: Star Zeng Cc: Eric Dong Cc: Michael D Kinney Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Chen A Chen --- MdeModulePkg/MdeModulePkg.dsc | 1 - 1 file changed, 1 deletion(-) diff --git

[edk2] [PATCH 1/3] IntelFrameworkModulePkg: Remove the missing PalLib in DSC file.

2018-09-20 Thread Chen A Chen
The PalLib will remove in MdePkg, so remove this lib from DSC file. Cc: Liming Gao Cc: Michael D Kinney Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Chen A Chen --- IntelFrameworkModulePkg/IntelFrameworkModulePkg.dsc | 1 - 1 file changed, 1 deletion(-) diff --git

[edk2] [PATCH V2 4/4] UefiCpuPkg: Removing ipf which is no longer supported from edk2.

2018-07-09 Thread Chen A Chen
Merge [Sources.Ia32, Sources.X64] to [Sources] after removing IPF. Also change other similar parts in this file. Cc: Eric Dong Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Chen A Chen --- .../Library/SecPeiDxeTimerLibUefiCpu/SecPeiDxeTimerLibUefiCpu.inf | 6

[edk2] [PATCH V2 1/4] CryptoPkg: Removing ipf which is no longer supported from edk2.

2018-07-09 Thread Chen A Chen
Michael D Kinney Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Chen A Chen --- CryptoPkg/CryptRuntimeDxe/CryptRuntime.c | 248 CryptoPkg/CryptRuntimeDxe/CryptRuntime.h | 186 - CryptoPkg/CryptRuntimeDxe/CryptRuntimeDxe